@rocicorp/zero 0.7.2024120200 → 0.7.2024120700

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 (238) hide show
  1. package/out/advanced.js +1 -1
  2. package/out/{chunk-C7M3BJ3Z.js → chunk-6HXO6VMP.js} +13 -12
  3. package/out/chunk-6HXO6VMP.js.map +7 -0
  4. package/out/{chunk-KL66XOAW.js → chunk-PFF4AHTF.js} +331 -241
  5. package/out/{chunk-KL66XOAW.js.map → chunk-PFF4AHTF.js.map} +4 -4
  6. package/out/otel/src/noop-span-exporter.d.ts +8 -0
  7. package/out/otel/src/noop-span-exporter.d.ts.map +1 -0
  8. package/out/otel/src/noop-span-exporter.js +14 -0
  9. package/out/otel/src/noop-span-exporter.js.map +1 -0
  10. package/out/otel/src/span.d.ts +5 -0
  11. package/out/otel/src/span.d.ts.map +1 -0
  12. package/out/otel/src/span.js +30 -0
  13. package/out/otel/src/span.js.map +1 -0
  14. package/out/otel/src/version.d.ts +2 -0
  15. package/out/otel/src/version.d.ts.map +1 -0
  16. package/out/otel/src/version.js +2 -0
  17. package/out/otel/src/version.js.map +1 -0
  18. package/out/react.js +12 -6
  19. package/out/react.js.map +2 -2
  20. package/out/shared/src/asserts.d.ts +1 -1
  21. package/out/shared/src/asserts.d.ts.map +1 -1
  22. package/out/shared/src/asserts.js +2 -1
  23. package/out/shared/src/asserts.js.map +1 -1
  24. package/out/solid.js +2 -2
  25. package/out/zero-cache/src/auth/load-schema.d.ts.map +1 -1
  26. package/out/zero-cache/src/auth/load-schema.js +4 -20
  27. package/out/zero-cache/src/auth/load-schema.js.map +1 -1
  28. package/out/zero-cache/src/auth/write-authorizer.js +10 -6
  29. package/out/zero-cache/src/auth/write-authorizer.js.map +1 -1
  30. package/out/zero-cache/src/config/zero-config.d.ts +11 -7
  31. package/out/zero-cache/src/config/zero-config.d.ts.map +1 -1
  32. package/out/zero-cache/src/config/zero-config.js +11 -7
  33. package/out/zero-cache/src/config/zero-config.js.map +1 -1
  34. package/out/zero-cache/src/server/change-streamer.d.ts +1 -1
  35. package/out/zero-cache/src/server/change-streamer.d.ts.map +1 -1
  36. package/out/zero-cache/src/server/change-streamer.js +3 -3
  37. package/out/zero-cache/src/server/change-streamer.js.map +1 -1
  38. package/out/zero-cache/src/server/main.js +6 -11
  39. package/out/zero-cache/src/server/main.js.map +1 -1
  40. package/out/zero-cache/src/server/replicator.d.ts +1 -1
  41. package/out/zero-cache/src/server/replicator.d.ts.map +1 -1
  42. package/out/zero-cache/src/server/replicator.js +3 -3
  43. package/out/zero-cache/src/server/replicator.js.map +1 -1
  44. package/out/zero-cache/src/server/syncer.d.ts +1 -1
  45. package/out/zero-cache/src/server/syncer.d.ts.map +1 -1
  46. package/out/zero-cache/src/server/syncer.js +34 -5
  47. package/out/zero-cache/src/server/syncer.js.map +1 -1
  48. package/out/zero-cache/src/services/change-streamer/pg/change-source.d.ts.map +1 -1
  49. package/out/zero-cache/src/services/change-streamer/pg/change-source.js +31 -21
  50. package/out/zero-cache/src/services/change-streamer/pg/change-source.js.map +1 -1
  51. package/out/zero-cache/src/services/change-streamer/storer.d.ts.map +1 -1
  52. package/out/zero-cache/src/services/change-streamer/storer.js +11 -6
  53. package/out/zero-cache/src/services/change-streamer/storer.js.map +1 -1
  54. package/out/zero-cache/src/services/dispatcher/connect-params.d.ts +2 -1
  55. package/out/zero-cache/src/services/dispatcher/connect-params.d.ts.map +1 -1
  56. package/out/zero-cache/src/services/dispatcher/connect-params.js +3 -2
  57. package/out/zero-cache/src/services/dispatcher/connect-params.js.map +1 -1
  58. package/out/zero-cache/src/services/dispatcher/dispatcher.d.ts.map +1 -1
  59. package/out/zero-cache/src/services/dispatcher/dispatcher.js +5 -5
  60. package/out/zero-cache/src/services/dispatcher/dispatcher.js.map +1 -1
  61. package/out/zero-cache/src/services/mutagen/mutagen.d.ts +3 -3
  62. package/out/zero-cache/src/services/mutagen/mutagen.d.ts.map +1 -1
  63. package/out/zero-cache/src/services/mutagen/mutagen.js +31 -22
  64. package/out/zero-cache/src/services/mutagen/mutagen.js.map +1 -1
  65. package/out/zero-cache/src/services/runner.js +1 -4
  66. package/out/zero-cache/src/services/runner.js.map +1 -1
  67. package/out/zero-cache/src/services/view-syncer/client-handler.d.ts +1 -1
  68. package/out/zero-cache/src/services/view-syncer/client-handler.d.ts.map +1 -1
  69. package/out/zero-cache/src/services/view-syncer/client-handler.js +3 -2
  70. package/out/zero-cache/src/services/view-syncer/client-handler.js.map +1 -1
  71. package/out/zero-cache/src/services/view-syncer/cvr-store.d.ts +2 -2
  72. package/out/zero-cache/src/services/view-syncer/cvr-store.d.ts.map +1 -1
  73. package/out/zero-cache/src/services/view-syncer/cvr-store.js +45 -34
  74. package/out/zero-cache/src/services/view-syncer/cvr-store.js.map +1 -1
  75. package/out/zero-cache/src/services/view-syncer/cvr.d.ts.map +1 -1
  76. package/out/zero-cache/src/services/view-syncer/cvr.js +2 -2
  77. package/out/zero-cache/src/services/view-syncer/cvr.js.map +1 -1
  78. package/out/zero-cache/src/services/view-syncer/pipeline-driver.d.ts.map +1 -1
  79. package/out/zero-cache/src/services/view-syncer/pipeline-driver.js +16 -3
  80. package/out/zero-cache/src/services/view-syncer/pipeline-driver.js.map +1 -1
  81. package/out/zero-cache/src/services/view-syncer/schema/types.d.ts +5 -195
  82. package/out/zero-cache/src/services/view-syncer/schema/types.d.ts.map +1 -1
  83. package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts +5 -5
  84. package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts.map +1 -1
  85. package/out/zero-cache/src/services/view-syncer/view-syncer.js +384 -357
  86. package/out/zero-cache/src/services/view-syncer/view-syncer.js.map +1 -1
  87. package/out/zero-cache/src/types/error-for-client.d.ts +10 -3
  88. package/out/zero-cache/src/types/error-for-client.d.ts.map +1 -1
  89. package/out/zero-cache/src/types/error-for-client.js +4 -4
  90. package/out/zero-cache/src/types/error-for-client.js.map +1 -1
  91. package/out/zero-cache/src/types/lite.d.ts.map +1 -1
  92. package/out/zero-cache/src/types/lite.js +1 -0
  93. package/out/zero-cache/src/types/lite.js.map +1 -1
  94. package/out/zero-cache/src/types/pg.d.ts +1 -1
  95. package/out/zero-cache/src/types/pg.d.ts.map +1 -1
  96. package/out/zero-cache/src/types/pg.js +33 -7
  97. package/out/zero-cache/src/types/pg.js.map +1 -1
  98. package/out/zero-cache/src/types/processes.d.ts +5 -1
  99. package/out/zero-cache/src/types/processes.d.ts.map +1 -1
  100. package/out/zero-cache/src/types/processes.js +12 -2
  101. package/out/zero-cache/src/types/processes.js.map +1 -1
  102. package/out/zero-cache/src/types/schema-versions.d.ts.map +1 -1
  103. package/out/zero-cache/src/types/schema-versions.js +4 -5
  104. package/out/zero-cache/src/types/schema-versions.js.map +1 -1
  105. package/out/zero-cache/src/workers/connection.d.ts +14 -6
  106. package/out/zero-cache/src/workers/connection.d.ts.map +1 -1
  107. package/out/zero-cache/src/workers/connection.js +78 -70
  108. package/out/zero-cache/src/workers/connection.js.map +1 -1
  109. package/out/zero-cache/src/workers/syncer.d.ts.map +1 -1
  110. package/out/zero-cache/src/workers/syncer.js +8 -10
  111. package/out/zero-cache/src/workers/syncer.js.map +1 -1
  112. package/out/zero-client/src/client/context.d.ts +1 -1
  113. package/out/zero-client/src/client/context.d.ts.map +1 -1
  114. package/out/zero-client/src/client/options.d.ts +13 -14
  115. package/out/zero-client/src/client/options.d.ts.map +1 -1
  116. package/out/zero-client/src/client/query-manager.d.ts.map +1 -1
  117. package/out/zero-client/src/client/server-error.d.ts +5 -3
  118. package/out/zero-client/src/client/server-error.d.ts.map +1 -1
  119. package/out/zero-client/src/client/zero.d.ts.map +1 -1
  120. package/out/zero-client/src/mod.d.ts +2 -2
  121. package/out/zero-client/src/mod.d.ts.map +1 -1
  122. package/out/zero-protocol/src/ast.d.ts +8 -95
  123. package/out/zero-protocol/src/ast.d.ts.map +1 -1
  124. package/out/zero-protocol/src/ast.js +9 -9
  125. package/out/zero-protocol/src/ast.js.map +1 -1
  126. package/out/zero-protocol/src/change-desired-queries.d.ts +2 -78
  127. package/out/zero-protocol/src/change-desired-queries.d.ts.map +1 -1
  128. package/out/zero-protocol/src/connect.d.ts +2 -78
  129. package/out/zero-protocol/src/connect.d.ts.map +1 -1
  130. package/out/zero-protocol/src/down.d.ts +2 -78
  131. package/out/zero-protocol/src/down.d.ts.map +1 -1
  132. package/out/zero-protocol/src/error.d.ts +18 -1
  133. package/out/zero-protocol/src/error.d.ts.map +1 -1
  134. package/out/zero-protocol/src/error.js +12 -2
  135. package/out/zero-protocol/src/error.js.map +1 -1
  136. package/out/zero-protocol/src/poke.d.ts +4 -156
  137. package/out/zero-protocol/src/poke.d.ts.map +1 -1
  138. package/out/zero-protocol/src/protocol-version.d.ts +20 -0
  139. package/out/zero-protocol/src/protocol-version.d.ts.map +1 -0
  140. package/out/zero-protocol/src/protocol-version.js +20 -0
  141. package/out/zero-protocol/src/protocol-version.js.map +1 -0
  142. package/out/zero-protocol/src/queries-patch.d.ts +3 -117
  143. package/out/zero-protocol/src/queries-patch.d.ts.map +1 -1
  144. package/out/zero-protocol/src/up.d.ts +2 -78
  145. package/out/zero-protocol/src/up.d.ts.map +1 -1
  146. package/out/zero-react/src/use-query.d.ts +9 -1
  147. package/out/zero-react/src/use-query.d.ts.map +1 -1
  148. package/out/zero-schema/src/build-schema.d.ts.map +1 -1
  149. package/out/zero-schema/src/build-schema.js +2 -14
  150. package/out/zero-schema/src/build-schema.js.map +1 -1
  151. package/out/zero-schema/src/compiled-permissions.d.ts +17 -459
  152. package/out/zero-schema/src/compiled-permissions.d.ts.map +1 -1
  153. package/out/zero-schema/src/compiled-permissions.js +1 -1
  154. package/out/zero-schema/src/compiled-permissions.js.map +1 -1
  155. package/out/zero-schema/src/mod.d.ts +1 -1
  156. package/out/zero-schema/src/mod.d.ts.map +1 -1
  157. package/out/zero-schema/src/normalize-table-schema.d.ts +3 -2
  158. package/out/zero-schema/src/normalize-table-schema.d.ts.map +1 -1
  159. package/out/zero-schema/src/normalize-table-schema.js +39 -13
  160. package/out/zero-schema/src/normalize-table-schema.js.map +1 -1
  161. package/out/zero-schema/src/permissions.d.ts +2 -2
  162. package/out/zero-schema/src/permissions.d.ts.map +1 -1
  163. package/out/zero-schema/src/schema-config.d.ts +15 -29
  164. package/out/zero-schema/src/schema-config.d.ts.map +1 -1
  165. package/out/zero-schema/src/schema-config.js +39 -13
  166. package/out/zero-schema/src/schema-config.js.map +1 -1
  167. package/out/zero-schema/src/table-schema.d.ts +24 -38
  168. package/out/zero-schema/src/table-schema.d.ts.map +1 -1
  169. package/out/zero-schema/src/table-schema.js.map +1 -1
  170. package/out/zero.js +2 -2
  171. package/out/zql/src/builder/builder.d.ts.map +1 -1
  172. package/out/zql/src/builder/builder.js +9 -11
  173. package/out/zql/src/builder/builder.js.map +1 -1
  174. package/out/zql/src/ivm/array-view.d.ts +1 -1
  175. package/out/zql/src/ivm/array-view.d.ts.map +1 -1
  176. package/out/zql/src/ivm/array-view.js +16 -3
  177. package/out/zql/src/ivm/array-view.js.map +1 -1
  178. package/out/zql/src/ivm/data.d.ts +1 -1
  179. package/out/zql/src/ivm/data.d.ts.map +1 -1
  180. package/out/zql/src/ivm/data.js +3 -2
  181. package/out/zql/src/ivm/data.js.map +1 -1
  182. package/out/zql/src/ivm/exists.d.ts.map +1 -1
  183. package/out/zql/src/ivm/exists.js +13 -2
  184. package/out/zql/src/ivm/exists.js.map +1 -1
  185. package/out/zql/src/ivm/join.d.ts +3 -2
  186. package/out/zql/src/ivm/join.d.ts.map +1 -1
  187. package/out/zql/src/ivm/join.js +5 -2
  188. package/out/zql/src/ivm/join.js.map +1 -1
  189. package/out/zql/src/ivm/memory-source.d.ts +3 -12
  190. package/out/zql/src/ivm/memory-source.d.ts.map +1 -1
  191. package/out/zql/src/ivm/memory-source.js +38 -72
  192. package/out/zql/src/ivm/memory-source.js.map +1 -1
  193. package/out/zql/src/ivm/operator.d.ts +3 -1
  194. package/out/zql/src/ivm/operator.d.ts.map +1 -1
  195. package/out/zql/src/ivm/schema.d.ts +8 -3
  196. package/out/zql/src/ivm/schema.d.ts.map +1 -1
  197. package/out/zql/src/ivm/skip.d.ts.map +1 -1
  198. package/out/zql/src/ivm/skip.js +60 -54
  199. package/out/zql/src/ivm/skip.js.map +1 -1
  200. package/out/zql/src/ivm/source.d.ts +10 -0
  201. package/out/zql/src/ivm/source.d.ts.map +1 -1
  202. package/out/zql/src/ivm/take.d.ts.map +1 -1
  203. package/out/zql/src/ivm/take.js +47 -35
  204. package/out/zql/src/ivm/take.js.map +1 -1
  205. package/out/zql/src/ivm/view-apply-change.js +4 -2
  206. package/out/zql/src/ivm/view-apply-change.js.map +1 -1
  207. package/out/zql/src/ivm/view.d.ts +1 -1
  208. package/out/zql/src/ivm/view.d.ts.map +1 -1
  209. package/out/zql/src/query/auth-query.d.ts +1 -0
  210. package/out/zql/src/query/auth-query.d.ts.map +1 -1
  211. package/out/zql/src/query/auth-query.js +1 -0
  212. package/out/zql/src/query/auth-query.js.map +1 -1
  213. package/out/zql/src/query/expression.d.ts +3 -2
  214. package/out/zql/src/query/expression.d.ts.map +1 -1
  215. package/out/zql/src/query/expression.js.map +1 -1
  216. package/out/zql/src/query/query-impl.d.ts +8 -6
  217. package/out/zql/src/query/query-impl.d.ts.map +1 -1
  218. package/out/zql/src/query/query-impl.js +18 -4
  219. package/out/zql/src/query/query-impl.js.map +1 -1
  220. package/out/zql/src/query/query.d.ts +9 -5
  221. package/out/zql/src/query/query.d.ts.map +1 -1
  222. package/out/zql/src/query/typed-view.d.ts +2 -1
  223. package/out/zql/src/query/typed-view.d.ts.map +1 -1
  224. package/out/zqlite/src/db.js +1 -1
  225. package/out/zqlite/src/table-source.d.ts +1 -0
  226. package/out/zqlite/src/table-source.d.ts.map +1 -1
  227. package/out/zqlite/src/table-source.js +40 -70
  228. package/out/zqlite/src/table-source.js.map +1 -1
  229. package/package.json +5 -1
  230. package/out/chunk-C7M3BJ3Z.js.map +0 -7
  231. package/out/shared/src/random-values.js +0 -22
  232. package/out/shared/src/random-values.js.map +0 -1
  233. package/out/zero-client/src/client/protocol-version.d.ts +0 -2
  234. package/out/zero-client/src/client/protocol-version.d.ts.map +0 -1
  235. package/out/zql/src/ivm/lookahead-iterator.d.ts +0 -13
  236. package/out/zql/src/ivm/lookahead-iterator.d.ts.map +0 -1
  237. package/out/zql/src/ivm/lookahead-iterator.js +0 -45
  238. package/out/zql/src/ivm/lookahead-iterator.js.map +0 -1
