@rocicorp/zero 1.12.0-canary.8 → 1.12.0-canary.9

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 (516) hide show
  1. package/out/replicache/src/btree/node.d.ts +0 -2
  2. package/out/replicache/src/btree/node.d.ts.map +1 -1
  3. package/out/replicache/src/btree/node.js.map +1 -1
  4. package/out/replicache/src/connection-loop.d.ts.map +1 -1
  5. package/out/replicache/src/connection-loop.js +1 -1
  6. package/out/replicache/src/connection-loop.js.map +1 -1
  7. package/out/replicache/src/db/commit.d.ts +0 -1
  8. package/out/replicache/src/db/commit.d.ts.map +1 -1
  9. package/out/replicache/src/db/commit.js +1 -1
  10. package/out/replicache/src/db/commit.js.map +1 -1
  11. package/out/replicache/src/db/write.d.ts +0 -2
  12. package/out/replicache/src/db/write.d.ts.map +1 -1
  13. package/out/replicache/src/db/write.js +1 -1
  14. package/out/replicache/src/db/write.js.map +1 -1
  15. package/out/replicache/src/deleted-clients.d.ts +0 -2
  16. package/out/replicache/src/deleted-clients.d.ts.map +1 -1
  17. package/out/replicache/src/deleted-clients.js +1 -1
  18. package/out/replicache/src/deleted-clients.js.map +1 -1
  19. package/out/replicache/src/frozen-json.d.ts +0 -1
  20. package/out/replicache/src/frozen-json.d.ts.map +1 -1
  21. package/out/replicache/src/frozen-json.js.map +1 -1
  22. package/out/replicache/src/index-defs.d.ts +0 -2
  23. package/out/replicache/src/index-defs.d.ts.map +1 -1
  24. package/out/replicache/src/index-defs.js +1 -1
  25. package/out/replicache/src/index-defs.js.map +1 -1
  26. package/out/replicache/src/kv/expo-sqlite/store.d.ts +0 -1
  27. package/out/replicache/src/kv/expo-sqlite/store.d.ts.map +1 -1
  28. package/out/replicache/src/kv/expo-sqlite/store.js +1 -1
  29. package/out/replicache/src/kv/expo-sqlite/store.js.map +1 -1
  30. package/out/replicache/src/kv/idb-store.js +1 -1
  31. package/out/replicache/src/kv/idb-store.js.map +1 -1
  32. package/out/replicache/src/kv/throw-if-closed.d.ts +0 -3
  33. package/out/replicache/src/kv/throw-if-closed.d.ts.map +1 -1
  34. package/out/replicache/src/kv/throw-if-closed.js.map +1 -1
  35. package/out/replicache/src/persist/client-group-gc.d.ts +0 -7
  36. package/out/replicache/src/persist/client-group-gc.d.ts.map +1 -1
  37. package/out/replicache/src/persist/client-group-gc.js +1 -1
  38. package/out/replicache/src/persist/client-group-gc.js.map +1 -1
  39. package/out/replicache/src/process-scheduler.js +1 -1
  40. package/out/replicache/src/process-scheduler.js.map +1 -1
  41. package/out/replicache/src/replicache-impl.d.ts +2 -7
  42. package/out/replicache/src/replicache-impl.d.ts.map +1 -1
  43. package/out/replicache/src/replicache-impl.js +1 -1
  44. package/out/replicache/src/replicache-impl.js.map +1 -1
  45. package/out/replicache/src/sync/patch.d.ts +0 -5
  46. package/out/replicache/src/sync/patch.d.ts.map +1 -1
  47. package/out/replicache/src/sync/patch.js +1 -1
  48. package/out/replicache/src/sync/patch.js.map +1 -1
  49. package/out/replicache/src/sync/pull.d.ts +0 -1
  50. package/out/replicache/src/sync/pull.d.ts.map +1 -1
  51. package/out/replicache/src/sync/pull.js.map +1 -1
  52. package/out/replicache/src/sync/push.d.ts +2 -1
  53. package/out/replicache/src/sync/push.d.ts.map +1 -1
  54. package/out/replicache/src/sync/push.js.map +1 -1
  55. package/out/replicache/src/types.d.ts +2 -1
  56. package/out/replicache/src/types.d.ts.map +1 -1
  57. package/out/shared/src/asserts.d.ts +0 -5
  58. package/out/shared/src/asserts.d.ts.map +1 -1
  59. package/out/shared/src/asserts.js +1 -1
  60. package/out/shared/src/asserts.js.map +1 -1
  61. package/out/shared/src/browser-env.d.ts +0 -17
  62. package/out/shared/src/browser-env.d.ts.map +1 -1
  63. package/out/shared/src/browser-env.js.map +1 -1
  64. package/out/shared/src/deep-clone.d.ts +0 -1
  65. package/out/shared/src/deep-clone.d.ts.map +1 -1
  66. package/out/shared/src/deep-clone.js +1 -1
  67. package/out/shared/src/deep-clone.js.map +1 -1
  68. package/out/shared/src/document-visible.js +1 -1
  69. package/out/shared/src/document-visible.js.map +1 -1
  70. package/out/shared/src/expand.d.ts +0 -3
  71. package/out/shared/src/expand.d.ts.map +1 -1
  72. package/out/shared/src/immutable.d.ts +1 -1
  73. package/out/shared/src/immutable.d.ts.map +1 -1
  74. package/out/shared/src/iterables.d.ts +0 -1
  75. package/out/shared/src/iterables.d.ts.map +1 -1
  76. package/out/shared/src/iterables.js.map +1 -1
  77. package/out/shared/src/logging-test-utils.js +1 -1
  78. package/out/shared/src/logging-test-utils.js.map +1 -1
  79. package/out/shared/src/options-types.d.ts +1 -1
  80. package/out/shared/src/options-types.d.ts.map +1 -1
  81. package/out/shared/src/options.d.ts +2 -3
  82. package/out/shared/src/options.d.ts.map +1 -1
  83. package/out/shared/src/options.js +1 -1
  84. package/out/shared/src/options.js.map +1 -1
  85. package/out/shared/src/promise-race.js +1 -1
  86. package/out/shared/src/promise-race.js.map +1 -1
  87. package/out/shared/src/queue.js +1 -1
  88. package/out/shared/src/queue.js.map +1 -1
  89. package/out/shared/src/resolved-promises.d.ts +0 -4
  90. package/out/shared/src/resolved-promises.d.ts.map +1 -1
  91. package/out/shared/src/resolved-promises.js +0 -1
  92. package/out/shared/src/resolved-promises.js.map +1 -1
  93. package/out/shared/src/resolver.d.ts +9 -0
  94. package/out/shared/src/resolver.d.ts.map +1 -0
  95. package/out/shared/src/resolver.js +6 -0
  96. package/out/shared/src/resolver.js.map +1 -0
  97. package/out/shared/src/sleep.js +1 -1
  98. package/out/shared/src/sleep.js.map +1 -1
  99. package/out/shared/src/tdigest.d.ts +0 -1
  100. package/out/shared/src/tdigest.d.ts.map +1 -1
  101. package/out/shared/src/tdigest.js.map +1 -1
  102. package/out/z2s/src/sql.d.ts +1 -5
  103. package/out/z2s/src/sql.d.ts.map +1 -1
  104. package/out/z2s/src/sql.js.map +1 -1
  105. package/out/zero/package.js +2 -3
  106. package/out/zero/package.js.map +1 -1
  107. package/out/zero/src/zero-cache-dev.js +1 -1
  108. package/out/zero/src/zero-cache-dev.js.map +1 -1
  109. package/out/zero-cache/src/config/zero-config.d.ts +14 -11
  110. package/out/zero-cache/src/config/zero-config.d.ts.map +1 -1
  111. package/out/zero-cache/src/config/zero-config.js +23 -0
  112. package/out/zero-cache/src/config/zero-config.js.map +1 -1
  113. package/out/zero-cache/src/db/migration-lite.js.map +1 -1
  114. package/out/zero-cache/src/db/migration.js +1 -1
  115. package/out/zero-cache/src/db/migration.js.map +1 -1
  116. package/out/zero-cache/src/db/pg-copy-binary.js +1 -1
  117. package/out/zero-cache/src/db/pg-copy-binary.js.map +1 -1
  118. package/out/zero-cache/src/db/pg-type-parser.js.map +1 -1
  119. package/out/zero-cache/src/db/specs.d.ts +3 -4
  120. package/out/zero-cache/src/db/specs.d.ts.map +1 -1
  121. package/out/zero-cache/src/db/specs.js +5 -7
  122. package/out/zero-cache/src/db/specs.js.map +1 -1
  123. package/out/zero-cache/src/db/transaction-pool.js +2 -2
  124. package/out/zero-cache/src/db/transaction-pool.js.map +1 -1
  125. package/out/zero-cache/src/observability/events.js +1 -1
  126. package/out/zero-cache/src/observability/events.js.map +1 -1
  127. package/out/zero-cache/src/server/change-streamer.js +1 -1
  128. package/out/zero-cache/src/server/change-streamer.js.map +1 -1
  129. package/out/zero-cache/src/server/main.js +1 -1
  130. package/out/zero-cache/src/server/main.js.map +1 -1
  131. package/out/zero-cache/src/server/runner/run-worker.js +1 -1
  132. package/out/zero-cache/src/server/runner/run-worker.js.map +1 -1
  133. package/out/zero-cache/src/services/change-source/common/backfill-manager.js +1 -1
  134. package/out/zero-cache/src/services/change-source/common/backfill-manager.js.map +1 -1
  135. package/out/zero-cache/src/services/change-source/common/change-stream-multiplexer.js +1 -1
  136. package/out/zero-cache/src/services/change-source/common/change-stream-multiplexer.js.map +1 -1
  137. package/out/zero-cache/src/services/change-source/common/replica-restore.js.map +1 -1
  138. package/out/zero-cache/src/services/change-source/custom/change-source.js +1 -1
  139. package/out/zero-cache/src/services/change-source/custom/change-source.js.map +1 -1
  140. package/out/zero-cache/src/services/change-source/pg/backfill-stream.js +1 -1
  141. package/out/zero-cache/src/services/change-source/pg/backfill-stream.js.map +1 -1
  142. package/out/zero-cache/src/services/change-source/pg/change-source.js +1 -1
  143. package/out/zero-cache/src/services/change-source/pg/change-source.js.map +1 -1
  144. package/out/zero-cache/src/services/change-source/pg/initial-sync.js +1 -1
  145. package/out/zero-cache/src/services/change-source/pg/initial-sync.js.map +1 -1
  146. package/out/zero-cache/src/services/change-source/pg/lsn.d.ts +0 -2
  147. package/out/zero-cache/src/services/change-source/pg/lsn.d.ts.map +1 -1
  148. package/out/zero-cache/src/services/change-source/pg/lsn.js.map +1 -1
  149. package/out/zero-cache/src/services/change-source/pg/replication-slots.js +1 -1
  150. package/out/zero-cache/src/services/change-source/pg/replication-slots.js.map +1 -1
  151. package/out/zero-cache/src/services/change-source/pg/schema/ddl.d.ts +0 -12
  152. package/out/zero-cache/src/services/change-source/pg/schema/ddl.d.ts.map +1 -1
  153. package/out/zero-cache/src/services/change-source/pg/schema/ddl.js +5 -3
  154. package/out/zero-cache/src/services/change-source/pg/schema/ddl.js.map +1 -1
  155. package/out/zero-cache/src/services/change-source/pg/schema/index-predicate.d.ts +1 -1
  156. package/out/zero-cache/src/services/change-source/pg/schema/index-predicate.d.ts.map +1 -1
  157. package/out/zero-cache/src/services/change-source/pg/schema/index-predicate.js.map +1 -1
  158. package/out/zero-cache/src/services/change-source/pg/schema/validation.d.ts +0 -1
  159. package/out/zero-cache/src/services/change-source/pg/schema/validation.d.ts.map +1 -1
  160. package/out/zero-cache/src/services/change-source/pg/schema/validation.js.map +1 -1
  161. package/out/zero-cache/src/services/change-streamer/backup-monitor.js +1 -1
  162. package/out/zero-cache/src/services/change-streamer/backup-monitor.js.map +1 -1
  163. package/out/zero-cache/src/services/change-streamer/broadcast.js +1 -1
  164. package/out/zero-cache/src/services/change-streamer/broadcast.js.map +1 -1
  165. package/out/zero-cache/src/services/change-streamer/change-streamer-http.js +1 -1
  166. package/out/zero-cache/src/services/change-streamer/change-streamer-http.js.map +1 -1
  167. package/out/zero-cache/src/services/change-streamer/change-streamer-service.js +1 -1
  168. package/out/zero-cache/src/services/change-streamer/change-streamer-service.js.map +1 -1
  169. package/out/zero-cache/src/services/change-streamer/change-streamer.js +1 -1
  170. package/out/zero-cache/src/services/change-streamer/change-streamer.js.map +1 -1
  171. package/out/zero-cache/src/services/change-streamer/drain-tracker.js +1 -1
  172. package/out/zero-cache/src/services/change-streamer/drain-tracker.js.map +1 -1
  173. package/out/zero-cache/src/services/change-streamer/litestream3-prometheus-poller.js +2 -2
  174. package/out/zero-cache/src/services/change-streamer/litestream3-prometheus-poller.js.map +1 -1
  175. package/out/zero-cache/src/services/change-streamer/restore-admission.js +2 -2
  176. package/out/zero-cache/src/services/change-streamer/restore-admission.js.map +1 -1
  177. package/out/zero-cache/src/services/change-streamer/schema/tables.js +1 -1
  178. package/out/zero-cache/src/services/change-streamer/schema/tables.js.map +1 -1
  179. package/out/zero-cache/src/services/change-streamer/snapshot-message.js +2 -3
  180. package/out/zero-cache/src/services/change-streamer/snapshot-message.js.map +1 -1
  181. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-catchup.js +2 -2
  182. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-catchup.js.map +1 -1
  183. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-read-router.js.map +1 -1
  184. package/out/zero-cache/src/services/change-streamer/storer.js +1 -1
  185. package/out/zero-cache/src/services/change-streamer/storer.js.map +1 -1
  186. package/out/zero-cache/src/services/change-streamer/subscribe.js +1 -1
  187. package/out/zero-cache/src/services/change-streamer/subscribe.js.map +1 -1
  188. package/out/zero-cache/src/services/change-streamer/subscriber.js +1 -1
  189. package/out/zero-cache/src/services/change-streamer/subscriber.js.map +1 -1
  190. package/out/zero-cache/src/services/life-cycle.js +1 -1
  191. package/out/zero-cache/src/services/life-cycle.js.map +1 -1
  192. package/out/zero-cache/src/services/litestream/commands.js +1 -1
  193. package/out/zero-cache/src/services/litestream/commands.js.map +1 -1
  194. package/out/zero-cache/src/services/litestream/metrics.js.map +1 -1
  195. package/out/zero-cache/src/services/mutagen/mutagen.js +2 -2
  196. package/out/zero-cache/src/services/mutagen/mutagen.js.map +1 -1
  197. package/out/zero-cache/src/services/plannerz.d.ts +4 -12
  198. package/out/zero-cache/src/services/plannerz.d.ts.map +1 -1
  199. package/out/zero-cache/src/services/plannerz.js +1 -3
  200. package/out/zero-cache/src/services/plannerz.js.map +1 -1
  201. package/out/zero-cache/src/services/replicator/change-log-db.js +1 -1
  202. package/out/zero-cache/src/services/replicator/change-log-db.js.map +1 -1
  203. package/out/zero-cache/src/services/replicator/change-log-stream-writer.js +1 -1
  204. package/out/zero-cache/src/services/replicator/change-log-stream-writer.js.map +1 -1
  205. package/out/zero-cache/src/services/replicator/drain-handler.js +1 -1
  206. package/out/zero-cache/src/services/replicator/drain-handler.js.map +1 -1
  207. package/out/zero-cache/src/services/replicator/reporter/recorder.js +1 -1
  208. package/out/zero-cache/src/services/replicator/reporter/recorder.js.map +1 -1
  209. package/out/zero-cache/src/services/replicator/reporter/report-schema.d.ts +2 -11
  210. package/out/zero-cache/src/services/replicator/reporter/report-schema.d.ts.map +1 -1
  211. package/out/zero-cache/src/services/replicator/reporter/report-schema.js +1 -1
  212. package/out/zero-cache/src/services/replicator/reporter/report-schema.js.map +1 -1
  213. package/out/zero-cache/src/services/replicator/schema/change-log.d.ts +0 -10
  214. package/out/zero-cache/src/services/replicator/schema/change-log.d.ts.map +1 -1
  215. package/out/zero-cache/src/services/replicator/schema/change-log.js.map +1 -1
  216. package/out/zero-cache/src/services/replicator/schema/column-metadata.d.ts +0 -7
  217. package/out/zero-cache/src/services/replicator/schema/column-metadata.d.ts.map +1 -1
  218. package/out/zero-cache/src/services/replicator/schema/column-metadata.js +1 -1
  219. package/out/zero-cache/src/services/replicator/schema/column-metadata.js.map +1 -1
  220. package/out/zero-cache/src/services/replicator/write-worker-client.js +1 -1
  221. package/out/zero-cache/src/services/replicator/write-worker-client.js.map +1 -1
  222. package/out/zero-cache/src/services/running-state.js +1 -1
  223. package/out/zero-cache/src/services/running-state.js.map +1 -1
  224. package/out/zero-cache/src/services/view-syncer/client-handler.js.map +1 -1
  225. package/out/zero-cache/src/services/view-syncer/connection-context-manager.js.map +1 -1
  226. package/out/zero-cache/src/services/view-syncer/cvr-store.js +1 -1
  227. package/out/zero-cache/src/services/view-syncer/cvr-store.js.map +1 -1
  228. package/out/zero-cache/src/services/view-syncer/cvr.js.map +1 -1
  229. package/out/zero-cache/src/services/view-syncer/drain-coordinator.js +1 -1
  230. package/out/zero-cache/src/services/view-syncer/drain-coordinator.js.map +1 -1
  231. package/out/zero-cache/src/services/view-syncer/pipeline-driver.js.map +1 -1
  232. package/out/zero-cache/src/services/view-syncer/query-stats.js.map +1 -1
  233. package/out/zero-cache/src/services/view-syncer/row-record-cache.js +1 -1
  234. package/out/zero-cache/src/services/view-syncer/row-record-cache.js.map +1 -1
  235. package/out/zero-cache/src/services/view-syncer/schema/cvr.js +1 -1
  236. package/out/zero-cache/src/services/view-syncer/schema/cvr.js.map +1 -1
  237. package/out/zero-cache/src/services/view-syncer/schema/types.js +3 -17
  238. package/out/zero-cache/src/services/view-syncer/schema/types.js.map +1 -1
  239. package/out/zero-cache/src/services/view-syncer/snapshotter.js +1 -1
  240. package/out/zero-cache/src/services/view-syncer/snapshotter.js.map +1 -1
  241. package/out/zero-cache/src/services/view-syncer/view-syncer.js +10 -10
  242. package/out/zero-cache/src/services/view-syncer/view-syncer.js.map +1 -1
  243. package/out/zero-cache/src/types/lite.d.ts +0 -1
  244. package/out/zero-cache/src/types/lite.d.ts.map +1 -1
  245. package/out/zero-cache/src/types/lite.js +2 -2
  246. package/out/zero-cache/src/types/lite.js.map +1 -1
  247. package/out/zero-cache/src/types/pg-types.d.ts +0 -40
  248. package/out/zero-cache/src/types/pg-types.d.ts.map +1 -1
  249. package/out/zero-cache/src/types/pg-types.js.map +1 -1
  250. package/out/zero-cache/src/types/poke-chunk.js +1 -1
  251. package/out/zero-cache/src/types/poke-chunk.js.map +1 -1
  252. package/out/zero-cache/src/types/row-key.d.ts +0 -5
  253. package/out/zero-cache/src/types/row-key.d.ts.map +1 -1
  254. package/out/zero-cache/src/types/row-key.js.map +1 -1
  255. package/out/zero-cache/src/types/streams.js +1 -1
  256. package/out/zero-cache/src/types/streams.js.map +1 -1
  257. package/out/zero-cache/src/types/subscription.js +1 -1
  258. package/out/zero-cache/src/types/subscription.js.map +1 -1
  259. package/out/zero-cache/src/types/websocket-handoff.d.ts +0 -6
  260. package/out/zero-cache/src/types/websocket-handoff.d.ts.map +1 -1
  261. package/out/zero-cache/src/types/websocket-handoff.js +8 -2
  262. package/out/zero-cache/src/types/websocket-handoff.js.map +1 -1
  263. package/out/zero-cache/src/types/ws.d.ts +2 -1
  264. package/out/zero-cache/src/types/ws.d.ts.map +1 -1
  265. package/out/zero-cache/src/types/ws.js +1 -1
  266. package/out/zero-cache/src/types/ws.js.map +1 -1
  267. package/out/zero-cache/src/workers/connection.js +4 -1
  268. package/out/zero-cache/src/workers/connection.js.map +1 -1
  269. package/out/zero-cache/src/workers/mutator.js +1 -1
  270. package/out/zero-cache/src/workers/mutator.js.map +1 -1
  271. package/out/zero-cache/src/workers/syncer.js +36 -2
  272. package/out/zero-cache/src/workers/syncer.js.map +1 -1
  273. package/out/zero-client/src/client/active-clients-manager.d.ts.map +1 -1
  274. package/out/zero-client/src/client/active-clients-manager.js +1 -1
  275. package/out/zero-client/src/client/active-clients-manager.js.map +1 -1
  276. package/out/zero-client/src/client/connection-manager.js +1 -1
  277. package/out/zero-client/src/client/connection-manager.js.map +1 -1
  278. package/out/zero-client/src/client/crud.d.ts +2 -8
  279. package/out/zero-client/src/client/crud.d.ts.map +1 -1
  280. package/out/zero-client/src/client/crud.js +1 -1
  281. package/out/zero-client/src/client/crud.js.map +1 -1
  282. package/out/zero-client/src/client/custom.d.ts +0 -2
  283. package/out/zero-client/src/client/custom.d.ts.map +1 -1
  284. package/out/zero-client/src/client/custom.js +1 -1
  285. package/out/zero-client/src/client/custom.js.map +1 -1
  286. package/out/zero-client/src/client/enable-analytics.d.ts +0 -1
  287. package/out/zero-client/src/client/enable-analytics.d.ts.map +1 -1
  288. package/out/zero-client/src/client/enable-analytics.js +2 -1
  289. package/out/zero-client/src/client/enable-analytics.js.map +1 -1
  290. package/out/zero-client/src/client/error.d.ts +4 -5
  291. package/out/zero-client/src/client/error.d.ts.map +1 -1
  292. package/out/zero-client/src/client/error.js.map +1 -1
  293. package/out/zero-client/src/client/keys.d.ts +0 -1
  294. package/out/zero-client/src/client/keys.d.ts.map +1 -1
  295. package/out/zero-client/src/client/keys.js +4 -2
  296. package/out/zero-client/src/client/keys.js.map +1 -1
  297. package/out/zero-client/src/client/mutation-tracker.d.ts.map +1 -1
  298. package/out/zero-client/src/client/mutation-tracker.js +1 -1
  299. package/out/zero-client/src/client/mutation-tracker.js.map +1 -1
  300. package/out/zero-client/src/client/options.d.ts +0 -4
  301. package/out/zero-client/src/client/options.d.ts.map +1 -1
  302. package/out/zero-client/src/client/options.js.map +1 -1
  303. package/out/zero-client/src/client/replicache-types.d.ts +3 -2
  304. package/out/zero-client/src/client/replicache-types.d.ts.map +1 -1
  305. package/out/zero-client/src/client/version.js +1 -1
  306. package/out/zero-client/src/client/zero-poke-handler.d.ts +1 -2
  307. package/out/zero-client/src/client/zero-poke-handler.d.ts.map +1 -1
  308. package/out/zero-client/src/client/zero-poke-handler.js +1 -1
  309. package/out/zero-client/src/client/zero-poke-handler.js.map +1 -1
  310. package/out/zero-client/src/client/zero.d.ts +1 -5
  311. package/out/zero-client/src/client/zero.d.ts.map +1 -1
  312. package/out/zero-client/src/client/zero.js +1 -1
  313. package/out/zero-client/src/client/zero.js.map +1 -1
  314. package/out/zero-client/src/types/client-state.d.ts +0 -6
  315. package/out/zero-client/src/types/client-state.d.ts.map +1 -1
  316. package/out/zero-permissions/src/permissions.d.ts +1 -12
  317. package/out/zero-permissions/src/permissions.d.ts.map +1 -1
  318. package/out/zero-permissions/src/permissions.js +1 -2
  319. package/out/zero-permissions/src/permissions.js.map +1 -1
  320. package/out/zero-protocol/src/ast.d.ts +0 -4
  321. package/out/zero-protocol/src/ast.d.ts.map +1 -1
  322. package/out/zero-protocol/src/ast.js +1 -2
  323. package/out/zero-protocol/src/ast.js.map +1 -1
  324. package/out/zero-protocol/src/change-desired-queries.d.ts +0 -20
  325. package/out/zero-protocol/src/change-desired-queries.d.ts.map +1 -1
  326. package/out/zero-protocol/src/change-desired-queries.js.map +1 -1
  327. package/out/zero-protocol/src/client-schema.d.ts +2 -5
  328. package/out/zero-protocol/src/client-schema.d.ts.map +1 -1
  329. package/out/zero-protocol/src/client-schema.js +1 -1
  330. package/out/zero-protocol/src/client-schema.js.map +1 -1
  331. package/out/zero-protocol/src/close-connection.d.ts +0 -8
  332. package/out/zero-protocol/src/close-connection.d.ts.map +1 -1
  333. package/out/zero-protocol/src/close-connection.js +1 -1
  334. package/out/zero-protocol/src/close-connection.js.map +1 -1
  335. package/out/zero-protocol/src/connect.d.ts +0 -12
  336. package/out/zero-protocol/src/connect.d.ts.map +1 -1
  337. package/out/zero-protocol/src/connect.js +1 -1
  338. package/out/zero-protocol/src/connect.js.map +1 -1
  339. package/out/zero-protocol/src/custom-queries.d.ts +3 -17
  340. package/out/zero-protocol/src/custom-queries.d.ts.map +1 -1
  341. package/out/zero-protocol/src/custom-queries.js +1 -1
  342. package/out/zero-protocol/src/custom-queries.js.map +1 -1
  343. package/out/zero-protocol/src/data.d.ts +0 -1
  344. package/out/zero-protocol/src/data.d.ts.map +1 -1
  345. package/out/zero-protocol/src/data.js +1 -1
  346. package/out/zero-protocol/src/data.js.map +1 -1
  347. package/out/zero-protocol/src/down.d.ts +27 -27
  348. package/out/zero-protocol/src/inspect-down.d.ts +82 -84
  349. package/out/zero-protocol/src/inspect-down.d.ts.map +1 -1
  350. package/out/zero-protocol/src/inspect-down.js +1 -1
  351. package/out/zero-protocol/src/inspect-down.js.map +1 -1
  352. package/out/zero-protocol/src/inspect-up.d.ts +0 -28
  353. package/out/zero-protocol/src/inspect-up.d.ts.map +1 -1
  354. package/out/zero-protocol/src/inspect-up.js +1 -1
  355. package/out/zero-protocol/src/inspect-up.js.map +1 -1
  356. package/out/zero-protocol/src/mutate-server.d.ts +0 -21
  357. package/out/zero-protocol/src/mutate-server.d.ts.map +1 -1
  358. package/out/zero-protocol/src/mutate-server.js +1 -1
  359. package/out/zero-protocol/src/mutate-server.js.map +1 -1
  360. package/out/zero-protocol/src/mutation-type-enum.d.ts +0 -1
  361. package/out/zero-protocol/src/mutation-type-enum.d.ts.map +1 -1
  362. package/out/zero-protocol/src/mutation-type-enum.js.map +1 -1
  363. package/out/zero-protocol/src/mutation.d.ts +2 -4
  364. package/out/zero-protocol/src/mutation.d.ts.map +1 -1
  365. package/out/zero-protocol/src/mutation.js +1 -1
  366. package/out/zero-protocol/src/mutation.js.map +1 -1
  367. package/out/zero-protocol/src/mutations-patch.d.ts +0 -33
  368. package/out/zero-protocol/src/mutations-patch.d.ts.map +1 -1
  369. package/out/zero-protocol/src/mutations-patch.js +1 -1
  370. package/out/zero-protocol/src/mutations-patch.js.map +1 -1
  371. package/out/zero-protocol/src/ping.d.ts +0 -2
  372. package/out/zero-protocol/src/ping.d.ts.map +1 -1
  373. package/out/zero-protocol/src/ping.js +1 -1
  374. package/out/zero-protocol/src/ping.js.map +1 -1
  375. package/out/zero-protocol/src/poke.d.ts +3 -2
  376. package/out/zero-protocol/src/poke.d.ts.map +1 -1
  377. package/out/zero-protocol/src/poke.js +1 -1
  378. package/out/zero-protocol/src/poke.js.map +1 -1
  379. package/out/zero-protocol/src/pong.d.ts +0 -2
  380. package/out/zero-protocol/src/pong.d.ts.map +1 -1
  381. package/out/zero-protocol/src/pong.js +1 -1
  382. package/out/zero-protocol/src/pong.js.map +1 -1
  383. package/out/zero-protocol/src/pull.d.ts +2 -7
  384. package/out/zero-protocol/src/pull.d.ts.map +1 -1
  385. package/out/zero-protocol/src/pull.js +1 -1
  386. package/out/zero-protocol/src/pull.js.map +1 -1
  387. package/out/zero-protocol/src/push.d.ts +1 -3
  388. package/out/zero-protocol/src/push.d.ts.map +1 -1
  389. package/out/zero-protocol/src/push.js +1 -1
  390. package/out/zero-protocol/src/push.js.map +1 -1
  391. package/out/zero-protocol/src/queries-patch.d.ts +0 -16
  392. package/out/zero-protocol/src/queries-patch.d.ts.map +1 -1
  393. package/out/zero-protocol/src/queries-patch.js +1 -1
  394. package/out/zero-protocol/src/queries-patch.js.map +1 -1
  395. package/out/zero-protocol/src/query-server.d.ts +2 -41
  396. package/out/zero-protocol/src/query-server.d.ts.map +1 -1
  397. package/out/zero-protocol/src/query-server.js +1 -1
  398. package/out/zero-protocol/src/query-server.js.map +1 -1
  399. package/out/zero-protocol/src/up.d.ts +42 -42
  400. package/out/zero-protocol/src/version.d.ts +0 -1
  401. package/out/zero-protocol/src/version.d.ts.map +1 -1
  402. package/out/zero-protocol/src/version.js.map +1 -1
  403. package/out/zero-react/src/use-query.js +1 -1
  404. package/out/zero-react/src/use-query.js.map +1 -1
  405. package/out/zero-schema/src/builder/relationship-builder.d.ts +0 -2
  406. package/out/zero-schema/src/builder/relationship-builder.d.ts.map +1 -1
  407. package/out/zero-schema/src/builder/relationship-builder.js.map +1 -1
  408. package/out/zero-schema/src/builder/table-builder.d.ts +1 -1
  409. package/out/zero-schema/src/builder/table-builder.d.ts.map +1 -1
  410. package/out/zero-schema/src/builder/table-builder.js +1 -1
  411. package/out/zero-schema/src/builder/table-builder.js.map +1 -1
  412. package/out/zero-schema/src/schema-config.d.ts +0 -1
  413. package/out/zero-schema/src/schema-config.d.ts.map +1 -1
  414. package/out/zero-schema/src/schema-config.js +1 -1
  415. package/out/zero-schema/src/schema-config.js.map +1 -1
  416. package/out/zero-schema/src/table-schema.d.ts +3 -11
  417. package/out/zero-schema/src/table-schema.d.ts.map +1 -1
  418. package/out/zero-server/src/queries/process-queries.d.ts +2 -4
  419. package/out/zero-server/src/queries/process-queries.d.ts.map +1 -1
  420. package/out/zero-server/src/queries/process-queries.js.map +1 -1
  421. package/out/zero-solid/src/solid-view.d.ts +0 -2
  422. package/out/zero-solid/src/solid-view.d.ts.map +1 -1
  423. package/out/zero-solid/src/solid-view.js +1 -1
  424. package/out/zero-solid/src/solid-view.js.map +1 -1
  425. package/out/zero-types/src/name-mapper.d.ts +2 -1
  426. package/out/zero-types/src/name-mapper.d.ts.map +1 -1
  427. package/out/zero-types/src/name-mapper.js.map +1 -1
  428. package/out/zero-types/src/schema-value.d.ts +3 -2
  429. package/out/zero-types/src/schema-value.d.ts.map +1 -1
  430. package/out/zero-types/src/schema.d.ts +1 -1
  431. package/out/zero-types/src/schema.d.ts.map +1 -1
  432. package/out/zql/src/builder/builder.d.ts +1 -11
  433. package/out/zql/src/builder/builder.d.ts.map +1 -1
  434. package/out/zql/src/builder/builder.js +1 -1
  435. package/out/zql/src/builder/builder.js.map +1 -1
  436. package/out/zql/src/builder/filter.d.ts +0 -1
  437. package/out/zql/src/builder/filter.d.ts.map +1 -1
  438. package/out/zql/src/builder/filter.js.map +1 -1
  439. package/out/zql/src/error.d.ts +0 -5
  440. package/out/zql/src/error.d.ts.map +1 -1
  441. package/out/zql/src/error.js.map +1 -1
  442. package/out/zql/src/ivm/constraint.d.ts +0 -7
  443. package/out/zql/src/ivm/constraint.d.ts.map +1 -1
  444. package/out/zql/src/ivm/constraint.js +1 -1
  445. package/out/zql/src/ivm/constraint.js.map +1 -1
  446. package/out/zql/src/ivm/data.d.ts +0 -1
  447. package/out/zql/src/ivm/data.d.ts.map +1 -1
  448. package/out/zql/src/ivm/data.js.map +1 -1
  449. package/out/zql/src/ivm/memory-source.d.ts +1 -2
  450. package/out/zql/src/ivm/memory-source.d.ts.map +1 -1
  451. package/out/zql/src/ivm/memory-source.js +1 -1
  452. package/out/zql/src/ivm/memory-source.js.map +1 -1
  453. package/out/zql/src/ivm/stream.d.ts +0 -1
  454. package/out/zql/src/ivm/stream.d.ts.map +1 -1
  455. package/out/zql/src/ivm/stream.js.map +1 -1
  456. package/out/zql/src/ivm/union-fan-in.d.ts +0 -1
  457. package/out/zql/src/ivm/union-fan-in.d.ts.map +1 -1
  458. package/out/zql/src/ivm/union-fan-in.js +1 -1
  459. package/out/zql/src/ivm/union-fan-in.js.map +1 -1
  460. package/out/zql/src/ivm/view-apply-change.d.ts +5 -35
  461. package/out/zql/src/ivm/view-apply-change.d.ts.map +1 -1
  462. package/out/zql/src/ivm/view-apply-change.js +1 -1
  463. package/out/zql/src/ivm/view-apply-change.js.map +1 -1
  464. package/out/zql/src/mutate/crud.d.ts +1 -3
  465. package/out/zql/src/mutate/crud.d.ts.map +1 -1
  466. package/out/zql/src/mutate/crud.js +1 -1
  467. package/out/zql/src/mutate/crud.js.map +1 -1
  468. package/out/zql/src/mutate/mutator-registry.d.ts +1 -1
  469. package/out/zql/src/mutate/mutator-registry.d.ts.map +1 -1
  470. package/out/zql/src/mutate/mutator-registry.js.map +1 -1
  471. package/out/zql/src/mutate/mutator.d.ts +1 -1
  472. package/out/zql/src/mutate/mutator.d.ts.map +1 -1
  473. package/out/zql/src/mutate/mutator.js.map +1 -1
  474. package/out/zql/src/planner/planner-debug.d.ts +10 -9
  475. package/out/zql/src/planner/planner-debug.d.ts.map +1 -1
  476. package/out/zql/src/planner/planner-debug.js.map +1 -1
  477. package/out/zql/src/planner/planner-node.d.ts +0 -1
  478. package/out/zql/src/planner/planner-node.d.ts.map +1 -1
  479. package/out/zql/src/planner/planner-node.js.map +1 -1
  480. package/out/zql/src/planner/planner-warnings.d.ts +3 -3
  481. package/out/zql/src/planner/planner-warnings.d.ts.map +1 -1
  482. package/out/zql/src/planner/planner-warnings.js.map +1 -1
  483. package/out/zql/src/query/expression.d.ts +0 -22
  484. package/out/zql/src/query/expression.d.ts.map +1 -1
  485. package/out/zql/src/query/expression.js +1 -1
  486. package/out/zql/src/query/expression.js.map +1 -1
  487. package/out/zql/src/query/query-delegate-base.d.ts +0 -7
  488. package/out/zql/src/query/query-delegate-base.d.ts.map +1 -1
  489. package/out/zql/src/query/query-delegate-base.js +2 -2
  490. package/out/zql/src/query/query-delegate-base.js.map +1 -1
  491. package/out/zql/src/query/query-delegate.d.ts +1 -4
  492. package/out/zql/src/query/query-delegate.d.ts.map +1 -1
  493. package/out/zql/src/query/query-internals.d.ts +0 -3
  494. package/out/zql/src/query/query-internals.d.ts.map +1 -1
  495. package/out/zql/src/query/query-internals.js.map +1 -1
  496. package/out/zql/src/query/query-registry.d.ts +5 -5
  497. package/out/zql/src/query/query-registry.d.ts.map +1 -1
  498. package/out/zql/src/query/query-registry.js.map +1 -1
  499. package/out/zql/src/query/query.d.ts +2 -13
  500. package/out/zql/src/query/query.d.ts.map +1 -1
  501. package/out/zql/src/query/runnable-query-impl.d.ts +1 -19
  502. package/out/zql/src/query/runnable-query-impl.d.ts.map +1 -1
  503. package/out/zql/src/query/runnable-query-impl.js +1 -1
  504. package/out/zql/src/query/runnable-query-impl.js.map +1 -1
  505. package/out/zql/src/query/ttl.d.ts +2 -3
  506. package/out/zql/src/query/ttl.d.ts.map +1 -1
  507. package/out/zql/src/query/ttl.js.map +1 -1
  508. package/out/zqlite/src/query-builder.d.ts +0 -2
  509. package/out/zqlite/src/query-builder.d.ts.map +1 -1
  510. package/out/zqlite/src/query-builder.js +1 -1
  511. package/out/zqlite/src/query-builder.js.map +1 -1
  512. package/out/zqlite/src/table-source.d.ts +0 -1
  513. package/out/zqlite/src/table-source.d.ts.map +1 -1
  514. package/out/zqlite/src/table-source.js +1 -1
  515. package/out/zqlite/src/table-source.js.map +1 -1
  516. package/package.json +2 -3
