@bett3r-dev/pv3-types 1.0.0 → 1.4.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 (137) hide show
  1. package/CHANGELOG.md +305 -0
  2. package/build/adminPlugin.d.ts +24 -0
  3. package/build/adminPlugin.d.ts.map +1 -0
  4. package/build/{eventsourcing/utils.js → adminPlugin.js} +1 -1
  5. package/build/adminPlugin.js.map +1 -0
  6. package/build/aggregateSchema.d.ts +94 -0
  7. package/build/aggregateSchema.d.ts.map +1 -0
  8. package/build/aggregateSchema.js +287 -0
  9. package/build/aggregateSchema.js.map +1 -0
  10. package/build/authentication.d.ts +179 -78
  11. package/build/authentication.d.ts.map +1 -1
  12. package/build/authentication.js +62 -19
  13. package/build/authentication.js.map +1 -1
  14. package/build/cache.d.ts +50 -4
  15. package/build/cache.d.ts.map +1 -1
  16. package/build/clusterAdministration.d.ts +712 -225
  17. package/build/clusterAdministration.d.ts.map +1 -1
  18. package/build/clusterAdministration.js +175 -52
  19. package/build/clusterAdministration.js.map +1 -1
  20. package/build/configuration.d.ts +26 -5
  21. package/build/configuration.d.ts.map +1 -1
  22. package/build/database.d.ts +240 -56
  23. package/build/database.d.ts.map +1 -1
  24. package/build/database.js +102 -20
  25. package/build/database.js.map +1 -1
  26. package/build/endpoints.d.ts +141 -41
  27. package/build/endpoints.d.ts.map +1 -1
  28. package/build/endpoints.js +50 -26
  29. package/build/endpoints.js.map +1 -1
  30. package/build/errors.d.ts +166 -0
  31. package/build/errors.d.ts.map +1 -0
  32. package/build/errors.js +276 -0
  33. package/build/errors.js.map +1 -0
  34. package/build/evenstore.d.ts +47 -7
  35. package/build/evenstore.d.ts.map +1 -1
  36. package/build/eventsourcing/aggregateBuilder.d.ts +17 -8
  37. package/build/eventsourcing/aggregateBuilder.d.ts.map +1 -1
  38. package/build/eventsourcing/commandBuilder.d.ts +20 -13
  39. package/build/eventsourcing/commandBuilder.d.ts.map +1 -1
  40. package/build/eventsourcing/commandHandlers.d.ts +155 -33
  41. package/build/eventsourcing/commandHandlers.d.ts.map +1 -1
  42. package/build/eventsourcing/commandHandlers.js +62 -14
  43. package/build/eventsourcing/commandHandlers.js.map +1 -1
  44. package/build/eventsourcing/eventHandlers.d.ts +173 -44
  45. package/build/eventsourcing/eventHandlers.d.ts.map +1 -1
  46. package/build/eventsourcing/eventHandlers.js +29 -21
  47. package/build/eventsourcing/eventHandlers.js.map +1 -1
  48. package/build/eventsourcing/eventHandlersBuilder.d.ts +18 -12
  49. package/build/eventsourcing/eventHandlersBuilder.d.ts.map +1 -1
  50. package/build/eventsourcing/eventHandlersBuilder.js.map +1 -1
  51. package/build/eventsourcing/eventsourcing.types.d.ts +322 -0
  52. package/build/eventsourcing/eventsourcing.types.d.ts.map +1 -0
  53. package/build/eventsourcing/eventsourcing.types.js +26 -0
  54. package/build/eventsourcing/eventsourcing.types.js.map +1 -0
  55. package/build/eventsourcing/externalSystemBuilder.d.ts +8 -7
  56. package/build/eventsourcing/externalSystemBuilder.d.ts.map +1 -1
  57. package/build/eventsourcing/index.d.ts +2 -378
  58. package/build/eventsourcing/index.d.ts.map +1 -1
  59. package/build/eventsourcing/index.js +2 -23
  60. package/build/eventsourcing/index.js.map +1 -1
  61. package/build/eventsourcing/invariants.d.ts +34 -10
  62. package/build/eventsourcing/invariants.d.ts.map +1 -1
  63. package/build/eventsourcing/shapeChangeForSubscriber.d.ts +33 -0
  64. package/build/eventsourcing/shapeChangeForSubscriber.d.ts.map +1 -0
  65. package/build/eventsourcing/shapeChangeForSubscriber.js +47 -0
  66. package/build/eventsourcing/shapeChangeForSubscriber.js.map +1 -0
  67. package/build/index.d.ts +6 -1
  68. package/build/index.d.ts.map +1 -1
  69. package/build/index.js +6 -1
  70. package/build/index.js.map +1 -1
  71. package/build/infrastructure.d.ts +9 -1
  72. package/build/infrastructure.d.ts.map +1 -1
  73. package/build/infrastructure.js +33 -1
  74. package/build/infrastructure.js.map +1 -1
  75. package/build/livenessWatchdog.d.ts +28 -0
  76. package/build/livenessWatchdog.d.ts.map +1 -0
  77. package/build/livenessWatchdog.js +43 -0
  78. package/build/livenessWatchdog.js.map +1 -0
  79. package/build/logger.d.ts +8 -9
  80. package/build/logger.d.ts.map +1 -1
  81. package/build/logger.js +18 -6
  82. package/build/logger.js.map +1 -1
  83. package/build/outboxManager.d.ts +858 -14
  84. package/build/outboxManager.d.ts.map +1 -1
  85. package/build/outboxManager.js +173 -15
  86. package/build/outboxManager.js.map +1 -1
  87. package/build/permissions.d.ts +47 -0
  88. package/build/permissions.d.ts.map +1 -0
  89. package/build/permissions.js +3 -0
  90. package/build/permissions.js.map +1 -0
  91. package/build/ports.d.ts +10 -10
  92. package/build/ports.d.ts.map +1 -1
  93. package/build/routesAuth.d.ts +17 -25
  94. package/build/routesAuth.d.ts.map +1 -1
  95. package/build/routesAuth.js +4 -14
  96. package/build/routesAuth.js.map +1 -1
  97. package/build/typedEventEmitter.d.ts +7 -13
  98. package/build/typedEventEmitter.d.ts.map +1 -1
  99. package/build/typedEventEmitter.js +2 -2
  100. package/build/typedEventEmitter.js.map +1 -1
  101. package/build/userSession.d.ts +8 -0
  102. package/build/userSession.d.ts.map +1 -0
  103. package/build/userSession.js +3 -0
  104. package/build/userSession.js.map +1 -0
  105. package/package.json +22 -7
  106. package/build/eventsourcing/utils.d.ts +0 -4
  107. package/build/eventsourcing/utils.d.ts.map +0 -1
  108. package/build/eventsourcing/utils.js.map +0 -1
  109. package/build/validation.d.ts +0 -64
  110. package/build/validation.d.ts.map +0 -1
  111. package/build/validation.js +0 -57
  112. package/build/validation.js.map +0 -1
  113. package/src/authentication.ts +0 -273
  114. package/src/cache.ts +0 -109
  115. package/src/clusterAdministration.ts +0 -216
  116. package/src/configuration.ts +0 -71
  117. package/src/database.ts +0 -157
  118. package/src/endpoints.ts +0 -198
  119. package/src/evenstore.ts +0 -27
  120. package/src/eventsourcing/aggregateBuilder.ts +0 -11
  121. package/src/eventsourcing/commandBuilder.ts +0 -64
  122. package/src/eventsourcing/commandHandlers.ts +0 -137
  123. package/src/eventsourcing/eventHandlers.ts +0 -118
  124. package/src/eventsourcing/eventHandlersBuilder.ts +0 -42
  125. package/src/eventsourcing/externalSystemBuilder.ts +0 -20
  126. package/src/eventsourcing/index.ts +0 -111
  127. package/src/eventsourcing/invariants.ts +0 -27
  128. package/src/eventsourcing/utils.ts +0 -4
  129. package/src/index.ts +0 -15
  130. package/src/infrastructure.ts +0 -41
  131. package/src/logger.ts +0 -45
  132. package/src/outboxManager.ts +0 -36
  133. package/src/ports.ts +0 -42
  134. package/src/routesAuth.ts +0 -58
  135. package/src/typedEventEmitter.ts +0 -73
  136. package/src/validation.ts +0 -89
  137. package/tsconfig.json +0 -15