@@ -1,478 +1,36 @@
1
1
  import * as v from '../../shared/src/valita.js';
2
- declare const ruleSchema: v.TupleType<[v.Type<"allow">, v.UnionType<[v.ObjectType<{
3
- type: v.Type<"simple">;
4
- op: v.UnionType<[v.UnionType<[v.Type<"=">, v.Type<"!=">, v.Type<"IS">, v.Type<"IS NOT">]>, v.UnionType<[v.Type<"<">, v.Type<">">, v.Type<"<=">, v.Type<">=">]>, v.UnionType<[v.Type<"LIKE">, v.Type<"NOT LIKE">, v.Type<"ILIKE">, v.Type<"NOT ILIKE">]>, v.UnionType<[v.Type<"IN">, v.Type<"NOT IN">]>]>;
5
- left: v.UnionType<[v.ObjectType<{
6
- type: v.Type<"literal">;
7
- value: v.UnionType<[v.Type<string>, v.Type<number>, v.Type<boolean>, v.Type<null>, v.Type<readonly (string | number | boolean)[]>]>;
8
- }, undefined>, v.ObjectType<{
9
- type: v.Type<"column">;
10
- name: v.Type<string>;
11
- }, undefined>, v.ObjectType<{
12
- type: v.Type<"static">;
13
- anchor: v.UnionType<[v.Type<"authData">, v.Type<"preMutationRow">]>;
14
- field: v.Type<string>;
15
- }, undefined>]>;
16
- right: v.UnionType<[v.ObjectType<{
17
- type: v.Type<"static">;
18
- anchor: v.UnionType<[v.Type<"authData">, v.Type<"preMutationRow">]>;
19
- field: v.Type<string>;
20
- }, undefined>, v.ObjectType<{
21
- type: v.Type<"literal">;
22
- value: v.UnionType<[v.Type<string>, v.Type<number>, v.Type<boolean>, v.Type<null>, v.Type<readonly (string | number | boolean)[]>]>;
23
- }, undefined>]>;
24
- }, undefined>, v.Type<import("../../zero-protocol/src/ast.js").Conjunction>, v.Type<import("../../zero-protocol/src/ast.js").Disjunction>, v.ObjectType<Readonly<{
25
- type: v.Type<"correlatedSubquery">;
26
- related: v.Type<import("../../zero-protocol/src/ast.js").CorrelatedSubquery>;
27
- op: v.UnionType<[v.Type<"EXISTS">, v.Type<"NOT EXISTS">]>;
28
- }>, undefined>]>]>;
2
+ declare const ruleSchema: v.TupleType<[v.Type<"allow">, v.Type<import("../../zero-protocol/src/ast.js").Condition>]>;
29
3
  export type Rule = v.Infer<typeof ruleSchema>;