@@ -1,25 +1,4 @@
1
1
  import * as v from '../../shared/src/valita.ts';
2
- export declare const mutateSuccessSchema: v.ObjectType<{
3
- kind: v.Type<"MutateResponse">;
4
- userID: v.Optional<string | null>;
5
- mutations: v.ArrayType<v.ObjectType<{
6
- id: v.ObjectType<{
7
- id: v.Type<number>;
8
- clientID: v.Type<string>;
9
- }, undefined>;
10
- result: v.UnionType<[v.ObjectType<{
11
- data: v.Optional<import("../../shared/src/json.ts").ReadonlyJSONValue>;
12
- }, undefined>, v.UnionType<[v.ObjectType<{
13
- error: v.Type<"app">;
14
- message: v.Optional<string>;
15
- details: v.Optional<import("../../shared/src/json.ts").ReadonlyJSONValue>;
16
- }, undefined>, v.ObjectType<{
17
- error: v.UnionType<[v.Type<"oooMutation">, v.Type<"alreadyProcessed">]>;
18
- details: v.Optional<import("../../shared/src/json.ts").ReadonlyJSONValue>;
19
- }, undefined>]>]>;
20
- }, undefined>>;
21
- }, undefined>;
22
- export type MutateSuccess = v.Infer<typeof mutateSuccessSchema>;
23
2
  export declare const mutateResponseSchema: v.UnionType<[v.ObjectType<{
24
3
  kind: v.Type<"MutateResponse">;
25
4
  userID: v.Optional<string | null>;
@@ -1 +1 @@
1
- {"version":3,"file":"mutate-server.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/mutate-server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAehD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;aAI9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAKhC,CAAC;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;aAG7B,CAAC"}
1
+ {"version":3,"file":"mutate-server.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/mutate-server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAqBhD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAKhC,CAAC;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;aAG7B,CAAC"}
@@ -19,6 +19,6 @@ var mutateParamsSchema = valita_exports.object({
19
19
  appID: valita_exports.string()
20
20
  });
21
21
  //#endregion
22
- export { mutateParamsSchema, mutateResponseSchema, mutateSuccessSchema };
22
+ export { mutateParamsSchema, mutateResponseSchema };
23
23
 
24
24
  //# sourceMappingURL=mutate-server.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mutate-server.js","names":["v"],"sources":["../../../../zero-protocol/src/mutate-server.ts"],"sourcesContent":["import * as v from '../../shared/src/valita.ts';\nimport {pushFailedBodySchema} from './error.ts';\nimport {mutationResponseSchema} from './mutation.ts';\nimport {pushErrorSchema} from './push.ts';\n\nconst legacyPushSuccessSchema = v.object({\n mutations: v.array(mutationResponseSchema),\n});\n\nconst legacyPushResponseSchema = v.union(\n legacyPushSuccessSchema,\n pushErrorSchema,\n pushFailedBodySchema,\n);\n\nexport const mutateSuccessSchema = v.object({\n kind: v.literal('MutateResponse'),\n userID: v.string().nullable().optional(),\n mutations: v.array(mutationResponseSchema),\n});\nexport type MutateSuccess = v.Infer<typeof mutateSuccessSchema>;\n\nexport const mutateResponseSchema = v.union(\n mutateSuccessSchema,\n pushFailedBodySchema,\n // for backwards compatibility\n legacyPushResponseSchema,\n);\nexport type MutateResponse = v.Infer<typeof mutateResponseSchema>;\n\n/**\n * The schema for the querystring parameters of the custom mutate endpoint.\n */\nexport const mutateParamsSchema = v.object({\n schema: v.string(),\n appID: v.string(),\n});\n"],"mappings":";;;;;AAKA,IAAM,0BAA0BA,eAAE,OAAO,EACvC,WAAWA,eAAE,MAAM,sBAAsB,EAC3C,CAAC;AAED,IAAM,2BAA2BA,eAAE,MACjC,yBACA,iBACA,oBACF;AAEA,IAAa,sBAAsBA,eAAE,OAAO;CAC1C,MAAMA,eAAE,QAAQ,gBAAgB;CAChC,QAAQA,eAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvC,WAAWA,eAAE,MAAM,sBAAsB;AAC3C,CAAC;AAGD,IAAa,uBAAuBA,eAAE,MACpC,qBACA,sBAEA,wBACF;;;;AAMA,IAAa,qBAAqBA,eAAE,OAAO;CACzC,QAAQA,eAAE,OAAO;CACjB,OAAOA,eAAE,OAAO;AAClB,CAAC"}
1
+ {"version":3,"file":"mutate-server.js","names":["v"],"sources":["../../../../zero-protocol/src/mutate-server.ts"],"sourcesContent":["import * as v from '../../shared/src/valita.ts';\nimport {pushFailedBodySchema} from './error.ts';\nimport {mutationResponseSchema} from './mutation.ts';\nimport {pushErrorSchema} from './push.ts';\n\nconst legacyPushSuccessSchema = v.object({\n mutations: v.array(mutationResponseSchema),\n});\n\nconst legacyPushResponseSchema = v.union(\n legacyPushSuccessSchema,\n pushErrorSchema,\n pushFailedBodySchema,\n);\n\nconst mutateSuccessSchema = v.object({\n kind: v.literal('MutateResponse'),\n userID: v.string().nullable().optional(),\n mutations: v.array(mutationResponseSchema),\n});\n\nexport const mutateResponseSchema = v.union(\n mutateSuccessSchema,\n pushFailedBodySchema,\n // for backwards compatibility\n legacyPushResponseSchema,\n);\nexport type MutateResponse = v.Infer<typeof mutateResponseSchema>;\n\n/**\n * The schema for the querystring parameters of the custom mutate endpoint.\n */\nexport const mutateParamsSchema = v.object({\n schema: v.string(),\n appID: v.string(),\n});\n"],"mappings":";;;;;AAKA,IAAM,0BAA0BA,eAAE,OAAO,EACvC,WAAWA,eAAE,MAAM,sBAAsB,EAC3C,CAAC;AAED,IAAM,2BAA2BA,eAAE,MACjC,yBACA,iBACA,oBACF;AAEA,IAAM,sBAAsBA,eAAE,OAAO;CACnC,MAAMA,eAAE,QAAQ,gBAAgB;CAChC,QAAQA,eAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvC,WAAWA,eAAE,MAAM,sBAAsB;AAC3C,CAAC;AAED,IAAa,uBAAuBA,eAAE,MACpC,qBACA,sBAEA,wBACF;;;;AAMA,IAAa,qBAAqBA,eAAE,OAAO;CACzC,QAAQA,eAAE,OAAO;CACjB,OAAOA,eAAE,OAAO;AAClB,CAAC"}
@@ -1,6 +1,5 @@
1
1
  export declare const CRUD = "crud";
2
2
  export declare const Custom = "custom";
3
- export type MutationType = typeof CRUD | typeof Custom;
4
3
  export type CRUD = typeof CRUD;
5
4
  export type Custom = typeof Custom;
6
5
  //# sourceMappingURL=mutation-type-enum.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mutation-type-enum.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/mutation-type-enum.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,SAAS,CAAC;AAC3B,eAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,MAAM,MAAM,YAAY,GAAG,OAAO,IAAI,GAAG,OAAO,MAAM,CAAC;AAEvD,MAAM,MAAM,IAAI,GAAG,OAAO,IAAI,CAAC;AAC/B,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC"}
1
+ {"version":3,"file":"mutation-type-enum.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/mutation-type-enum.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,SAAS,CAAC;AAC3B,eAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,MAAM,IAAI,GAAG,OAAO,IAAI,CAAC;AAC/B,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"mutation-type-enum.js","names":[],"sources":["../../../../zero-protocol/src/mutation-type-enum.ts"],"sourcesContent":["export const CRUD = 'crud';\nexport const Custom = 'custom';\nexport type MutationType = typeof CRUD | typeof Custom;\n\nexport type CRUD = typeof CRUD;\nexport type Custom = typeof Custom;\n"],"mappings":";AAAA,IAAa,OAAO;AACpB,IAAa,SAAS"}
1
+ {"version":3,"file":"mutation-type-enum.js","names":[],"sources":["../../../../zero-protocol/src/mutation-type-enum.ts"],"sourcesContent":["export const CRUD = 'crud';\nexport const Custom = 'custom';\n\nexport type CRUD = typeof CRUD;\nexport type Custom = typeof Custom;\n"],"mappings":";AAAA,IAAa,OAAO;AACpB,IAAa,SAAS"}
@@ -97,7 +97,7 @@ declare const crudArgSchema: v.ObjectType<{
97
97
  value: v.Type<Readonly<Record<string, string | number | boolean>>>;
98
98
  }, undefined>]>>;
99
99
  }, undefined>;
100
- export declare const crudMutationSchema: v.ObjectType<{
100
+ declare const crudMutationSchema: v.ObjectType<{
101
101
  type: v.Type<"crud">;
102
102
  id: v.Type<number>;
103
103
  clientID: v.Type<string>;
@@ -127,7 +127,7 @@ export declare const crudMutationSchema: v.ObjectType<{
127
127
  }, undefined>]>;
128
128
  timestamp: v.Type<number>;
129
129
  }, undefined>;
130
- export declare const customMutationSchema: v.ObjectType<{
130
+ declare const customMutationSchema: v.ObjectType<{
131
131
  type: v.Type<"custom">;
132
132
  id: v.Type<number>;
133
133
  clientID: v.Type<string>;
@@ -214,12 +214,10 @@ export type UpsertOp = v.Infer<typeof upsertOpSchema>;
214
214
  export type UpdateOp = v.Infer<typeof updateOpSchema>;
215
215
  export type DeleteOp = v.Infer<typeof deleteOpSchema>;
216
216
  export type CRUDOp = v.Infer<typeof crudOpSchema>;
217
- export type CRUDOpKind = CRUDOp['op'];
218
217
  export type CRUDMutationArg = v.Infer<typeof crudArgSchema>;
219
218
  export type CRUDMutation = v.Infer<typeof crudMutationSchema>;
220
219
  export type CustomMutation = v.Infer<typeof customMutationSchema>;
221
220
  export type Mutation = v.Infer<typeof mutationSchema>;
222
- export type MutationResponse = v.Infer<typeof mutationResponseSchema>;
223
221
  export type MutationOk = v.Infer<typeof mutationOkSchema>;
224
222
  export type MutationError = v.Infer<typeof mutationErrorSchema>;
225
223
  export type MutationResult = v.Infer<typeof mutationResultSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"mutation.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/mutation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAChD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,qCAAqC,CAAC;AASpE,eAAO,MAAM,kBAAkB,eAAe,CAAC;AAK/C,eAAO,MAAM,6BAA6B,yBAAyB,CAAC;AAEpE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;eAqBnC,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,cAAc;;;;;aAKlB,CAAC;AAEH;;;GAGG;AACH,QAAA,MAAM,cAAc;;;;;aAKlB,CAAC;AAEH;;GAEG;AACH,QAAA,MAAM,cAAc;;;;;aAMlB,CAAC;AAEH;;GAEG;AACH,QAAA,MAAM,cAAc;;;;;aAMlB,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;eAKjB,CAAC;AAEF,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;aAEjB,CAAC;AAIH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAO7B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;aAO/B,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAAoD,CAAC;AAiBhF,QAAA,MAAM,gBAAgB;;aAGpB,CAAC;AACH,QAAA,MAAM,mBAAmB;;;;;;;eAA2C,CAAC;AAErE,eAAO,MAAM,oBAAoB;;;;;;;;;iBAGhC,CAAC;AAEF,eAAO,MAAM,sBAAsB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Q,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAClD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC5D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,wBAAgB,OAAO,CACrB,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,UAAU,GACd,eAAe,CAcjB"}
@@ -107,6 +107,6 @@ function mapCRUD(arg, map) {
107
107
  })) };
