@rocicorp/zero 0.6.2024111800 → 0.6.2024112000
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.
- package/out/{chunk-N4TOAWSH.js → chunk-W4HNSZIF.js} +149 -54
- package/out/chunk-W4HNSZIF.js.map +7 -0
- package/out/shared/src/valita.d.ts.map +1 -1
- package/out/shared/src/valita.js +53 -4
- package/out/shared/src/valita.js.map +1 -1
- package/out/solid.js +1 -1
- package/out/zero-cache/src/config/zero-config.d.ts.map +1 -1
- package/out/zero-cache/src/config/zero-config.js +12 -4
- package/out/zero-cache/src/config/zero-config.js.map +1 -1
- package/out/zero-cache/src/db/create.d.ts.map +1 -1
- package/out/zero-cache/src/db/create.js +1 -3
- package/out/zero-cache/src/db/create.js.map +1 -1
- package/out/zero-cache/src/db/pg-to-lite.d.ts.map +1 -1
- package/out/zero-cache/src/db/pg-to-lite.js +12 -3
- package/out/zero-cache/src/db/pg-to-lite.js.map +1 -1
- package/out/zero-cache/src/server/main.js +1 -1
- package/out/zero-cache/src/server/main.js.map +1 -1
- package/out/zero-cache/src/server/syncer.d.ts +1 -1
- package/out/zero-cache/src/server/syncer.d.ts.map +1 -1
- package/out/zero-cache/src/server/syncer.js +15 -5
- package/out/zero-cache/src/server/syncer.js.map +1 -1
- package/out/zero-cache/src/services/change-streamer/pg/schema/shard.js +1 -1
- package/out/zero-cache/src/services/mutagen/mutagen.d.ts.map +1 -1
- package/out/zero-cache/src/services/mutagen/mutagen.js +1 -3
- package/out/zero-cache/src/services/mutagen/mutagen.js.map +1 -1
- package/out/zero-cache/src/services/mutagen/write-authorizer.d.ts.map +1 -1
- package/out/zero-cache/src/services/mutagen/write-authorizer.js +22 -42
- package/out/zero-cache/src/services/mutagen/write-authorizer.js.map +1 -1
- package/out/zero-cache/src/services/replicator/incremental-sync.d.ts.map +1 -1
- package/out/zero-cache/src/services/replicator/incremental-sync.js +2 -3
- package/out/zero-cache/src/services/replicator/incremental-sync.js.map +1 -1
- package/out/zero-cache/src/services/view-syncer/cvr.d.ts.map +1 -1
- package/out/zero-cache/src/services/view-syncer/cvr.js +8 -2
- package/out/zero-cache/src/services/view-syncer/cvr.js.map +1 -1
- package/out/zero-cache/src/services/view-syncer/schema/types.d.ts +80 -15
- package/out/zero-cache/src/services/view-syncer/schema/types.d.ts.map +1 -1
- package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts.map +1 -1
- package/out/zero-cache/src/services/view-syncer/view-syncer.js +1 -3
- package/out/zero-cache/src/services/view-syncer/view-syncer.js.map +1 -1
- package/out/zero-cache/src/workers/replicator.d.ts +1 -0
- package/out/zero-cache/src/workers/replicator.d.ts.map +1 -1
- package/out/zero-cache/src/workers/replicator.js +4 -1
- package/out/zero-cache/src/workers/replicator.js.map +1 -1
- package/out/zero-protocol/src/ast.d.ts +75 -18
- package/out/zero-protocol/src/ast.d.ts.map +1 -1
- package/out/zero-protocol/src/ast.js +36 -13
- package/out/zero-protocol/src/ast.js.map +1 -1
- package/out/zero-protocol/src/change-desired-queries.d.ts +32 -6
- package/out/zero-protocol/src/change-desired-queries.d.ts.map +1 -1
- package/out/zero-protocol/src/connect.d.ts +32 -6
- package/out/zero-protocol/src/connect.d.ts.map +1 -1
- package/out/zero-protocol/src/down.d.ts +32 -6
- package/out/zero-protocol/src/down.d.ts.map +1 -1
- package/out/zero-protocol/src/poke.d.ts +64 -12
- package/out/zero-protocol/src/poke.d.ts.map +1 -1
- package/out/zero-protocol/src/queries-patch.d.ts +48 -9
- package/out/zero-protocol/src/queries-patch.d.ts.map +1 -1
- package/out/zero-protocol/src/up.d.ts +32 -6
- package/out/zero-protocol/src/up.d.ts.map +1 -1
- package/out/zero-schema/src/authorization.d.ts +6 -6
- package/out/zero-schema/src/authorization.d.ts.map +1 -1
- package/out/zero-schema/src/compiled-authorization.d.ts +224 -42
- package/out/zero-schema/src/compiled-authorization.d.ts.map +1 -1
- package/out/zero.js +1 -1
- package/out/zql/src/builder/builder.d.ts.map +1 -1
- package/out/zql/src/builder/builder.js +10 -12
- package/out/zql/src/builder/builder.js.map +1 -1
- package/out/zql/src/builder/filter.d.ts.map +1 -1
- package/out/zql/src/builder/filter.js +20 -5
- package/out/zql/src/builder/filter.js.map +1 -1
- package/out/zql/src/query/expression.d.ts +4 -2
- package/out/zql/src/query/expression.d.ts.map +1 -1
- package/out/zql/src/query/query-impl.d.ts.map +1 -1
- package/out/zqlite/src/table-source.d.ts +1 -1
- package/out/zqlite/src/table-source.d.ts.map +1 -1
- package/out/zqlite/src/table-source.js +38 -10
- package/out/zqlite/src/table-source.js.map +1 -1
- package/package.json +1 -1
- package/out/chunk-N4TOAWSH.js.map +0 -7
- package/out/zql/src/builder/error.d.ts +0 -3
- package/out/zql/src/builder/error.d.ts.map +0 -1
- package/out/zql/src/builder/error.js +0 -3
- package/out/zql/src/builder/error.js.map +0 -1
|
@@ -34,12 +34,25 @@ export declare const downstreamSchema: v.UnionType<[v.TupleType<[v.Type<"connect
|
|
|
34
34
|
where?: {
|
|
35
35
|
type: "simple";
|
|
36
36
|
op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
left: {
|
|
38
|
+
type: "literal";
|
|
39
|
+
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
40
|
+
} | {
|
|
41
|
+
type: "column";
|
|
42
|
+
name: string;
|
|
43
|
+
} | {
|
|
39
44
|
type: "static";
|
|
40
45
|
anchor: "authData" | "preMutationRow";
|
|
41
46
|
field: string;
|
|
42
|
-
}
|
|
47
|
+
};
|
|
48
|
+
right: {
|
|
49
|
+
type: "literal";
|
|
50
|
+
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
51
|
+
} | {
|
|
52
|
+
type: "static";
|
|
53
|
+
anchor: "authData" | "preMutationRow";
|
|
54
|
+
field: string;
|
|
55
|
+
};
|
|
43
56
|
} | import("./ast.js").Conjunction | import("./ast.js").Disjunction | {
|
|
44
57
|
readonly type: "correlatedSubquery";
|
|
45
58
|
readonly related: import("./ast.js").CorrelatedSubquery;
|
|
@@ -69,12 +82,25 @@ export declare const downstreamSchema: v.UnionType<[v.TupleType<[v.Type<"connect
|
|
|
69
82
|
where?: {
|
|
70
83
|
type: "simple";
|
|
71
84
|
op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
|
|
72
|
-
|
|
73
|
-
|
|
85
|
+
left: {
|
|
86
|
+
type: "literal";
|
|
87
|
+
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
88
|
+
} | {
|
|
89
|
+
type: "column";
|
|
90
|
+
name: string;
|
|
91
|
+
} | {
|
|
92
|
+
type: "static";
|
|
93
|
+
anchor: "authData" | "preMutationRow";
|
|
94
|
+
field: string;
|
|
95
|
+
};
|
|
96
|
+
right: {
|
|
97
|
+
type: "literal";
|
|
98
|
+
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
99
|
+
} | {
|
|
74
100
|
type: "static";
|
|
75
101
|
anchor: "authData" | "preMutationRow";
|
|
76
102
|
field: string;
|
|
77
|
-
}
|
|
103
|
+
};
|
|
78
104
|
} | import("./ast.js").Conjunction | import("./ast.js").Disjunction | {
|
|
79
105
|
readonly type: "correlatedSubquery";
|
|
80
106
|
readonly related: import("./ast.js").CorrelatedSubquery;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"down.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/down.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAYhD,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"down.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/down.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAYhD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAS5B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -54,12 +54,25 @@ export declare const pokePartBodySchema: v.ObjectType<{
|
|
|
54
54
|
where?: {
|
|
55
55
|
type: "simple";
|
|
56
56
|
op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
left: {
|
|
58
|
+
type: "literal";
|
|
59
|
+
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
60
|
+
} | {
|
|
61
|
+
type: "column";
|
|
62
|
+
name: string;
|
|
63
|
+
} | {
|
|
59
64
|
type: "static";
|
|
60
65
|
anchor: "authData" | "preMutationRow";
|
|
61
66
|
field: string;
|
|
62
|
-
}
|
|
67
|
+
};
|
|
68
|
+
right: {
|
|
69
|
+
type: "literal";
|
|
70
|
+
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
71
|
+
} | {
|
|
72
|
+
type: "static";
|
|
73
|
+
anchor: "authData" | "preMutationRow";
|
|
74
|
+
field: string;
|
|
75
|
+
};
|
|
63
76
|
} | import("./ast.js").Conjunction | import("./ast.js").Disjunction | {
|
|
64
77
|
readonly type: "correlatedSubquery";
|
|
65
78
|
readonly related: import("./ast.js").CorrelatedSubquery;
|
|
@@ -89,12 +102,25 @@ export declare const pokePartBodySchema: v.ObjectType<{
|
|
|
89
102
|
where?: {
|
|
90
103
|
type: "simple";
|
|
91
104
|
op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
|
|
92
|
-
|
|
93
|
-
|
|
105
|
+
left: {
|
|
106
|
+
type: "literal";
|
|
107
|
+
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
108
|
+
} | {
|
|
109
|
+
type: "column";
|
|
110
|
+
name: string;
|
|
111
|
+
} | {
|
|
112
|
+
type: "static";
|
|
113
|
+
anchor: "authData" | "preMutationRow";
|
|
114
|
+
field: string;
|
|
115
|
+
};
|
|
116
|
+
right: {
|
|
117
|
+
type: "literal";
|
|
118
|
+
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
119
|
+
} | {
|
|
94
120
|
type: "static";
|
|
95
121
|
anchor: "authData" | "preMutationRow";
|
|
96
122
|
field: string;
|
|
97
|
-
}
|
|
123
|
+
};
|
|
98
124
|
} | import("./ast.js").Conjunction | import("./ast.js").Disjunction | {
|
|
99
125
|
readonly type: "correlatedSubquery";
|
|
100
126
|
readonly related: import("./ast.js").CorrelatedSubquery;
|
|
@@ -168,12 +194,25 @@ export declare const pokePartMessageSchema: v.TupleType<[v.Type<"pokePart">, v.O
|
|
|
168
194
|
where?: {
|
|
169
195
|
type: "simple";
|
|
170
196
|
op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
|
|
171
|
-
|
|
172
|
-
|
|
197
|
+
left: {
|
|
198
|
+
type: "literal";
|
|
199
|
+
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
200
|
+
} | {
|
|
201
|
+
type: "column";
|
|
202
|
+
name: string;
|
|
203
|
+
} | {
|
|
173
204
|
type: "static";
|
|
174
205
|
anchor: "authData" | "preMutationRow";
|
|
175
206
|
field: string;
|
|
176
|
-
}
|
|
207
|
+
};
|
|
208
|
+
right: {
|
|
209
|
+
type: "literal";
|
|
210
|
+
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
211
|
+
} | {
|
|
212
|
+
type: "static";
|
|
213
|
+
anchor: "authData" | "preMutationRow";
|
|
214
|
+
field: string;
|
|
215
|
+
};
|
|
177
216
|
} | import("./ast.js").Conjunction | import("./ast.js").Disjunction | {
|
|
178
217
|
readonly type: "correlatedSubquery";
|
|
179
218
|
readonly related: import("./ast.js").CorrelatedSubquery;
|
|
@@ -203,12 +242,25 @@ export declare const pokePartMessageSchema: v.TupleType<[v.Type<"pokePart">, v.O
|
|
|
203
242
|
where?: {
|
|
204
243
|
type: "simple";
|
|
205
244
|
op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
|
|
206
|
-
|
|
207
|
-
|
|
245
|
+
left: {
|
|
246
|
+
type: "literal";
|
|
247
|
+
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
248
|
+
} | {
|
|
249
|
+
type: "column";
|
|
250
|
+
name: string;
|
|
251
|
+
} | {
|
|
252
|
+
type: "static";
|
|
253
|
+
anchor: "authData" | "preMutationRow";
|
|
254
|
+
field: string;
|
|
255
|
+
};
|
|
256
|
+
right: {
|
|
257
|
+
type: "literal";
|
|
258
|
+
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
259
|
+
} | {
|
|
208
260
|
type: "static";
|
|
209
261
|
anchor: "authData" | "preMutationRow";
|
|
210
262
|
field: string;
|
|
211
|
-
}
|
|
263
|
+
};
|
|
212
264
|
} | import("./ast.js").Conjunction | import("./ast.js").Disjunction | {
|
|
213
265
|
readonly type: "correlatedSubquery";
|
|
214
266
|
readonly related: import("./ast.js").CorrelatedSubquery;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"poke.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/poke.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,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AAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -9,12 +9,25 @@ declare const putOpSchema: v.ObjectType<{
|
|
|
9
9
|
where: v.Optional<{
|
|
10
10
|
type: "simple";
|
|
11
11
|
op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
left: {
|
|
13
|
+
type: "literal";
|
|
14
|
+
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
15
|
+
} | {
|
|
16
|
+
type: "column";
|
|
17
|
+
name: string;
|
|
18
|
+
} | {
|
|
14
19
|
type: "static";
|
|
15
20
|
anchor: "authData" | "preMutationRow";
|
|
16
21
|
field: string;
|
|
17
|
-
}
|
|
22
|
+
};
|
|
23
|
+
right: {
|
|
24
|
+
type: "literal";
|
|
25
|
+
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
26
|
+
} | {
|
|
27
|
+
type: "static";
|
|
28
|
+
anchor: "authData" | "preMutationRow";
|
|
29
|
+
field: string;
|
|
30
|
+
};
|
|
18
31
|
} | import("./ast.js").Conjunction | import("./ast.js").Disjunction | {
|
|
19
32
|
readonly type: "correlatedSubquery";
|
|
20
33
|
readonly related: import("./ast.js").CorrelatedSubquery;
|
|
@@ -46,12 +59,25 @@ declare const patchOpSchema: v.UnionType<[v.ObjectType<{
|
|
|
46
59
|
where: v.Optional<{
|
|
47
60
|
type: "simple";
|
|
48
61
|
op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
|
|
49
|
-
|
|
50
|
-
|
|
62
|
+
left: {
|
|
63
|
+
type: "literal";
|
|
64
|
+
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
65
|
+
} | {
|
|
66
|
+
type: "column";
|
|
67
|
+
name: string;
|
|
68
|
+
} | {
|
|
51
69
|
type: "static";
|
|
52
70
|
anchor: "authData" | "preMutationRow";
|
|
53
71
|
field: string;
|
|
54
|
-
}
|
|
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
|
+
};
|
|
55
81
|
} | import("./ast.js").Conjunction | import("./ast.js").Disjunction | {
|
|
56
82
|
readonly type: "correlatedSubquery";
|
|
57
83
|
readonly related: import("./ast.js").CorrelatedSubquery;
|
|
@@ -81,12 +107,25 @@ export declare const queriesPatchSchema: v.ArrayType<v.UnionType<[v.ObjectType<{
|
|
|
81
107
|
where: v.Optional<{
|
|
82
108
|
type: "simple";
|
|
83
109
|
op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
|
|
84
|
-
|
|
85
|
-
|
|
110
|
+
left: {
|
|
111
|
+
type: "literal";
|
|
112
|
+
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
113
|
+
} | {
|
|
114
|
+
type: "column";
|
|
115
|
+
name: string;
|
|
116
|
+
} | {
|
|
117
|
+
type: "static";
|
|
118
|
+
anchor: "authData" | "preMutationRow";
|
|
119
|
+
field: string;
|
|
120
|
+
};
|
|
121
|
+
right: {
|
|
122
|
+
type: "literal";
|
|
123
|
+
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
124
|
+
} | {
|
|
86
125
|
type: "static";
|
|
87
126
|
anchor: "authData" | "preMutationRow";
|
|
88
127
|
field: string;
|
|
89
|
-
}
|
|
128
|
+
};
|
|
90
129
|
} | import("./ast.js").Conjunction | import("./ast.js").Disjunction | {
|
|
91
130
|
readonly type: "correlatedSubquery";
|
|
92
131
|
readonly related: import("./ast.js").CorrelatedSubquery;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries-patch.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/queries-patch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAGhD,QAAA,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"queries-patch.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/queries-patch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAGhD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAIf,CAAC;AAEH,QAAA,MAAM,WAAW;;;aAGf,CAAC;AAEH,QAAA,MAAM,aAAa;;aAEjB,CAAC;AAEH,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAAmD,CAAC;AAEvE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAAyB,CAAC;AAEzD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AACvD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AACvD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC3D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC3D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -10,12 +10,25 @@ export declare const upstreamSchema: v.UnionType<[v.TupleType<[v.Type<"initConne
|
|
|
10
10
|
where: v.Optional<{
|
|
11
11
|
type: "simple";
|
|
12
12
|
op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
left: {
|
|
14
|
+
type: "literal";
|
|
15
|
+
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
16
|
+
} | {
|
|
17
|
+
type: "column";
|
|
18
|
+
name: string;
|
|
19
|
+
} | {
|
|
15
20
|
type: "static";
|
|
16
21
|
anchor: "authData" | "preMutationRow";
|
|
17
22
|
field: string;
|
|
18
|
-
}
|
|
23
|
+
};
|
|
24
|
+
right: {
|
|
25
|
+
type: "literal";
|
|
26
|
+
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
27
|
+
} | {
|
|
28
|
+
type: "static";
|
|
29
|
+
anchor: "authData" | "preMutationRow";
|
|
30
|
+
field: string;
|
|
31
|
+
};
|
|
19
32
|
} | import("./ast.js").Conjunction | import("./ast.js").Disjunction | {
|
|
20
33
|
readonly type: "correlatedSubquery";
|
|
21
34
|
readonly related: import("./ast.js").CorrelatedSubquery;
|
|
@@ -48,12 +61,25 @@ export declare const upstreamSchema: v.UnionType<[v.TupleType<[v.Type<"initConne
|
|
|
48
61
|
where: v.Optional<{
|
|
49
62
|
type: "simple";
|
|
50
63
|
op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
|
|
51
|
-
|
|
52
|
-
|
|
64
|
+
left: {
|
|
65
|
+
type: "literal";
|
|
66
|
+
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
67
|
+
} | {
|
|
68
|
+
type: "column";
|
|
69
|
+
name: string;
|
|
70
|
+
} | {
|
|
71
|
+
type: "static";
|
|
72
|
+
anchor: "authData" | "preMutationRow";
|
|
73
|
+
field: string;
|
|
74
|
+
};
|
|
75
|
+
right: {
|
|
76
|
+
type: "literal";
|
|
77
|
+
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
78
|
+
} | {
|
|
53
79
|
type: "static";
|
|
54
80
|
anchor: "authData" | "preMutationRow";
|
|
55
81
|
field: string;
|
|
56
|
-
}
|
|
82
|
+
};
|
|
57
83
|
} | import("./ast.js").Conjunction | import("./ast.js").Disjunction | {
|
|
58
84
|
readonly type: "correlatedSubquery";
|
|
59
85
|
readonly related: import("./ast.js").CorrelatedSubquery;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"up.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/up.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAQhD,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"up.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/up.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAQhD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAO1B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -6,16 +6,16 @@ type Action = 'select' | 'insert' | 'update' | 'delete';
|
|
|
6
6
|
export type Queries<TSchema extends Schema> = {
|
|
7
7
|
[K in keyof TSchema['tables']]: Query<TSchema['tables'][K]>;
|
|
8
8
|
};
|
|
9
|
-
type
|
|
10
|
-
type
|
|
11
|
-
[K in Action]?:
|
|
9
|
+
type AuthorizationRule<TAuthDataShape, TSchema extends TableSchema> = (authData: TAuthDataShape, row: TableSchemaToRow<TSchema>) => Query<TableSchema>;
|
|
10
|
+
type AssetAuthorization<TAuthDataShape, TSchema extends TableSchema> = {
|
|
11
|
+
[K in Action]?: AuthorizationRule<TAuthDataShape, TSchema>[] | undefined;
|
|
12
12
|
};
|
|
13
13
|
export type AuthorizationConfig<TAuthDataShape, TSchema extends Schema> = {
|
|
14
14
|
[K in keyof TSchema['tables']]?: {
|
|
15
|
-
row?:
|
|
15
|
+
row?: AssetAuthorization<TAuthDataShape, TSchema['tables'][K]> | undefined;
|
|
16
16
|
cell?: {
|
|
17
|
-
[C in keyof TSchema['tables'][K]['columns']]?:
|
|
18
|
-
};
|
|
17
|
+
[C in keyof TSchema['tables'][K]['columns']]?: AssetAuthorization<TAuthDataShape, TSchema['tables'][K]>;
|
|
18
|
+
} | undefined;
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
export declare function defineAuthorization<TAuthDataShape, TSchema extends Schema>(schema: TSchema, definer: (query: Queries<TSchema>) => Promise<AuthorizationConfig<TAuthDataShape, TSchema>> | AuthorizationConfig<TAuthDataShape, TSchema>): Promise<CompiledAuthorizationConfig | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorization.d.ts","sourceRoot":"","sources":["../../../../zero-schema/src/authorization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,8BAA8B,CAAC;AACxD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,EAAC,WAAW,EAAE,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AACrE,OAAO,KAAK,EAEV,mBAAmB,IAAI,2BAA2B,EACnD,MAAM,6BAA6B,CAAC;AAMrC,KAAK,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAExD,MAAM,MAAM,OAAO,CAAC,OAAO,SAAS,MAAM,IAAI;KAC3C,CAA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