@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
@@ -19,50 +19,50 @@ export declare const HostPushSuccessResult: import("../typing/object-type-descri
19
19
  aud: string;
20
20
  iss: string;
21
21
  };
22
- outputs: {
23
- type: string;
24
- data: {
25
- [key: string]: string | number | boolean | Date;
26
- };
27
- id: string;
28
- sourceEventId: string;
29
- }[];
30
22
  success: true;
31
- eventId: string;
32
23
  operation: ({
33
- type: "delete";
34
24
  keys: {
35
25
  [key: string]: string | number | boolean | Date;
36
26
  };
27
+ type: "delete";
37
28
  state: string;
38
29
  } | {
39
- type: "patch";
40
30
  keys: {
41
31
  [key: string]: string | number | boolean | Date;
42
32
  };
33
+ type: "patch";
43
34
  state: string;
44
35
  data: {
45
36
  [key: string]: string | number | boolean | Date;
46
37
  };
47
38
  } | {
48
- type: "insert";
49
39
  keys: {
50
40
  [key: string]: string | number | boolean | Date;
51
41
  };
42
+ type: "upsert";
52
43
  state: string;
53
44
  data: {
54
45
  [key: string]: string | number | boolean | Date;
55
46
  };
56
47
  } | {
57
- type: "upsert";
58
48
  keys: {
59
49
  [key: string]: string | number | boolean | Date;
60
50
  };
51
+ type: "insert";
61
52
  state: string;
62
53
  data: {
63
54
  [key: string]: string | number | boolean | Date;
64
55
  };
65
56
  })[];
57
+ outputs: {
58
+ type: string;
59
+ data: {
60
+ [key: string]: string | number | boolean | Date;
61
+ };
62
+ id: string;
63
+ sourceEventId: string;
64
+ }[];
65
+ eventId: string;
66
66
  }>;
67
67
  export type HostPushSuccessResult = TypeOf<typeof HostPushSuccessResult>;