108
108
  }
109
109
  //#endregion
110
- export { CLEANUP_RESULTS_MUTATION_NAME, CRUD_MUTATION_NAME, cleanupResultsArgSchema, crudMutationSchema, customMutationSchema, mapCRUD, mutationResponseSchema, mutationResultSchema, mutationSchema };
110
+ export { CLEANUP_RESULTS_MUTATION_NAME, CRUD_MUTATION_NAME, cleanupResultsArgSchema, mapCRUD, mutationResponseSchema, mutationResultSchema, mutationSchema };
111
111
 
112
112
  //# sourceMappingURL=mutation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mutation.js","names":["v","MutationType.CRUD","MutationType.Custom"],"sources":["../../../../zero-protocol/src/mutation.ts"],"sourcesContent":["import {jsonSchema} from '../../shared/src/json-schema.ts';\nimport * as v from '../../shared/src/valita.ts';\nimport type {NameMapper} from '../../zero-types/src/name-mapper.ts';\nimport {rowSchema} from './data.ts';\nimport {mutationIDSchema} from './mutation-id.ts';\nimport * as MutationType from './mutation-type-enum.ts';\nimport {primaryKeySchema, primaryKeyValueRecordSchema} from './primary-key.ts';\n\n// NOTE! If you change this name you must also change the\n// string in `replicache-impl.ts` But CRUD mutators are being\n// deleted soon so this should not happen.\nexport const CRUD_MUTATION_NAME = '_zero_crud';\n\n// Internal mutation name for cleaning up mutation results.\n// This mutation is sent from zero-cache to zero-server to delete\n// acknowledged mutation results from the upstream database.\nexport const CLEANUP_RESULTS_MUTATION_NAME = '_zero_cleanupResults';\n\nexport const cleanupResultsArgSchema = v.union(\n // Legacy format (no type field) - treat as single\n v.object({\n clientGroupID: v.string(),\n clientID: v.string(),\n upToMutationID: v.number(),\n }),\n // Explicit single: delete up to a specific mutation ID for one client\n v.object({\n type: v.literal('single'),\n clientGroupID: v.string(),\n clientID: v.string(),\n upToMutationID: v.number(),\n }),\n // Bulk: delete all mutations for multiple clients\n v.object({\n type: v.literal('bulk'),\n clientGroupID: v.string(),\n // oxlint-disable-next-line e18e/prefer-spread-syntax\n clientIDs: v.tuple([v.string()]).concat(v.array(v.string())),\n }),\n);\n\n/**\n * Inserts if entity with id does not already exist.\n */\nconst insertOpSchema = v.object({\n op: v.literal('insert'),\n tableName: v.string(),\n primaryKey: primaryKeySchema,\n value: rowSchema,\n});\n\n/**\n * Upsert semantics. Inserts if entity with id does not already exist,\n * otherwise updates existing entity with id.\n */\nconst upsertOpSchema = v.object({\n op: v.literal('upsert'),\n tableName: v.string(),\n primaryKey: primaryKeySchema,\n value: rowSchema,\n});\n\n/**\n * Updates if entity with id exists, otherwise does nothing.\n */\nconst updateOpSchema = v.object({\n op: v.literal('update'),\n tableName: v.string(),\n primaryKey: primaryKeySchema,\n // Partial value with at least the primary key fields\n value: rowSchema,\n});\n\n/**\n * Deletes entity with id if it exists, otherwise does nothing.\n */\nconst deleteOpSchema = v.object({\n op: v.literal('delete'),\n tableName: v.string(),\n primaryKey: primaryKeySchema,\n // Partial value representing the primary key\n value: primaryKeyValueRecordSchema,\n});\n\nconst crudOpSchema = v.union(\n insertOpSchema,\n upsertOpSchema,\n updateOpSchema,\n deleteOpSchema,\n);\n\nconst crudArgSchema = v.object({\n ops: v.array(crudOpSchema),\n});\n\nconst crudArgsSchema = v.tuple([crudArgSchema]);\n\nexport const crudMutationSchema = v.object({\n type: v.literal(MutationType.CRUD),\n id: v.number(),\n clientID: v.string(),\n name: v.literal(CRUD_MUTATION_NAME),\n args: crudArgsSchema,\n timestamp: v.number(),\n});\n\nexport const customMutationSchema = v.object({\n type: v.literal(MutationType.Custom),\n id: v.number(),\n clientID: v.string(),\n name: v.string(),\n args: v.array(jsonSchema),\n timestamp: v.number(),\n});\n\nexport const mutationSchema = v.union(crudMutationSchema, customMutationSchema);\n\nconst appErrorSchema = v.object({\n error: v.literal('app'),\n // The user can return any additional data here\n message: v.string().optional(),\n details: jsonSchema.optional(),\n});\nconst zeroErrorSchema = v.object({\n error: v.union(\n /** @deprecated push oooMutation errors are now represented as ['error', { ... }] messages */\n v.literal('oooMutation'),\n v.literal('alreadyProcessed'),\n ),\n details: jsonSchema.optional(),\n});\n\nconst mutationOkSchema = v.object({\n // The user can return any additional data here\n data: jsonSchema.optional(),\n});\nconst mutationErrorSchema = v.union(appErrorSchema, zeroErrorSchema);\n\nexport const mutationResultSchema = v.union(\n mutationOkSchema,\n mutationErrorSchema,\n);\n\nexport const mutationResponseSchema = v.object({\n id: mutationIDSchema,\n result: mutationResultSchema,\n});\n\nexport type InsertOp = v.Infer<typeof insertOpSchema>;\nexport type UpsertOp = v.Infer<typeof upsertOpSchema>;\nexport type UpdateOp = v.Infer<typeof updateOpSchema>;\nexport type DeleteOp = v.Infer<typeof deleteOpSchema>;\nexport type CRUDOp = v.Infer<typeof crudOpSchema>;\nexport type CRUDOpKind = CRUDOp['op'];\nexport type CRUDMutationArg = v.Infer<typeof crudArgSchema>;\nexport type CRUDMutation = v.Infer<typeof crudMutationSchema>;\nexport type CustomMutation = v.Infer<typeof customMutationSchema>;\nexport type Mutation = v.Infer<typeof mutationSchema>;\n\nexport type MutationResponse = v.Infer<typeof mutationResponseSchema>;\nexport type MutationOk = v.Infer<typeof mutationOkSchema>;\nexport type MutationError = v.Infer<typeof mutationErrorSchema>;\nexport type MutationResult = v.Infer<typeof mutationResultSchema>;\nexport type CleanupResultsArg = v.Infer<typeof cleanupResultsArgSchema>;\n\nexport function mapCRUD(\n arg: CRUDMutationArg,\n map: NameMapper,\n): CRUDMutationArg {\n return {\n ops: arg.ops.map(\n ({op, tableName, primaryKey, value}) =>\n ({\n op,\n tableName: map.tableName(tableName),\n primaryKey: map.columns(tableName, primaryKey),\n value: map.row(tableName, value),\n // The cast is necessary because ts objects to the `value` field\n // for \"delete\" ops being different.\n }) as unknown as CRUDOp,\n ),\n };\n}\n"],"mappings":";;;;;;;AAWA,IAAa,qBAAqB;AAKlC,IAAa,gCAAgC;AAE7C,IAAa,0BAA0BA,eAAE,MAEvCA,eAAE,OAAO;CACP,eAAeA,eAAE,OAAO;CACxB,UAAUA,eAAE,OAAO;CACnB,gBAAgBA,eAAE,OAAO;AAC3B,CAAC,GAEDA,eAAE,OAAO;CACP,MAAMA,eAAE,QAAQ,QAAQ;CACxB,eAAeA,eAAE,OAAO;CACxB,UAAUA,eAAE,OAAO;CACnB,gBAAgBA,eAAE,OAAO;AAC3B,CAAC,GAEDA,eAAE,OAAO;CACP,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,OAAO;CACf,MAAMA,eAAE,MAAM,UAAU;CACxB,WAAWA,eAAE,OAAO;AACtB,CAAC;AAED,IAAa,iBAAiBA,eAAE,MAAM,oBAAoB,oBAAoB;AAE9E,IAAM,iBAAiBA,eAAE,OAAO;CAC9B,OAAOA,eAAE,QAAQ,KAAK;CAEtB,SAASA,eAAE,OAAO,CAAC,CAAC,SAAS;CAC7B,SAAS,WAAW,SAAS;AAC/B,CAAC;AACD,IAAM,kBAAkBA,eAAE,OAAO;CAC/B,OAAOA,eAAE;;EAEPA,eAAE,QAAQ,aAAa;EACvBA,eAAE,QAAQ,kBAAkB;CAC9B;CACA,SAAS,WAAW,SAAS;AAC/B,CAAC;AAED,IAAM,mBAAmBA,eAAE,OAAO,EAEhC,MAAM,WAAW,SAAS,EAC5B,CAAC;AACD,IAAM,sBAAsBA,eAAE,MAAM,gBAAgB,eAAe;AAEnE,IAAa,uBAAuBA,eAAE,MACpC,kBACA,mBACF;AAEA,IAAa,yBAAyBA,eAAE,OAAO;CAC7C,IAAI;CACJ,QAAQ;AACV,CAAC;AAmBD,SAAgB,QACd,KACA,KACiB;CACjB,OAAO,EACL,KAAK,IAAI,IAAI,KACV,EAAC,IAAI,WAAW,YAAY,aAC1B;EACC;EACA,WAAW,IAAI,UAAU,SAAS;EAClC,YAAY,IAAI,QAAQ,WAAW,UAAU;EAC7C,OAAO,IAAI,IAAI,WAAW,KAAK;CAGjC,EACJ,EACF;AACF"}