@@ -1,14 +1,13 @@
1
- /// <reference types="ramda/node_modules/ts-toolbelt" />
2
- import { CommittedEvent } from '@bett3r-dev/pv3-types';
1
+ import { DatabaseTransaction } from './database';
2
+ import { CommittedEvent } from './eventsourcing';
3
3
  export type ClusterStructureType = {
4
4
  getCurrentState: (id?: string) => Promise<StructureState>;
5
- getStructureRevision: (version: number) => Promise<StructureState | null>;
6
- subscribeToStructureChanges: (onStructureChanges: (change: StructureState) => void) => Promise<{
5
+ subscribeToStructureChanges: (onStructureChanges: (change: StructureState, event?: CommittedEvent) => void) => Promise<{
7
6
  unsubscribe: () => void;
8
7
  }>;
9
8
  stop: () => Promise<void>;
10
9
  } & {
11
- [key in keyof CommandTypes]: (payload: CommandTypes[key], expectedVersion?: number) => Promise<StructureState>;
10
+ [key in keyof CommandTypes]: (payload: CommandTypes[key], expectedVersion?: number, transaction?: DatabaseTransaction) => Promise<StructureState>;
12
11
  };
13
12
  export type StructureState = {
14
13
  state: StructureAggregateType;
@@ -28,12 +27,16 @@ export type StructureCommittedEventType = CommittedEvent<StructureAggregateType
28
27
  };
29
28
  }>;
30
29
  export declare const StructureServiceSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
30
+ hosts: string[];
31
31
  port?: number | undefined;
32
- channel?: "http" | "tcp" | "local" | undefined;
32
+ channel?: "http" | "local" | "tcp" | undefined;
33
33
  isExternal?: boolean | undefined;
34
34
  possibleSubscriptions?: string[] | undefined;
35
35
  possibleModules?: {
36
- [x: string]: string[];
36
+ [x: string]: {
37
+ name: string;
38
+ type: "aggregate" | "externalSystem" | "policy" | "readmodel";
39
+ }[];
37
40
  } | undefined;
38
41
  isService?: boolean | undefined;
39
42
  isBroker?: boolean | undefined;
@@ -43,82 +46,133 @@ export declare const StructureServiceSchema: import("@bett3r-dev/jsonschema-defi
43
46
  [x: string]: string[];
44
47
  } | undefined;
45
48
  consumes?: {
46
- [x: string]: string[];
49
+ [x: string]: {
50
+ events: string[];
51
+ endpoint: string;
52
+ };
47
53
  } | undefined;
48
- hosts: string[];
49
54
  }, true>;
50
55
  export type StructureServiceType = typeof StructureServiceSchema.type;
51
- export declare const RetryableStatuses: number[];
56
+ export declare const CustomCriteriaRegexpSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
57
+ value: string;
58
+ regexp: string;
59
+ initialPosition?: number | undefined;
60
+ isErrorDataSplit?: boolean | undefined;
61
+ lastErrorDataSplitIndex?: number | undefined;
62
+ lastErrorClusterRevision?: number | undefined;
63
+ }, true>;
64
+ export type CustomCriteriaRegexpType = typeof CustomCriteriaRegexpSchema.type;
52
65
  export declare const StructureSubscriptionSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
53
- events?: string[] | undefined;
54
- endpoint?: string | undefined;
66
+ status: "active" | "error" | "inactive";
55
67
  load?: number | undefined;
68
+ producers: string[];
56
69
  eventstore?: string | undefined;
57
- manualDataSplits?: number | undefined;
58
- mirrorDataSplitsWithConsumers?: boolean | undefined;
59
- customDataSplits?: string[][] | undefined;
70
+ module?: string | undefined;
71
+ events?: string[] | undefined;
60
72
  streams?: string | undefined;
61
- retryAfterSecs?: number | undefined;
62
- retryableStatuses?: number[] | undefined;
63
- dataSplits?: {
64
- custom?: (string | undefined)[] | undefined;
65
- manual?: (string | undefined)[] | undefined;
66
- automatic?: (string | undefined)[] | undefined;
67
- } | undefined;
68
- producers: string[];
69
- module: string;
70
73
  consumer: string;
74
+ endpoint?: string | undefined;
75
+ retryableStatuses?: number[] | undefined;
76
+ retryAfterSecs?: number | undefined;
77
+ manualDataSplits?: number | undefined;
78
+ customDataSplits?: {
79
+ value: string;
80
+ regexp: string;
81
+ initialPosition?: number | undefined;
82
+ isErrorDataSplit?: boolean | undefined;
83
+ lastErrorDataSplitIndex?: number | undefined;
84
+ lastErrorClusterRevision?: number | undefined;
85
+ }[][] | undefined;
86
+ criticalErrorHandlingStrategy?: "custom-datasplit" | "subscriptionStop" | undefined;
87
+ customDataSplitErrorStrategyLimit?: number | undefined;
88
+ customDataSplitErrorStrategyCount?: number | undefined;
89
+ dataSplits?: import("Object/Optional").OptionalDeep<{
90
+ custom: string[];
91
+ manual: string[];
92
+ automatic: string[];
93
+ }> | undefined;
71
94
  }, true>;
72
95
  export type StructureSubscriptionType = typeof StructureSubscriptionSchema.type;
73
- export declare const StructureBrokerSubscriptionSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
74
- custom?: string[] | undefined;
96
+ export declare const StructureDispatcherSubscriptionSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
75
97
  host: string;
76
98
  index: number;
99
+ isManual?: boolean | undefined;
100
+ customCriteriaRegexp?: {
101
+ value: string;
102
+ regexp: string;
103
+ initialPosition?: number | undefined;
104
+ isErrorDataSplit?: boolean | undefined;
105
+ lastErrorDataSplitIndex?: number | undefined;
106
+ lastErrorClusterRevision?: number | undefined;
107
+ }[] | undefined;
77
108
  }, true>;
78
- export type StructureBrokerSubscriptionType = typeof StructureBrokerSubscriptionSchema.type;
109
+ export type StructureDispatcherSubscriptionType = typeof StructureDispatcherSubscriptionSchema.type;
79
110
  export declare const StructureBrokerSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
111
+ host: string;
80
112
  subscriptions: {
81
113
  [x: string]: {
82
114
  [x: string]: {
83
- custom?: string[] | undefined;
84
115
  host: string;
85
116
  index: number;
117
+ isManual?: boolean | undefined;
118
+ customCriteriaRegexp?: {
119
+ value: string;
120
+ regexp: string;
121
+ initialPosition?: number | undefined;
122
+ isErrorDataSplit?: boolean | undefined;
123
+ lastErrorDataSplitIndex?: number | undefined;
124
+ lastErrorClusterRevision?: number | undefined;
125
+ }[] | undefined;
86
126
  };
87
127
  };
88
128
  };
89
- host: string;
90
129
  }, true>;
91
130
  export type StructureBrokerType = typeof StructureBrokerSchema.type;
92
131
  export declare const StructureSubscriptionsSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
