hide-a-bed 4.0.3 → 4.1.1
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/README.md +304 -73
- package/cjs/impl/bulk.cjs +158 -10
- package/cjs/impl/crud.cjs +17 -6
- package/cjs/impl/patch.cjs +19 -0
- package/cjs/impl/queryBuilder.cjs +99 -0
- package/cjs/impl/stream.cjs +12 -1
- package/cjs/impl/trackedEmitter.cjs +54 -0
- package/cjs/impl/transactionErrors.cjs +70 -0
- package/cjs/index.cjs +20 -5
- package/cjs/schema/bind.cjs +4 -0
- package/cjs/schema/bulk.cjs +35 -11
- package/cjs/schema/config.cjs +1 -0
- package/cjs/schema/crud.cjs +23 -1
- package/cjs/schema/patch.cjs +17 -2
- package/cjs/schema/query.cjs +2 -1
- package/config.json +5 -0
- package/impl/bulk.d.mts +4 -0
- package/impl/bulk.d.mts.map +1 -1
- package/impl/bulk.mjs +200 -13
- package/impl/crud.d.mts +2 -0
- package/impl/crud.d.mts.map +1 -1
- package/impl/crud.mjs +25 -15
- package/impl/errors.mjs +12 -0
- package/impl/patch.d.mts +2 -0
- package/impl/patch.d.mts.map +1 -1
- package/impl/patch.mjs +22 -1
- package/impl/query.d.mts +18 -9
- package/impl/query.d.mts.map +1 -1
- package/impl/queryBuilder.d.mts +94 -0
- package/impl/queryBuilder.d.mts.map +1 -0
- package/impl/queryBuilder.mjs +99 -0
- package/impl/stream.d.mts.map +1 -1
- package/impl/stream.mjs +12 -1
- package/impl/trackedEmitter.d.mts +8 -0
- package/impl/trackedEmitter.d.mts.map +1 -0
- package/impl/trackedEmitter.mjs +33 -0
- package/impl/transactionErrors.d.mts +57 -0
- package/impl/transactionErrors.d.mts.map +1 -0
- package/impl/transactionErrors.mjs +47 -0
- package/index.d.mts +16 -3
- package/index.d.mts.map +1 -1
- package/index.mjs +41 -11
- package/log.txt +1842 -0
- package/package.json +9 -4
- package/schema/bind.d.mts +382 -45
- package/schema/bind.d.mts.map +1 -1
- package/schema/bind.mjs +6 -2
- package/schema/bulk.d.mts +559 -16
- package/schema/bulk.d.mts.map +1 -1
- package/schema/bulk.mjs +40 -10
- package/schema/config.d.mts.map +1 -1
- package/schema/config.mjs +1 -0
- package/schema/crud.d.mts +240 -15
- package/schema/crud.d.mts.map +1 -1
- package/schema/crud.mjs +27 -1
- package/schema/patch.d.mts +138 -2
- package/schema/patch.d.mts.map +1 -1
- package/schema/patch.mjs +22 -2
- package/schema/query.d.mts +62 -30
- package/schema/query.d.mts.map +1 -1
- package/schema/query.mjs +4 -1
- package/schema/stream.d.mts +18 -9
- package/schema/stream.d.mts.map +1 -1
package/schema/patch.mjs
CHANGED
|
@@ -3,12 +3,15 @@ import { CouchConfig } from './config.mjs'
|
|
|
3
3
|
import { CouchDocResponse } from './crud.mjs'
|
|
4
4
|
|
|
5
5
|
export const PatchProperties = z.record(z.string(), z.any())
|
|
6
|
+
export const StrictPatchProperties = z.object({
|
|
7
|
+
_rev: z.string()
|
|
8
|
+
}).and(PatchProperties)
|
|
6
9
|
|
|
7
10
|
export const Patch = z.function()
|
|
8
11
|
.args(
|
|
9
12
|
CouchConfig,
|
|
10
13
|
z.string().describe('the couch doc id'),
|
|
11
|
-
|
|
14
|
+
StrictPatchProperties
|
|
12
15
|
)
|
|
13
16
|
.returns(z.promise(CouchDocResponse))
|
|
14
17
|
/** @typedef { z.infer<typeof Patch> } PatchSchema */
|
|
@@ -16,7 +19,24 @@ export const Patch = z.function()
|
|
|
16
19
|
export const PatchBound = z.function()
|
|
17
20
|
.args(
|
|
18
21
|
z.string().describe('the couch doc id'),
|
|
19
|
-
|
|
22
|
+
StrictPatchProperties
|
|
20
23
|
)
|
|
21
24
|
.returns(z.promise(CouchDocResponse))
|
|
22
25
|
/** @typedef { z.infer<typeof PatchBound> } PatchBoundSchema */
|
|
26
|
+
|
|
27
|
+
export const PatchDangerously = z.function()
|
|
28
|
+
.args(
|
|
29
|
+
CouchConfig,
|
|
30
|
+
z.string().describe('the couch doc id'),
|
|
31
|
+
PatchProperties
|
|
32
|
+
)
|
|
33
|
+
.returns(z.promise(CouchDocResponse))
|
|
34
|
+
/** @typedef { z.infer<typeof PatchDangerously> } PatchDangerouslySchema */
|
|
35
|
+
|
|
36
|
+
export const PatchDangerouslyBound = z.function()
|
|
37
|
+
.args(
|
|
38
|
+
z.string().describe('the couch doc id'),
|
|
39
|
+
PatchProperties
|
|
40
|
+
)
|
|
41
|
+
.returns(z.promise(CouchDocResponse))
|
|
42
|
+
/** @typedef { z.infer<typeof PatchDangerouslyBound> } PatchDangerouslyBoundSchema */
|
package/schema/query.d.mts
CHANGED
|
@@ -2,35 +2,42 @@ export const ViewRow: z.ZodObject<{
|
|
|
2
2
|
id: z.ZodOptional<z.ZodString>;
|
|
3
3
|
key: z.ZodNullable<z.ZodAny>;
|
|
4
4
|
value: z.ZodNullable<z.ZodAny>;
|
|
5
|
-
doc: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough"
|
|
5
|
+
doc: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>>;
|
|
6
|
+
error: z.ZodOptional<z.ZodString>;
|
|
6
7
|
}, "strip", z.ZodTypeAny, {
|
|
7
8
|
id?: string | undefined;
|
|
8
9
|
key?: any;
|
|
9
10
|
value?: any;
|
|
10
|
-
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
11
|
+
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
12
|
+
error?: string | undefined;
|
|
11
13
|
}, {
|
|
12
14
|
id?: string | undefined;
|
|
13
15
|
key?: any;
|
|
14
16
|
value?: any;
|
|
15
|
-
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
17
|
+
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
18
|
+
error?: string | undefined;
|
|
16
19
|
}>;
|
|
20
|
+
/** @typedef { z.infer<typeof ViewRow> } ViewRowSchema */
|
|
17
21
|
export const SimpleViewQueryResponse: z.ZodObject<{
|
|
18
22
|
error: z.ZodOptional<z.ZodString>;
|
|
19
23
|
rows: z.ZodArray<z.ZodObject<{
|
|
20
24
|
id: z.ZodOptional<z.ZodString>;
|
|
21
25
|
key: z.ZodNullable<z.ZodAny>;
|
|
22
26
|
value: z.ZodNullable<z.ZodAny>;
|
|
23
|
-
doc: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough"
|
|
27
|
+
doc: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>>;
|
|
28
|
+
error: z.ZodOptional<z.ZodString>;
|
|
24
29
|
}, "strip", z.ZodTypeAny, {
|
|
25
30
|
id?: string | undefined;
|
|
26
31
|
key?: any;
|
|
27
32
|
value?: any;
|
|
28
|
-
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
33
|
+
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
34
|
+
error?: string | undefined;
|
|
29
35
|
}, {
|
|
30
36
|
id?: string | undefined;
|
|
31
37
|
key?: any;
|
|
32
38
|
value?: any;
|
|
33
|
-
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
39
|
+
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
40
|
+
error?: string | undefined;
|
|
34
41
|
}>, "many">;
|
|
35
42
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
36
43
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -38,17 +45,20 @@ export const SimpleViewQueryResponse: z.ZodObject<{
|
|
|
38
45
|
id: z.ZodOptional<z.ZodString>;
|
|
39
46
|
key: z.ZodNullable<z.ZodAny>;
|
|
40
47
|
value: z.ZodNullable<z.ZodAny>;
|
|
41
|
-
doc: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough"
|
|
48
|
+
doc: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>>;
|
|
49
|
+
error: z.ZodOptional<z.ZodString>;
|
|
42
50
|
}, "strip", z.ZodTypeAny, {
|
|
43
51
|
id?: string | undefined;
|
|
44
52
|
key?: any;
|
|
45
53
|
value?: any;
|
|
46
|
-
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
54
|
+
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
55
|
+
error?: string | undefined;
|
|
47
56
|
}, {
|
|
48
57
|
id?: string | undefined;
|
|
49
58
|
key?: any;
|
|
50
59
|
value?: any;
|
|
51
|
-
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
60
|
+
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
61
|
+
error?: string | undefined;
|
|
52
62
|
}>, "many">;
|
|
53
63
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
54
64
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -56,17 +66,20 @@ export const SimpleViewQueryResponse: z.ZodObject<{
|
|
|
56
66
|
id: z.ZodOptional<z.ZodString>;
|
|
57
67
|
key: z.ZodNullable<z.ZodAny>;
|
|
58
68
|
value: z.ZodNullable<z.ZodAny>;
|
|
59
|
-
doc: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough"
|
|
69
|
+
doc: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>>;
|
|
70
|
+
error: z.ZodOptional<z.ZodString>;
|
|
60
71
|
}, "strip", z.ZodTypeAny, {
|
|
61
72
|
id?: string | undefined;
|
|
62
73
|
key?: any;
|
|
63
74
|
value?: any;
|
|
64
|
-
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
75
|
+
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
76
|
+
error?: string | undefined;
|
|
65
77
|
}, {
|
|
66
78
|
id?: string | undefined;
|
|
67
79
|
key?: any;
|
|
68
80
|
value?: any;
|
|
69
|
-
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
81
|
+
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
82
|
+
error?: string | undefined;
|
|
70
83
|
}>, "many">;
|
|
71
84
|
}, z.ZodTypeAny, "passthrough">>;
|
|
72
85
|
/** @typedef { z.infer<typeof SimpleViewQueryResponse> } SimpleViewQueryResponseSchema */
|
|
@@ -219,17 +232,20 @@ export const SimpleViewQuery: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
|
219
232
|
id: z.ZodOptional<z.ZodString>;
|
|
220
233
|
key: z.ZodNullable<z.ZodAny>;
|
|
221
234
|
value: z.ZodNullable<z.ZodAny>;
|
|
222
|
-
doc: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough"
|
|
235
|
+
doc: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>>;
|
|
236
|
+
error: z.ZodOptional<z.ZodString>;
|
|
223
237
|
}, "strip", z.ZodTypeAny, {
|
|
224
238
|
id?: string | undefined;
|
|
225
239
|
key?: any;
|
|
226
240
|
value?: any;
|
|
227
|
-
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
241
|
+
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
242
|
+
error?: string | undefined;
|
|
228
243
|
}, {
|
|
229
244
|
id?: string | undefined;
|
|
230
245
|
key?: any;
|
|
231
246
|
value?: any;
|
|
232
|
-
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
247
|
+
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
248
|
+
error?: string | undefined;
|
|
233
249
|
}>, "many">;
|
|
234
250
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
235
251
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -237,17 +253,20 @@ export const SimpleViewQuery: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
|
237
253
|
id: z.ZodOptional<z.ZodString>;
|
|
238
254
|
key: z.ZodNullable<z.ZodAny>;
|
|
239
255
|
value: z.ZodNullable<z.ZodAny>;
|
|
240
|
-
doc: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough"
|
|
256
|
+
doc: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>>;
|
|
257
|
+
error: z.ZodOptional<z.ZodString>;
|
|
241
258
|
}, "strip", z.ZodTypeAny, {
|
|
242
259
|
id?: string | undefined;
|
|
243
260
|
key?: any;
|
|
244
261
|
value?: any;
|
|
245
|
-
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
262
|
+
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
263
|
+
error?: string | undefined;
|
|
246
264
|
}, {
|
|
247
265
|
id?: string | undefined;
|
|
248
266
|
key?: any;
|
|
249
267
|
value?: any;
|
|
250
|
-
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
268
|
+
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
269
|
+
error?: string | undefined;
|
|
251
270
|
}>, "many">;
|
|
252
271
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
253
272
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -255,17 +274,20 @@ export const SimpleViewQuery: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
|
255
274
|
id: z.ZodOptional<z.ZodString>;
|
|
256
275
|
key: z.ZodNullable<z.ZodAny>;
|
|
257
276
|
value: z.ZodNullable<z.ZodAny>;
|
|
258
|
-
doc: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough"
|
|
277
|
+
doc: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>>;
|
|
278
|
+
error: z.ZodOptional<z.ZodString>;
|
|
259
279
|
}, "strip", z.ZodTypeAny, {
|
|
260
280
|
id?: string | undefined;
|
|
261
281
|
key?: any;
|
|
262
282
|
value?: any;
|
|
263
|
-
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
283
|
+
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
284
|
+
error?: string | undefined;
|
|
264
285
|
}, {
|
|
265
286
|
id?: string | undefined;
|
|
266
287
|
key?: any;
|
|
267
288
|
value?: any;
|
|
268
|
-
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
289
|
+
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
290
|
+
error?: string | undefined;
|
|
269
291
|
}>, "many">;
|
|
270
292
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
271
293
|
/** @typedef { z.infer<typeof SimpleViewQuery> } SimpleViewQuerySchema */
|
|
@@ -308,17 +330,20 @@ export const SimpleViewQueryBound: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodO
|
|
|
308
330
|
id: z.ZodOptional<z.ZodString>;
|
|
309
331
|
key: z.ZodNullable<z.ZodAny>;
|
|
310
332
|
value: z.ZodNullable<z.ZodAny>;
|
|
311
|
-
doc: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough"
|
|
333
|
+
doc: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>>;
|
|
334
|
+
error: z.ZodOptional<z.ZodString>;
|
|
312
335
|
}, "strip", z.ZodTypeAny, {
|
|
313
336
|
id?: string | undefined;
|
|
314
337
|
key?: any;
|
|
315
338
|
value?: any;
|
|
316
|
-
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
339
|
+
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
340
|
+
error?: string | undefined;
|
|
317
341
|
}, {
|
|
318
342
|
id?: string | undefined;
|
|
319
343
|
key?: any;
|
|
320
344
|
value?: any;
|
|
321
|
-
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
345
|
+
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
346
|
+
error?: string | undefined;
|
|
322
347
|
}>, "many">;
|
|
323
348
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
324
349
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -326,17 +351,20 @@ export const SimpleViewQueryBound: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodO
|
|
|
326
351
|
id: z.ZodOptional<z.ZodString>;
|
|
327
352
|
key: z.ZodNullable<z.ZodAny>;
|
|
328
353
|
value: z.ZodNullable<z.ZodAny>;
|
|
329
|
-
doc: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough"
|
|
354
|
+
doc: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>>;
|
|
355
|
+
error: z.ZodOptional<z.ZodString>;
|
|
330
356
|
}, "strip", z.ZodTypeAny, {
|
|
331
357
|
id?: string | undefined;
|
|
332
358
|
key?: any;
|
|
333
359
|
value?: any;
|
|
334
|
-
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
360
|
+
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
361
|
+
error?: string | undefined;
|
|
335
362
|
}, {
|
|
336
363
|
id?: string | undefined;
|
|
337
364
|
key?: any;
|
|
338
365
|
value?: any;
|
|
339
|
-
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
366
|
+
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
367
|
+
error?: string | undefined;
|
|
340
368
|
}>, "many">;
|
|
341
369
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
342
370
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -344,19 +372,23 @@ export const SimpleViewQueryBound: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodO
|
|
|
344
372
|
id: z.ZodOptional<z.ZodString>;
|
|
345
373
|
key: z.ZodNullable<z.ZodAny>;
|
|
346
374
|
value: z.ZodNullable<z.ZodAny>;
|
|
347
|
-
doc: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough"
|
|
375
|
+
doc: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>>;
|
|
376
|
+
error: z.ZodOptional<z.ZodString>;
|
|
348
377
|
}, "strip", z.ZodTypeAny, {
|
|
349
378
|
id?: string | undefined;
|
|
350
379
|
key?: any;
|
|
351
380
|
value?: any;
|
|
352
|
-
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
381
|
+
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
382
|
+
error?: string | undefined;
|
|
353
383
|
}, {
|
|
354
384
|
id?: string | undefined;
|
|
355
385
|
key?: any;
|
|
356
386
|
value?: any;
|
|
357
|
-
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
387
|
+
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
388
|
+
error?: string | undefined;
|
|
358
389
|
}>, "many">;
|
|
359
390
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
391
|
+
export type ViewRowSchema = z.infer<typeof ViewRow>;
|
|
360
392
|
export type SimpleViewQueryResponseSchema = z.infer<typeof SimpleViewQueryResponse>;
|
|
361
393
|
export type SimpleViewOptionsSchema = z.infer<typeof SimpleViewOptions>;
|
|
362
394
|
export type SimpleViewQuerySchema = z.infer<typeof SimpleViewQuery>;
|
package/schema/query.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.mts","sourceRoot":"","sources":["query.mjs"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"query.d.mts","sourceRoot":"","sources":["query.mjs"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;GAME;AACF,yDAAyD;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAGgB;AAChB,yFAAyF;AAEzF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAWuC;AACvC,6EAA6E;AAE7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAI6C;AAC7C,yEAAyE;AAEzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAG6C;4BAhC9B,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC;4CAMvB,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC;sCAcvC,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC;oCAOjC,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC;yCAM/B,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC;kBA3CjC,KAAK"}
|
package/schema/query.mjs
CHANGED
|
@@ -5,8 +5,11 @@ export const ViewRow = z.object({
|
|
|
5
5
|
id: z.string().optional(),
|
|
6
6
|
key: z.any().nullable(),
|
|
7
7
|
value: z.any().nullable(),
|
|
8
|
-
doc: z.object({}).passthrough().optional()
|
|
8
|
+
doc: z.object({}).passthrough().optional().nullish(),
|
|
9
|
+
error: z.string().optional().describe('usually not_found, if something is wrong with this doc')
|
|
9
10
|
})
|
|
11
|
+
/** @typedef { z.infer<typeof ViewRow> } ViewRowSchema */
|
|
12
|
+
|
|
10
13
|
export const SimpleViewQueryResponse = z.object({
|
|
11
14
|
error: z.string().optional().describe('if something is wrong'),
|
|
12
15
|
rows: z.array(ViewRow)
|
package/schema/stream.d.mts
CHANGED
|
@@ -2,17 +2,20 @@ export const OnRow: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
|
2
2
|
id: z.ZodOptional<z.ZodString>;
|
|
3
3
|
key: z.ZodNullable<z.ZodAny>;
|
|
4
4
|
value: z.ZodNullable<z.ZodAny>;
|
|
5
|
-
doc: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough"
|
|
5
|
+
doc: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>>;
|
|
6
|
+
error: z.ZodOptional<z.ZodString>;
|
|
6
7
|
}, "strip", z.ZodTypeAny, {
|
|
7
8
|
id?: string | undefined;
|
|
8
9
|
key?: any;
|
|
9
10
|
value?: any;
|
|
10
|
-
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
11
|
+
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
12
|
+
error?: string | undefined;
|
|
11
13
|
}, {
|
|
12
14
|
id?: string | undefined;
|
|
13
15
|
key?: any;
|
|
14
16
|
value?: any;
|
|
15
|
-
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
17
|
+
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
18
|
+
error?: string | undefined;
|
|
16
19
|
}>], z.ZodUnknown>, z.ZodUnknown>;
|
|
17
20
|
/** @typedef { z.infer<typeof OnRow> } OnRowSchema */
|
|
18
21
|
export const SimpleViewQueryStream: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
@@ -127,17 +130,20 @@ export const SimpleViewQueryStream: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
|
127
130
|
id: z.ZodOptional<z.ZodString>;
|
|
128
131
|
key: z.ZodNullable<z.ZodAny>;
|
|
129
132
|
value: z.ZodNullable<z.ZodAny>;
|
|
130
|
-
doc: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough"
|
|
133
|
+
doc: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>>;
|
|
134
|
+
error: z.ZodOptional<z.ZodString>;
|
|
131
135
|
}, "strip", z.ZodTypeAny, {
|
|
132
136
|
id?: string | undefined;
|
|
133
137
|
key?: any;
|
|
134
138
|
value?: any;
|
|
135
|
-
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
139
|
+
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
140
|
+
error?: string | undefined;
|
|
136
141
|
}, {
|
|
137
142
|
id?: string | undefined;
|
|
138
143
|
key?: any;
|
|
139
144
|
value?: any;
|
|
140
|
-
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
145
|
+
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
146
|
+
error?: string | undefined;
|
|
141
147
|
}>], z.ZodUnknown>, z.ZodUnknown>], z.ZodUnknown>, z.ZodPromise<z.ZodUndefined>>;
|
|
142
148
|
/** @typedef { z.infer<typeof SimpleViewQueryStream> } SimpleViewQueryStreamSchema */
|
|
143
149
|
export const SimpleViewQueryStreamBound: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodOptional<z.ZodObject<{
|
|
@@ -177,17 +183,20 @@ export const SimpleViewQueryStreamBound: z.ZodFunction<z.ZodTuple<[z.ZodString,
|
|
|
177
183
|
id: z.ZodOptional<z.ZodString>;
|
|
178
184
|
key: z.ZodNullable<z.ZodAny>;
|
|
179
185
|
value: z.ZodNullable<z.ZodAny>;
|
|
180
|
-
doc: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough"
|
|
186
|
+
doc: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>>;
|
|
187
|
+
error: z.ZodOptional<z.ZodString>;
|
|
181
188
|
}, "strip", z.ZodTypeAny, {
|
|
182
189
|
id?: string | undefined;
|
|
183
190
|
key?: any;
|
|
184
191
|
value?: any;
|
|
185
|
-
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
192
|
+
doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
193
|
+
error?: string | undefined;
|
|
186
194
|
}, {
|
|
187
195
|
id?: string | undefined;
|
|
188
196
|
key?: any;
|
|
189
197
|
value?: any;
|
|
190
|
-
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
198
|
+
doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
199
|
+
error?: string | undefined;
|
|
191
200
|
}>], z.ZodUnknown>, z.ZodUnknown>], z.ZodUnknown>, z.ZodPromise<z.ZodUndefined>>;
|
|
192
201
|
export type OnRowSchema = z.infer<typeof OnRow>;
|
|
193
202
|
export type SimpleViewQueryStreamSchema = z.infer<typeof SimpleViewQueryStream>;
|
package/schema/stream.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.d.mts","sourceRoot":"","sources":["stream.mjs"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"stream.d.mts","sourceRoot":"","sources":["stream.mjs"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;kCAEC;AACD,qDAAqD;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iFAKmC;AACnC,qFAAqF;AAErF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iFAImC;0BAdpB,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC;0CAQrB,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC;+CAOrC,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC;kBAtBvC,KAAK"}
|