30
- declare const policySchema: v.ArrayType<v.TupleType<[v.Type<"allow">, v.UnionType<[v.ObjectType<{
31
- type: v.Type<"simple">;
32
- op: v.UnionType<[v.UnionType<[v.Type<"=">, v.Type<"!=">, v.Type<"IS">, v.Type<"IS NOT">]>, v.UnionType<[v.Type<"<">, v.Type<">">, v.Type<"<=">, v.Type<">=">]>, v.UnionType<[v.Type<"LIKE">, v.Type<"NOT LIKE">, v.Type<"ILIKE">, v.Type<"NOT ILIKE">]>, v.UnionType<[v.Type<"IN">, v.Type<"NOT IN">]>]>;
33
- left: v.UnionType<[v.ObjectType<{
34
- type: v.Type<"literal">;
35
- value: v.UnionType<[v.Type<string>, v.Type<number>, v.Type<boolean>, v.Type<null>, v.Type<readonly (string | number | boolean)[]>]>;
36
- }, undefined>, v.ObjectType<{
37
- type: v.Type<"column">;
38
- name: v.Type<string>;
39
- }, undefined>, v.ObjectType<{
40
- type: v.Type<"static">;
41
- anchor: v.UnionType<[v.Type<"authData">, v.Type<"preMutationRow">]>;
42
- field: v.Type<string>;
43
- }, undefined>]>;
44
- right: v.UnionType<[v.ObjectType<{
45
- type: v.Type<"static">;
46
- anchor: v.UnionType<[v.Type<"authData">, v.Type<"preMutationRow">]>;
47
- field: v.Type<string>;
48
- }, undefined>, v.ObjectType<{
49
- type: v.Type<"literal">;
50
- value: v.UnionType<[v.Type<string>, v.Type<number>, v.Type<boolean>, v.Type<null>, v.Type<readonly (string | number | boolean)[]>]>;
51
- }, undefined>]>;
52
- }, undefined>, v.Type<import("../../zero-protocol/src/ast.js").Conjunction>, v.Type<import("../../zero-protocol/src/ast.js").Disjunction>, v.ObjectType<Readonly<{
53
- type: v.Type<"correlatedSubquery">;
54
- related: v.Type<import("../../zero-protocol/src/ast.js").CorrelatedSubquery>;
55
- op: v.UnionType<[v.Type<"EXISTS">, v.Type<"NOT EXISTS">]>;
56
- }>, undefined>]>]>>;
4
+ declare const policySchema: v.ArrayType<v.TupleType<[v.Type<"allow">, v.Type<import("../../zero-protocol/src/ast.js").Condition>]>>;
57
5
  export type Policy = v.Infer<typeof policySchema>;