93
132
  [x: string]: {
94
- events?: string[] | undefined;
95
- endpoint?: string | undefined;
133
+ status: "active" | "error" | "inactive";
96
134
  load?: number | undefined;
135
+ producers: string[];
97
136
  eventstore?: string | undefined;
98
- manualDataSplits?: number | undefined;
99
- mirrorDataSplitsWithConsumers?: boolean | undefined;
100
- customDataSplits?: string[][] | undefined;
137
+ module?: string | undefined;
138
+ events?: string[] | undefined;
101
139
  streams?: string | undefined;
102
- retryAfterSecs?: number | undefined;
103
- retryableStatuses?: number[] | undefined;
104
- dataSplits?: {
105
- custom?: (string | undefined)[] | undefined;
106
- manual?: (string | undefined)[] | undefined;
107
- automatic?: (string | undefined)[] | undefined;
108
- } | undefined;
109
- producers: string[];
110
- module: string;
111
140
  consumer: string;
141
+ endpoint?: string | undefined;
142
+ retryableStatuses?: number[] | undefined;
143
+ retryAfterSecs?: number | undefined;
144
+ manualDataSplits?: number | undefined;
145
+ customDataSplits?: {
146
+ value: string;
147
+ regexp: string;
148
+ initialPosition?: number | undefined;
149
+ isErrorDataSplit?: boolean | undefined;
150
+ lastErrorDataSplitIndex?: number | undefined;
151
+ lastErrorClusterRevision?: number | undefined;
152
+ }[][] | undefined;
153
+ criticalErrorHandlingStrategy?: "custom-datasplit" | "subscriptionStop" | undefined;
154
+ customDataSplitErrorStrategyLimit?: number | undefined;
155
+ customDataSplitErrorStrategyCount?: number | undefined;
156
+ dataSplits?: import("Object/Optional").OptionalDeep<{
157
+ custom: string[];
158
+ manual: string[];
159
+ automatic: string[];
160
+ }> | undefined;
112
161
  };
113
162
  }, true>;
163
+ export type StructureSubscriptionsType = typeof StructureSubscriptionsSchema.type;
114
164
  export declare const StructureServicesSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
115
165
  [x: string]: {
166
+ hosts: string[];
116
167
  port?: number | undefined;
117
- channel?: "http" | "tcp" | "local" | undefined;
168
+ channel?: "http" | "local" | "tcp" | undefined;
118
169
  isExternal?: boolean | undefined;
119
170
  possibleSubscriptions?: string[] | undefined;
120
171
  possibleModules?: {
121
- [x: string]: string[];
172
+ [x: string]: {
173
+ name: string;
174
+ type: "aggregate" | "externalSystem" | "policy" | "readmodel";
175
+ }[];
122
176
  } | undefined;
123
177
  isService?: boolean | undefined;
124
178
  isBroker?: boolean | undefined;
@@ -128,57 +182,81 @@ export declare const StructureServicesSchema: import("@bett3r-dev/jsonschema-def
128
182
  [x: string]: string[];
129
183
  } | undefined;
130
184
  consumes?: {
131
- [x: string]: string[];
185
+ [x: string]: {
186
+ events: string[];
187
+ endpoint: string;
188
+ };
132
189
  } | undefined;
133
- hosts: string[];
134
190
  };
135
191
  }, true>;
136
192
  export type StructureServicesType = typeof StructureServicesSchema.type;
137
193
  export declare const StructureBrokersSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
138
194
  [x: string]: import("Object/Omit")._Omit<{
195
+ host: string;
139
196
  subscriptions: {
140
197
  [x: string]: {
141
198
  [x: string]: {
142
- custom?: string[] | undefined;
143
199
  host: string;
144
200
  index: number;
201
+ isManual?: boolean | undefined;
202
+ customCriteriaRegexp?: {
203
+ value: string;
204
+ regexp: string;
205
+ initialPosition?: number | undefined;
206
+ isErrorDataSplit?: boolean | undefined;
207
+ lastErrorDataSplitIndex?: number | undefined;
208
+ lastErrorClusterRevision?: number | undefined;
209
+ }[] | undefined;
145
210
  };
146
211
  };
147
212
  };
148
- host: string;
149
213
  }, "host">;
150
214
  }, true>;
151
215
  export declare const StructureAggregateSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
152
216
  subscriptions: {
153
217
  [x: string]: {
154
- events?: string[] | undefined;
155
- endpoint?: string | undefined;
218
+ status: "active" | "error" | "inactive";
156
219
  load?: number | undefined;
220
+ producers: string[];
157
221
  eventstore?: string | undefined;
158
- manualDataSplits?: number | undefined;
159
- mirrorDataSplitsWithConsumers?: boolean | undefined;
160
- customDataSplits?: string[][] | undefined;
222
+ module?: string | undefined;
223
+ events?: string[] | undefined;
161
224
  streams?: string | undefined;
162
- retryAfterSecs?: number | undefined;
163
- retryableStatuses?: number[] | undefined;
164
- dataSplits?: {
165
- custom?: (string | undefined)[] | undefined;
166
- manual?: (string | undefined)[] | undefined;
167
- automatic?: (string | undefined)[] | undefined;
168
- } | undefined;
169
- producers: string[];
170
- module: string;
171
225
  consumer: string;
226
+ endpoint?: string | undefined;
227
+ retryableStatuses?: number[] | undefined;
228
+ retryAfterSecs?: number | undefined;
229
+ manualDataSplits?: number | undefined;
230
+ customDataSplits?: {
231
+ value: string;
232
+ regexp: string;
233
+ initialPosition?: number | undefined;
234
+ isErrorDataSplit?: boolean | undefined;
235
+ lastErrorDataSplitIndex?: number | undefined;
236
+ lastErrorClusterRevision?: number | undefined;
237
+ }[][] | undefined;
238
+ criticalErrorHandlingStrategy?: "custom-datasplit" | "subscriptionStop" | undefined;
239
+ customDataSplitErrorStrategyLimit?: number | undefined;
240
+ customDataSplitErrorStrategyCount?: number | undefined;
241
+ dataSplits?: import("Object/Optional").OptionalDeep<{
242
+ custom: string[];
243
+ manual: string[];
244
+ automatic: string[];
245
+ }> | undefined;
172
246
  };
173
247
  };
174
248
  services: {
175
249
  [x: string]: {
250
+ hosts: string[];
176
251
  port?: number | undefined;
177
- channel?: "http" | "tcp" | "local" | undefined;
252
+ channel?: "http" | "local" | "tcp" | undefined;
178
253
  isExternal?: boolean | undefined;
179
254
  possibleSubscriptions?: string[] | undefined;
180
255
  possibleModules?: {
181
- [x: string]: string[];
256
+ [x: string]: {
257
+ name: string;
258
+ type: "aggregate" | "externalSystem" | "policy" | "readmodel";
259
+ }[];
182
260
  } | undefined;
183
261
  isService?: boolean | undefined;
184
262
  isBroker?: boolean | undefined;
@@ -188,89 +266,143 @@ export declare const StructureAggregateSchema: import("@bett3r-dev/jsonschema-de
188
266
  [x: string]: string[];
189
267
  } | undefined;
190
268
  consumes?: {
191
- [x: string]: string[];
269
+ [x: string]: {
270
+ events: string[];
271
+ endpoint: string;
272
+ };
192
273
  } | undefined;
193
- hosts: string[];
194
274
  };
195
275
  };
196
276
  brokers: {
197
277
  [x: string]: import("Object/Omit")._Omit<{
278
+ host: string;
198
279
  subscriptions: {
199
280
  [x: string]: {
200
281
  [x: string]: {
201
- custom?: string[] | undefined;
202
282
  host: string;
203
283
  index: number;
284
+ isManual?: boolean | undefined;
285
+ customCriteriaRegexp?: {
286
+ value: string;
287
+ regexp: string;
288
+ initialPosition?: number | undefined;
289
+ isErrorDataSplit?: boolean | undefined;
290
+ lastErrorDataSplitIndex?: number | undefined;
291
+ lastErrorClusterRevision?: number | undefined;
292
+ }[] | undefined;
204
293
  };
205
294
  };
206
295
  };
207
- host: string;
208
296
  }, "host">;
209
297
  };
210
298
  clusterRevision: number;
211
299
  servicesRevisionAck: string[];
300
+ defaultAutomaticDataSplits?: number | undefined;
212
301
  }, true>;
213
302
  export type StructureAggregateType = typeof StructureAggregateSchema.type;
214
303
  export declare const AddSubscriptionsCommandSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
