@rotorsoft/act 0.0.2

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 (64) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +166 -0
  3. package/dist/.tsbuildinfo +1 -0
  4. package/dist/act.d.ts +24 -0
  5. package/dist/act.d.ts.map +1 -0
  6. package/dist/act.js +136 -0
  7. package/dist/act.js.map +1 -0
  8. package/dist/adapters/InMemoryStore.d.ts +24 -0
  9. package/dist/adapters/InMemoryStore.d.ts.map +1 -0
  10. package/dist/adapters/InMemoryStore.js +125 -0
  11. package/dist/adapters/InMemoryStore.js.map +1 -0
  12. package/dist/builder.d.ts +30 -0
  13. package/dist/builder.d.ts.map +1 -0
  14. package/dist/builder.js +97 -0
  15. package/dist/builder.js.map +1 -0
  16. package/dist/config.d.ts +93 -0
  17. package/dist/config.d.ts.map +1 -0
  18. package/dist/config.js +41 -0
  19. package/dist/config.js.map +1 -0
  20. package/dist/event-sourcing.d.ts +5 -0
  21. package/dist/event-sourcing.d.ts.map +1 -0
  22. package/dist/event-sourcing.js +101 -0
  23. package/dist/event-sourcing.js.map +1 -0
  24. package/dist/index.d.ts +9 -0
  25. package/dist/index.d.ts.map +1 -0
  26. package/dist/index.js +27 -0
  27. package/dist/index.js.map +1 -0
  28. package/dist/ports.d.ts +17 -0
  29. package/dist/ports.d.ts.map +1 -0
  30. package/dist/ports.js +56 -0
  31. package/dist/ports.js.map +1 -0
  32. package/dist/types/action.d.ts +57 -0
  33. package/dist/types/action.d.ts.map +1 -0
  34. package/dist/types/action.js +2 -0
  35. package/dist/types/action.js.map +1 -0
  36. package/dist/types/errors.d.ts +41 -0
  37. package/dist/types/errors.d.ts.map +1 -0
  38. package/dist/types/errors.js +44 -0
  39. package/dist/types/errors.js.map +1 -0
  40. package/dist/types/index.d.ts +11 -0
  41. package/dist/types/index.d.ts.map +1 -0
  42. package/dist/types/index.js +17 -0
  43. package/dist/types/index.js.map +1 -0
  44. package/dist/types/ports.d.ts +16 -0
  45. package/dist/types/ports.d.ts.map +1 -0
  46. package/dist/types/ports.js +2 -0
  47. package/dist/types/ports.js.map +1 -0
  48. package/dist/types/reaction.d.ts +30 -0
  49. package/dist/types/reaction.d.ts.map +1 -0
  50. package/dist/types/reaction.js +2 -0
  51. package/dist/types/reaction.js.map +1 -0
  52. package/dist/types/registry.d.ts +23 -0
  53. package/dist/types/registry.d.ts.map +1 -0
  54. package/dist/types/registry.js +2 -0
  55. package/dist/types/registry.js.map +1 -0
  56. package/dist/types/schemas.d.ts +1046 -0
  57. package/dist/types/schemas.d.ts.map +1 -0
  58. package/dist/types/schemas.js +82 -0
  59. package/dist/types/schemas.js.map +1 -0
  60. package/dist/utils.d.ts +17 -0
  61. package/dist/utils.d.ts.map +1 -0
  62. package/dist/utils.js +73 -0
  63. package/dist/utils.js.map +1 -0
  64. package/package.json +32 -0