1
+ {"version":3,"file":"mutation.js","names":["v","MutationType.CRUD","MutationType.Custom"],"sources":["../../../../zero-protocol/src/mutation.ts"],"sourcesContent":["import {jsonSchema} from '../../shared/src/json-schema.ts';\nimport * as v from '../../shared/src/valita.ts';\nimport type {NameMapper} from '../../zero-types/src/name-mapper.ts';\nimport {rowSchema} from './data.ts';\nimport {mutationIDSchema} from './mutation-id.ts';\nimport * as MutationType from './mutation-type-enum.ts';\nimport {primaryKeySchema, primaryKeyValueRecordSchema} from './primary-key.ts';\n\n// NOTE! If you change this name you must also change the\n// string in `replicache-impl.ts` But CRUD mutators are being\n// deleted soon so this should not happen.\nexport const CRUD_MUTATION_NAME = '_zero_crud';\n\n// Internal mutation name for cleaning up mutation results.\n// This mutation is sent from zero-cache to zero-server to delete\n// acknowledged mutation results from the upstream database.\nexport const CLEANUP_RESULTS_MUTATION_NAME = '_zero_cleanupResults';\n\nexport const cleanupResultsArgSchema = v.union(\n // Legacy format (no type field) - treat as single\n v.object({\n clientGroupID: v.string(),\n clientID: v.string(),\n upToMutationID: v.number(),\n }),\n // Explicit single: delete up to a specific mutation ID for one client\n v.object({\n type: v.literal('single'),\n clientGroupID: v.string(),\n clientID: v.string(),\n upToMutationID: v.number(),\n }),\n // Bulk: delete all mutations for multiple clients\n v.object({\n type: v.literal('bulk'),\n clientGroupID: v.string(),\n // oxlint-disable-next-line e18e/prefer-spread-syntax\n clientIDs: v.tuple([v.string()]).concat(v.array(v.string())),\n }),\n);\n\n/**\n * Inserts if entity with id does not already exist.\n */\nconst insertOpSchema = v.object({\n op: v.literal('insert'),\n tableName: v.string(),\n primaryKey: primaryKeySchema,\n value: rowSchema,\n});\n\n/**\n * Upsert semantics. Inserts if entity with id does not already exist,\n * otherwise updates existing entity with id.\n */\nconst upsertOpSchema = v.object({\n op: v.literal('upsert'),\n tableName: v.string(),\n primaryKey: primaryKeySchema,\n value: rowSchema,\n});\n\n/**\n * Updates if entity with id exists, otherwise does nothing.\n */\nconst updateOpSchema = v.object({\n op: v.literal('update'),\n tableName: v.string(),\n primaryKey: primaryKeySchema,\n // Partial value with at least the primary key fields\n value: rowSchema,\n});\n\n/**\n * Deletes entity with id if it exists, otherwise does nothing.\n */\nconst deleteOpSchema = v.object({\n op: v.literal('delete'),\n tableName: v.string(),\n primaryKey: primaryKeySchema,\n // Partial value representing the primary key\n value: primaryKeyValueRecordSchema,\n});\n\nconst crudOpSchema = v.union(\n insertOpSchema,\n upsertOpSchema,\n updateOpSchema,\n deleteOpSchema,\n);\n\nconst crudArgSchema = v.object({\n ops: v.array(crudOpSchema),\n});\n\nconst crudArgsSchema = v.tuple([crudArgSchema]);\n\nconst crudMutationSchema = v.object({\n type: v.literal(MutationType.CRUD),\n id: v.number(),\n clientID: v.string(),\n name: v.literal(CRUD_MUTATION_NAME),\n args: crudArgsSchema,\n timestamp: v.number(),\n});\n\nconst customMutationSchema = v.object({\n type: v.literal(MutationType.Custom),\n id: v.number(),\n clientID: v.string(),\n name: v.string(),\n args: v.array(jsonSchema),\n timestamp: v.number(),\n});\n\nexport const mutationSchema = v.union(crudMutationSchema, customMutationSchema);\n\nconst appErrorSchema = v.object({\n error: v.literal('app'),\n // The user can return any additional data here\n message: v.string().optional(),\n details: jsonSchema.optional(),\n});\nconst zeroErrorSchema = v.object({\n error: v.union(\n /** @deprecated push oooMutation errors are now represented as ['error', { ... }] messages */\n v.literal('oooMutation'),\n v.literal('alreadyProcessed'),\n ),\n details: jsonSchema.optional(),\n});\n\nconst mutationOkSchema = v.object({\n // The user can return any additional data here\n data: jsonSchema.optional(),\n});\nconst mutationErrorSchema = v.union(appErrorSchema, zeroErrorSchema);\n\nexport const mutationResultSchema = v.union(\n mutationOkSchema,\n mutationErrorSchema,\n);\n\nexport const mutationResponseSchema = v.object({\n id: mutationIDSchema,\n result: mutationResultSchema,\n});\n\nexport type InsertOp = v.Infer<typeof insertOpSchema>;\nexport type UpsertOp = v.Infer<typeof upsertOpSchema>;\nexport type UpdateOp = v.Infer<typeof updateOpSchema>;\nexport type DeleteOp = v.Infer<typeof deleteOpSchema>;\nexport type CRUDOp = v.Infer<typeof crudOpSchema>;\nexport type CRUDMutationArg = v.Infer<typeof crudArgSchema>;\nexport type CRUDMutation = v.Infer<typeof crudMutationSchema>;\nexport type CustomMutation = v.Infer<typeof customMutationSchema>;\nexport type Mutation = v.Infer<typeof mutationSchema>;\n\nexport type MutationOk = v.Infer<typeof mutationOkSchema>;\nexport type MutationError = v.Infer<typeof mutationErrorSchema>;\nexport type MutationResult = v.Infer<typeof mutationResultSchema>;\nexport type CleanupResultsArg = v.Infer<typeof cleanupResultsArgSchema>;\n\nexport function mapCRUD(\n arg: CRUDMutationArg,\n map: NameMapper,\n): CRUDMutationArg {\n return {\n ops: arg.ops.map(\n ({op, tableName, primaryKey, value}) =>\n ({\n op,\n tableName: map.tableName(tableName),\n primaryKey: map.columns(tableName, primaryKey),\n value: map.row(tableName, value),\n // The cast is necessary because ts objects to the `value` field\n // for \"delete\" ops being different.\n }) as unknown as CRUDOp,\n ),\n };\n}\n"],"mappings":";;;;;;;AAWA,IAAa,qBAAqB;AAKlC,IAAa,gCAAgC;AAE7C,IAAa,0BAA0BA,eAAE,MAEvCA,eAAE,OAAO;CACP,eAAeA,eAAE,OAAO;CACxB,UAAUA,eAAE,OAAO;CACnB,gBAAgBA,eAAE,OAAO;AAC3B,CAAC,GAEDA,eAAE,OAAO;CACP,MAAMA,eAAE,QAAQ,QAAQ;CACxB,eAAeA,eAAE,OAAO;CACxB,UAAUA,eAAE,OAAO;CACnB,gBAAgBA,eAAE,OAAO;AAC3B,CAAC,GAEDA,eAAE,OAAO;CACP,MAAMA,eAAE,QAAQ,MAAM;CACtB,eAAeA,eAAE,OAAO;CAExB,WAAWA,eAAE,MAAM,CAACA,eAAE,OAAO,CAAC,CAAC,CAAC,CAAC,OAAOA,eAAE,MAAMA,eAAE,OAAO,CAAC,CAAC;AAC7D,CAAC,CACH;;;;AAKA,IAAM,iBAAiBA,eAAE,OAAO;CAC9B,IAAIA,eAAE,QAAQ,QAAQ;CACtB,WAAWA,eAAE,OAAO;CACpB,YAAY;CACZ,OAAO;AACT,CAAC;;;;;AAMD,IAAM,iBAAiBA,eAAE,OAAO;CAC9B,IAAIA,eAAE,QAAQ,QAAQ;CACtB,WAAWA,eAAE,OAAO;CACpB,YAAY;CACZ,OAAO;AACT,CAAC;;;;AAKD,IAAM,iBAAiBA,eAAE,OAAO;CAC9B,IAAIA,eAAE,QAAQ,QAAQ;CACtB,WAAWA,eAAE,OAAO;CACpB,YAAY;CAEZ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uBA,eAAE,MACpC,kBACA,mBACF;AAEA,IAAa,yBAAyBA,eAAE,OAAO;CAC7C,IAAI;CACJ,QAAQ;AACV,CAAC;AAiBD,SAAgB,QACd,KACA,KACiB;CACjB,OAAO,EACL,KAAK,IAAI,IAAI,KACV,EAAC,IAAI,WAAW,YAAY,aAC1B;EACC;EACA,WAAW,IAAI,UAAU,SAAS;EAClC,YAAY,IAAI,QAAQ,WAAW,UAAU;EAC7C,OAAO,IAAI,IAAI,WAAW,KAAK;CAGjC,EACJ,EACF;AACF"}
@@ -1,37 +1,4 @@
1
1
  import * as v from '../../shared/src/valita.ts';
