@iwentsourcing/core 0.1.0 → 0.2.0

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 (68) hide show
  1. package/dist/aggregation/aggregation-declaration.d.ts +27 -27
  2. package/dist/authentication/public-auth-providers.js.map +1 -1
  3. package/dist/event-store/create-file-event-store.d.ts +1 -1
  4. package/dist/example/todo-example.d.ts +6 -6
  5. package/dist/management/access/access-events.d.ts +104 -104
  6. package/dist/management/access/access-state.d.ts +269 -269
  7. package/dist/management/access/access-stream.d.ts +286 -286
  8. package/dist/management/authentication/authentication-state.d.ts +21 -21
  9. package/dist/management/authentication/authentication-stream.d.ts +66 -66
  10. package/dist/management/permission/permission-aggregation.d.ts +101 -101
  11. package/dist/management/permission/permission-aggregation.test.js +0 -1
  12. package/dist/management/permission/permission-aggregation.test.js.map +1 -1
  13. package/dist/management/permission-error-schema.d.ts +29 -29
  14. package/dist/management/registry/registry-events.d.ts +186 -186
  15. package/dist/management/registry/registry-state.d.ts +55 -55
  16. package/dist/management/registry/registry-stream.d.ts +284 -284
  17. package/dist/management/state-read-policy.js.map +1 -1
  18. package/dist/management/system/iwentsourcing-realm.d.ts +106 -106
  19. package/dist/runtime/host-result-builder.d.ts +13 -13
  20. package/dist/runtime/permission-grant-schema.d.ts +7 -7
  21. package/dist/runtime/runtime-result.d.ts +26 -26
  22. package/dist/sequencer/create-sequencer-storage.d.ts +4 -4
  23. package/dist/sequencer/create-state-processor.d.ts +4 -4
  24. package/dist/sequencer/sequence-topic.d.ts +1 -1
  25. package/dist/stream/stream-declaration.d.ts +34 -34
  26. package/dist/tsbuild.info +1 -1
  27. package/dist/utils/combine-abort-signal.js.map +1 -1
  28. package/dist/worker/create-stream-worker.d.ts +2 -2
  29. package/package.json +1 -1
  30. package/dist/lock/exclusive-lock.d.ts +0 -4
  31. package/dist/lock/exclusive-lock.js +0 -8
  32. package/dist/lock/exclusive-lock.js.map +0 -1
  33. package/dist/management/managed-permission-denied-error.d.ts +0 -50
  34. package/dist/management/managed-permission-denied-error.js +0 -26
  35. package/dist/management/managed-permission-denied-error.js.map +0 -1
  36. package/dist/processing/create-event-processor.d.ts +0 -23
  37. package/dist/processing/create-event-processor.js +0 -133
  38. package/dist/processing/create-event-processor.js.map +0 -1
  39. package/dist/processing/create-event-processor.test.d.ts +0 -1
  40. package/dist/processing/create-event-processor.test.js +0 -218
  41. package/dist/processing/create-event-processor.test.js.map +0 -1
  42. package/dist/processing/event-processing-topic.d.ts +0 -5
  43. package/dist/processing/event-processing-topic.js +0 -13
  44. package/dist/processing/event-processing-topic.js.map +0 -1
  45. package/dist/processing/select-event-shard.d.ts +0 -1
  46. package/dist/processing/select-event-shard.js +0 -14
  47. package/dist/processing/select-event-shard.js.map +0 -1
  48. package/dist/processing/sequencer-cache-key.d.ts +0 -2
  49. package/dist/processing/sequencer-cache-key.js +0 -13
  50. package/dist/processing/sequencer-cache-key.js.map +0 -1
  51. package/dist/tmp-typetest.d.ts +0 -1
  52. package/dist/tmp-typetest.js +0 -3
  53. package/dist/tmp-typetest.js.map +0 -1
  54. package/dist/tracer/create-noop-telemetry.d.ts +0 -2
  55. package/dist/tracer/create-noop-telemetry.js +0 -22
  56. package/dist/tracer/create-noop-telemetry.js.map +0 -1
  57. package/dist/tracer/create-tracer.d.ts +0 -2
  58. package/dist/tracer/create-tracer.js +0 -15
  59. package/dist/tracer/create-tracer.js.map +0 -1
  60. package/dist/utils/lru-cache.d.ts +0 -11
  61. package/dist/utils/lru-cache.js +0 -44
  62. package/dist/utils/lru-cache.js.map +0 -1
  63. package/dist/worker/create-stream-wroker.test.d.ts +0 -0
  64. package/dist/worker/create-stream-wroker.test.js +0 -2
  65. package/dist/worker/create-stream-wroker.test.js.map +0 -1
  66. package/dist/worker/process-pending-events.d.ts +0 -20
  67. package/dist/worker/process-pending-events.js +0 -106
  68. package/dist/worker/process-pending-events.js.map +0 -1