58
6
  declare const assetSchema: v.ObjectType<{
59
- select: v.Optional<["allow", {
60
- type: "simple";
61
- op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
62
- left: {
63
- type: "literal";
64
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
65
- } | {
66
- type: "column";
67
- name: string;
68
- } | {
69
- type: "static";
70
- anchor: "authData" | "preMutationRow";
71
- field: string;
72
- };
73
- right: {
74
- type: "literal";
75
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
76
- } | {
77
- type: "static";
78
- anchor: "authData" | "preMutationRow";
79
- field: string;
80
- };
81
- } | import("../../zero-protocol/src/ast.js").Conjunction | import("../../zero-protocol/src/ast.js").Disjunction | {
82
- readonly type: "correlatedSubquery";
83
- readonly related: import("../../zero-protocol/src/ast.js").CorrelatedSubquery;
84
- readonly op: "EXISTS" | "NOT EXISTS";
85
- }][]>;
86
- insert: v.Optional<["allow", {
87
- type: "simple";
88
- op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
89
- left: {
90
- type: "literal";
91
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
92
- } | {
93
- type: "column";
94
- name: string;
95
- } | {
96
- type: "static";
97
- anchor: "authData" | "preMutationRow";
98
- field: string;
99
- };
100
- right: {
101
- type: "literal";
102
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
103
- } | {
104
- type: "static";
105
- anchor: "authData" | "preMutationRow";
106
- field: string;
107
- };
108
- } | import("../../zero-protocol/src/ast.js").Conjunction | import("../../zero-protocol/src/ast.js").Disjunction | {
109
- readonly type: "correlatedSubquery";
110
- readonly related: import("../../zero-protocol/src/ast.js").CorrelatedSubquery;
111
- readonly op: "EXISTS" | "NOT EXISTS";
112
- }][]>;
7
+ select: v.Optional<["allow", import("../../zero-protocol/src/ast.js").Condition][]>;
8
+ insert: v.Optional<["allow", import("../../zero-protocol/src/ast.js").Condition][]>;
113
9
  update: v.Optional<{
114
- preMutation?: ["allow", {
115
- type: "simple";
116
- op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
117
- left: {
118
- type: "literal";
119
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
120
- } | {
121
- type: "column";
122
- name: string;
123
- } | {
124
- type: "static";
125
- anchor: "authData" | "preMutationRow";
126
- field: string;
127
- };
128
- right: {
129
- type: "literal";
130
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
131
- } | {
132
- type: "static";
133
- anchor: "authData" | "preMutationRow";
134
- field: string;
135
- };
136
- } | import("../../zero-protocol/src/ast.js").Conjunction | import("../../zero-protocol/src/ast.js").Disjunction | {
137
- readonly type: "correlatedSubquery";
138
- readonly related: import("../../zero-protocol/src/ast.js").CorrelatedSubquery;
139
- readonly op: "EXISTS" | "NOT EXISTS";
140
- }][] | undefined;
141
- postProposedMutation?: ["allow", {
142
- type: "simple";
143
- op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
144
- left: {
145
- type: "literal";
146
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
147
- } | {
148
- type: "column";
149
- name: string;
150
- } | {
151
- type: "static";
152
- anchor: "authData" | "preMutationRow";
153
- field: string;
154
- };
155
- right: {
156
- type: "literal";
157
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
158
- } | {
159
- type: "static";
160
- anchor: "authData" | "preMutationRow";
161
- field: string;
162
- };
163
- } | import("../../zero-protocol/src/ast.js").Conjunction | import("../../zero-protocol/src/ast.js").Disjunction | {
164
- readonly type: "correlatedSubquery";
165
- readonly related: import("../../zero-protocol/src/ast.js").CorrelatedSubquery;
166
- readonly op: "EXISTS" | "NOT EXISTS";
167
- }][] | undefined;
10
+ preMutation?: ["allow", import("../../zero-protocol/src/ast.js").Condition][] | undefined;
11
+ postMutation?: ["allow", import("../../zero-protocol/src/ast.js").Condition][] | undefined;
168
12
  }>;
169
- delete: v.Optional<["allow", {
170
- type: "simple";
171
- op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
172
- left: {
173
- type: "literal";
174
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
175
- } | {
176
- type: "column";
177
- name: string;
178
- } | {
179
- type: "static";
180
- anchor: "authData" | "preMutationRow";
181
- field: string;
182
- };
183
- right: {
184
- type: "literal";
185
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
186
- } | {
187
- type: "static";
188
- anchor: "authData" | "preMutationRow";
189
- field: string;
190
- };
191
- } | import("../../zero-protocol/src/ast.js").Conjunction | import("../../zero-protocol/src/ast.js").Disjunction | {
192
- readonly type: "correlatedSubquery";
193
- readonly related: import("../../zero-protocol/src/ast.js").CorrelatedSubquery;
194
- readonly op: "EXISTS" | "NOT EXISTS";
195
- }][]>;
13
+ delete: v.Optional<["allow", import("../../zero-protocol/src/ast.js").Condition][]>;
196
14
  }, undefined>;