215
- doNotRebalance?: boolean | undefined;
216
304
  subscriptions: {
217
305
  [x: string]: {
218
- events?: string[] | undefined;
219
- endpoint?: string | undefined;
306
+ status: "active" | "error" | "inactive";
220
307
  load?: number | undefined;
308
+ producers: string[];
221
309
  eventstore?: string | undefined;
222
- manualDataSplits?: number | undefined;
223
- mirrorDataSplitsWithConsumers?: boolean | undefined;
224
- customDataSplits?: string[][] | undefined;
310
+ module?: string | undefined;
311
+ events?: string[] | undefined;
225
312
  streams?: string | undefined;
226
- retryAfterSecs?: number | undefined;
227
- retryableStatuses?: number[] | undefined;
228
- dataSplits?: {
229
- custom?: (string | undefined)[] | undefined;
230
- manual?: (string | undefined)[] | undefined;
231
- automatic?: (string | undefined)[] | undefined;
232
- } | undefined;
233
- producers: string[];
234
- module: string;
235
313
  consumer: string;
314
+ endpoint?: string | undefined;
315
+ retryableStatuses?: number[] | undefined;
316
+ retryAfterSecs?: number | undefined;
317
+ manualDataSplits?: number | undefined;
318
+ customDataSplits?: {
319
+ value: string;
320
+ regexp: string;
321
+ initialPosition?: number | undefined;
322
+ isErrorDataSplit?: boolean | undefined;
323
+ lastErrorDataSplitIndex?: number | undefined;
324
+ lastErrorClusterRevision?: number | undefined;
325
+ }[][] | undefined;
326
+ criticalErrorHandlingStrategy?: "custom-datasplit" | "subscriptionStop" | undefined;
327
+ customDataSplitErrorStrategyLimit?: number | undefined;
328
+ customDataSplitErrorStrategyCount?: number | undefined;
329
+ dataSplits?: import("Object/Optional").OptionalDeep<{
330
+ custom: string[];
331
+ manual: string[];
332
+ automatic: string[];
333
+ }> | undefined;
236
334
  };
237
335
  };
336
+ doNotRebalance?: boolean | undefined;
337
+ }, true>;
338
+ export declare const SubscriptionActivationCommandSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
339
+ id: string;
238
340
  }, true>;
239
341
  export declare const EditSubscriptionCommandSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
240
- doNotRebalance?: boolean | undefined;
241
342
  id: string;
242
- subscription: {
243
- events?: import("Object/Optional").OptionalDeep<string[] | undefined>;
244
- endpoint?: import("Object/Optional").OptionalDeep<string | undefined>;
245
- producers?: (string | undefined)[] | undefined;
343
+ subscription: import("Object/Optional").OptionalDeep<{
344
+ status: "active" | "error" | "inactive";
345
+ load?: number | undefined;
346
+ producers: string[];
347
+ eventstore?: string | undefined;
246
348
  module?: string | undefined;
247
- consumer?: string | undefined;
248
- load?: import("Object/Optional").OptionalDeep<number | undefined>;
249
- eventstore?: import("Object/Optional").OptionalDeep<string | undefined>;
250
- manualDataSplits?: import("Object/Optional").OptionalDeep<number | undefined>;
251
- mirrorDataSplitsWithConsumers?: import("Object/Optional").OptionalDeep<boolean | undefined>;
252
- customDataSplits?: import("Object/Optional").OptionalDeep<string[][] | undefined>;
253
- streams?: import("Object/Optional").OptionalDeep<string | undefined>;
254
- retryAfterSecs?: import("Object/Optional").OptionalDeep<number | undefined>;
255
- retryableStatuses?: import("Object/Optional").OptionalDeep<number[] | undefined>;
349
+ events?: string[] | undefined;
350
+ streams?: string | undefined;
351
+ consumer: string;
352
+ endpoint?: string | undefined;
353
+ retryableStatuses?: number[] | undefined;
354
+ retryAfterSecs?: number | undefined;
355
+ manualDataSplits?: number | undefined;
356
+ customDataSplits?: {
357
+ value: string;
358
+ regexp: string;
359
+ initialPosition?: number | undefined;
360
+ isErrorDataSplit?: boolean | undefined;
361
+ lastErrorDataSplitIndex?: number | undefined;
362
+ lastErrorClusterRevision?: number | undefined;
363
+ }[][] | undefined;
364
+ criticalErrorHandlingStrategy?: "custom-datasplit" | "subscriptionStop" | undefined;
365
+ customDataSplitErrorStrategyLimit?: number | undefined;
366
+ customDataSplitErrorStrategyCount?: number | undefined;
256
367
  dataSplits?: import("Object/Optional").OptionalDeep<{
257
- custom?: (string | undefined)[] | undefined;
258
- manual?: (string | undefined)[] | undefined;
259
- automatic?: (string | undefined)[] | undefined;
260
- } | undefined>;
261
- };
368
+ custom: string[];
369
+ manual: string[];
370
+ automatic: string[];
371
+ }> | undefined;
372
+ }>;
373
+ doNotRebalance?: boolean | undefined;
262
374
  }, true>;
263
375
  export declare const DeleteSubscriptionCommandSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
264
- doNotRebalance?: boolean | undefined;
265
376
  id: string;
377
+ doNotRebalance?: boolean | undefined;
378
+ }, true>;
379
+ export declare const AddErrorCustomDataSplitCommandSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
380
+ doNotRebalance?: boolean | undefined;
381
+ subscriptionId: string;
382
+ dataSplits: {
383
+ value: string;
384
+ regexp: string;
385
+ initialPosition?: number | undefined;
386
+ isErrorDataSplit?: boolean | undefined;
387
+ lastErrorDataSplitIndex?: number | undefined;
388
+ lastErrorClusterRevision?: number | undefined;
389
+ }[][];
390
+ }, true>;
391
+ export declare const DeleteDataSplitCommandSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
392
+ subscriptionId: string;
393
+ dataSplitId: string;
394
+ host: string;
266
395
  }, true>;
267
396
  export declare const UpsertHostCommandSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
268
397
  port?: number | undefined;
269
- channel?: "http" | "tcp" | "local" | undefined;
398
+ channel?: "http" | "local" | "tcp" | undefined;
270
399
  isExternal?: boolean | undefined;
271
400
  possibleSubscriptions?: string[] | undefined;
272
401
  possibleModules?: {
273
- [x: string]: string[];
402
+ [x: string]: {
403
+ name: string;
404
+ type: "aggregate" | "externalSystem" | "policy" | "readmodel";
405
+ }[];
274
406
  } | undefined;
275
407
  isService?: boolean | undefined;
276
408
  isBroker?: boolean | undefined;
@@ -280,23 +412,30 @@ export declare const UpsertHostCommandSchema: import("@bett3r-dev/jsonschema-def
280
412
  [x: string]: string[];
281
413
  } | undefined;
282
414
  consumes?: {
283
- [x: string]: string[];
415
+ [x: string]: {
416
+ events: string[];
417
+ endpoint: string;
418
+ };
284
419
  } | undefined;
420
+ service: string;
285
421
  host: string;
286
422
  doNotRebalance?: boolean | undefined;
287
- service: string;
288
423
  }, true>;
289
424
  export type UpsertHostCommandType = typeof UpsertHostCommandSchema.type;
290
425
  export declare const RemoveHostCommandSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
291
426
  host: string;
292
427
  }, true>;
293
428
  export declare const SetStructureUpsertHostCommandSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
429
+ hosts: string[];
294
430
  port?: number | undefined;
295
- channel?: "http" | "tcp" | "local" | undefined;
431
+ channel?: "http" | "local" | "tcp" | undefined;
296
432
  isExternal?: boolean | undefined;
297
433
  possibleSubscriptions?: string[] | undefined;
298
434
  possibleModules?: {
299
- [x: string]: string[];
435
+ [x: string]: {
436
+ name: string;
437
+ type: "aggregate" | "externalSystem" | "policy" | "readmodel";
438
+ }[];
300
439
  } | undefined;
301
440
  isService?: boolean | undefined;
302
441
  isBroker?: boolean | undefined;
@@ -306,41 +445,25 @@ export declare const SetStructureUpsertHostCommandSchema: import("@bett3r-dev/js
306
445
  [x: string]: string[];
307
446
  } | undefined;