@@ -24,36 +24,36 @@ export declare const AccessStream: import("../../event-store/event-declarations.
24
24
  state: import("../../typing/record-type-description.js").RecordTypeDescription<{
25
25
  [key: string]: {
26
26
  key: string[];
27
- schema: {
28
- schemas: {
29
- [key: string]: import("../../json-schema/json-schema.js").JsonSchema;
30
- };
31
- mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
32
- };
33
27
  indices: {
34
28
  [key: string]: {
35
29
  fields: string[];
36
30
  unique: boolean;
37
31
  };
38
32
  };
33
+ schema: {
34
+ schemas: {
35
+ [key: string]: import("../../json-schema/json-schema.js").JsonSchema;
36
+ };
37
+ mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
38
+ };
39
39
  };
40
40
  }>;
41
41
  stateGrant: import("../../typing/array-type-description.js").ArrayTypeDescription<{
42
42
  state: string;
43
- methods: ("get" | "range" | "observe" | "iterate" | "observeRange")[];
44
43
  filters: {
45
- field: string;
46
44
  value: string;
45
+ field: string;
47
46
  }[];
48
47
  access: "read" | "write";
48
+ methods: ("get" | "range" | "observe" | "iterate" | "observeRange")[];
49
49
  }>;
50
50
  eventGrant: import("../../typing/array-type-description.js").ArrayTypeDescription<{
51
+ event: string;
51
52
  filters: {
52
- field: string;
53
53
  value: string;
54
+ field: string;
54
55
  }[];
55
56
  access: "read" | "write";
56
- event: string;
57
57
  }>;
58
58
  }>> & {
59
59
  key: "access-stream";
@@ -79,13 +79,12 @@ export declare const AccessAggregation: import("../../event-store/event-declarat
79
79
  };
80
80
  mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
81
81
  };
82
- output: string;
82
+ event: string;
83
83
  stream: {
84
- version: string;
85
84
  pattern: string;
85
+ version: string;
86
86
  };