197
15
  export type AssetPermissions = v.Infer<typeof assetSchema>;
198
16
  export declare const permissionsConfigSchema: v.Type<Record<string, {
199
17
  row?: {
200
- select?: ["allow", {
201
- type: "simple";
202
- op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
203
- left: {
204
- type: "literal";
205
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
206
- } | {
207
- type: "column";
208
- name: string;
209
- } | {
210
- type: "static";
211
- anchor: "authData" | "preMutationRow";
212
- field: string;
213
- };
214
- right: {
215
- type: "literal";
216
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
217
- } | {
218
- type: "static";
219
- anchor: "authData" | "preMutationRow";
220
- field: string;
221
- };
222
- } | import("../../zero-protocol/src/ast.js").Conjunction | import("../../zero-protocol/src/ast.js").Disjunction | {
223
- readonly type: "correlatedSubquery";
224
- readonly related: import("../../zero-protocol/src/ast.js").CorrelatedSubquery;
225
- readonly op: "EXISTS" | "NOT EXISTS";
226
- }][] | undefined;
227
- insert?: ["allow", {
228
- type: "simple";
229
- op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
230
- left: {
231
- type: "literal";
232
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
233
- } | {
234
- type: "column";
235
- name: string;
236
- } | {
237
- type: "static";
238
- anchor: "authData" | "preMutationRow";
239
- field: string;
240
- };
241
- right: {
242
- type: "literal";
243
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
244
- } | {
245
- type: "static";
246
- anchor: "authData" | "preMutationRow";
247
- field: string;
248
- };
249
- } | import("../../zero-protocol/src/ast.js").Conjunction | import("../../zero-protocol/src/ast.js").Disjunction | {
250
- readonly type: "correlatedSubquery";
251
- readonly related: import("../../zero-protocol/src/ast.js").CorrelatedSubquery;
252
- readonly op: "EXISTS" | "NOT EXISTS";
253
- }][] | undefined;
18
+ select?: ["allow", import("../../zero-protocol/src/ast.js").Condition][] | undefined;
19
+ insert?: ["allow", import("../../zero-protocol/src/ast.js").Condition][] | undefined;
254
20
  update?: {
255
- preMutation?: ["allow", {
256
- type: "simple";
257
- op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
258
- left: {
259
- type: "literal";
260
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
261
- } | {
262
- type: "column";
263
- name: string;
264
- } | {
265
- type: "static";
266
- anchor: "authData" | "preMutationRow";
267
- field: string;
268
- };
269
- right: {
270
- type: "literal";
271
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
272
- } | {
273
- type: "static";
274
- anchor: "authData" | "preMutationRow";
275
- field: string;
276
- };
277
- } | import("../../zero-protocol/src/ast.js").Conjunction | import("../../zero-protocol/src/ast.js").Disjunction | {
278
- readonly type: "correlatedSubquery";
279
- readonly related: import("../../zero-protocol/src/ast.js").CorrelatedSubquery;
280
- readonly op: "EXISTS" | "NOT EXISTS";
281
- }][] | undefined;
282
- postProposedMutation?: ["allow", {
283
- type: "simple";
284
- op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
285
- left: {
286
- type: "literal";
287
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
288
- } | {
289
- type: "column";
290
- name: string;
291
- } | {
292
- type: "static";
293
- anchor: "authData" | "preMutationRow";
294
- field: string;
295
- };
296
- right: {
297
- type: "literal";
298
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
299
- } | {
300
- type: "static";
301
- anchor: "authData" | "preMutationRow";
302
- field: string;
303
- };
304
- } | import("../../zero-protocol/src/ast.js").Conjunction | import("../../zero-protocol/src/ast.js").Disjunction | {
305
- readonly type: "correlatedSubquery";
306
- readonly related: import("../../zero-protocol/src/ast.js").CorrelatedSubquery;
307
- readonly op: "EXISTS" | "NOT EXISTS";
308
- }][] | undefined;
21
+ preMutation?: ["allow", import("../../zero-protocol/src/ast.js").Condition][] | undefined;
22
+ postMutation?: ["allow", import("../../zero-protocol/src/ast.js").Condition][] | undefined;
309
23
  } | undefined;
310
- delete?: ["allow", {
311
- type: "simple";
312
- op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
313
- left: {
314
- type: "literal";
315
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
316
- } | {
317
- type: "column";
318
- name: string;
319
- } | {
320
- type: "static";
321
- anchor: "authData" | "preMutationRow";
322
- field: string;
323
- };
324
- right: {
325
- type: "literal";
326
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
327
- } | {
328
- type: "static";
329
- anchor: "authData" | "preMutationRow";
330
- field: string;
331
- };
332
- } | import("../../zero-protocol/src/ast.js").Conjunction | import("../../zero-protocol/src/ast.js").Disjunction | {
333
- readonly type: "correlatedSubquery";
334
- readonly related: import("../../zero-protocol/src/ast.js").CorrelatedSubquery;
335
- readonly op: "EXISTS" | "NOT EXISTS";
336
- }][] | undefined;
24
+ delete?: ["allow", import("../../zero-protocol/src/ast.js").Condition][] | undefined;
337
25
  } | undefined;
338
26
  cell?: Record<string, {
339
- select?: ["allow", {
340
- type: "simple";
341
- op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
342
- left: {
343
- type: "literal";
344
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
345
- } | {
346
- type: "column";
347
- name: string;
348
- } | {
349
- type: "static";
350
- anchor: "authData" | "preMutationRow";
351
- field: string;
352
- };
353
- right: {
354
- type: "literal";
355
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
356
- } | {
357
- type: "static";
358
- anchor: "authData" | "preMutationRow";
359
- field: string;
360
- };
361
- } | import("../../zero-protocol/src/ast.js").Conjunction | import("../../zero-protocol/src/ast.js").Disjunction | {
362
- readonly type: "correlatedSubquery";
363
- readonly related: import("../../zero-protocol/src/ast.js").CorrelatedSubquery;
364
- readonly op: "EXISTS" | "NOT EXISTS";
365
- }][] | undefined;
366
- insert?: ["allow", {
367
- type: "simple";
368
- op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
369
- left: {
370
- type: "literal";
371
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
372
- } | {
373
- type: "column";
374
- name: string;
375
- } | {
376
- type: "static";
377
- anchor: "authData" | "preMutationRow";
378
- field: string;
379
- };
380
- right: {
381
- type: "literal";
382
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
383
- } | {
384
- type: "static";
385
- anchor: "authData" | "preMutationRow";
386
- field: string;
387
- };
388
- } | import("../../zero-protocol/src/ast.js").Conjunction | import("../../zero-protocol/src/ast.js").Disjunction | {
389
- readonly type: "correlatedSubquery";
390
- readonly related: import("../../zero-protocol/src/ast.js").CorrelatedSubquery;
391
- readonly op: "EXISTS" | "NOT EXISTS";
392
- }][] | undefined;
27
+ select?: ["allow", import("../../zero-protocol/src/ast.js").Condition][] | undefined;
28
+ insert?: ["allow", import("../../zero-protocol/src/ast.js").Condition][] | undefined;
393
29
  update?: {
394
- preMutation?: ["allow", {
395
- type: "simple";
396
- op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
397
- left: {
398
- type: "literal";
399
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
400
- } | {
401
- type: "column";
402
- name: string;
403
- } | {
404
- type: "static";
405
- anchor: "authData" | "preMutationRow";
406
- field: string;
407
- };
408
- right: {
409
- type: "literal";
410
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
411
- } | {
412
- type: "static";
413
- anchor: "authData" | "preMutationRow";
414
- field: string;
415
- };
416
- } | import("../../zero-protocol/src/ast.js").Conjunction | import("../../zero-protocol/src/ast.js").Disjunction | {
417
- readonly type: "correlatedSubquery";
418
- readonly related: import("../../zero-protocol/src/ast.js").CorrelatedSubquery;
419
- readonly op: "EXISTS" | "NOT EXISTS";
420
- }][] | undefined;
421
- postProposedMutation?: ["allow", {
422
- type: "simple";
423
- op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
424
- left: {
425
- type: "literal";
426
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
427
- } | {
428
- type: "column";
429
- name: string;
430
- } | {
431
- type: "static";
432
- anchor: "authData" | "preMutationRow";
433
- field: string;
434
- };
435
- right: {
436
- type: "literal";
437
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
438
- } | {
439
- type: "static";
440
- anchor: "authData" | "preMutationRow";
441
- field: string;
442
- };
443
- } | import("../../zero-protocol/src/ast.js").Conjunction | import("../../zero-protocol/src/ast.js").Disjunction | {
444
- readonly type: "correlatedSubquery";
445
- readonly related: import("../../zero-protocol/src/ast.js").CorrelatedSubquery;
446
- readonly op: "EXISTS" | "NOT EXISTS";
447
- }][] | undefined;
30
+ preMutation?: ["allow", import("../../zero-protocol/src/ast.js").Condition][] | undefined;
31
+ postMutation?: ["allow", import("../../zero-protocol/src/ast.js").Condition][] | undefined;
448
32
  } | undefined;
449
- delete?: ["allow", {
450
- type: "simple";
451
- op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
452
- left: {
453
- type: "literal";
454
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
455
- } | {
456
- type: "column";
457
- name: string;
458
- } | {
459
- type: "static";
460
- anchor: "authData" | "preMutationRow";
461
- field: string;
462
- };
463
- right: {
464
- type: "literal";
465
- value: string | number | boolean | readonly (string | number | boolean)[] | null;
466
- } | {
467
- type: "static";
468
- anchor: "authData" | "preMutationRow";
469
- field: string;
470
- };
471
- } | import("../../zero-protocol/src/ast.js").Conjunction | import("../../zero-protocol/src/ast.js").Disjunction | {
472
- readonly type: "correlatedSubquery";
473
- readonly related: import("../../zero-protocol/src/ast.js").CorrelatedSubquery;
474
- readonly op: "EXISTS" | "NOT EXISTS";
475
- }][] | undefined;
33
+ delete?: ["allow", import("../../zero-protocol/src/ast.js").Condition][] | undefined;
476
34
  }> | undefined;
477
35
  }>>;