308
447
  consumes?: {
309
- [x: string]: string[];
448
+ [x: string]: {
449
+ events: string[];
450
+ endpoint: string;
451
+ };
310
452
  } | undefined;
311
- hosts: string[];
312
453
  service: string;
313
454
  }, true>;
314
455
  export declare const SetStructureCommandSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
315
- subscriptions?: {
316
- [x: string]: {
317
- events?: string[] | undefined;
318
- endpoint?: string | undefined;
319
- load?: number | undefined;
320
- eventstore?: string | undefined;
321
- manualDataSplits?: number | undefined;
322
- mirrorDataSplitsWithConsumers?: boolean | undefined;
323
- customDataSplits?: string[][] | undefined;
324
- streams?: string | undefined;
325
- retryAfterSecs?: number | undefined;
326
- retryableStatuses?: number[] | undefined;
327
- dataSplits?: {
328
- custom?: (string | undefined)[] | undefined;
329
- manual?: (string | undefined)[] | undefined;
330
- automatic?: (string | undefined)[] | undefined;
331
- } | undefined;
332
- producers: string[];
333
- module: string;
334
- consumer: string;
335
- };
336
- } | undefined;
456
+ reportingHost: string;
337
457
  upsertHosts: {
338
458
  port?: number | undefined;
339
- channel?: "http" | "tcp" | "local" | undefined;
459
+ channel?: "http" | "local" | "tcp" | undefined;
340
460
  isExternal?: boolean | undefined;
341
461
  possibleSubscriptions?: string[] | undefined;
342
462
  possibleModules?: {
343
- [x: string]: string[];
463
+ [x: string]: {
464
+ name: string;
465
+ type: "aggregate" | "externalSystem" | "policy" | "readmodel";
466
+ }[];
344
467
  } | undefined;
345
468
  isService?: boolean | undefined;
346
469
  isBroker?: boolean | undefined;
@@ -350,26 +473,72 @@ export declare const SetStructureCommandSchema: import("@bett3r-dev/jsonschema-d
350
473
  [x: string]: string[];
351
474
  } | undefined;
352
475
  consumes?: {
353
- [x: string]: string[];
476
+ [x: string]: {
477
+ events: string[];
478
+ endpoint: string;
479
+ };
354
480
  } | undefined;
481
+ service: string;
355
482
  host: string;
356
483
  doNotRebalance?: boolean | undefined;
357
- service: string;
358
484
  }[];
359
485
  removeHosts: string[];
486
+ subscriptions?: {
487
+ [x: string]: {
488
+ status: "active" | "error" | "inactive";
489
+ load?: number | undefined;
490
+ producers: string[];
491
+ eventstore?: string | undefined;
492
+ module?: string | undefined;
493
+ events?: string[] | undefined;
494
+ streams?: string | undefined;
495
+ consumer: string;
496
+ endpoint?: string | undefined;
497
+ retryableStatuses?: number[] | undefined;
498
+ retryAfterSecs?: number | undefined;
499
+ manualDataSplits?: number | undefined;
500
+ customDataSplits?: {
501
+ value: string;
502
+ regexp: string;
503
+ initialPosition?: number | undefined;
504
+ isErrorDataSplit?: boolean | undefined;
505
+ lastErrorDataSplitIndex?: number | undefined;
506
+ lastErrorClusterRevision?: number | undefined;
507
+ }[][] | undefined;
508
+ criticalErrorHandlingStrategy?: "custom-datasplit" | "subscriptionStop" | undefined;
509
+ customDataSplitErrorStrategyLimit?: number | undefined;
510
+ customDataSplitErrorStrategyCount?: number | undefined;
511
+ dataSplits?: import("Object/Optional").OptionalDeep<{
512
+ custom: string[];
513
+ manual: string[];
514
+ automatic: string[];
515
+ }> | undefined;
516
+ };
517
+ } | undefined;
518
+ }, true>;
519
+ export declare const SetDefaultAutomaticDataSplitsCommandSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
520
+ defaultAutomaticDataSplits: number;
360
521
  }, true>;
361
522
  export declare const RebalanceSubscriptionsCommandSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
362
523
  [x: string]: import("Object/Omit")._Omit<{
524
+ host: string;
363
525
  subscriptions: {
364
526
  [x: string]: {
365
527
  [x: string]: {
366
- custom?: string[] | undefined;
367
528
  host: string;
368
529
  index: number;
530
+ isManual?: boolean | undefined;
531
+ customCriteriaRegexp?: {
532
+ value: string;
533
+ regexp: string;
534
+ initialPosition?: number | undefined;
535
+ isErrorDataSplit?: boolean | undefined;
536
+ lastErrorDataSplitIndex?: number | undefined;
537
+ lastErrorClusterRevision?: number | undefined;
538
+ }[] | undefined;
369
539
  };
370
540
  };
371
541
  };
372
- host: string;
373
542
  }, "host">;
374
543
  }, true>;
375
544
  export type RebalanceSubscriptionsCommandType = typeof RebalanceSubscriptionsCommandSchema.type;
@@ -385,36 +554,31 @@ export type CommandTypes = {
385
554
  RemoveHost: typeof RemoveHostCommandSchema.type;
386
555
  RebalanceSubscriptions: typeof RebalanceSubscriptionsCommandSchema.type;
387
556
  AddSubscriptions: typeof AddSubscriptionsCommandSchema.type;
557
+ ActivateSubscription: typeof SubscriptionActivationCommandSchema.type;
558
+ DeactivateSubscription: typeof SubscriptionActivationCommandSchema.type;
559
+ DectivateSubscriptionWithError: typeof SubscriptionActivationCommandSchema.type;
388
560
  EditSubscription: typeof EditSubscriptionCommandSchema.type;
389
561
  DeleteSubscription: typeof DeleteSubscriptionCommandSchema.type;
562
+ AddErrorCustomDataSplit: typeof AddErrorCustomDataSplitCommandSchema.type;
390
563
  SetStructure: typeof SetStructureCommandSchema.type;
391
564
  AckStructure: typeof AckStructureSchema.type;
565
+ RemoveCustomDataSplit: typeof DeleteDataSplitCommandSchema.type;
566
+ SetDefaultAutomaticDataSplits: typeof SetDefaultAutomaticDataSplitsCommandSchema.type;
392
567
  };