68
68
  export declare const HostPushFailResult: import("../typing/object-type-description.js").ObjectTypeDescription<{
@@ -79,50 +79,50 @@ export declare const RuntimeResult: import("../typing/union-type-description.js"
79
79
  aud: string;
80
80
  iss: string;
81
81
  };
82
- outputs: {
83
- type: string;
84
- data: {
85
- [key: string]: string | number | boolean | Date;
86
- };
87
- id: string;
88
- sourceEventId: string;
89
- }[];
90
82
  success: true;
91
- eventId: string;
92
83
  operation: ({
93
- type: "delete";
94
84
  keys: {
95
85
  [key: string]: string | number | boolean | Date;
96
86
  };
87
+ type: "delete";
97
88
  state: string;
98
89
  } | {
99
- type: "patch";
100
90
  keys: {
101
91
  [key: string]: string | number | boolean | Date;
102
92
  };
93
+ type: "patch";
103
94
  state: string;
104
95
  data: {
105
96
  [key: string]: string | number | boolean | Date;
106
97
  };
107
98
  } | {
108
- type: "insert";
109
99
  keys: {
110
100
  [key: string]: string | number | boolean | Date;
111
101
  };
102
+ type: "upsert";
112
103
  state: string;
113
104
  data: {
114
105
  [key: string]: string | number | boolean | Date;
115
106
  };
116
107
  } | {
117
- type: "upsert";
118
108
  keys: {
119
109
  [key: string]: string | number | boolean | Date;
120
110
  };
111
+ type: "insert";
121
112
  state: string;
122
113
  data: {
123
114
  [key: string]: string | number | boolean | Date;
124
115
  };
125
116
  })[];
117
+ outputs: {
118
+ type: string;
119
+ data: {
120
+ [key: string]: string | number | boolean | Date;
121
+ };
122
+ id: string;
123
+ sourceEventId: string;
124
+ }[];
125
+ eventId: string;
126
126
  } | {
127
127
  success: false;
128
128
  eventId: string;
@@ -60,34 +60,34 @@ export declare function createSequencerStorage<TState extends StateDefinitions>(
60
60
  stateOperations: import("../storage/state-declaration.js").StateDeclaration<"stateOperations", {
61
61
  eventId: string;
62
62
  transaction: {
63
- type: "delete";
64
63
  keys: {
65
64
  [key: string]: string | number | boolean | Date;
66
65
  };
66
+ type: "delete";
67
67
  state: string;
68
68
  } | {
69
- type: "patch";
70
69
  keys: {
71
70
  [key: string]: string | number | boolean | Date;
72
71
  };
72
+ type: "patch";
73
73
  state: string;
74
74
  data: {
75
75
  [key: string]: string | number | boolean | Date;
76
76
  };
77
77
  } | {
78
- type: "insert";
79
78
  keys: {
80
79
  [key: string]: string | number | boolean | Date;
81
80
  };
81
+ type: "upsert";
82
82
  state: string;
83
83
  data: {
84
84
  [key: string]: string | number | boolean | Date;
85
85
  };
86
86
  } | {
87
- type: "upsert";
88
87
  keys: {
89
88
  [key: string]: string | number | boolean | Date;
90
89
  };
90
+ type: "insert";
91
91
  state: string;
92
92
  data: {
93
93
  [key: string]: string | number | boolean | Date;
@@ -139,34 +139,34 @@ export declare const StateProcessorState: {
139
139
  stateOperations: import("../storage/state-declaration.js").StateDeclaration<"stateOperations", {
140
140
  eventId: string;
141
141
  transaction: {
142
- type: "delete";
143
142
  keys: {
144
143
  [key: string]: string | number | boolean | Date;
145
144
  };
145
+ type: "delete";
146
146
  state: string;
147
147
  } | {
148
- type: "patch";
149
148
  keys: {
150
149
  [key: string]: string | number | boolean | Date;
151
150
  };
151
+ type: "patch";
152
152
  state: string;
153
153
  data: {
154
154
  [key: string]: string | number | boolean | Date;
155
155
  };
156
156
  } | {
157
- type: "insert";
158
157
  keys: {
159
158
  [key: string]: string | number | boolean | Date;
160
159
  };
160
+ type: "upsert";
161
161
  state: string;
162
162
  data: {
163
163
  [key: string]: string | number | boolean | Date;
164
164
  };
165
165
  } | {
166
- type: "upsert";
167
166
  keys: {
168
167
  [key: string]: string | number | boolean | Date;
169
168
  };
169
+ type: "insert";
170
170
  state: string;
171
171
  data: {
172
172
  [key: string]: string | number | boolean | Date;
@@ -1,4 +1,4 @@
1
1
  export declare const sequenceProcessTopic: Readonly<import("../queue/topic-definition.js").TopicDefinition<["tenant", "realm", "pattern", "version", "partitionKey"], import("../typing/object-type-description.js").ObjectTypeDescription<{
2
- storedAt: Date;
3
2
  eventId: string;
3
+ storedAt: Date;
4
4
  }>>>;
@@ -1,38 +1,8 @@
1
1
  import { TypeOf } from '../typing/type-of.js';
2
2
  export declare const StreamDeclaration: import("../typing/object-type-description.js").ObjectTypeDescription<{
3
- realm: string;
4
3
  auth: {
5
4
  allowAnonymous: boolean;
6
5
  };
7
- pattern: string;
8
- version: string;
9
- events: {
10
- [key: string]: {
11
- schema: {
12
- schemas: {
13
- [key: string]: import("../json-schema/json-schema.js").JsonSchema;
14
- };
15
- mainSchema: import("../json-schema/json-schema.js").JsonSchema;
16
- };
17
- };
18
- };
19
- stateGrant: {
20
- state: string;
21
- methods: ("get" | "range" | "observe" | "iterate" | "observeRange")[];
22
- filters: {
23
- field: string;
24
- value: string;
25
- }[];
26
- access: "read" | "write";
27
- }[];
28
- eventGrant: {
29
- event: string;
30
- filters: {
31
- field: string;
32
- value: string;
33
- }[];
34
- access: "read" | "write";
35
- }[];
36
6
  outputs: {
37
7
  [key: string]: {
38
8
  schema: {
@@ -43,6 +13,9 @@ export declare const StreamDeclaration: import("../typing/object-type-descriptio
43
13
  };
44
14
  };
45
15
  };
16
+ realm: string;
17
+ pattern: string;
18
+ version: string;
46
19
  runtime: {
47
20
  source: string;
48
21
  exportName: string;
@@ -50,19 +23,46 @@ export declare const StreamDeclaration: import("../typing/object-type-descriptio
50
23
  states: {
51
24
  [key: string]: {
52
25
  key: string[];
26
+ indices: {
27
+ [key: string]: {
28
+ fields: string[];
29
+ unique: boolean;
30
+ };
31
+ };
53
32
  schema: {
54
33
  schemas: {
55
34
  [key: string]: import("../json-schema/json-schema.js").JsonSchema;
56
35
  };
57
36
  mainSchema: import("../json-schema/json-schema.js").JsonSchema;
58
37
  };
59
- indices: {
60
- [key: string]: {
61
- fields: string[];
62
- unique: boolean;
38
+ };
39
+ };
40
+ events: {
41
+ [key: string]: {
42
+ schema: {
43
+ schemas: {
44
+ [key: string]: import("../json-schema/json-schema.js").JsonSchema;
63
45
  };
46
+ mainSchema: import("../json-schema/json-schema.js").JsonSchema;
64
47
  };
65
48
  };
66
49
  };
50
+ stateGrant: {
51
+ state: string;
52
+ filters: {
53
+ value: string;
54
+ field: string;
55
+ }[];
56
+ access: "read" | "write";
57
+ methods: ("get" | "range" | "observe" | "iterate" | "observeRange")[];
58
+ }[];
59
+ eventGrant: {
60
+ event: string;
61
+ filters: {
62
+ value: string;
63
+ field: string;
64
+ }[];
65
+ access: "read" | "write";
66
+ }[];
67
67
  }>;
68
68
  export type StreamDeclaration = TypeOf<typeof StreamDeclaration>;