478
36
  export type PermissionsConfig = v.Infer<typeof permissionsConfigSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"compiled-permissions.d.ts","sourceRoot":"","sources":["../../../../zero-schema/src/compiled-permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAGhD,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAiD,CAAC;AAClE,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAC9C,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAsB,CAAC;AACzC,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAUf,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAE3D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAKnC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
1
+ {"version":3,"file":"compiled-permissions.d.ts","sourceRoot":"","sources":["../../../../zero-schema/src/compiled-permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAGhD,QAAA,MAAM,UAAU,4FAAiD,CAAC;AAClE,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAC9C,QAAA,MAAM,YAAY,yGAAsB,CAAC;AACzC,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,QAAA,MAAM,WAAW;;;;;;;;aAUf,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAE3D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;GAKnC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -8,7 +8,7 @@ const assetSchema = v.object({
8
8
  update: v
9
9
  .object({
10
10
  preMutation: policySchema.optional(),
11
- postProposedMutation: policySchema.optional(),
11
+ postMutation: policySchema.optional(),
12
12
  })
13
13
  .optional(),
14
14
  delete: policySchema.optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"compiled-permissions.js","sourceRoot":"","sources":["../../../../zero-schema/src/compiled-permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAChD,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAE/D,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC;AAElE,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;AAGzC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,MAAM,EAAE,YAAY,CAAC,QAAQ,EAAE;IAC/B,MAAM,EAAE,YAAY,CAAC,QAAQ,EAAE;IAC/B,MAAM,EAAE,CAAC;SACN,MAAM,CAAC;QACN,WAAW,EAAE,YAAY,CAAC,QAAQ,EAAE;QACpC,oBAAoB,EAAE,YAAY,CAAC,QAAQ,EAAE;KAC9C,CAAC;SACD,QAAQ,EAAE;IACb,MAAM,EAAE,YAAY,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAC7C,CAAC,CAAC,MAAM,CAAC;IACP,GAAG,EAAE,WAAW,CAAC,QAAQ,EAAE;IAC3B,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE;CACvC,CAAC,CACH,CAAC"}
1
+ {"version":3,"file":"compiled-permissions.js","sourceRoot":"","sources":["../../../../zero-schema/src/compiled-permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAChD,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAE/D,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC;AAElE,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;AAGzC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,MAAM,EAAE,YAAY,CAAC,QAAQ,EAAE;IAC/B,MAAM,EAAE,YAAY,CAAC,QAAQ,EAAE;IAC/B,MAAM,EAAE,CAAC;SACN,MAAM,CAAC;QACN,WAAW,EAAE,YAAY,CAAC,QAAQ,EAAE;QACpC,YAAY,EAAE,YAAY,CAAC,QAAQ,EAAE;KACtC,CAAC;SACD,QAAQ,EAAE;IACb,MAAM,EAAE,YAAY,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAC7C,CAAC,CAAC,MAAM,CAAC;IACP,GAAG,EAAE,WAAW,CAAC,QAAQ,EAAE;IAC3B,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE;CACvC,CAAC,CACH,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export { authQuery } from '../../zql/src/query/auth-query.js';
2
- export { createTableSchema, type TableSchema, type TableSchemaToRow, } from './table-schema.js';
2
+ export { createTableSchema, type TableSchema } from './table-schema.js';
3
3
  export * from './schema.js';
4
4
  export { definePermissions } from './permissions.js';
5
5
  //# sourceMappingURL=mod.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../zero-schema/src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,mCAAmC,CAAC;AAC5D,OAAO,EACL,iBAAiB,EACjB,KAAK,WAAW,EAChB,KAAK,gBAAgB,GACtB,MAAM,mBAAmB,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../zero-schema/src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,mCAAmC,CAAC;AAC5D,OAAO,EAAC,iBAAiB,EAAE,KAAK,WAAW,EAAC,MAAM,mBAAmB,CAAC;AACtE,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC"}
@@ -10,7 +10,7 @@ type Normalized<T> = T & {
10
10
  * dependencies.
11
11
  */
12
12
  export type TableSchemaCache = Map<TableSchema, NormalizedTableSchema>;
13
- export declare class NormalizedTableSchema {
13
+ export declare class NormalizedTableSchema implements TableSchema {
14
14
  readonly [normalized]: true;
15
15
  readonly tableName: string;
16
16
  readonly primaryKey: NormalizedPrimaryKey;
@@ -23,7 +23,7 @@ export declare class NormalizedTableSchema {
23
23
  export declare function normalizeTableSchema(tableSchema: TableSchema | NormalizedTableSchema): NormalizedTableSchema;
24
24
  export declare function normalizeTableSchemaWithCache(tableSchema: TableSchema | NormalizedTableSchema, expectedName: string, tableSchemaCache: TableSchemaCache): NormalizedTableSchema;
25
25
  export type NormalizedPrimaryKey = Normalized<PrimaryKey>;
26
- export declare function normalizePrimaryKey(arr: PrimaryKey): NormalizedPrimaryKey;
26
+ export declare function normalizePrimaryKey(primaryKey: PrimaryKey | string): NormalizedPrimaryKey;
27
27
  export type DecycledNormalizedTableSchema = Omit<NormalizedTableSchema, 'relationships'> & {
28
28
  readonly relationships: {
29
29
  readonly [relationship: string]: DecycledNormalizedFieldRelationship | readonly [
@@ -45,5 +45,6 @@ export type NormalizedJunctionRelationship = readonly [
45
45
  NormalizedFieldRelationship,
46
46
  NormalizedFieldRelationship
47
47
  ];
48
+ export declare function normalizeTables(tables: Record<string, TableSchema>): Record<string, NormalizedTableSchema>;
48
49
  export {};
49
50
  //# sourceMappingURL=normalize-table-schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"normalize-table-schema.d.ts","sourceRoot":"","sources":["../../../../zero-schema/src/normalize-table-schema.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gCAAgC,CAAC;AAChE,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,CAAC,MAAM,UAAU,EAAE,OAAO,MAAM,CAAC;AAExC,KAAK,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG;IAAC,QAAQ,CAAC,CAAC,UAAU,CAAC,EAAE,IAAI,CAAA;CAAC,CAAC;AAEvD;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,GAAG,CAAC,WAAW,EAAE,qBAAqB,CAAC,CAAC;AAEvE,qBAAa,qBAAqB;IAChC,SAAiB,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,oBAAoB,CAAC;IAC1C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC9C,QAAQ,CAAC,aAAa,EAAE;QAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,sBAAsB,CAAA;KAAC,CAAC;gBAE9D,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB;CAWzE;AAED,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,WAAW,GAAG,qBAAqB,GAC/C,qBAAqB,CAMvB;AAED,wBAAgB,6BAA6B,CAC3C,WAAW,EAAE,WAAW,GAAG,qBAAqB,EAChD,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,gBAAgB,GACjC,qBAAqB,CAmBvB;AAED,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;AAS1D,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,UAAU,GAAG,oBAAoB,CAGzE;AA+CD,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAC9C,qBAAqB,EACrB,eAAe,CAChB,GAAG;IACF,QAAQ,CAAC,aAAa,EAAE;QACtB,QAAQ,EAAE,YAAY,EAAE,MAAM,GAC1B,mCAAmC,GACnC,SAAS;YACP,mCAAmC;YACnC,mCAAmC;SACpC,CAAC;KACP,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,mCAAmC,GAAG,IAAI,CACpD,2BAA2B,EAC3B,YAAY,CACb,GAAG;IAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAC,CAAC;AAElC,KAAK,sBAAsB,GACvB,2BAA2B,GAC3B,8BAA8B,CAAC;AAcnC,KAAK,2BAA2B,GAAG;IACjC,WAAW,EAAE,WAAW,CAAC;IACzB,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,qBAAqB,CAAC;CACnC,CAAC;AAoBF,MAAM,MAAM,8BAA8B,GAAG,SAAS;IACpD,2BAA2B;IAC3B,2BAA2B;CAC5B,CAAC"}
1
+ {"version":3,"file":"normalize-table-schema.d.ts","sourceRoot":"","sources":["../../../../zero-schema/src/normalize-table-schema.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gCAAgC,CAAC;AAChE,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAKL,KAAK,WAAW,EAChB,KAAK,WAAW,EAEjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,CAAC,MAAM,UAAU,EAAE,OAAO,MAAM,CAAC;AAExC,KAAK,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG;IAAC,QAAQ,CAAC,CAAC,UAAU,CAAC,EAAE,IAAI,CAAA;CAAC,CAAC;AAEvD;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,GAAG,CAAC,WAAW,EAAE,qBAAqB,CAAC,CAAC;AAEvE,qBAAa,qBAAsB,YAAW,WAAW;IACvD,SAAiB,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,oBAAoB,CAAC;IAC1C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC9C,QAAQ,CAAC,aAAa,EAAE;QAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,sBAAsB,CAAA;KAAC,CAAC;gBAE9D,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB;CAWzE;AAED,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,WAAW,GAAG,qBAAqB,GAC/C,qBAAqB,CAMvB;AAED,wBAAgB,6BAA6B,CAC3C,WAAW,EAAE,WAAW,GAAG,qBAAqB,EAChD,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,gBAAgB,GACjC,qBAAqB,CAmBvB;AAED,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;AAS1D,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,UAAU,GAAG,MAAM,GAC9B,oBAAoB,CAMtB;AAsDD,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAC9C,qBAAqB,EACrB,eAAe,CAChB,GAAG;IACF,QAAQ,CAAC,aAAa,EAAE;QACtB,QAAQ,EAAE,YAAY,EAAE,MAAM,GAC1B,mCAAmC,GACnC,SAAS;YACP,mCAAmC;YACnC,mCAAmC;SACpC,CAAC;KACP,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,mCAAmC,GAAG,IAAI,CACpD,2BAA2B,EAC3B,YAAY,CACb,GAAG;IAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAC,CAAC;AAElC,KAAK,sBAAsB,GACvB,2BAA2B,GAC3B,8BAA8B,CAAC;AAYnC,KAAK,2BAA2B,GAAG;IACjC,WAAW,EAAE,WAAW,CAAC;IACzB,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,qBAAqB,CAAC;CACnC,CAAC;AAsBF,MAAM,MAAM,8BAA8B,GAAG,SAAS;IACpD,2BAA2B;IAC3B,2BAA2B;CAC5B,CAAC;AAiCF,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,GAClC,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAMvC"}