393
568
  export declare const structureEvents: {
394
- HostUpserted: () => import("@bett3r-dev/pv3-types").EventInstance<{
395
- brokers?: {
396
- [x: string]: import("Object/Omit")._Omit<{
397
- subscriptions: {
398
- [x: string]: {
399
- [x: string]: {
400
- custom?: string[] | undefined;
401
- host: string;
402
- index: number;
403
- };
404
- };
405
- };
406
- host: string;
407
- }, "host">;
408
- } | undefined;
409
- doNotRebalance?: boolean | undefined;
569
+ HostUpserted: () => import("./eventsourcing").EventInstance<{
410
570
  services: {
411
571
  [x: string]: {
572
+ hosts: string[];
412
573
  port?: number | undefined;
413
- channel?: "http" | "tcp" | "local" | undefined;
574
+ channel?: "http" | "local" | "tcp" | undefined;
414
575
  isExternal?: boolean | undefined;
415
576
  possibleSubscriptions?: string[] | undefined;
416
577
  possibleModules?: {
417
- [x: string]: string[];
578
+ [x: string]: {
579
+ name: string;
580
+ type: "aggregate" | "externalSystem" | "policy" | "readmodel";
581
+ }[];
418
582
  } | undefined;
419
583
  isService?: boolean | undefined;
420
584
  isBroker?: boolean | undefined;
@@ -424,173 +588,426 @@ export declare const structureEvents: {
424
588
  [x: string]: string[];
425
589
  } | undefined;
426
590
  consumes?: {
427
- [x: string]: string[];
591
+ [x: string]: {
592
+ events: string[];
593
+ endpoint: string;
594
+ };
428
595
  } | undefined;
429
- hosts: string[];
430
596
  };
431
597
  };
598
+ brokers?: {
599
+ [x: string]: import("Object/Omit")._Omit<{
600
+ host: string;
601
+ subscriptions: {
602
+ [x: string]: {
603
+ [x: string]: {
604
+ host: string;
605
+ index: number;
606
+ isManual?: boolean | undefined;
607
+ customCriteriaRegexp?: {
608
+ value: string;
609
+ regexp: string;
610
+ initialPosition?: number | undefined;
611
+ isErrorDataSplit?: boolean | undefined;
612
+ lastErrorDataSplitIndex?: number | undefined;
613
+ lastErrorClusterRevision?: number | undefined;
614
+ }[] | undefined;
615
+ };
616
+ };
617
+ };
618
+ }, "host">;
619
+ } | undefined;
620
+ doNotRebalance?: boolean | undefined;
432
621
  }, any>;
433
- HostRemoved: () => import("@bett3r-dev/pv3-types").EventInstance<{
434
- host: string;
622
+ HostRemoved: () => import("./eventsourcing").EventInstance<{
435
623
  brokers: {
436
624
  [x: string]: import("Object/Omit")._Omit<{
625
+ host: string;
437
626
  subscriptions: {
438
627
  [x: string]: {
439
628
  [x: string]: {
440
- custom?: string[] | undefined;
441
629
  host: string;
442
630
  index: number;
631
+ isManual?: boolean | undefined;
632
+ customCriteriaRegexp?: {
633
+ value: string;
634
+ regexp: string;
635
+ initialPosition?: number | undefined;
636
+ isErrorDataSplit?: boolean | undefined;
637
+ lastErrorDataSplitIndex?: number | undefined;
638
+ lastErrorClusterRevision?: number | undefined;
639
+ }[] | undefined;
443
640
  };
444
641
  };
445
642
  };
446
- host: string;
447
643
  }, "host">;
448
644
  };
645
+ host: string;
449
646
  service: string;
450
647
  }, any>;
451
- SubscriptionsRebalanced: () => import("@bett3r-dev/pv3-types").EventInstance<{
648
+ SubscriptionsRebalanced: () => import("./eventsourcing").EventInstance<{
452
649
  brokers: {
453
650
  [x: string]: import("Object/Omit")._Omit<{
651
+ host: string;
454
652
  subscriptions: {
455
653
  [x: string]: {
456
654
  [x: string]: {
457
- custom?: string[] | undefined;
458
655
  host: string;
459
656
  index: number;
657
+ isManual?: boolean | undefined;
658
+ customCriteriaRegexp?: {
659
+ value: string;
660
+ regexp: string;
661
+ initialPosition?: number | undefined;
662
+ isErrorDataSplit?: boolean | undefined;
663
+ lastErrorDataSplitIndex?: number | undefined;
664
+ lastErrorClusterRevision?: number | undefined;
665
+ }[] | undefined;
460
666
  };
461
667
  };
462
668
  };
463
- host: string;
464
669
  }, "host">;
465
670
  };
466
671
  }, any>;
467
- SubscriptionsAdded: () => import("@bett3r-dev/pv3-types").EventInstance<{
672
+ SubscriptionsAdded: () => import("./eventsourcing").EventInstance<{
468
673
  brokers?: {
469
674
  [x: string]: import("Object/Omit")._Omit<{
675
+ host: string;
470
676
  subscriptions: {
471
677
  [x: string]: {
472
678
  [x: string]: {
473
- custom?: string[] | undefined;
474
679
  host: string;
475
680
  index: number;
681
+ isManual?: boolean | undefined;
682
+ customCriteriaRegexp?: {
683
+ value: string;
684
+ regexp: string;
685
+ initialPosition?: number | undefined;
686
+ isErrorDataSplit?: boolean | undefined;
687
+ lastErrorDataSplitIndex?: number | undefined;
688
+ lastErrorClusterRevision?: number | undefined;
689
+ }[] | undefined;
476
690
  };
477
691
  };
478
692
  };
479
- host: string;
480
693
  }, "host">;
481
694
  } | undefined;
482
- doNotRebalance?: boolean | undefined;
483
695
  subscriptions: {
484
696
  [x: string]: {
485
- events?: string[] | undefined;
486
- endpoint?: string | undefined;
697
+ status: "active" | "error" | "inactive";
487
698
  load?: number | undefined;
699
+ producers: string[];
488
700
  eventstore?: string | undefined;
489
- manualDataSplits?: number | undefined;
490
- mirrorDataSplitsWithConsumers?: boolean | undefined;
491
- customDataSplits?: string[][] | undefined;
701
+ module?: string | undefined;
702
+ events?: string[] | undefined;
492
703
  streams?: string | undefined;
493
- retryAfterSecs?: number | undefined;
494
- retryableStatuses?: number[] | undefined;
495
- dataSplits?: {
496
- custom?: (string | undefined)[] | undefined;
497
- manual?: (string | undefined)[] | undefined;
498
- automatic?: (string | undefined)[] | undefined;
499
- } | undefined;
500
- producers: string[];
501
- module: string;
502
704
  consumer: string;
705
+ endpoint?: string | undefined;
706
+ retryableStatuses?: number[] | undefined;
707
+ retryAfterSecs?: number | undefined;
708
+ manualDataSplits?: number | undefined;
709
+ customDataSplits?: {
710
+ value: string;
711
+ regexp: string;
712
+ initialPosition?: number | undefined;
713
+ isErrorDataSplit?: boolean | undefined;
714
+ lastErrorDataSplitIndex?: number | undefined;
715
+ lastErrorClusterRevision?: number | undefined;
716
+ }[][] | undefined;
717
+ criticalErrorHandlingStrategy?: "custom-datasplit" | "subscriptionStop" | undefined;
718
+ customDataSplitErrorStrategyLimit?: number | undefined;
719
+ customDataSplitErrorStrategyCount?: number | undefined;
720
+ dataSplits?: import("Object/Optional").OptionalDeep<{
721
+ custom: string[];
722
+ manual: string[];
723
+ automatic: string[];
724
+ }> | undefined;
503
725
  };
504
726
  };
727
+ doNotRebalance?: boolean | undefined;
505
728
  }, any>;
506
- SubscriptionEdited: () => import("@bett3r-dev/pv3-types").EventInstance<{
729
+ SubscriptionActivated: () => import("./eventsourcing").EventInstance<{
730
+ id: string;
731
+ }, any>;
732
+ SubscriptionDeactivated: () => import("./eventsourcing").EventInstance<{
733
+ id: string;
734
+ }, any>;
735
+ SubscriptionDeactivatedWithError: () => import("./eventsourcing").EventInstance<{
736
+ id: string;
737
+ }, any>;
738
+ SubscriptionEdited: () => import("./eventsourcing").EventInstance<{
507
739
  brokers?: {
508
740
  [x: string]: import("Object/Omit")._Omit<{
741
+ host: string;
509
742
  subscriptions: {
510
743
  [x: string]: {
511
744
  [x: string]: {
512
- custom?: string[] | undefined;
513
745
  host: string;
514
746
  index: number;
747
+ isManual?: boolean | undefined;
748
+ customCriteriaRegexp?: {
749
+ value: string;
750
+ regexp: string;
751
+ initialPosition?: number | undefined;
752
+ isErrorDataSplit?: boolean | undefined;
753
+ lastErrorDataSplitIndex?: number | undefined;
754
+ lastErrorClusterRevision?: number | undefined;
755
+ }[] | undefined;
515
756
  };
516
757
  };
517
758
  };
518
- host: string;
519
759
  }, "host">;
520
760
  } | undefined;
521
- doNotRebalance?: boolean | undefined;
522
761
  subscriptions: {
523
762
  [x: string]: {
524
- events?: string[] | undefined;
525
- endpoint?: string | undefined;
763
+ status: "active" | "error" | "inactive";
526
764
  load?: number | undefined;
765
+ producers: string[];
527
766
  eventstore?: string | undefined;
528
- manualDataSplits?: number | undefined;
529
- mirrorDataSplitsWithConsumers?: boolean | undefined;
530
- customDataSplits?: string[][] | undefined;
767
+ module?: string | undefined;
768
+ events?: string[] | undefined;
531
769
  streams?: string | undefined;
532
- retryAfterSecs?: number | undefined;
533
- retryableStatuses?: number[] | undefined;
534
- dataSplits?: {
535
- custom?: (string | undefined)[] | undefined;
536
- manual?: (string | undefined)[] | undefined;
537
- automatic?: (string | undefined)[] | undefined;
538
- } | undefined;
539
- producers: string[];
540
- module: string;
541
770
  consumer: string;
771
+ endpoint?: string | undefined;
772
+ retryableStatuses?: number[] | undefined;
773
+ retryAfterSecs?: number | undefined;
774
+ manualDataSplits?: number | undefined;
775
+ customDataSplits?: {
776
+ value: string;
777
+ regexp: string;
778
+ initialPosition?: number | undefined;
779
+ isErrorDataSplit?: boolean | undefined;
780
+ lastErrorDataSplitIndex?: number | undefined;
781
+ lastErrorClusterRevision?: number | undefined;
782
+ }[][] | undefined;
783
+ criticalErrorHandlingStrategy?: "custom-datasplit" | "subscriptionStop" | undefined;
784
+ customDataSplitErrorStrategyLimit?: number | undefined;
785
+ customDataSplitErrorStrategyCount?: number | undefined;
786
+ dataSplits?: import("Object/Optional").OptionalDeep<{
787
+ custom: string[];
788
+ manual: string[];
789
+ automatic: string[];
790
+ }> | undefined;
542
791
  };
543
792
  };
793
+ doNotRebalance?: boolean | undefined;
544
794
  }, any>;
545
- SubscriptionDeleted: () => import("@bett3r-dev/pv3-types").EventInstance<{
795
+ SubscriptionDeleted: () => import("./eventsourcing").EventInstance<{
796
+ id: string;
797
+ doNotRebalance?: boolean | undefined;
546
798
  brokers?: {
547
799
  [x: string]: import("Object/Omit")._Omit<{
800
+ host: string;
548
801
  subscriptions: {
549
802
  [x: string]: {
550
803
  [x: string]: {
551
- custom?: string[] | undefined;
552
804
  host: string;
553
805
  index: number;
806
+ isManual?: boolean | undefined;
807
+ customCriteriaRegexp?: {
808
+ value: string;
809
+ regexp: string;
810
+ initialPosition?: number | undefined;
811
+ isErrorDataSplit?: boolean | undefined;
812
+ lastErrorDataSplitIndex?: number | undefined;
813
+ lastErrorClusterRevision?: number | undefined;
814
+ }[] | undefined;
554
815
  };
555
816
  };
556
817
  };
557
- host: string;
558
818
  }, "host">;
559
819
  } | undefined;
560
- doNotRebalance?: boolean | undefined;
561
- id: string;
562
820
  }, any>;
563
- StructureSet: () => import("@bett3r-dev/pv3-types").EventInstance<{
821
+ ErrorCustomDataSplitAdded: () => import("./eventsourcing").EventInstance<{
822
+ brokers: {
823
+ [x: string]: import("Object/Omit")._Omit<{
824
+ host: string;
825
+ subscriptions: {
826
+ [x: string]: {
827
+ [x: string]: {
828
+ host: string;
829
+ index: number;
830
+ isManual?: boolean | undefined;
831
+ customCriteriaRegexp?: {
832
+ value: string;
833
+ regexp: string;
834
+ initialPosition?: number | undefined;
835
+ isErrorDataSplit?: boolean | undefined;
836
+ lastErrorDataSplitIndex?: number | undefined;
837
+ lastErrorClusterRevision?: number | undefined;
838
+ }[] | undefined;
839
+ };
840
+ };
841
+ };
842
+ }, "host">;
843
+ };
564
844
  subscriptions: {
565
845
  [x: string]: {
846
+ status: "active" | "error" | "inactive";
847
+ load?: number | undefined;
848
+ producers: string[];
849
+ eventstore?: string | undefined;
850
+ module?: string | undefined;
566
851
  events?: string[] | undefined;
852
+ streams?: string | undefined;
853
+ consumer: string;
567
854
  endpoint?: string | undefined;
855
+ retryableStatuses?: number[] | undefined;
856
+ retryAfterSecs?: number | undefined;
857
+ manualDataSplits?: number | undefined;
858
+ customDataSplits?: {
859
+ value: string;
860
+ regexp: string;
861
+ initialPosition?: number | undefined;
862
+ isErrorDataSplit?: boolean | undefined;
863
+ lastErrorDataSplitIndex?: number | undefined;
864
+ lastErrorClusterRevision?: number | undefined;
865
+ }[][] | undefined;
866
+ criticalErrorHandlingStrategy?: "custom-datasplit" | "subscriptionStop" | undefined;
867
+ customDataSplitErrorStrategyLimit?: number | undefined;
868
+ customDataSplitErrorStrategyCount?: number | undefined;
869
+ dataSplits?: import("Object/Optional").OptionalDeep<{
870
+ custom: string[];
871
+ manual: string[];
872
+ automatic: string[];
873
+ }> | undefined;
874
+ };
875
+ };
876
+ clusterRevision: number;
877
+ doNotRebalance?: boolean | undefined;
878
+ }, any>;
879
+ DataSplitDeleted: () => import("./eventsourcing").EventInstance<{
880
+ subscriptions: {
881
+ [x: string]: {
882
+ status: "active" | "error" | "inactive";
568
883
  load?: number | undefined;
884
+ producers: string[];
569
885
  eventstore?: string | undefined;
570
- manualDataSplits?: number | undefined;
571
- mirrorDataSplitsWithConsumers?: boolean | undefined;
572
- customDataSplits?: string[][] | undefined;
886
+ module?: string | undefined;
887
+ events?: string[] | undefined;
573
888
  streams?: string | undefined;
574
- retryAfterSecs?: number | undefined;
889
+ consumer: string;
890
+ endpoint?: string | undefined;
575
891
  retryableStatuses?: number[] | undefined;
576
- dataSplits?: {
577
- custom?: (string | undefined)[] | undefined;
578
- manual?: (string | undefined)[] | undefined;
579
- automatic?: (string | undefined)[] | undefined;
892
+ retryAfterSecs?: number | undefined;
893
+ manualDataSplits?: number | undefined;
894
+ customDataSplits?: {
895
+ value: string;
896
+ regexp: string;
897
+ initialPosition?: number | undefined;
898
+ isErrorDataSplit?: boolean | undefined;
899
+ lastErrorDataSplitIndex?: number | undefined;
900
+ lastErrorClusterRevision?: number | undefined;
901
+ }[][] | undefined;
902
+ criticalErrorHandlingStrategy?: "custom-datasplit" | "subscriptionStop" | undefined;
903
+ customDataSplitErrorStrategyLimit?: number | undefined;
904
+ customDataSplitErrorStrategyCount?: number | undefined;
905
+ dataSplits?: import("Object/Optional").OptionalDeep<{
906
+ custom: string[];
907
+ manual: string[];
908
+ automatic: string[];
909
+ }> | undefined;
910
+ };
911
+ };
912
+ services: {
913
+ [x: string]: {
914
+ hosts: string[];
915
+ port?: number | undefined;
916
+ channel?: "http" | "local" | "tcp" | undefined;
917
+ isExternal?: boolean | undefined;
918
+ possibleSubscriptions?: string[] | undefined;
919
+ possibleModules?: {
920
+ [x: string]: {
921
+ name: string;
922
+ type: "aggregate" | "externalSystem" | "policy" | "readmodel";
923
+ }[];
924
+ } | undefined;
925
+ isService?: boolean | undefined;
926
+ isBroker?: boolean | undefined;
927
+ endpoints?: string[] | undefined;
928
+ openApiEndpoint?: string | undefined;
929
+ produces?: {
930
+ [x: string]: string[];
931
+ } | undefined;
932
+ consumes?: {
933
+ [x: string]: {
934
+ events: string[];
935
+ endpoint: string;
936
+ };
580
937
  } | undefined;
938
+ };
939
+ };
940
+ brokers: {
941
+ [x: string]: import("Object/Omit")._Omit<{
942
+ host: string;
943
+ subscriptions: {
944
+ [x: string]: {
945
+ [x: string]: {
946
+ host: string;
947
+ index: number;
948
+ isManual?: boolean | undefined;
949
+ customCriteriaRegexp?: {
950
+ value: string;
951
+ regexp: string;
952
+ initialPosition?: number | undefined;
953
+ isErrorDataSplit?: boolean | undefined;
954
+ lastErrorDataSplitIndex?: number | undefined;
955
+ lastErrorClusterRevision?: number | undefined;
956
+ }[] | undefined;
957
+ };
958
+ };
959
+ };
960
+ }, "host">;
961
+ };
962
+ clusterRevision: number;
963
+ servicesRevisionAck: string[];
964
+ defaultAutomaticDataSplits?: number | undefined;
965
+ }, any>;
966
+ StructureSet: () => import("./eventsourcing").EventInstance<{
967
+ subscriptions: {
968
+ [x: string]: {
969
+ status: "active" | "error" | "inactive";
970
+ load?: number | undefined;
581
971
  producers: string[];
582
- module: string;
972
+ eventstore?: string | undefined;
973
+ module?: string | undefined;
974
+ events?: string[] | undefined;
975
+ streams?: string | undefined;
583
976
  consumer: string;
977
+ endpoint?: string | undefined;
978
+ retryableStatuses?: number[] | undefined;
979
+ retryAfterSecs?: number | undefined;
980
+ manualDataSplits?: number | undefined;
981
+ customDataSplits?: {
982
+ value: string;
983
+ regexp: string;
984
+ initialPosition?: number | undefined;
985
+ isErrorDataSplit?: boolean | undefined;
986
+ lastErrorDataSplitIndex?: number | undefined;
987
+ lastErrorClusterRevision?: number | undefined;
988
+ }[][] | undefined;
989
+ criticalErrorHandlingStrategy?: "custom-datasplit" | "subscriptionStop" | undefined;
990
+ customDataSplitErrorStrategyLimit?: number | undefined;
991
+ customDataSplitErrorStrategyCount?: number | undefined;
992
+ dataSplits?: import("Object/Optional").OptionalDeep<{
993
+ custom: string[];
994
+ manual: string[];
995
+ automatic: string[];
996
+ }> | undefined;
584
997
  };
585
998
  };
586
999
  services: {
587
1000
  [x: string]: {
1001
+ hosts: string[];
588
1002
  port?: number | undefined;
589
- channel?: "http" | "tcp" | "local" | undefined;
1003
+ channel?: "http" | "local" | "tcp" | undefined;
590
1004
  isExternal?: boolean | undefined;
591
1005
  possibleSubscriptions?: string[] | undefined;
592
1006
  possibleModules?: {
593
- [x: string]: string[];
1007
+ [x: string]: {
1008
+ name: string;
1009
+ type: "aggregate" | "externalSystem" | "policy" | "readmodel";
1010
+ }[];
594
1011
  } | undefined;
595
1012
  isService?: boolean | undefined;
596
1013
  isBroker?: boolean | undefined;
@@ -600,32 +1017,101 @@ export declare const structureEvents: {
600
1017
  [x: string]: string[];
601
1018
  } | undefined;
602
1019
  consumes?: {
603
- [x: string]: string[];
1020
+ [x: string]: {
1021
+ events: string[];
1022
+ endpoint: string;
1023
+ };
604
1024
  } | undefined;
605
- hosts: string[];
606
1025
  };
607
1026
  };
608
1027
  brokers: {
609
1028
  [x: string]: import("Object/Omit")._Omit<{
1029
+ host: string;
610
1030
  subscriptions: {
611
1031
  [x: string]: {
612
1032
  [x: string]: {
613
- custom?: string[] | undefined;
614
1033
  host: string;
615
1034
  index: number;
1035
+ isManual?: boolean | undefined;
1036
+ customCriteriaRegexp?: {
1037
+ value: string;
1038
+ regexp: string;
1039
+ initialPosition?: number | undefined;
1040
+ isErrorDataSplit?: boolean | undefined;
1041
+ lastErrorDataSplitIndex?: number | undefined;
1042
+ lastErrorClusterRevision?: number | undefined;
1043
+ }[] | undefined;
616
1044
  };
617
1045
  };
618
1046
  };
619
- host: string;
620
1047
  }, "host">;
621
1048
  };
622
1049
  clusterRevision: number;
623
1050
  servicesRevisionAck: string[];
1051
+ defaultAutomaticDataSplits?: number | undefined;
624
1052
  }, any>;
625
- StructureAcked: () => import("@bett3r-dev/pv3-types").EventInstance<{
1053
+ StructureAcked: () => import("./eventsourcing").EventInstance<{
626
1054
  host: string;
627
1055
  revision: number;
628
1056
  }, any>;
1057
+ DefaultAutomaticDataSplitsSet: () => import("./eventsourcing").EventInstance<{
1058
+ brokers: {
1059
+ [x: string]: import("Object/Omit")._Omit<{
1060
+ host: string;
1061
+ subscriptions: {
1062
+ [x: string]: {
1063
+ [x: string]: {
1064
+ host: string;
1065
+ index: number;
1066
+ isManual?: boolean | undefined;
1067
+ customCriteriaRegexp?: {
1068
+ value: string;
1069
+ regexp: string;
1070
+ initialPosition?: number | undefined;
1071
+ isErrorDataSplit?: boolean | undefined;
1072
+ lastErrorDataSplitIndex?: number | undefined;
1073
+ lastErrorClusterRevision?: number | undefined;
1074
+ }[] | undefined;
1075
+ };
1076
+ };
1077
+ };
1078
+ }, "host">;
1079
+ };
1080
+ subscriptions: {
1081
+ [x: string]: {
1082
+ status: "active" | "error" | "inactive";
1083
+ load?: number | undefined;
1084
+ producers: string[];
1085
+ eventstore?: string | undefined;
1086
+ module?: string | undefined;
1087
+ events?: string[] | undefined;
1088
+ streams?: string | undefined;
1089
+ consumer: string;
1090
+ endpoint?: string | undefined;
1091
+ retryableStatuses?: number[] | undefined;
1092
+ retryAfterSecs?: number | undefined;
1093
+ manualDataSplits?: number | undefined;
1094
+ customDataSplits?: {
1095
+ value: string;
1096
+ regexp: string;
1097
+ initialPosition?: number | undefined;
1098
+ isErrorDataSplit?: boolean | undefined;
1099
+ lastErrorDataSplitIndex?: number | undefined;
1100
+ lastErrorClusterRevision?: number | undefined;
1101
+ }[][] | undefined;
1102
+ criticalErrorHandlingStrategy?: "custom-datasplit" | "subscriptionStop" | undefined;
1103
+ customDataSplitErrorStrategyLimit?: number | undefined;
1104
+ customDataSplitErrorStrategyCount?: number | undefined;
1105
+ dataSplits?: import("Object/Optional").OptionalDeep<{
1106
+ custom: string[];
1107
+ manual: string[];
1108
+ automatic: string[];
1109
+ }> | undefined;
1110
+ };
1111
+ };
1112
+ clusterRevision: number;
1113
+ defaultAutomaticDataSplits: number;
1114
+ }, any>;
629
1115
  };
630
1116
  export declare const ClusterRoutesConfigSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
631
1117
  clusterRoutesAggregateCollection?: string | undefined;
@@ -637,6 +1123,7 @@ export declare const ClusterStructureConfigSchema: import("@bett3r-dev/jsonschem
637
1123
  structureEventstoreStream?: string | undefined;
638
1124
  structureAggregateCollection?: string | undefined;
639
1125
  structureEventstoreCollection?: string | undefined;
1126
+ defaultAutomaticDataSplits?: number | undefined;
640
1127
  }, true>;
641
1128
  export type ClusterStructureConfigType = typeof ClusterStructureConfigSchema.type;
642
1129
  //# sourceMappingURL=clusterAdministration.d.ts.map