2
- /**
3
- * Mutation results are stored ephemerally in the client
4
- * hence why we only have the `put` operation.
5
- *
6
- * On put the mutation promise is resolved/rejected
7
- * and reference released.
8
- */
9
- export declare const putOpSchema: v.ObjectType<{
10
- op: v.Type<"put">;
11
- mutation: v.ObjectType<{
12
- id: v.ObjectType<{
13
- id: v.Type<number>;
14
- clientID: v.Type<string>;
15
- }, undefined>;
16
- result: v.UnionType<[v.ObjectType<{
17
- data: v.Optional<import("../../shared/src/json.ts").ReadonlyJSONValue>;
18
- }, undefined>, v.UnionType<[v.ObjectType<{
19
- error: v.Type<"app">;
20
- message: v.Optional<string>;
21
- details: v.Optional<import("../../shared/src/json.ts").ReadonlyJSONValue>;
22
- }, undefined>, v.ObjectType<{
23
- error: v.UnionType<[v.Type<"oooMutation">, v.Type<"alreadyProcessed">]>;
24
- details: v.Optional<import("../../shared/src/json.ts").ReadonlyJSONValue>;
25
- }, undefined>]>]>;
26
- }, undefined>;
27
- }, undefined>;
28
- export declare const delOpSchema: v.ObjectType<{
29
- op: v.Type<"del">;
30
- id: v.ObjectType<{
31
- id: v.Type<number>;
32
- clientID: v.Type<string>;
33
- }, undefined>;
34
- }, undefined>;
35
2
  declare const patchOpSchema: v.UnionType<[v.ObjectType<{
36
3
  op: v.Type<"put">;
37
4
  mutation: v.ObjectType<{
@@ -1 +1 @@
1
- {"version":3,"file":"mutations-patch.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/mutations-patch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAIhD;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;aAGtB,CAAC;AACH,eAAO,MAAM,WAAW;;;;;;aAGtB,CAAC;AAEH,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;eAAoC,CAAC;AACxD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;gBAAyB,CAAC;AAC3D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
1
+ {"version":3,"file":"mutations-patch.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/mutations-patch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAoBhD,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;eAAoC,CAAC;AACxD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;gBAAyB,CAAC;AAC3D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -20,6 +20,6 @@ var delOpSchema = valita_exports.object({
20
20
  var patchOpSchema = valita_exports.union(putOpSchema, delOpSchema);
21
21
  var mutationsPatchSchema = valita_exports.array(patchOpSchema);
22
22
  //#endregion
23
- export { delOpSchema, mutationsPatchSchema, putOpSchema };
23
+ export { mutationsPatchSchema };
24
24
 
25
25
  //# sourceMappingURL=mutations-patch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mutations-patch.js","names":["v"],"sources":["../../../../zero-protocol/src/mutations-patch.ts"],"sourcesContent":["import * as v from '../../shared/src/valita.ts';\nimport {mutationIDSchema} from './mutation-id.ts';\nimport {mutationResponseSchema} from './mutation.ts';\n\n/**\n * Mutation results are stored ephemerally in the client\n * hence why we only have the `put` operation.\n *\n * On put the mutation promise is resolved/rejected\n * and reference released.\n */\nexport const putOpSchema = v.object({\n op: v.literal('put'),\n mutation: mutationResponseSchema,\n});\nexport const delOpSchema = v.object({\n op: v.literal('del'),\n id: mutationIDSchema,\n});\n\nconst patchOpSchema = v.union(putOpSchema, delOpSchema);\nexport const mutationsPatchSchema = v.array(patchOpSchema);\nexport type MutationPatch = v.Infer<typeof patchOpSchema>;\n"],"mappings":";;;;;;;;;;;AAWA,IAAa,cAAcA,eAAE,OAAO;CAClC,IAAIA,eAAE,QAAQ,KAAK;CACnB,UAAU;AACZ,CAAC;AACD,IAAa,cAAcA,eAAE,OAAO;CAClC,IAAIA,eAAE,QAAQ,KAAK;CACnB,IAAI;AACN,CAAC;AAED,IAAM,gBAAgBA,eAAE,MAAM,aAAa,WAAW;AACtD,IAAa,uBAAuBA,eAAE,MAAM,aAAa"}
1
+ {"version":3,"file":"mutations-patch.js","names":["v"],"sources":["../../../../zero-protocol/src/mutations-patch.ts"],"sourcesContent":["import * as v from '../../shared/src/valita.ts';\nimport {mutationIDSchema} from './mutation-id.ts';\nimport {mutationResponseSchema} from './mutation.ts';\n\n/**\n * Mutation results are stored ephemerally in the client\n * hence why we only have the `put` operation.\n *\n * On put the mutation promise is resolved/rejected\n * and reference released.\n */\nconst putOpSchema = v.object({\n op: v.literal('put'),\n mutation: mutationResponseSchema,\n});\nconst delOpSchema = v.object({\n op: v.literal('del'),\n id: mutationIDSchema,\n});\n\nconst patchOpSchema = v.union(putOpSchema, delOpSchema);\nexport const mutationsPatchSchema = v.array(patchOpSchema);\nexport type MutationPatch = v.Infer<typeof patchOpSchema>;\n"],"mappings":";;;;;;;;;;;AAWA,IAAM,cAAcA,eAAE,OAAO;CAC3B,IAAIA,eAAE,QAAQ,KAAK;CACnB,UAAU;AACZ,CAAC;AACD,IAAM,cAAcA,eAAE,OAAO;CAC3B,IAAIA,eAAE,QAAQ,KAAK;CACnB,IAAI;AACN,CAAC;AAED,IAAM,gBAAgBA,eAAE,MAAM,aAAa,WAAW;AACtD,IAAa,uBAAuBA,eAAE,MAAM,aAAa"}
@@ -1,6 +1,4 @@
1
1
  import * as v from '../../shared/src/valita.ts';
2
- export declare const pingBodySchema: v.ObjectType<{}, undefined>;
3
2
  export declare const pingMessageSchema: v.TupleType<[v.Type<"ping">, v.ObjectType<{}, undefined>]>;
4
- export type PingBody = v.Infer<typeof pingBodySchema>;
5
3
  export type PingMessage = v.Infer<typeof pingMessageSchema>;
6
4
  //# sourceMappingURL=ping.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ping.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/ping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAEhD,eAAO,MAAM,cAAc,6BAAe,CAAC;AAC3C,eAAO,MAAM,iBAAiB,4DAA+C,CAAC;AAE9E,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
1
+ {"version":3,"file":"ping.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/ping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAGhD,eAAO,MAAM,iBAAiB,4DAA+C,CAAC;AAE9E,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -3,6 +3,6 @@ import { valita_exports } from "../../shared/src/valita.js";
3
3
  var pingBodySchema = valita_exports.object({});
4
4
  var pingMessageSchema = valita_exports.tuple([valita_exports.literal("ping"), pingBodySchema]);
5
5
  //#endregion
6
- export { pingBodySchema, pingMessageSchema };
6
+ export { pingMessageSchema };
7
7
 
8
8
  //# sourceMappingURL=ping.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ping.js","names":["v"],"sources":["../../../../zero-protocol/src/ping.ts"],"sourcesContent":["import * as v from '../../shared/src/valita.ts';\n\nexport const pingBodySchema = v.object({});\nexport const pingMessageSchema = v.tuple([v.literal('ping'), pingBodySchema]);\n\nexport type PingBody = v.Infer<typeof pingBodySchema>;\nexport type PingMessage = v.Infer<typeof pingMessageSchema>;\n"],"mappings":";;AAEA,IAAa,iBAAiBA,eAAE,OAAO,CAAC,CAAC;AACzC,IAAa,oBAAoBA,eAAE,MAAM,CAACA,eAAE,QAAQ,MAAM,GAAG,cAAc,CAAC"}
1
+ {"version":3,"file":"ping.js","names":["v"],"sources":["../../../../zero-protocol/src/ping.ts"],"sourcesContent":["import * as v from '../../shared/src/valita.ts';\n\nconst pingBodySchema = v.object({});\nexport const pingMessageSchema = v.tuple([v.literal('ping'), pingBodySchema]);\n\nexport type PingMessage = v.Infer<typeof pingMessageSchema>;\n"],"mappings":";;AAEA,IAAM,iBAAiBA,eAAE,OAAO,CAAC,CAAC;AAClC,IAAa,oBAAoBA,eAAE,MAAM,CAACA,eAAE,QAAQ,MAAM,GAAG,cAAc,CAAC"}
@@ -25,7 +25,7 @@ import * as v from '../../shared/src/valita.ts';
25
25
  * observed it is an unexpected error; the client should ignore both pokes,
26
26
  * disconnect, and reconnect.
27
27
  */
28
- export declare const pokeStartBodySchema: v.ObjectType<{
28
+ declare const pokeStartBodySchema: v.ObjectType<{
29
29
  pokeID: v.Type<string>;
30
30
  baseCookie: v.UnionType<[v.Type<string>, v.Type<null>]>;
31
31
  /**
@@ -175,7 +175,7 @@ export declare const pokePartsSchema: v.ArrayType<v.ObjectType<{
175
175
  })[]>;
176
176
  pokeID: v.Type<string>;
177
177
  }, undefined>>;
178
- export declare const pokeEndBodySchema: v.ObjectType<{
178
+ declare const pokeEndBodySchema: v.ObjectType<{
179
179
  pokeID: v.Type<string>;
180
180
  cookie: v.Type<string>;
181
181
  cancel: v.Optional<boolean>;
@@ -279,4 +279,5 @@ export type PokeChunk = Uint8Array;
279
279
  export type PokeStartMessage = v.Infer<typeof pokeStartMessageSchema>;
280
280
  export type PokePartMessage = v.Infer<typeof pokePartMessageSchema>;
281
281
  export type PokeEndMessage = v.Infer<typeof pokeEndMessageSchema>;
282
+ export {};
282
283
  //# sourceMappingURL=poke.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"poke.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/poke.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAMhD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,eAAO,MAAM,mBAAmB;;;IAM9B;;;OAGG;;;;;;aAQH,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAa7B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAA8B,CAAC;AAE3D,eAAO,MAAM,iBAAiB;;;;aAO5B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;IA5CjC;;;OAGG;;;;;;eA4CH,CAAC;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAGhC,CAAC;AACH,eAAO,MAAM,oBAAoB;;;;eAG/B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK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AG/B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,6EAA6E;AAC7E,eAAO,MAAM,uBAAuB,IAAO,CAAC;AAE5C,mEAAmE;AACnE,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAE9C,sEAAsE;AACtE,eAAO,MAAM,+BAA+B,KAAK,CAAC;AAElD,oDAAoD;AACpD,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC;AAEnC,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -66,6 +66,6 @@ var pokeStartMessageSchema = valita_exports.tuple([valita_exports.literal("pokeS
66
66
  var pokePartMessageSchema = valita_exports.tuple([valita_exports.literal("pokePart"), pokePartBodySchema]);
67
67
  var pokeEndMessageSchema = valita_exports.tuple([valita_exports.literal("pokeEnd"), pokeEndBodySchema]);
68
68
  //#endregion
69
- export { pokeEndBodySchema, pokeEndMessageSchema, pokePartBodySchema, pokePartMessageSchema, pokePartsSchema, pokeStartBodySchema, pokeStartMessageSchema };
69
+ export { pokeEndMessageSchema, pokePartBodySchema, pokePartMessageSchema, pokePartsSchema, pokeStartMessageSchema };
70
70
 
71
71
  //# sourceMappingURL=poke.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"poke.js","names":["v"],"sources":["../../../../zero-protocol/src/poke.ts"],"sourcesContent":["import * as v from '../../shared/src/valita.ts';\nimport {mutationsPatchSchema} from './mutations-patch.ts';\nimport {queriesPatchSchema} from './queries-patch.ts';\nimport {rowsPatchSchema} from './row-patch.ts';\nimport {nullableVersionSchema, versionSchema} from './version.ts';\n\n/**\n * Pokes use a multi-part format. Pokes send entity data to the client and can\n * be multiple mega-bytes in size. Using a multi-part format allows the server\n * to avoid having to have the full poke in memory at one time.\n *\n * Each poke is assigned a `pokeID`, a unique id (within the context of the\n * connection) for identifying the poke. All messages for a poke will have the\n * same `pokeID`.\n *\n * A poke begins with a `poke-start` message which contains the `baseCookie`\n * the poke is updating from and the `cookie` the poke is updating to.\n *\n * Through protocol version 51, the poke continues with zero to many\n * `poke-part` JSON messages. Starting in version 52, it continues with zero to\n * many binary `pokeChunk` messages. Each binary message starts with a message\n * type byte. Concatenating and decoding the payload after that byte produces a\n * PokePartBody array. pokeChunk boundaries have no semantic meaning.\n *\n * Finally, the poke ends with a `poke-end` message. The decoded patches can\n * now be applied as a whole to update from `baseCookie` to `cookie`.\n *\n * Poke messages can be intermingled with other `down` messages, but cannot be\n * intermingled with poke messages for a different `pokeID`. If this is\n * observed it is an unexpected error; the client should ignore both pokes,\n * disconnect, and reconnect.\n */\n\nexport const pokeStartBodySchema = v.object({\n pokeID: v.string(),\n // We always specify a Version as our cookie, but Replicache starts clients\n // with initial cookie `null`, before the first request. So we have to be\n // able to send a base cookie with value `null` to match that state.\n baseCookie: nullableVersionSchema,\n /**\n * This field is always set if the poke contains a `rowsPatch`.\n * It may be absent for patches that only update clients and queries.\n */\n schemaVersions: v\n .object({\n minSupportedVersion: v.number(),\n maxSupportedVersion: v.number(),\n })\n .optional(),\n timestamp: v.number().optional(),\n});\n\nexport const pokePartBodySchema = v.object({\n // Changes to last mutation id by client id.\n lastMutationIDChanges: v.record(v.number()).optional(),\n // Patches to the desired query sets by client id.\n desiredQueriesPatches: v.record(queriesPatchSchema).optional(),\n // Patches to the set of queries for which entities are sync'd in\n // rowsPatch.\n gotQueriesPatch: queriesPatchSchema.optional(),\n // Patches to the rows set.\n rowsPatch: rowsPatchSchema.optional(),\n // Mutation results patch\n mutationsPatch: mutationsPatchSchema.optional(),\n pokeID: v.string(),\n});\n\n/**\n * The logical payload carried by binary poke chunks. Chunk boundaries are\n * arbitrary; concatenating and decoding all chunks for a poke produces this\n * array.\n */\nexport const pokePartsSchema = v.array(pokePartBodySchema);\n\nexport const pokeEndBodySchema = v.object({\n pokeID: v.string(),\n // Note: This should be ignored (and may be empty) if cancel === `true`.\n cookie: versionSchema,\n // If `true`, the poke with id `pokeID` should be discarded without\n // applying it.\n cancel: v.boolean().optional(),\n});\n\nexport const pokeStartMessageSchema = v.tuple([\n v.literal('pokeStart'),\n pokeStartBodySchema,\n]);\nexport const pokePartMessageSchema = v.tuple([\n v.literal('pokePart'),\n pokePartBodySchema,\n]);\nexport const pokeEndMessageSchema = v.tuple([\n v.literal('pokeEnd'),\n pokeEndBodySchema,\n]);\n\nexport type PokeStartBody = v.Infer<typeof pokeStartBodySchema>;\nexport type PokePartBody = v.Infer<typeof pokePartBodySchema>;\nexport type PokeParts = v.Infer<typeof pokePartsSchema>;\nexport type PokeEndBody = v.Infer<typeof pokeEndBodySchema>;\n\n/** The first byte identifying a binary WebSocket message as a poke chunk. */\nexport const POKE_CHUNK_MESSAGE_TYPE = 0x00;\n\n/** The first protocol version that receives binary poke chunks. */\nexport const POKE_CHUNK_PROTOCOL_VERSION = 52;\n\n/** The last protocol version that receives JSON pokePart messages. */\nexport const LAST_POKE_PART_PROTOCOL_VERSION = 51;\n\n/** A tagged binary poke chunk WebSocket message. */\nexport type PokeChunk = Uint8Array;\n\nexport type PokeStartMessage = v.Infer<typeof pokeStartMessageSchema>;\nexport type PokePartMessage = v.Infer<typeof pokePartMessageSchema>;\nexport type PokeEndMessage = v.Infer<typeof pokeEndMessageSchema>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,IAAa,sBAAsBA,eAAE,OAAO;CAC1C,QAAQA,eAAE,OAAO;CAIjB,YAAY;;;;;CAKZ,gBAAgBA,eACb,OAAO;EACN,qBAAqBA,eAAE,OAAO;EAC9B,qBAAqBA,eAAE,OAAO;CAChC,CAAC,CAAC,CACD,SAAS;CACZ,WAAWA,eAAE,OAAO,CAAC,CAAC,SAAS;AACjC,CAAC;AAED,IAAa,qBAAqBA,eAAE,OAAO;CAEzC,uBAAuBA,eAAE,OAAOA,eAAE,OAAO,CAAC,CAAC,CAAC,SAAS;CAErD,uBAAuBA,eAAE,OAAO,kBAAkB,CAAC,CAAC,SAAS;CAG7D,iBAAiB,mBAAmB,SAAS;CAE7C,WAAW,gBAAgB,SAAS;CAEpC,gBAAgB,qBAAqB,SAAS;CAC9C,QAAQA,eAAE,OAAO;AACnB,CAAC;;;;;;AAOD,IAAa,kBAAkBA,eAAE,MAAM,kBAAkB;AAEzD,IAAa,oBAAoBA,eAAE,OAAO;CACxC,QAAQA,eAAE,OAAO;CAEjB,QAAQ;CAGR,QAAQA,eAAE,QAAQ,CAAC,CAAC,SAAS;AAC/B,CAAC;AAED,IAAa,yBAAyBA,eAAE,MAAM,CAC5CA,eAAE,QAAQ,WAAW,GACrB,mBACF,CAAC;AACD,IAAa,wBAAwBA,eAAE,MAAM,CAC3CA,eAAE,QAAQ,UAAU,GACpB,kBACF,CAAC;AACD,IAAa,uBAAuBA,eAAE,MAAM,CAC1CA,eAAE,QAAQ,SAAS,GACnB,iBACF,CAAC"}
1
+ {"version":3,"file":"poke.js","names":["v"],"sources":["../../../../zero-protocol/src/poke.ts"],"sourcesContent":["import * as v from '../../shared/src/valita.ts';\nimport {mutationsPatchSchema} from './mutations-patch.ts';\nimport {queriesPatchSchema} from './queries-patch.ts';\nimport {rowsPatchSchema} from './row-patch.ts';\nimport {nullableVersionSchema, versionSchema} from './version.ts';\n\n/**\n * Pokes use a multi-part format. Pokes send entity data to the client and can\n * be multiple mega-bytes in size. Using a multi-part format allows the server\n * to avoid having to have the full poke in memory at one time.\n *\n * Each poke is assigned a `pokeID`, a unique id (within the context of the\n * connection) for identifying the poke. All messages for a poke will have the\n * same `pokeID`.\n *\n * A poke begins with a `poke-start` message which contains the `baseCookie`\n * the poke is updating from and the `cookie` the poke is updating to.\n *\n * Through protocol version 51, the poke continues with zero to many\n * `poke-part` JSON messages. Starting in version 52, it continues with zero to\n * many binary `pokeChunk` messages. Each binary message starts with a message\n * type byte. Concatenating and decoding the payload after that byte produces a\n * PokePartBody array. pokeChunk boundaries have no semantic meaning.\n *\n * Finally, the poke ends with a `poke-end` message. The decoded patches can\n * now be applied as a whole to update from `baseCookie` to `cookie`.\n *\n * Poke messages can be intermingled with other `down` messages, but cannot be\n * intermingled with poke messages for a different `pokeID`. If this is\n * observed it is an unexpected error; the client should ignore both pokes,\n * disconnect, and reconnect.\n */\n\nconst pokeStartBodySchema = v.object({\n pokeID: v.string(),\n // We always specify a Version as our cookie, but Replicache starts clients\n // with initial cookie `null`, before the first request. So we have to be\n // able to send a base cookie with value `null` to match that state.\n baseCookie: nullableVersionSchema,\n /**\n * This field is always set if the poke contains a `rowsPatch`.\n * It may be absent for patches that only update clients and queries.\n */\n schemaVersions: v\n .object({\n minSupportedVersion: v.number(),\n maxSupportedVersion: v.number(),\n })\n .optional(),\n timestamp: v.number().optional(),\n});\n\nexport const pokePartBodySchema = v.object({\n // Changes to last mutation id by client id.\n lastMutationIDChanges: v.record(v.number()).optional(),\n // Patches to the desired query sets by client id.\n desiredQueriesPatches: v.record(queriesPatchSchema).optional(),\n // Patches to the set of queries for which entities are sync'd in\n // rowsPatch.\n gotQueriesPatch: queriesPatchSchema.optional(),\n // Patches to the rows set.\n rowsPatch: rowsPatchSchema.optional(),\n // Mutation results patch\n mutationsPatch: mutationsPatchSchema.optional(),\n pokeID: v.string(),\n});\n\n/**\n * The logical payload carried by binary poke chunks. Chunk boundaries are\n * arbitrary; concatenating and decoding all chunks for a poke produces this\n * array.\n */\nexport const pokePartsSchema = v.array(pokePartBodySchema);\n\nconst pokeEndBodySchema = v.object({\n pokeID: v.string(),\n // Note: This should be ignored (and may be empty) if cancel === `true`.\n cookie: versionSchema,\n // If `true`, the poke with id `pokeID` should be discarded without\n // applying it.\n cancel: v.boolean().optional(),\n});\n\nexport const pokeStartMessageSchema = v.tuple([\n v.literal('pokeStart'),\n pokeStartBodySchema,\n]);\nexport const pokePartMessageSchema = v.tuple([\n v.literal('pokePart'),\n pokePartBodySchema,\n]);\nexport const pokeEndMessageSchema = v.tuple([\n v.literal('pokeEnd'),\n pokeEndBodySchema,\n]);\n\nexport type PokeStartBody = v.Infer<typeof pokeStartBodySchema>;\nexport type PokePartBody = v.Infer<typeof pokePartBodySchema>;\nexport type PokeParts = v.Infer<typeof pokePartsSchema>;\nexport type PokeEndBody = v.Infer<typeof pokeEndBodySchema>;\n\n/** The first byte identifying a binary WebSocket message as a poke chunk. */\nexport const POKE_CHUNK_MESSAGE_TYPE = 0x00;\n\n/** The first protocol version that receives binary poke chunks. */\nexport const POKE_CHUNK_PROTOCOL_VERSION = 52;\n\n/** The last protocol version that receives JSON pokePart messages. */\nexport const LAST_POKE_PART_PROTOCOL_VERSION = 51;\n\n/** A tagged binary poke chunk WebSocket message. */\nexport type PokeChunk = Uint8Array;\n\nexport type PokeStartMessage = v.Infer<typeof pokeStartMessageSchema>;\nexport type PokePartMessage = v.Infer<typeof pokePartMessageSchema>;\nexport type PokeEndMessage = v.Infer<typeof pokeEndMessageSchema>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,IAAM,sBAAsBA,eAAE,OAAO;CACnC,QAAQA,eAAE,OAAO;CAIjB,YAAY;;;;;CAKZ,gBAAgBA,eACb,OAAO;EACN,qBAAqBA,eAAE,OAAO;EAC9B,qBAAqBA,eAAE,OAAO;CAChC,CAAC,CAAC,CACD,SAAS;CACZ,WAAWA,eAAE,OAAO,CAAC,CAAC,SAAS;AACjC,CAAC;AAED,IAAa,qBAAqBA,eAAE,OAAO;CAEzC,uBAAuBA,eAAE,OAAOA,eAAE,OAAO,CAAC,CAAC,CAAC,SAAS;CAErD,uBAAuBA,eAAE,OAAO,kBAAkB,CAAC,CAAC,SAAS;CAG7D,iBAAiB,mBAAmB,SAAS;CAE7C,WAAW,gBAAgB,SAAS;CAEpC,gBAAgB,qBAAqB,SAAS;CAC9C,QAAQA,eAAE,OAAO;AACnB,CAAC;;;;;;AAOD,IAAa,kBAAkBA,eAAE,MAAM,kBAAkB;AAEzD,IAAM,oBAAoBA,eAAE,OAAO;CACjC,QAAQA,eAAE,OAAO;CAEjB,QAAQ;CAGR,QAAQA,eAAE,QAAQ,CAAC,CAAC,SAAS;AAC/B,CAAC;AAED,IAAa,yBAAyBA,eAAE,MAAM,CAC5CA,eAAE,QAAQ,WAAW,GACrB,mBACF,CAAC;AACD,IAAa,wBAAwBA,eAAE,MAAM,CAC3CA,eAAE,QAAQ,UAAU,GACpB,kBACF,CAAC;AACD,IAAa,uBAAuBA,eAAE,MAAM,CAC1CA,eAAE,QAAQ,SAAS,GACnB,iBACF,CAAC"}
@@ -1,6 +1,4 @@
1
1
  import * as v from '../../shared/src/valita.ts';
2
- export declare const pongBodySchema: v.ObjectType<{}, undefined>;
3
2
  export declare const pongMessageSchema: v.TupleType<[v.Type<"pong">, v.ObjectType<{}, undefined>]>;
4
- export type PongBody = v.Infer<typeof pongBodySchema>;
5
3
  export type PongMessage = v.Infer<typeof pongMessageSchema>;
6
4
  //# sourceMappingURL=pong.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pong.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/pong.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAEhD,eAAO,MAAM,cAAc,6BAAe,CAAC;AAC3C,eAAO,MAAM,iBAAiB,4DAA+C,CAAC;AAE9E,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
1
+ {"version":3,"file":"pong.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/pong.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAGhD,eAAO,MAAM,iBAAiB,4DAA+C,CAAC;AAE9E,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -3,6 +3,6 @@ import { valita_exports } from "../../shared/src/valita.js";
3
3
  var pongBodySchema = valita_exports.object({});
4
4
  var pongMessageSchema = valita_exports.tuple([valita_exports.literal("pong"), pongBodySchema]);
5
5
  //#endregion
6
- export { pongBodySchema, pongMessageSchema };
6
+ export { pongMessageSchema };
7
7
 
8
8
  //# sourceMappingURL=pong.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pong.js","names":["v"],"sources":["../../../../zero-protocol/src/pong.ts"],"sourcesContent":["import * as v from '../../shared/src/valita.ts';\n\nexport const pongBodySchema = v.object({});\nexport const pongMessageSchema = v.tuple([v.literal('pong'), pongBodySchema]);\n\nexport type PongBody = v.Infer<typeof pongBodySchema>;\nexport type PongMessage = v.Infer<typeof pongMessageSchema>;\n"],"mappings":";;AAEA,IAAa,iBAAiBA,eAAE,OAAO,CAAC,CAAC;AACzC,IAAa,oBAAoBA,eAAE,MAAM,CAACA,eAAE,QAAQ,MAAM,GAAG,cAAc,CAAC"}
1
+ {"version":3,"file":"pong.js","names":["v"],"sources":["../../../../zero-protocol/src/pong.ts"],"sourcesContent":["import * as v from '../../shared/src/valita.ts';\n\nconst pongBodySchema = v.object({});\nexport const pongMessageSchema = v.tuple([v.literal('pong'), pongBodySchema]);\n\nexport type PongMessage = v.Infer<typeof pongMessageSchema>;\n"],"mappings":";;AAEA,IAAM,iBAAiBA,eAAE,OAAO,CAAC,CAAC;AAClC,IAAa,oBAAoBA,eAAE,MAAM,CAACA,eAAE,QAAQ,MAAM,GAAG,cAAc,CAAC"}
@@ -1,10 +1,5 @@
1
1
  import * as v from '../../shared/src/valita.ts';
2
- export declare const pullRequestBodySchema: v.ObjectType<{
3
- clientGroupID: v.Type<string>;
4
- cookie: v.UnionType<[v.Type<string>, v.Type<null>]>;
5
- requestID: v.Type<string>;
6
- }, undefined>;
7
- export declare const pullResponseBodySchema: v.ObjectType<{
2
+ declare const pullResponseBodySchema: v.ObjectType<{
8
3
  cookie: v.Type<string>;
9
4
  requestID: v.Type<string>;
10
5
  lastMutationIDChanges: v.Type<Record<string, number>>;
@@ -19,8 +14,8 @@ export declare const pullResponseMessageSchema: v.TupleType<[v.Type<"pull">, v.O
19
14
  requestID: v.Type<string>;
20
15
  lastMutationIDChanges: v.Type<Record<string, number>>;
21
16
  }, undefined>]>;
22
- export type PullRequestBody = v.Infer<typeof pullRequestBodySchema>;
23
17
  export type PullResponseBody = v.Infer<typeof pullResponseBodySchema>;
24
18
  export type PullRequestMessage = v.Infer<typeof pullRequestMessageSchema>;
25
19
  export type PullResponseMessage = v.Infer<typeof pullResponseMessageSchema>;
20
+ export {};
26
21
  //# sourceMappingURL=pull.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pull.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/pull.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAGhD,eAAO,MAAM,qBAAqB;;;;aAIhC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;aAOjC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;eAGnC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;eAGpC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
1
+ {"version":3,"file":"pull.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/pull.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAShD,QAAA,MAAM,sBAAsB;;;;aAO1B,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;eAGnC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;eAGpC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
@@ -14,6 +14,6 @@ var pullResponseBodySchema = valita_exports.object({
14
14
  var pullRequestMessageSchema = valita_exports.tuple([valita_exports.literal("pull"), pullRequestBodySchema]);
15
15
  var pullResponseMessageSchema = valita_exports.tuple([valita_exports.literal("pull"), pullResponseBodySchema]);
16
16
  //#endregion
17
- export { pullRequestBodySchema, pullRequestMessageSchema, pullResponseBodySchema, pullResponseMessageSchema };
17
+ export { pullRequestMessageSchema, pullResponseMessageSchema };
18
18
 
19
19
  //# sourceMappingURL=pull.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pull.js","names":["v"],"sources":["../../../../zero-protocol/src/pull.ts"],"sourcesContent":["import * as v from '../../shared/src/valita.ts';\nimport {nullableVersionSchema, versionSchema} from './version.ts';\n\nexport const pullRequestBodySchema = v.object({\n clientGroupID: v.string(),\n cookie: nullableVersionSchema,\n requestID: v.string(),\n});\n\nexport const pullResponseBodySchema = v.object({\n cookie: versionSchema,\n // Matches pullRequestBodySchema requestID that initiated this response\n requestID: v.string(),\n lastMutationIDChanges: v.record(v.number()),\n // Pull is currently only used for mutation recovery which does not use\n // the patch so we save work by not computing the patch.\n});\n\nexport const pullRequestMessageSchema = v.tuple([\n v.literal('pull'),\n pullRequestBodySchema,\n]);\n\nexport const pullResponseMessageSchema = v.tuple([\n v.literal('pull'),\n pullResponseBodySchema,\n]);\n\nexport type PullRequestBody = v.Infer<typeof pullRequestBodySchema>;\nexport type PullResponseBody = v.Infer<typeof pullResponseBodySchema>;\n\nexport type PullRequestMessage = v.Infer<typeof pullRequestMessageSchema>;\nexport type PullResponseMessage = v.Infer<typeof pullResponseMessageSchema>;\n"],"mappings":";;;AAGA,IAAa,wBAAwBA,eAAE,OAAO;CAC5C,eAAeA,eAAE,OAAO;CACxB,QAAQ;CACR,WAAWA,eAAE,OAAO;AACtB,CAAC;AAED,IAAa,yBAAyBA,eAAE,OAAO;CAC7C,QAAQ;CAER,WAAWA,eAAE,OAAO;CACpB,uBAAuBA,eAAE,OAAOA,eAAE,OAAO,CAAC;AAG5C,CAAC;AAED,IAAa,2BAA2BA,eAAE,MAAM,CAC9CA,eAAE,QAAQ,MAAM,GAChB,qBACF,CAAC;AAED,IAAa,4BAA4BA,eAAE,MAAM,CAC/CA,eAAE,QAAQ,MAAM,GAChB,sBACF,CAAC"}
1
+ {"version":3,"file":"pull.js","names":["v"],"sources":["../../../../zero-protocol/src/pull.ts"],"sourcesContent":["import * as v from '../../shared/src/valita.ts';\nimport {nullableVersionSchema, versionSchema} from './version.ts';\n\nconst pullRequestBodySchema = v.object({\n clientGroupID: v.string(),\n cookie: nullableVersionSchema,\n requestID: v.string(),\n});\n\nconst pullResponseBodySchema = v.object({\n cookie: versionSchema,\n // Matches pullRequestBodySchema requestID that initiated this response\n requestID: v.string(),\n lastMutationIDChanges: v.record(v.number()),\n // Pull is currently only used for mutation recovery which does not use\n // the patch so we save work by not computing the patch.\n});\n\nexport const pullRequestMessageSchema = v.tuple([\n v.literal('pull'),\n pullRequestBodySchema,\n]);\n\nexport const pullResponseMessageSchema = v.tuple([\n v.literal('pull'),\n pullResponseBodySchema,\n]);\n\nexport type PullResponseBody = v.Infer<typeof pullResponseBodySchema>;\n\nexport type PullRequestMessage = v.Infer<typeof pullRequestMessageSchema>;\nexport type PullResponseMessage = v.Infer<typeof pullResponseMessageSchema>;\n"],"mappings":";;;AAGA,IAAM,wBAAwBA,eAAE,OAAO;CACrC,eAAeA,eAAE,OAAO;CACxB,QAAQ;CACR,WAAWA,eAAE,OAAO;AACtB,CAAC;AAED,IAAM,yBAAyBA,eAAE,OAAO;CACtC,QAAQ;CAER,WAAWA,eAAE,OAAO;CACpB,uBAAuBA,eAAE,OAAOA,eAAE,OAAO,CAAC;AAG5C,CAAC;AAED,IAAa,2BAA2BA,eAAE,MAAM,CAC9CA,eAAE,QAAQ,MAAM,GAChB,qBACF,CAAC;AAED,IAAa,4BAA4BA,eAAE,MAAM,CAC/CA,eAAE,QAAQ,MAAM,GAChB,sBACF,CAAC"}
@@ -162,7 +162,7 @@ export declare const pushErrorSchema: v.UnionType<[v.ObjectType<{
162
162
  clientID: string;
163
163
  }[]>;
164
164
  }, undefined>]>;
165
- export declare const pushResponseBodySchema: v.UnionType<[v.ObjectType<{
165
+ declare const pushResponseBodySchema: v.UnionType<[v.ObjectType<{
166
166
  mutations: v.ArrayType<v.ObjectType<{
167
167
  id: v.ObjectType<{
168
168
  id: v.Type<number>;
@@ -372,7 +372,6 @@ export declare const ackMutationResponsesMessageSchema: v.TupleType<[v.Type<"ack
372
372
  export type PushBody = v.Infer<typeof pushBodySchema>;
373
373
  export type PushMessage = v.Infer<typeof pushMessageSchema>;
374
374
  export type PushResponseBody = v.Infer<typeof pushResponseBodySchema>;
375
- export type PushResponse = v.Infer<typeof pushResponseSchema>;
376
375
  export type PushResponseMessage = v.Infer<typeof pushResponseMessageSchema>;
377
376
  export type MutationResponse = v.Infer<typeof mutationResponseSchema>;
378
377
  /**
@@ -380,6 +379,5 @@ export type MutationResponse = v.Infer<typeof mutationResponseSchema>;
380
379
  */
381
380
  export type PushError = v.Infer<typeof pushErrorSchema>;
382
381
  export type PushOk = v.Infer<typeof pushOkSchema>;
383
- export type AckMutationMessage = v.Infer<typeof ackMutationResponsesMessageSchema>;
384
382
  export {};
385
383
  //# sourceMappingURL=push.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/push.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAGhD,OAAO,EAAC,sBAAsB,EAAiB,MAAM,eAAe,CAAC;AAErE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUzB;;;OAGG;;IAEH,sDAAsD;;aAEtD,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAT5B;;;OAGG;;IAEH,sDAAsD;;eAIqB,CAAC;AAE9E,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;aAEhB,CAAC;AA4CH;;GAEG;AACH,eAAO,MAAM,eAAe;IAzC1B,kBAAkB;;IAElB,kBAAkB;;;;;;IAOlB,kBAAkB;;IAElB,kBAAkB;;;;;;IAOlB,kBAAkB;;IAElB,kBAAkB;;IAElB,kBAAkB;;IAElB,kBAAkB;;;;;;IAOlB,kBAAkB;;IAElB,kBAAkB;;IAElB,kBAAkB;;;;;eAWnB,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;IAhDjC,kBAAkB;;IAElB,kBAAkB;;;;;;IAOlB,kBAAkB;;IAElB,kBAAkB;;;;;;IAOlB,kBAAkB;;IAElB,kBAAkB;;IAElB,kBAAkB;;IAElB,kBAAkB;;;;;;IAOlB,kBAAkB;;IAElB,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kBAAkB;;IAElB,kBAAkB;;;;;;IAOlB,kBAAkB;;IAElB,kBAAkB;;IAElB,kBAAkB;;IAElB,kBAAkB;;;;;;IAOlB,kBAAkB;;IAElB,kBAAkB;;IAElB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkBnB,CAAC;AACF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;IAtDpC,kBAAkB;;IAElB,kBAAkB;;;;;;IAOlB,kBAAkB;;IAElB,kBAAkB;;;;;;IAOlB,kBAAkB;;IAElB,kBAAkB;;IAElB,kBAAkB;;IAElB,kBAAkB;;;;;;IAOlB,kBAAkB;;IAElB,kBAAkB;;IAElB,kBAAkB;;;;;mBAsBlB,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;eAG5C,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
@@ -71,6 +71,6 @@ valita_exports.union(pushResponseBodySchema, pushFailedBodySchema);
71
71
  var pushResponseMessageSchema = valita_exports.tuple([valita_exports.literal("pushResponse"), pushResponseBodySchema]);
72
72
  var ackMutationResponsesMessageSchema = valita_exports.tuple([valita_exports.literal("ackMutationResponses"), mutationIDSchema]);
73
73
  //#endregion
74
- export { ackMutationResponsesMessageSchema, pushBodySchema, pushErrorSchema, pushMessageSchema, pushResponseBodySchema, pushResponseMessageSchema };
74
+ export { ackMutationResponsesMessageSchema, pushBodySchema, pushErrorSchema, pushMessageSchema, pushResponseMessageSchema };
75
75
 
76
76
  //# sourceMappingURL=push.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"push.js","names":["v"],"sources":["../../../../zero-protocol/src/push.ts"],"sourcesContent":["import * as v from '../../shared/src/valita.ts';\nimport {pushFailedBodySchema} from './error.ts';\nimport {mutationIDSchema} from './mutation-id.ts';\nimport {mutationResponseSchema, mutationSchema} from './mutation.ts';\n\nexport const pushBodySchema = v.object({\n clientGroupID: v.string(),\n mutations: v.array(mutationSchema),\n pushVersion: v.number(),\n // For legacy (CRUD) mutations, the schema is tied to the client group /\n // sync connection. For custom mutations, schema versioning is delegated\n // to the custom protocol / api-server.\n schemaVersion: v.number().optional(),\n timestamp: v.number(),\n requestID: v.string(),\n /**\n * @deprecated auth is managed at client-group scope via connect/updateAuth\n * and should not be included in push messages.\n */\n auth: v.string().optional(),\n /** W3C traceparent header for distributed tracing. */\n traceparent: v.string().optional(),\n});\n\nexport const pushMessageSchema = v.tuple([v.literal('push'), pushBodySchema]);\n\nconst pushOkSchema = v.object({\n mutations: v.array(mutationResponseSchema),\n});\n\n/**\n * @deprecated push errors are now represented as ['error', { ... }] messages\n */\nconst unsupportedPushVersionSchema = v.object({\n /** @deprecated */\n error: v.literal('unsupportedPushVersion'),\n /** @deprecated */\n mutationIDs: v.array(mutationIDSchema).optional(),\n});\n/**\n * @deprecated push errors are now represented as ['error', { ... }] messages\n */\nconst unsupportedSchemaVersionSchema = v.object({\n /** @deprecated */\n error: v.literal('unsupportedSchemaVersion'),\n /** @deprecated */\n mutationIDs: v.array(mutationIDSchema).optional(),\n});\n/**\n * @deprecated push http errors are now represented as ['error', { ... }] messages\n */\nconst httpErrorSchema = v.object({\n /** @deprecated */\n error: v.literal('http'),\n /** @deprecated */\n status: v.number(),\n /** @deprecated */\n details: v.string(),\n /** @deprecated */\n mutationIDs: v.array(mutationIDSchema).optional(),\n});\n/**\n * @deprecated push zero errors are now represented as ['error', { ... }] messages\n */\nconst zeroPusherErrorSchema = v.object({\n /** @deprecated */\n error: v.literal('zeroPusher'),\n /** @deprecated */\n details: v.string(),\n /** @deprecated */\n mutationIDs: v.array(mutationIDSchema).optional(),\n});\n/**\n * @deprecated push errors are now represented as ['error', { ... }] messages\n */\nexport const pushErrorSchema = v.union(\n unsupportedPushVersionSchema,\n unsupportedSchemaVersionSchema,\n httpErrorSchema,\n zeroPusherErrorSchema,\n);\n\nexport const pushResponseBodySchema = v.union(pushOkSchema, pushErrorSchema);\n\nexport const pushResponseSchema = v.union(\n pushResponseBodySchema,\n pushFailedBodySchema,\n);\nexport const pushResponseMessageSchema = v.tuple([\n v.literal('pushResponse'),\n pushResponseBodySchema,\n]);\n\nexport const ackMutationResponsesMessageSchema = v.tuple([\n v.literal('ackMutationResponses'),\n mutationIDSchema,\n]);\n\nexport type PushBody = v.Infer<typeof pushBodySchema>;\nexport type PushMessage = v.Infer<typeof pushMessageSchema>;\nexport type PushResponseBody = v.Infer<typeof pushResponseBodySchema>;\nexport type PushResponse = v.Infer<typeof pushResponseSchema>;\nexport type PushResponseMessage = v.Infer<typeof pushResponseMessageSchema>;\nexport type MutationResponse = v.Infer<typeof mutationResponseSchema>;\n/**\n * @deprecated push errors are now represented as ['error', { ... }] messages\n */\nexport type PushError = v.Infer<typeof pushErrorSchema>;\nexport type PushOk = v.Infer<typeof pushOkSchema>;\nexport type AckMutationMessage = v.Infer<\n typeof ackMutationResponsesMessageSchema\n>;\n"],"mappings":";;;;;AAKA,IAAa,iBAAiBA,eAAE,OAAO;CACrC,eAAeA,eAAE,OAAO;CACxB,WAAWA,eAAE,MAAM,cAAc;CACjC,aAAaA,eAAE,OAAO;CAItB,eAA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vDA,eAAE,QAAQ,sBAAsB,GAChC,gBACF,CAAC"}
1
+ {"version":3,"file":"push.js","names":["v"],"sources":["../../../../zero-protocol/src/push.ts"],"sourcesContent":["import * as v from '../../shared/src/valita.ts';\nimport {pushFailedBodySchema} from './error.ts';\nimport {mutationIDSchema} from './mutation-id.ts';\nimport {mutationResponseSchema, mutationSchema} from './mutation.ts';\n\nexport const pushBodySchema = v.object({\n clientGroupID: v.string(),\n mutations: v.array(mutationSchema),\n pushVersion: v.number(),\n // For legacy (CRUD) mutations, the schema is tied to the client group /\n // sync connection. For custom mutations, schema versioning is delegated\n // to the custom protocol / api-server.\n schemaVersion: v.number().optional(),\n timestamp: v.number(),\n requestID: v.string(),\n /**\n * @deprecated auth is managed at client-group scope via connect/updateAuth\n * and should not be included in push messages.\n */\n auth: v.string().optional(),\n /** W3C traceparent header for distributed tracing. */\n traceparent: v.string().optional(),\n});\n\nexport const pushMessageSchema = v.tuple([v.literal('push'), pushBodySchema]);\n\nconst pushOkSchema = v.object({\n mutations: v.array(mutationResponseSchema),\n});\n\n/**\n * @deprecated push errors are now represented as ['error', { ... }] messages\n */\nconst unsupportedPushVersionSchema = v.object({\n /** @deprecated */\n error: v.literal('unsupportedPushVersion'),\n /** @deprecated */\n mutationIDs: v.array(mutationIDSchema).optional(),\n});\n/**\n * @deprecated push errors are now represented as ['error', { ... }] messages\n */\nconst unsupportedSchemaVersionSchema = v.object({\n /** @deprecated */\n error: v.literal('unsupportedSchemaVersion'),\n /** @deprecated */\n mutationIDs: v.array(mutationIDSchema).optional(),\n});\n/**\n * @deprecated push http errors are now represented as ['error', { ... }] messages\n */\nconst httpErrorSchema = v.object({\n /** @deprecated */\n error: v.literal('http'),\n /** @deprecated */\n status: v.number(),\n /** @deprecated */\n details: v.string(),\n /** @deprecated */\n mutationIDs: v.array(mutationIDSchema).optional(),\n});\n/**\n * @deprecated push zero errors are now represented as ['error', { ... }] messages\n */\nconst zeroPusherErrorSchema = v.object({\n /** @deprecated */\n error: v.literal('zeroPusher'),\n /** @deprecated */\n details: v.string(),\n /** @deprecated */\n mutationIDs: v.array(mutationIDSchema).optional(),\n});\n/**\n * @deprecated push errors are now represented as ['error', { ... }] messages\n */\nexport const pushErrorSchema = v.union(\n unsupportedPushVersionSchema,\n unsupportedSchemaVersionSchema,\n httpErrorSchema,\n zeroPusherErrorSchema,\n);\n\nconst pushResponseBodySchema = v.union(pushOkSchema, pushErrorSchema);\n\nexport const pushResponseSchema = v.union(\n pushResponseBodySchema,\n pushFailedBodySchema,\n);\nexport const pushResponseMessageSchema = v.tuple([\n v.literal('pushResponse'),\n pushResponseBodySchema,\n]);\n\nexport const ackMutationResponsesMessageSchema = v.tuple([\n v.literal('ackMutationResponses'),\n mutationIDSchema,\n]);\n\nexport type PushBody = v.Infer<typeof pushBodySchema>;\nexport type PushMessage = v.Infer<typeof pushMessageSchema>;\nexport type PushResponseBody = v.Infer<typeof pushResponseBodySchema>;\nexport type PushResponseMessage = v.Infer<typeof pushResponseMessageSchema>;\nexport type MutationResponse = v.Infer<typeof mutationResponseSchema>;\n/**\n * @deprecated push errors are now represented as ['error', { ... }] messages\n */\nexport type PushError = v.Infer<typeof pushErrorSchema>;\nexport type PushOk = v.Infer<typeof pushOkSchema>;\n"],"mappings":";;;;;AAKA,IAAa,iBAAiBA,eAAE,OAAO;CACrC,eAAeA,eAAE,OAAO;CACxB,WAAWA,eAAE,MAAM,cAAc;CACjC,aAAaA,eAAE,OAAO;CAItB,eAAeA,eAAE,OAAO,CAAC,CAAC,SAAS;CACnC,WAAWA,eAAE,OAAO;CACpB,WAAWA,eAAE,OAAO;;;;;CAKpB,MAAMA,eAAE,OAAO,CAAC,CAAC,SAAS;;CAE1B,aAAaA,eAAE,OAAO,CAAC,CAAC,SAAS;AACnC,CAAC;AAED,IAAa,oBAAoBA,eAAE,MAAM,CAACA,eAAE,QAAQ,MAAM,GAAG,cAAc,CAAC;AAE5E,IAAM,eAAeA,eAAE,OAAO,EAC5B,WAAWA,eAAE,MAAM,sBAAsB,EAC3C,CAAC;;;;AAKD,IAAM,+BAA+BA,eAAE,OAAO;;CAE5C,OAAOA,eAAE,QAAQ,wBAAwB;;CAEzC,aAAaA,eAAE,MAAM,gBAAgB,CAAC,CAAC,SAAS;AAClD,CAAC;;;;AAID,IAAM,iCAAiCA,eAAE,OAAO;;CAE9C,OAAOA,eAAE,QAAQ,0BAA0B;;CAE3C,aAAaA,eAAE,MAAM,gBAAgB,CAAC,CAAC,SAAS;AAClD,CAAC;;;;AAID,IAAM,kBAAkBA,eAAE,OAAO;;CAE/B,OAAOA,eAAE,QAAQ,MAAM;;CAEvB,QAAQA,eAAE,OAAO;;CAEjB,SAASA,eAAE,OAAO;;CAElB,aAAaA,eAAE,MAAM,gBAAgB,CAAC,CAAC,SAAS;AAClD,CAAC;;;;AAID,IAAM,wBAAwBA,eAAE,OAAO;;CAErC,OAAOA,eAAE,QAAQ,YAAY;;CAE7B,SAASA,eAAE,OAAO;;CAElB,aAAaA,eAAE,MAAM,gBAAgB,CAAC,CAAC,SAAS;AAClD,CAAC;;;;AAID,IAAa,kBAAkBA,eAAE,MAC/B,8BACA,gCACA,iBACA,qBACF;AAEA,IAAM,yBAAyBA,eAAE,MAAM,cAAc,eAAe;AAElCA,eAAE,MAClC,wBACA,oBACF;AACA,IAAa,4BAA4BA,eAAE,MAAM,CAC/CA,eAAE,QAAQ,cAAc,GACxB,sBACF,CAAC;AAED,IAAa,oCAAoCA,eAAE,MAAM,CACvDA,eAAE,QAAQ,sBAAsB,GAChC,gBACF,CAAC"}
@@ -1,9 +1,4 @@
1
1
  import * as v from '../../shared/src/valita.ts';
2
- export declare const putOpSchema: v.ObjectType<{
3
- op: v.Type<"put">;
4
- hash: v.Type<string>;
5
- ttl: v.Optional<number>;
6
- }, undefined>;
7
2
  export declare const upPutOpSchema: v.ObjectType<Omit<{
8
3
  op: v.Type<"put">;
9
4
  hash: v.Type<string>;
@@ -13,13 +8,6 @@ export declare const upPutOpSchema: v.ObjectType<Omit<{
13
8
  name: v.Optional<string>;
14
9
  args: v.Optional<readonly import("../../shared/src/json.ts").ReadonlyJSONValue[]>;
15
10
  }, undefined>;
16
- declare const delOpSchema: v.ObjectType<{
17
- op: v.Type<"del">;
18
- hash: v.Type<string>;
19
- }, undefined>;
20
- declare const clearOpSchema: v.ObjectType<{
21
- op: v.Type<"clear">;
22
- }, undefined>;
23
11
  declare const patchOpSchema: v.UnionType<[v.ObjectType<{
24
12
  op: v.Type<"put">;
25
13
  hash: v.Type<string>;
@@ -68,12 +56,8 @@ export declare const upQueriesPatchSchema: v.ArrayType<v.UnionType<[v.ObjectType
68
56
  }, undefined>, v.ObjectType<{
69
57
  op: v.Type<"clear">;
70
58
  }, undefined>]>>;
71
- export type QueriesPutOp = v.Infer<typeof putOpSchema>;
72
- export type QueriesDelOp = v.Infer<typeof delOpSchema>;
73
- export type QueriesClearOp = v.Infer<typeof clearOpSchema>;
74
59
  export type QueriesPatchOp = v.Infer<typeof patchOpSchema>;
75
60
  export type UpQueriesPatchOp = v.Infer<typeof upPatchOpSchema>;
76
- export type QueriesPatch = v.Infer<typeof queriesPatchSchema>;
77
61
  export type UpQueriesPatch = v.Infer<typeof upQueriesPatchSchema>;
78
62
  export {};
79
63
  //# sourceMappingURL=queries-patch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"queries-patch.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/queries-patch.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAGhD,eAAO,MAAM,WAAW;;;;aAItB,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;aAOxB,CAAC;AAEH,QAAA,MAAM,WAAW;;;aAGf,CAAC;AAEH,QAAA,MAAM,aAAa;;aAEjB,CAAC;AAEH,QAAA,MAAM,aAAa;;;;;;;;;eAAmD,CAAC;AACvE,QAAA,MAAM,eAAe;;;;;;;;;;;;;eAAqD,CAAC;AAE3E,eAAO,MAAM,kBAAkB;;;;;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AC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -22,6 +22,6 @@ var upPatchOpSchema = valita_exports.union(upPutOpSchema, delOpSchema, clearOpSc
22
22
  var queriesPatchSchema = valita_exports.array(patchOpSchema);
23
23
  var upQueriesPatchSchema = valita_exports.array(upPatchOpSchema);
24
24
  //#endregion
25
- export { putOpSchema, queriesPatchSchema, upPutOpSchema, upQueriesPatchSchema };
25
+ export { queriesPatchSchema, upPutOpSchema, upQueriesPatchSchema };
26
26
 
27
27
  //# sourceMappingURL=queries-patch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"queries-patch.js","names":["v","v.readonly"],"sources":["../../../../zero-protocol/src/queries-patch.ts"],"sourcesContent":["import {jsonSchema} from '../../shared/src/json-schema.ts';\nimport * as v from '../../shared/src/valita.ts';\nimport {strictASTSchema} from './ast.ts';\n\nexport const putOpSchema = v.object({\n op: v.literal('put'),\n hash: v.string(),\n ttl: v.number().optional(),\n});\n\nexport const upPutOpSchema = putOpSchema.extend({\n // All fields are optional in this transitional period.\n // - ast is filled in for client queries\n // - name and args are filled in for custom queries\n ast: strictASTSchema.optional(),\n name: v.string().optional(),\n args: v.readonly(v.array(jsonSchema)).optional(),\n});\n\nconst delOpSchema = v.object({\n op: v.literal('del'),\n hash: v.string(),\n});\n\nconst clearOpSchema = v.object({\n op: v.literal('clear'),\n});\n\nconst patchOpSchema = v.union(putOpSchema, delOpSchema, clearOpSchema);\nconst upPatchOpSchema = v.union(upPutOpSchema, delOpSchema, clearOpSchema);\n\nexport const queriesPatchSchema = v.array(patchOpSchema);\nexport const upQueriesPatchSchema = v.array(upPatchOpSchema);\n\nexport type QueriesPutOp = v.Infer<typeof putOpSchema>;\nexport type QueriesDelOp = v.Infer<typeof delOpSchema>;\nexport type QueriesClearOp = v.Infer<typeof clearOpSchema>;\nexport type QueriesPatchOp = v.Infer<typeof patchOpSchema>;\nexport type UpQueriesPatchOp = v.Infer<typeof upPatchOpSchema>;\nexport type QueriesPatch = v.Infer<typeof queriesPatchSchema>;\nexport type UpQueriesPatch = v.Infer<typeof upQueriesPatchSchema>;\n"],"mappings":";;;;AAIA,IAAa,cAAcA,eAAE,OAAO;CAClC,IAAIA,eAAE,QAAQ,KAAK;CACnB,MAAMA,eAAE,OAAO;CACf,KAAKA,eAAE,OAAO,CAAC,CAAC,SAAS;AAC3B,CAAC;AAED,IAAa,gBAAgB,YAAY,OAAO;CAI9C,KAAK,gBAAgB,SAAS;CAC9B,MAAMA,eAAE,OAAO,CAAC,CAAC,SAAS;CAC1B,MAAMC,SAAWD,eAAE,MAAM,UAAU,CAAC,CAAC,CAAC,SAAS;AACjD,CAAC;AAED,IAAM,cAAcA,eAAE,OAAO;CAC3B,IAAIA,eAAE,QAAQ,KAAK;CACnB,MAAMA,eAAE,OAAO;AACjB,CAAC;AAED,IAAM,gBAAgBA,eAAE,OAAO,EAC7B,IAAIA,eAAE,QAAQ,OAAO,EACvB,CAAC;AAED,IAAM,gBAAgBA,eAAE,MAAM,aAAa,aAAa,aAAa;AACrE,IAAM,kBAAkBA,eAAE,MAAM,eAAe,aAAa,aAAa;AAEzE,IAAa,qBAAqBA,eAAE,MAAM,aAAa;AACvD,IAAa,uBAAuBA,eAAE,MAAM,eAAe"}
1
+ {"version":3,"file":"queries-patch.js","names":["v","v.readonly"],"sources":["../../../../zero-protocol/src/queries-patch.ts"],"sourcesContent":["import {jsonSchema} from '../../shared/src/json-schema.ts';\nimport * as v from '../../shared/src/valita.ts';\nimport {strictASTSchema} from './ast.ts';\n\nconst putOpSchema = v.object({\n op: v.literal('put'),\n hash: v.string(),\n ttl: v.number().optional(),\n});\n\nexport const upPutOpSchema = putOpSchema.extend({\n // All fields are optional in this transitional period.\n // - ast is filled in for client queries\n // - name and args are filled in for custom queries\n ast: strictASTSchema.optional(),\n name: v.string().optional(),\n args: v.readonly(v.array(jsonSchema)).optional(),\n});\n\nconst delOpSchema = v.object({\n op: v.literal('del'),\n hash: v.string(),\n});\n\nconst clearOpSchema = v.object({\n op: v.literal('clear'),\n});\n\nconst patchOpSchema = v.union(putOpSchema, delOpSchema, clearOpSchema);\nconst upPatchOpSchema = v.union(upPutOpSchema, delOpSchema, clearOpSchema);\n\nexport const queriesPatchSchema = v.array(patchOpSchema);\nexport const upQueriesPatchSchema = v.array(upPatchOpSchema);\n\nexport type QueriesPatchOp = v.Infer<typeof patchOpSchema>;\nexport type UpQueriesPatchOp = v.Infer<typeof upPatchOpSchema>;\nexport type UpQueriesPatch = v.Infer<typeof upQueriesPatchSchema>;\n"],"mappings":";;;;AAIA,IAAM,cAAcA,eAAE,OAAO;CAC3B,IAAIA,eAAE,QAAQ,KAAK;CACnB,MAAMA,eAAE,OAAO;CACf,KAAKA,eAAE,OAAO,CAAC,CAAC,SAAS;AAC3B,CAAC;AAED,IAAa,gBAAgB,YAAY,OAAO;CAI9C,KAAK,gBAAgB,SAAS;CAC9B,MAAMA,eAAE,OAAO,CAAC,CAAC,SAAS;CAC1B,MAAMC,SAAWD,eAAE,MAAM,UAAU,CAAC,CAAC,CAAC,SAAS;AACjD,CAAC;AAED,IAAM,cAAcA,eAAE,OAAO;CAC3B,IAAIA,eAAE,QAAQ,KAAK;CACnB,MAAMA,eAAE,OAAO;AACjB,CAAC;AAED,IAAM,gBAAgBA,eAAE,OAAO,EAC7B,IAAIA,eAAE,QAAQ,OAAO,EACvB,CAAC;AAED,IAAM,gBAAgBA,eAAE,MAAM,aAAa,aAAa,aAAa;AACrE,IAAM,kBAAkBA,eAAE,MAAM,eAAe,aAAa,aAAa;AAEzE,IAAa,qBAAqBA,eAAE,MAAM,aAAa;AACvD,IAAa,uBAAuBA,eAAE,MAAM,eAAe"}