87
87
  } | {
88
- event: string;
89
88
  schema: {
90
89
  schemas: {
91
90
  [key: string]: import("../../json-schema/json-schema.js").JsonSchema;
@@ -93,44 +92,45 @@ export declare const AccessAggregation: import("../../event-store/event-declarat
93
92
  mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
94
93
  };
95
94
  stream: {
96
- version: string;
97
95
  pattern: string;
96
+ version: string;
98
97
  };
98
+ output: string;
99
99
  };
100
100
  }>;
101
101
  state: import("../../typing/record-type-description.js").RecordTypeDescription<{
102
102
  [key: string]: {
103
103
  key: string[];
104
- schema: {
105
- schemas: {
106
- [key: string]: import("../../json-schema/json-schema.js").JsonSchema;
107
- };
108
- mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
109
- };
110
104
  indices: {
111
105
  [key: string]: {
112
106
  fields: string[];
113
107
  unique: boolean;
114
108
  };
115
109
  };
110
+ schema: {
111
+ schemas: {
112
+ [key: string]: import("../../json-schema/json-schema.js").JsonSchema;
113
+ };
114
+ mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
115
+ };
116
116
  };
117
117
  }>;
118
118
  stateGrant: import("../../typing/array-type-description.js").ArrayTypeDescription<{
119
119
  state: string;
120
- methods: ("get" | "range" | "observe" | "iterate" | "observeRange")[];
121
120
  filters: {
122
- field: string;
123
121
  value: string;
122
+ field: string;
124
123
  }[];
125
124
  access: "read" | "write";
125
+ methods: ("get" | "range" | "observe" | "iterate" | "observeRange")[];
126
126
  }>;
127
127
  eventGrant: import("../../typing/array-type-description.js").ArrayTypeDescription<{
128
+ event: string;
128
129
  filters: {
129
- field: string;
130
130
  value: string;
131
+ field: string;
131
132
  }[];
132
133
  access: "read" | "write";
133
- event: string;
134
134
  }>;
135
135
  }>> & {
136
136
  key: "access-aggregation";
@@ -149,35 +149,35 @@ export declare const ProcessEvent: import("../../event-store/event-declarations.
149
149
  };
150
150
  success: true;
151
151
  operation: ({
152
- type: "delete";
153
- state: string;
154
152
  keys: {
155
153
  [key: string]: string | number | boolean | Date;
156
154
  };
157
- } | {
158
- type: "patch";
155
+ type: "delete";
159
156
  state: string;
157
+ } | {
160
158
  keys: {
161
159
  [key: string]: string | number | boolean | Date;
162
160
  };
161
+ type: "patch";
162
+ state: string;
163
163
  data: {
164
164
  [key: string]: string | number | boolean | Date;
165
165
  };
166
166
  } | {
167
- type: "insert";
168
- state: string;
169
167
  keys: {
170
168
  [key: string]: string | number | boolean | Date;
171
169
  };
170
+ type: "upsert";
171
+ state: string;
172
172
  data: {
173
173
  [key: string]: string | number | boolean | Date;
174
174
  };
175
175
  } | {
176
- type: "upsert";
177
- state: string;
178
176
  keys: {
179
177
  [key: string]: string | number | boolean | Date;
180
178
  };
179
+ type: "insert";
180
+ state: string;
181
181
  data: {
182
182
  [key: string]: string | number | boolean | Date;
183
183
  };
@@ -241,36 +241,36 @@ export declare const AccessEvents: {
241
241
  state: import("../../typing/record-type-description.js").RecordTypeDescription<{
242
242
  [key: string]: {
243
243
  key: string[];
244
- schema: {
245
- schemas: {
246
- [key: string]: import("../../json-schema/json-schema.js").JsonSchema;
247
- };
248
- mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
249
- };
250
244
  indices: {
251
245
  [key: string]: {
252
246
  fields: string[];
253
247
  unique: boolean;
254
248
  };
255
249
  };
250
+ schema: {
251
+ schemas: {
252
+ [key: string]: import("../../json-schema/json-schema.js").JsonSchema;
253
+ };
254
+ mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
255
+ };
256
256
  };
257
257
  }>;
258
258
  stateGrant: import("../../typing/array-type-description.js").ArrayTypeDescription<{
259
259
  state: string;
260
- methods: ("get" | "range" | "observe" | "iterate" | "observeRange")[];
261
260
  filters: {
262
- field: string;
263
261
  value: string;
262
+ field: string;
264
263
  }[];
265
264
  access: "read" | "write";
265
+ methods: ("get" | "range" | "observe" | "iterate" | "observeRange")[];
266
266
  }>;
267
267
  eventGrant: import("../../typing/array-type-description.js").ArrayTypeDescription<{
268
+ event: string;
268
269
  filters: {
269
- field: string;
270
270
  value: string;
271
+ field: string;
271
272
  }[];
272
273
  access: "read" | "write";
273
- event: string;
274
274
  }>;
275
275
  }>> & {
276
276
  key: "access-stream";
@@ -296,13 +296,12 @@ export declare const AccessEvents: {
296
296
  };
297
297
  mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
298
298
  };
299
- output: string;
299
+ event: string;
300
300
  stream: {
301
- version: string;
302
301
  pattern: string;
302
+ version: string;
303
303
  };
304
304
  } | {
305
- event: string;
306
305
  schema: {
307
306
  schemas: {
308
307
  [key: string]: import("../../json-schema/json-schema.js").JsonSchema;
@@ -310,44 +309,45 @@ export declare const AccessEvents: {
310
309
  mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
311
310
  };
312
311
  stream: {
313
- version: string;
314
312
  pattern: string;
313
+ version: string;
315
314
  };
315
+ output: string;
316
316
  };
317
317
  }>;
318
318
  state: import("../../typing/record-type-description.js").RecordTypeDescription<{
319
319
  [key: string]: {
320
320
  key: string[];
321
- schema: {
322
- schemas: {
323
- [key: string]: import("../../json-schema/json-schema.js").JsonSchema;
324
- };
325
- mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
326
- };
327
321
  indices: {
328
322
  [key: string]: {
329
323
  fields: string[];
330
324
  unique: boolean;
331
325
  };
332
326
  };
327
+ schema: {
328
+ schemas: {
329
+ [key: string]: import("../../json-schema/json-schema.js").JsonSchema;
330
+ };
331
+ mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
332
+ };
333
333
  };
334
334
  }>;
335
335
  stateGrant: import("../../typing/array-type-description.js").ArrayTypeDescription<{
336
336
  state: string;
337
- methods: ("get" | "range" | "observe" | "iterate" | "observeRange")[];
338
337
  filters: {
339
- field: string;
340
338
  value: string;
339
+ field: string;
341
340
  }[];
342
341
  access: "read" | "write";
342
+ methods: ("get" | "range" | "observe" | "iterate" | "observeRange")[];
343
343
  }>;
344
344
  eventGrant: import("../../typing/array-type-description.js").ArrayTypeDescription<{
345
+ event: string;
345
346
  filters: {
346
- field: string;
347
347
  value: string;
348
+ field: string;
348
349
  }[];
349
350
  access: "read" | "write";
350
- event: string;
351
351
  }>;
352
352
  }>> & {
353
353
  key: "access-aggregation";
@@ -384,36 +384,36 @@ export declare const StreamDefCreated: import("../../event-store/event-declarati
384
384
  state: import("../../typing/record-type-description.js").RecordTypeDescription<{
385
385
  [key: string]: {
386
386
  key: string[];
387
- schema: {
388
- schemas: {
389
- [key: string]: import("../../json-schema/json-schema.js").JsonSchema;
390
- };
391
- mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
392
- };
393
387
  indices: {
394
388
  [key: string]: {
395
389
  fields: string[];
396
390
  unique: boolean;
397
391
  };
398
392
  };
393
+ schema: {
394
+ schemas: {
395
+ [key: string]: import("../../json-schema/json-schema.js").JsonSchema;
396
+ };
397
+ mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
398
+ };
399
399
  };
400
400
  }>;
401
401
  stateGrant: import("../../typing/array-type-description.js").ArrayTypeDescription<{
402
402
  state: string;
403
- methods: ("get" | "range" | "observe" | "iterate" | "observeRange")[];
404
403
  filters: {
405
- field: string;
406
404
  value: string;
405
+ field: string;
407
406
  }[];
408
407
  access: "read" | "write";
408
+ methods: ("get" | "range" | "observe" | "iterate" | "observeRange")[];
409
409
  }>;
410
410
  eventGrant: import("../../typing/array-type-description.js").ArrayTypeDescription<{
411
+ event: string;
411
412
  filters: {
412
- field: string;
413
413
  value: string;
414
+ field: string;
414
415
  }[];
415
416
  access: "read" | "write";
416
- event: string;
417
417
  }>;
418
418
  }>> & {
419
419
  key: "stream-def-created";
@@ -457,13 +457,12 @@ export declare const AggregationDefCreated: import("../../event-store/event-decl
457
457
  };
458
458
  mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
459
459
  };
460
- output: string;
460
+ event: string;
461
461
  stream: {
462
- version: string;
463
462
  pattern: string;
463
+ version: string;
464
464
  };
465
465
  } | {
466
- event: string;
467
466
  schema: {
468
467
  schemas: {
469
468
  [key: string]: import("../../json-schema/json-schema.js").JsonSchema;
@@ -471,44 +470,45 @@ export declare const AggregationDefCreated: import("../../event-store/event-decl
471
470
  mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
472
471
  };
473
472
  stream: {
474
- version: string;
475
473
  pattern: string;
474
+ version: string;
476
475
  };
476
+ output: string;
477
477
  };
478
478
  }>;
479
479
  state: import("../../typing/record-type-description.js").RecordTypeDescription<{
480
480
  [key: string]: {
481
481
  key: string[];
482
- schema: {
483
- schemas: {
484
- [key: string]: import("../../json-schema/json-schema.js").JsonSchema;
485
- };
486
- mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
487
- };
488
482
  indices: {
489
483
  [key: string]: {
490
484
  fields: string[];
491
485
  unique: boolean;
492
486
  };
493
487
  };
488
+ schema: {
489
+ schemas: {
490
+ [key: string]: import("../../json-schema/json-schema.js").JsonSchema;
491
+ };
492
+ mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
493
+ };
494
494
  };
495
495
  }>;
496
496
  stateGrant: import("../../typing/array-type-description.js").ArrayTypeDescription<{
497
497
  state: string;
498
- methods: ("get" | "range" | "observe" | "iterate" | "observeRange")[];
499
498
  filters: {
500
- field: string;
501
499
  value: string;
500
+ field: string;
502
501
  }[];
503
502
  access: "read" | "write";
503
+ methods: ("get" | "range" | "observe" | "iterate" | "observeRange")[];
504
504
  }>;
505
505
  eventGrant: import("../../typing/array-type-description.js").ArrayTypeDescription<{
506
+ event: string;
506
507
  filters: {
507
- field: string;
508
508
  value: string;
509
+ field: string;
509
510
  }[];
510
511
  access: "read" | "write";
511
- event: string;
512
512
  }>;
513
513
  }>> & {
514
514
  key: "aggregation-def-created";
@@ -558,36 +558,36 @@ export declare const AccessOutputs: {
558
558
  state: import("../../typing/record-type-description.js").RecordTypeDescription<{
559
559
  [key: string]: {
560
560
  key: string[];
561
- schema: {
562
- schemas: {
563
- [key: string]: import("../../json-schema/json-schema.js").JsonSchema;
564
- };
565
- mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
566
- };
567
561
  indices: {
568
562
  [key: string]: {
569
563
  fields: string[];
570
564
  unique: boolean;
571
565
  };
572
566
  };
567
+ schema: {
568
+ schemas: {
569
+ [key: string]: import("../../json-schema/json-schema.js").JsonSchema;
570
+ };
571
+ mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
572
+ };
573
573
  };
574
574
  }>;
575
575
  stateGrant: import("../../typing/array-type-description.js").ArrayTypeDescription<{
576
576
  state: string;
577
- methods: ("get" | "range" | "observe" | "iterate" | "observeRange")[];
578
577
  filters: {
579
- field: string;
580
578
  value: string;
579
+ field: string;
581
580
  }[];
582
581
  access: "read" | "write";
582
+ methods: ("get" | "range" | "observe" | "iterate" | "observeRange")[];
583
583
  }>;
584
584
  eventGrant: import("../../typing/array-type-description.js").ArrayTypeDescription<{
585
+ event: string;
585
586
  filters: {
586
- field: string;
587
587
  value: string;
588
+ field: string;
588
589
  }[];
589
590
  access: "read" | "write";
590
- event: string;
591
591
  }>;
592
592
  }>> & {
593
593
  key: "stream-def-created";
@@ -631,13 +631,12 @@ export declare const AccessOutputs: {
631
631
  };
632
632
  mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
633
633
  };
634
- output: string;
634
+ event: string;
635
635
  stream: {
636
- version: string;
637
636
  pattern: string;
637
+ version: string;
638
638
  };
639
639
  } | {
640
- event: string;
641
640
  schema: {
642
641
  schemas: {
643
642
  [key: string]: import("../../json-schema/json-schema.js").JsonSchema;
@@ -645,44 +644,45 @@ export declare const AccessOutputs: {
645
644
  mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
646
645
  };
647
646
  stream: {
648
- version: string;
649
647
  pattern: string;
648
+ version: string;
650
649
  };
650
+ output: string;
651
651
  };
652
652
  }>;
653
653
  state: import("../../typing/record-type-description.js").RecordTypeDescription<{
654
654
  [key: string]: {
655
655
  key: string[];
656
- schema: {
657
- schemas: {
658
- [key: string]: import("../../json-schema/json-schema.js").JsonSchema;
659
- };
660
- mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
661
- };
662
656
  indices: {
663
657
  [key: string]: {
664
658
  fields: string[];
665
659
  unique: boolean;
666
660
  };
667
661
  };
662
+ schema: {
663
+ schemas: {
664
+ [key: string]: import("../../json-schema/json-schema.js").JsonSchema;
665
+ };
666
+ mainSchema: import("../../json-schema/json-schema.js").JsonSchema;
667
+ };
668
668
  };
669
669
  }>;
670
670
  stateGrant: import("../../typing/array-type-description.js").ArrayTypeDescription<{
671
671
  state: string;
672
- methods: ("get" | "range" | "observe" | "iterate" | "observeRange")[];
673
672
  filters: {
674
- field: string;
675
673
  value: string;
674
+ field: string;
676
675
  }[];
677
676
  access: "read" | "write";
677
+ methods: ("get" | "range" | "observe" | "iterate" | "observeRange")[];
678
678
  }>;
679
679
  eventGrant: import("../../typing/array-type-description.js").ArrayTypeDescription<{
680
+ event: string;
680
681
  filters: {
681
- field: string;
682
682
  value: string;
683
+ field: string;
683
684
  }[];
684
685
  access: "read" | "write";
685
- event: string;
686
686
  }>;
687
687
  }>> & {
688
688
  key: "aggregation-def-created";