@@ -0,0 +1,1046 @@
1
+ import { z, ZodObject, ZodRawShape } from "zod";
2
+ export declare const ZodEmpty: z.ZodRecord<z.ZodString, z.ZodNever>;
3
+ export declare const ActorSchema: z.ZodReadonly<z.ZodObject<{
4
+ id: z.ZodString;
5
+ name: z.ZodString;
6
+ }, "strip", z.ZodTypeAny, {
7
+ id: string;
8
+ name: string;
9
+ }, {
10
+ id: string;
11
+ name: string;
12
+ }>>;
13
+ export declare const TargetSchema: z.ZodReadonly<z.ZodObject<{
14
+ stream: z.ZodString;
15
+ actor: z.ZodReadonly<z.ZodObject<{
16
+ id: z.ZodString;
17
+ name: z.ZodString;
18
+ }, "strip", z.ZodTypeAny, {
19
+ id: string;
20
+ name: string;
21
+ }, {
22
+ id: string;
23
+ name: string;
24
+ }>>;
25
+ expectedVersion: z.ZodOptional<z.ZodNumber>;
26
+ }, "strip", z.ZodTypeAny, {
27
+ stream: string;
28
+ actor: Readonly<{
29
+ id: string;
30
+ name: string;
31
+ }>;
32
+ expectedVersion?: number | undefined;
33
+ }, {
34
+ stream: string;
35
+ actor: Readonly<{
36
+ id: string;
37
+ name: string;
38
+ }>;
39
+ expectedVersion?: number | undefined;
40
+ }>>;
41
+ export declare const EventMetaSchema: z.ZodReadonly<z.ZodObject<{
42
+ correlation: z.ZodString;
43
+ causation: z.ZodObject<{
44
+ action: z.ZodOptional<z.ZodIntersection<z.ZodReadonly<z.ZodObject<{
45
+ stream: z.ZodString;
46
+ actor: z.ZodReadonly<z.ZodObject<{
47
+ id: z.ZodString;
48
+ name: z.ZodString;
49
+ }, "strip", z.ZodTypeAny, {
50
+ id: string;
51
+ name: string;
52
+ }, {
53
+ id: string;
54
+ name: string;
55
+ }>>;
56
+ expectedVersion: z.ZodOptional<z.ZodNumber>;
57
+ }, "strip", z.ZodTypeAny, {
58
+ stream: string;
59
+ actor: Readonly<{
60
+ id: string;
61
+ name: string;
62
+ }>;
63
+ expectedVersion?: number | undefined;
64
+ }, {
65
+ stream: string;
66
+ actor: Readonly<{
67
+ id: string;
68
+ name: string;
69
+ }>;
70
+ expectedVersion?: number | undefined;
71
+ }>>, z.ZodObject<{
72
+ name: z.ZodString;
73
+ }, "strip", z.ZodTypeAny, {
74
+ name: string;
75
+ }, {
76
+ name: string;
77
+ }>>>;
78
+ event: z.ZodOptional<z.ZodObject<{
79
+ id: z.ZodNumber;
80
+ name: z.ZodString;
81
+ stream: z.ZodString;
82
+ }, "strip", z.ZodTypeAny, {
83
+ id: number;
84
+ name: string;
85
+ stream: string;
86
+ }, {
87
+ id: number;
88
+ name: string;
89
+ stream: string;
90
+ }>>;
91
+ }, "strip", z.ZodTypeAny, {
92
+ action?: (Readonly<{
93
+ stream: string;
94
+ actor: Readonly<{
95
+ id: string;
96
+ name: string;
97
+ }>;
98
+ expectedVersion?: number | undefined;
99
+ }> & {
100
+ name: string;
101
+ }) | undefined;
102
+ event?: {
103
+ id: number;
104
+ name: string;
105
+ stream: string;
106
+ } | undefined;
107
+ }, {
108
+ action?: (Readonly<{
109
+ stream: string;
110
+ actor: Readonly<{
111
+ id: string;
112
+ name: string;
113
+ }>;
114
+ expectedVersion?: number | undefined;
115
+ }> & {
116
+ name: string;
117
+ }) | undefined;
118
+ event?: {
119
+ id: number;
120
+ name: string;
121
+ stream: string;
122
+ } | undefined;
123
+ }>;
124
+ }, "strip", z.ZodTypeAny, {
125
+ correlation: string;
126
+ causation: {
127
+ action?: (Readonly<{
128
+ stream: string;
129
+ actor: Readonly<{
130
+ id: string;
131
+ name: string;
132
+ }>;
133
+ expectedVersion?: number | undefined;
134
+ }> & {
135
+ name: string;
136
+ }) | undefined;
137
+ event?: {
138
+ id: number;
139
+ name: string;
140
+ stream: string;
141
+ } | undefined;
142
+ };
143
+ }, {
144
+ correlation: string;
145
+ causation: {
146
+ action?: (Readonly<{
147
+ stream: string;
148
+ actor: Readonly<{
149
+ id: string;
150
+ name: string;
151
+ }>;
152
+ expectedVersion?: number | undefined;
153
+ }> & {
154
+ name: string;
155
+ }) | undefined;
156
+ event?: {
157
+ id: number;
158
+ name: string;
159
+ stream: string;
160
+ } | undefined;
161
+ };
162
+ }>>;
163
+ export declare const CommittedMetaSchema: z.ZodReadonly<z.ZodObject<{
164
+ id: z.ZodNumber;
165
+ stream: z.ZodString;
166
+ version: z.ZodNumber;
167
+ created: z.ZodDate;
168
+ meta: z.ZodReadonly<z.ZodObject<{
169
+ correlation: z.ZodString;
170
+ causation: z.ZodObject<{
171
+ action: z.ZodOptional<z.ZodIntersection<z.ZodReadonly<z.ZodObject<{
172
+ stream: z.ZodString;
173
+ actor: z.ZodReadonly<z.ZodObject<{
174
+ id: z.ZodString;
175
+ name: z.ZodString;
176
+ }, "strip", z.ZodTypeAny, {
177
+ id: string;
178
+ name: string;
179
+ }, {
180
+ id: string;
181
+ name: string;
182
+ }>>;
183
+ expectedVersion: z.ZodOptional<z.ZodNumber>;
184
+ }, "strip", z.ZodTypeAny, {
185
+ stream: string;
186
+ actor: Readonly<{
187
+ id: string;
188
+ name: string;
189
+ }>;
190
+ expectedVersion?: number | undefined;
191
+ }, {
192
+ stream: string;
193
+ actor: Readonly<{
194
+ id: string;
195
+ name: string;
196
+ }>;
197
+ expectedVersion?: number | undefined;
198
+ }>>, z.ZodObject<{
199
+ name: z.ZodString;
200
+ }, "strip", z.ZodTypeAny, {
201
+ name: string;
202
+ }, {
203
+ name: string;
204
+ }>>>;
205
+ event: z.ZodOptional<z.ZodObject<{
206
+ id: z.ZodNumber;
207
+ name: z.ZodString;
208
+ stream: z.ZodString;
209
+ }, "strip", z.ZodTypeAny, {
210
+ id: number;
211
+ name: string;
212
+ stream: string;
213
+ }, {
214
+ id: number;
215
+ name: string;
216
+ stream: string;
217
+ }>>;
218
+ }, "strip", z.ZodTypeAny, {
219
+ action?: (Readonly<{
220
+ stream: string;
221
+ actor: Readonly<{
222
+ id: string;
223
+ name: string;
224
+ }>;
225
+ expectedVersion?: number | undefined;
226
+ }> & {
227
+ name: string;
228
+ }) | undefined;
229
+ event?: {
230
+ id: number;
231
+ name: string;
232
+ stream: string;
233
+ } | undefined;
234
+ }, {
235
+ action?: (Readonly<{
236
+ stream: string;
237
+ actor: Readonly<{
238
+ id: string;
239
+ name: string;
240
+ }>;
241
+ expectedVersion?: number | undefined;
242
+ }> & {
243
+ name: string;
244
+ }) | undefined;
245
+ event?: {
246
+ id: number;
247
+ name: string;
248
+ stream: string;
249
+ } | undefined;
250
+ }>;
251
+ }, "strip", z.ZodTypeAny, {
252
+ correlation: string;
253
+ causation: {
254
+ action?: (Readonly<{
255
+ stream: string;
256
+ actor: Readonly<{
257
+ id: string;
258
+ name: string;
259
+ }>;
260
+ expectedVersion?: number | undefined;
261
+ }> & {
262
+ name: string;
263
+ }) | undefined;
264
+ event?: {
265
+ id: number;
266
+ name: string;
267
+ stream: string;
268
+ } | undefined;
269
+ };
270
+ }, {
271
+ correlation: string;
272
+ causation: {
273
+ action?: (Readonly<{
274
+ stream: string;
275
+ actor: Readonly<{
276
+ id: string;
277
+ name: string;
278
+ }>;
279
+ expectedVersion?: number | undefined;
280
+ }> & {
281
+ name: string;
282
+ }) | undefined;
283
+ event?: {
284
+ id: number;
285
+ name: string;
286
+ stream: string;
287
+ } | undefined;
288
+ };
289
+ }>>;
290
+ }, "strip", z.ZodTypeAny, {
291
+ id: number;
292
+ stream: string;
293
+ version: number;
294
+ created: Date;
295
+ meta: Readonly<{
296
+ correlation: string;
297
+ causation: {
298
+ action?: (Readonly<{
299
+ stream: string;
300
+ actor: Readonly<{
301
+ id: string;
302
+ name: string;
303
+ }>;
304
+ expectedVersion?: number | undefined;
305
+ }> & {
306
+ name: string;
307
+ }) | undefined;
308
+ event?: {
309
+ id: number;
310
+ name: string;
311
+ stream: string;
312
+ } | undefined;
313
+ };
314
+ }>;
315
+ }, {
316
+ id: number;
317
+ stream: string;
318
+ version: number;
319
+ created: Date;
320
+ meta: Readonly<{
321
+ correlation: string;
322
+ causation: {
323
+ action?: (Readonly<{
324
+ stream: string;
325
+ actor: Readonly<{
326
+ id: string;
327
+ name: string;
328
+ }>;
329
+ expectedVersion?: number | undefined;
330
+ }> & {
331
+ name: string;
332
+ }) | undefined;
333
+ event?: {
334
+ id: number;
335
+ name: string;
336
+ stream: string;
337
+ } | undefined;
338
+ };
339
+ }>;
340
+ }>>;
341
+ export type StateSchema = Readonly<{
342
+ events: Record<string, ZodObject<ZodRawShape> | typeof ZodEmpty>;
343
+ actions: Record<string, ZodObject<ZodRawShape> | typeof ZodEmpty>;
344
+ state: ZodObject<ZodRawShape>;
345
+ }>;
346
+ export declare function buildSnapshotSchema<S extends StateSchema>(s: S): z.ZodObject<{
347
+ state: z.ZodReadonly<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, {
348
+ [x: string]: any;
349
+ }, {
350
+ [x: string]: any;
351
+ }>>;
352
+ event: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
353
+ name: z.ZodLiteral<string>;
354
+ data: z.ZodRecord<z.ZodString, z.ZodNever> | z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, {
355
+ [x: string]: any;
356
+ }, {
357
+ [x: string]: any;
358
+ }>;
359
+ id: z.ZodNumber;
360
+ stream: z.ZodString;
361
+ version: z.ZodNumber;
362
+ created: z.ZodDate;
363
+ meta: z.ZodReadonly<z.ZodObject<{
364
+ correlation: z.ZodString;
365
+ causation: z.ZodObject<{
366
+ action: z.ZodOptional<z.ZodIntersection<z.ZodReadonly<z.ZodObject<{
367
+ stream: z.ZodString;
368
+ actor: z.ZodReadonly<z.ZodObject<{
369
+ id: z.ZodString;
370
+ name: z.ZodString;
371
+ }, "strip", z.ZodTypeAny, {
372
+ id: string;
373
+ name: string;
374
+ }, {
375
+ id: string;
376
+ name: string;
377
+ }>>;
378
+ expectedVersion: z.ZodOptional<z.ZodNumber>;
379
+ }, "strip", z.ZodTypeAny, {
380
+ stream: string;
381
+ actor: Readonly<{
382
+ id: string;
383
+ name: string;
384
+ }>;
385
+ expectedVersion?: number | undefined;
386
+ }, {
387
+ stream: string;
388
+ actor: Readonly<{
389
+ id: string;
390
+ name: string;
391
+ }>;
392
+ expectedVersion?: number | undefined;
393
+ }>>, z.ZodObject<{
394
+ name: z.ZodString;
395
+ }, "strip", z.ZodTypeAny, {
396
+ name: string;
397
+ }, {
398
+ name: string;
399
+ }>>>;
400
+ event: z.ZodOptional<z.ZodObject<{
401
+ id: z.ZodNumber;
402
+ name: z.ZodString;
403
+ stream: z.ZodString;
404
+ }, "strip", z.ZodTypeAny, {
405
+ id: number;
406
+ name: string;
407
+ stream: string;
408
+ }, {
409
+ id: number;
410
+ name: string;
411
+ stream: string;
412
+ }>>;
413
+ }, "strip", z.ZodTypeAny, {
414
+ action?: (Readonly<{
415
+ stream: string;
416
+ actor: Readonly<{
417
+ id: string;
418
+ name: string;
419
+ }>;
420
+ expectedVersion?: number | undefined;
421
+ }> & {
422
+ name: string;
423
+ }) | undefined;
424
+ event?: {
425
+ id: number;
426
+ name: string;
427
+ stream: string;
428
+ } | undefined;
429
+ }, {
430
+ action?: (Readonly<{
431
+ stream: string;
432
+ actor: Readonly<{
433
+ id: string;
434
+ name: string;
435
+ }>;
436
+ expectedVersion?: number | undefined;
437
+ }> & {
438
+ name: string;
439
+ }) | undefined;
440
+ event?: {
441
+ id: number;
442
+ name: string;
443
+ stream: string;
444
+ } | undefined;
445
+ }>;
446
+ }, "strip", z.ZodTypeAny, {
447
+ correlation: string;
448
+ causation: {
449
+ action?: (Readonly<{
450
+ stream: string;
451
+ actor: Readonly<{
452
+ id: string;
453
+ name: string;
454
+ }>;
455
+ expectedVersion?: number | undefined;
456
+ }> & {
457
+ name: string;
458
+ }) | undefined;
459
+ event?: {
460
+ id: number;
461
+ name: string;
462
+ stream: string;
463
+ } | undefined;
464
+ };
465
+ }, {
466
+ correlation: string;
467
+ causation: {
468
+ action?: (Readonly<{
469
+ stream: string;
470
+ actor: Readonly<{
471
+ id: string;
472
+ name: string;
473
+ }>;
474
+ expectedVersion?: number | undefined;
475
+ }> & {
476
+ name: string;
477
+ }) | undefined;
478
+ event?: {
479
+ id: number;
480
+ name: string;
481
+ stream: string;
482
+ } | undefined;
483
+ };
484
+ }>>;
485
+ }, "strip", z.ZodTypeAny, {
486
+ id: number;
487
+ name: string;
488
+ stream: string;
489
+ version: number;
490
+ created: Date;
491
+ meta: Readonly<{
492
+ correlation: string;
493
+ causation: {
494
+ action?: (Readonly<{
495
+ stream: string;
496
+ actor: Readonly<{
497
+ id: string;
498
+ name: string;
499
+ }>;
500
+ expectedVersion?: number | undefined;
501
+ }> & {
502
+ name: string;
503
+ }) | undefined;
504
+ event?: {
505
+ id: number;
506
+ name: string;
507
+ stream: string;
508
+ } | undefined;
509
+ };
510
+ }>;
511
+ data: {
512
+ [x: string]: any;
513
+ } | Record<string, never>;
514
+ }, {
515
+ id: number;
516
+ name: string;
517
+ stream: string;
518
+ version: number;
519
+ created: Date;
520
+ meta: Readonly<{
521
+ correlation: string;
522
+ causation: {
523
+ action?: (Readonly<{
524
+ stream: string;
525
+ actor: Readonly<{
526
+ id: string;
527
+ name: string;
528
+ }>;
529
+ expectedVersion?: number | undefined;
530
+ }> & {
531
+ name: string;
532
+ }) | undefined;
533
+ event?: {
534
+ id: number;
535
+ name: string;
536
+ stream: string;
537
+ } | undefined;
538
+ };
539
+ }>;
540
+ data: {
541
+ [x: string]: any;
542
+ } | Record<string, never>;
543
+ }>, z.ZodObject<{
544
+ name: z.ZodLiteral<string>;
545
+ data: z.ZodRecord<z.ZodString, z.ZodNever> | z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, {
546
+ [x: string]: any;
547
+ }, {
548
+ [x: string]: any;
549
+ }>;
550
+ id: z.ZodNumber;
551
+ stream: z.ZodString;
552
+ version: z.ZodNumber;
553
+ created: z.ZodDate;
554
+ meta: z.ZodReadonly<z.ZodObject<{
555
+ correlation: z.ZodString;
556
+ causation: z.ZodObject<{
557
+ action: z.ZodOptional<z.ZodIntersection<z.ZodReadonly<z.ZodObject<{
558
+ stream: z.ZodString;
559
+ actor: z.ZodReadonly<z.ZodObject<{
560
+ id: z.ZodString;
561
+ name: z.ZodString;
562
+ }, "strip", z.ZodTypeAny, {
563
+ id: string;
564
+ name: string;
565
+ }, {
566
+ id: string;
567
+ name: string;
568
+ }>>;
569
+ expectedVersion: z.ZodOptional<z.ZodNumber>;
570
+ }, "strip", z.ZodTypeAny, {
571
+ stream: string;
572
+ actor: Readonly<{
573
+ id: string;
574
+ name: string;
575
+ }>;
576
+ expectedVersion?: number | undefined;
577
+ }, {
578
+ stream: string;
579
+ actor: Readonly<{
580
+ id: string;
581
+ name: string;
582
+ }>;
583
+ expectedVersion?: number | undefined;
584
+ }>>, z.ZodObject<{
585
+ name: z.ZodString;
586
+ }, "strip", z.ZodTypeAny, {
587
+ name: string;
588
+ }, {
589
+ name: string;
590
+ }>>>;
591
+ event: z.ZodOptional<z.ZodObject<{
592
+ id: z.ZodNumber;
593
+ name: z.ZodString;
594
+ stream: z.ZodString;
595
+ }, "strip", z.ZodTypeAny, {
596
+ id: number;
597
+ name: string;
598
+ stream: string;
599
+ }, {
600
+ id: number;
601
+ name: string;
602
+ stream: string;
603
+ }>>;
604
+ }, "strip", z.ZodTypeAny, {
605
+ action?: (Readonly<{
606
+ stream: string;
607
+ actor: Readonly<{
608
+ id: string;
609
+ name: string;
610
+ }>;
611
+ expectedVersion?: number | undefined;
612
+ }> & {
613
+ name: string;
614
+ }) | undefined;
615
+ event?: {
616
+ id: number;
617
+ name: string;
618
+ stream: string;
619
+ } | undefined;
620
+ }, {
621
+ action?: (Readonly<{
622
+ stream: string;
623
+ actor: Readonly<{
624
+ id: string;
625
+ name: string;
626
+ }>;
627
+ expectedVersion?: number | undefined;
628
+ }> & {
629
+ name: string;
630
+ }) | undefined;
631
+ event?: {
632
+ id: number;
633
+ name: string;
634
+ stream: string;
635
+ } | undefined;
636
+ }>;
637
+ }, "strip", z.ZodTypeAny, {
638
+ correlation: string;
639
+ causation: {
640
+ action?: (Readonly<{
641
+ stream: string;
642
+ actor: Readonly<{
643
+ id: string;
644
+ name: string;
645
+ }>;
646
+ expectedVersion?: number | undefined;
647
+ }> & {
648
+ name: string;
649
+ }) | undefined;
650
+ event?: {
651
+ id: number;
652
+ name: string;
653
+ stream: string;
654
+ } | undefined;
655
+ };
656
+ }, {
657
+ correlation: string;
658
+ causation: {
659
+ action?: (Readonly<{
660
+ stream: string;
661
+ actor: Readonly<{
662
+ id: string;
663
+ name: string;
664
+ }>;
665
+ expectedVersion?: number | undefined;
666
+ }> & {
667
+ name: string;
668
+ }) | undefined;
669
+ event?: {
670
+ id: number;
671
+ name: string;
672
+ stream: string;
673
+ } | undefined;
674
+ };
675
+ }>>;
676
+ }, "strip", z.ZodTypeAny, {
677
+ id: number;
678
+ name: string;
679
+ stream: string;
680
+ version: number;
681
+ created: Date;
682
+ meta: Readonly<{
683
+ correlation: string;
684
+ causation: {
685
+ action?: (Readonly<{
686
+ stream: string;
687
+ actor: Readonly<{
688
+ id: string;
689
+ name: string;
690
+ }>;
691
+ expectedVersion?: number | undefined;
692
+ }> & {
693
+ name: string;
694
+ }) | undefined;
695
+ event?: {
696
+ id: number;
697
+ name: string;
698
+ stream: string;
699
+ } | undefined;
700
+ };
701
+ }>;
702
+ data: {
703
+ [x: string]: any;
704
+ } | Record<string, never>;
705
+ }, {
706
+ id: number;
707
+ name: string;
708
+ stream: string;
709
+ version: number;
710
+ created: Date;
711
+ meta: Readonly<{
712
+ correlation: string;
713
+ causation: {
714
+ action?: (Readonly<{
715
+ stream: string;
716
+ actor: Readonly<{
717
+ id: string;
718
+ name: string;
719
+ }>;
720
+ expectedVersion?: number | undefined;
721
+ }> & {
722
+ name: string;
723
+ }) | undefined;
724
+ event?: {
725
+ id: number;
726
+ name: string;
727
+ stream: string;
728
+ } | undefined;
729
+ };
730
+ }>;
731
+ data: {
732
+ [x: string]: any;
733
+ } | Record<string, never>;
734
+ }>, ...z.ZodObject<{
735
+ name: z.ZodLiteral<string>;
736
+ data: z.ZodRecord<z.ZodString, z.ZodNever> | z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, {
737
+ [x: string]: any;
738
+ }, {
739
+ [x: string]: any;
740
+ }>;
741
+ id: z.ZodNumber;
742
+ stream: z.ZodString;
743
+ version: z.ZodNumber;
744
+ created: z.ZodDate;
745
+ meta: z.ZodReadonly<z.ZodObject<{
746
+ correlation: z.ZodString;
747
+ causation: z.ZodObject<{
748
+ action: z.ZodOptional<z.ZodIntersection<z.ZodReadonly<z.ZodObject<{
749
+ stream: z.ZodString;
750
+ actor: z.ZodReadonly<z.ZodObject<{
751
+ id: z.ZodString;
752
+ name: z.ZodString;
753
+ }, "strip", z.ZodTypeAny, {
754
+ id: string;
755
+ name: string;
756
+ }, {
757
+ id: string;
758
+ name: string;
759
+ }>>;
760
+ expectedVersion: z.ZodOptional<z.ZodNumber>;
761
+ }, "strip", z.ZodTypeAny, {
762
+ stream: string;
763
+ actor: Readonly<{
764
+ id: string;
765
+ name: string;
766
+ }>;
767
+ expectedVersion?: number | undefined;
768
+ }, {
769
+ stream: string;
770
+ actor: Readonly<{
771
+ id: string;
772
+ name: string;
773
+ }>;
774
+ expectedVersion?: number | undefined;
775
+ }>>, z.ZodObject<{
776
+ name: z.ZodString;
777
+ }, "strip", z.ZodTypeAny, {
778
+ name: string;
779
+ }, {
780
+ name: string;
781
+ }>>>;
782
+ event: z.ZodOptional<z.ZodObject<{
783
+ id: z.ZodNumber;
784
+ name: z.ZodString;
785
+ stream: z.ZodString;
786
+ }, "strip", z.ZodTypeAny, {
787
+ id: number;
788
+ name: string;
789
+ stream: string;
790
+ }, {
791
+ id: number;
792
+ name: string;
793
+ stream: string;
794
+ }>>;
795
+ }, "strip", z.ZodTypeAny, {
796
+ action?: (Readonly<{
797
+ stream: string;
798
+ actor: Readonly<{
799
+ id: string;
800
+ name: string;
801
+ }>;
802
+ expectedVersion?: number | undefined;
803
+ }> & {
804
+ name: string;
805
+ }) | undefined;
806
+ event?: {
807
+ id: number;
808
+ name: string;
809
+ stream: string;
810
+ } | undefined;
811
+ }, {
812
+ action?: (Readonly<{
813
+ stream: string;
814
+ actor: Readonly<{
815
+ id: string;
816
+ name: string;
817
+ }>;
818
+ expectedVersion?: number | undefined;
819
+ }> & {
820
+ name: string;
821
+ }) | undefined;
822
+ event?: {
823
+ id: number;
824
+ name: string;
825
+ stream: string;
826
+ } | undefined;
827
+ }>;
828
+ }, "strip", z.ZodTypeAny, {
829
+ correlation: string;
830
+ causation: {
831
+ action?: (Readonly<{
832
+ stream: string;
833
+ actor: Readonly<{
834
+ id: string;
835
+ name: string;
836
+ }>;
837
+ expectedVersion?: number | undefined;
838
+ }> & {
839
+ name: string;
840
+ }) | undefined;
841
+ event?: {
842
+ id: number;
843
+ name: string;
844
+ stream: string;
845
+ } | undefined;
846
+ };
847
+ }, {
848
+ correlation: string;
849
+ causation: {
850
+ action?: (Readonly<{
851
+ stream: string;
852
+ actor: Readonly<{
853
+ id: string;
854
+ name: string;
855
+ }>;
856
+ expectedVersion?: number | undefined;
857
+ }> & {
858
+ name: string;
859
+ }) | undefined;
860
+ event?: {
861
+ id: number;
862
+ name: string;
863
+ stream: string;
864
+ } | undefined;
865
+ };
866
+ }>>;
867
+ }, "strip", z.ZodTypeAny, {
868
+ id: number;
869
+ name: string;
870
+ stream: string;
871
+ version: number;
872
+ created: Date;
873
+ meta: Readonly<{
874
+ correlation: string;
875
+ causation: {
876
+ action?: (Readonly<{
877
+ stream: string;
878
+ actor: Readonly<{
879
+ id: string;
880
+ name: string;
881
+ }>;
882
+ expectedVersion?: number | undefined;
883
+ }> & {
884
+ name: string;
885
+ }) | undefined;
886
+ event?: {
887
+ id: number;
888
+ name: string;
889
+ stream: string;
890
+ } | undefined;
891
+ };
892
+ }>;
893
+ data: {
894
+ [x: string]: any;
895
+ } | Record<string, never>;
896
+ }, {
897
+ id: number;
898
+ name: string;
899
+ stream: string;
900
+ version: number;
901
+ created: Date;
902
+ meta: Readonly<{
903
+ correlation: string;
904
+ causation: {
905
+ action?: (Readonly<{
906
+ stream: string;
907
+ actor: Readonly<{
908
+ id: string;
909
+ name: string;
910
+ }>;
911
+ expectedVersion?: number | undefined;
912
+ }> & {
913
+ name: string;
914
+ }) | undefined;
915
+ event?: {
916
+ id: number;
917
+ name: string;
918
+ stream: string;
919
+ } | undefined;
920
+ };
921
+ }>;
922
+ data: {
923
+ [x: string]: any;
924
+ } | Record<string, never>;
925
+ }>[]]>>;
926
+ patches: z.ZodNumber;
927
+ snaps: z.ZodNumber;
928
+ }, "strip", z.ZodTypeAny, {
929
+ state: Readonly<{
930
+ [x: string]: any;
931
+ }>;
932
+ patches: number;
933
+ snaps: number;
934
+ event?: {
935
+ id: number;
936
+ name: string;
937
+ stream: string;
938
+ version: number;
939
+ created: Date;
940
+ meta: Readonly<{
941
+ correlation: string;
942
+ causation: {
943
+ action?: (Readonly<{
944
+ stream: string;
945
+ actor: Readonly<{
946
+ id: string;
947
+ name: string;
948
+ }>;
949
+ expectedVersion?: number | undefined;
950
+ }> & {
951
+ name: string;
952
+ }) | undefined;
953
+ event?: {
954
+ id: number;
955
+ name: string;
956
+ stream: string;
957
+ } | undefined;
958
+ };
959
+ }>;
960
+ data: {
961
+ [x: string]: any;
962
+ } | Record<string, never>;
963
+ } | undefined;
964
+ }, {
965
+ state: Readonly<{
966
+ [x: string]: any;
967
+ }>;
968
+ patches: number;
969
+ snaps: number;
970
+ event?: {
971
+ id: number;
972
+ name: string;
973
+ stream: string;
974
+ version: number;
975
+ created: Date;
976
+ meta: Readonly<{
977
+ correlation: string;
978
+ causation: {
979
+ action?: (Readonly<{
980
+ stream: string;
981
+ actor: Readonly<{
982
+ id: string;
983
+ name: string;
984
+ }>;
985
+ expectedVersion?: number | undefined;
986
+ }> & {
987
+ name: string;
988
+ }) | undefined;
989
+ event?: {
990
+ id: number;
991
+ name: string;
992
+ stream: string;
993
+ } | undefined;
994
+ };
995
+ }>;
996
+ data: {
997
+ [x: string]: any;
998
+ } | Record<string, never>;
999
+ } | undefined;
1000
+ }>;
1001
+ /**
1002
+ * Options to query the all stream
1003
+ * - `stream?` filter by stream
1004
+ * - `names?` filter by event names
1005
+ * - `before?` filter events before this id
1006
+ * - `after?` filter events after this id
1007
+ * - `limit?` limit the number of events to return
1008
+ * - `created_before?` filter events created before this date/time
1009
+ * - `created_after?` filter events created after this date/time
1010
+ * - `backward?` order descending when true
1011
+ * - `correlation?` filter by correlation
1012
+ * - `actor?` filter by actor id (mainly used to reduce process managers)
1013
+ * - `loading?` flag when loading to optimize queries
1014
+ */
1015
+ export declare const QuerySchema: z.ZodObject<{
1016
+ stream: z.ZodOptional<z.ZodString>;
1017
+ names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1018
+ before: z.ZodOptional<z.ZodNumber>;
1019
+ after: z.ZodOptional<z.ZodNumber>;
1020
+ limit: z.ZodOptional<z.ZodNumber>;
1021
+ created_before: z.ZodOptional<z.ZodDate>;
1022
+ created_after: z.ZodOptional<z.ZodDate>;
1023
+ backward: z.ZodOptional<z.ZodBoolean>;
1024
+ correlation: z.ZodOptional<z.ZodString>;
1025
+ }, "strip", z.ZodTypeAny, {
1026
+ stream?: string | undefined;
1027
+ correlation?: string | undefined;
1028
+ names?: string[] | undefined;
1029
+ before?: number | undefined;
1030
+ after?: number | undefined;
1031
+ limit?: number | undefined;
1032
+ created_before?: Date | undefined;
1033
+ created_after?: Date | undefined;
1034
+ backward?: boolean | undefined;
1035
+ }, {
1036
+ stream?: string | undefined;
1037
+ correlation?: string | undefined;
1038
+ names?: string[] | undefined;
1039
+ before?: number | undefined;
1040
+ after?: number | undefined;
1041
+ limit?: number | undefined;
1042
+ created_before?: Date | undefined;
1043
+ created_after?: Date | undefined;
1044
+ backward?: boolean | undefined;
1045
+ }>;
1046
+ //# sourceMappingURL=schemas.d.ts.map