@bett3r-dev/pv3-types 1.0.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 (122) hide show
  1. package/build/authentication.d.ts +261 -0
  2. package/build/authentication.d.ts.map +1 -0
  3. package/build/authentication.js +108 -0
  4. package/build/authentication.js.map +1 -0
  5. package/build/cache.d.ts +101 -0
  6. package/build/cache.d.ts.map +1 -0
  7. package/build/cache.js +3 -0
  8. package/build/cache.js.map +1 -0
  9. package/build/clusterAdministration.d.ts +642 -0
  10. package/build/clusterAdministration.d.ts.map +1 -0
  11. package/build/clusterAdministration.js +177 -0
  12. package/build/clusterAdministration.js.map +1 -0
  13. package/build/configuration.d.ts +66 -0
  14. package/build/configuration.d.ts.map +1 -0
  15. package/build/configuration.js +3 -0
  16. package/build/configuration.js.map +1 -0
  17. package/build/database.d.ts +120 -0
  18. package/build/database.d.ts.map +1 -0
  19. package/build/database.js +41 -0
  20. package/build/database.js.map +1 -0
  21. package/build/endpoints.d.ts +183 -0
  22. package/build/endpoints.d.ts.map +1 -0
  23. package/build/endpoints.js +78 -0
  24. package/build/endpoints.js.map +1 -0
  25. package/build/evenstore.d.ts +26 -0
  26. package/build/evenstore.d.ts.map +1 -0
  27. package/build/evenstore.js +12 -0
  28. package/build/evenstore.js.map +1 -0
  29. package/build/eventsourcing/aggregateBuilder.d.ts +10 -0
  30. package/build/eventsourcing/aggregateBuilder.d.ts.map +1 -0
  31. package/build/eventsourcing/aggregateBuilder.js +3 -0
  32. package/build/eventsourcing/aggregateBuilder.js.map +1 -0
  33. package/build/eventsourcing/commandBuilder.d.ts +58 -0
  34. package/build/eventsourcing/commandBuilder.d.ts.map +1 -0
  35. package/build/eventsourcing/commandBuilder.js +6 -0
  36. package/build/eventsourcing/commandBuilder.js.map +1 -0
  37. package/build/eventsourcing/commandHandlers.d.ts +104 -0
  38. package/build/eventsourcing/commandHandlers.d.ts.map +1 -0
  39. package/build/eventsourcing/commandHandlers.js +28 -0
  40. package/build/eventsourcing/commandHandlers.js.map +1 -0
  41. package/build/eventsourcing/eventHandlers.d.ts +102 -0
  42. package/build/eventsourcing/eventHandlers.d.ts.map +1 -0
  43. package/build/eventsourcing/eventHandlers.js +33 -0
  44. package/build/eventsourcing/eventHandlers.js.map +1 -0
  45. package/build/eventsourcing/eventHandlersBuilder.d.ts +36 -0
  46. package/build/eventsourcing/eventHandlersBuilder.d.ts.map +1 -0
  47. package/build/eventsourcing/eventHandlersBuilder.js +13 -0
  48. package/build/eventsourcing/eventHandlersBuilder.js.map +1 -0
  49. package/build/eventsourcing/externalSystemBuilder.d.ts +14 -0
  50. package/build/eventsourcing/externalSystemBuilder.d.ts.map +1 -0
  51. package/build/eventsourcing/externalSystemBuilder.js +3 -0
  52. package/build/eventsourcing/externalSystemBuilder.js.map +1 -0
  53. package/build/eventsourcing/index.d.ts +386 -0
  54. package/build/eventsourcing/index.d.ts.map +1 -0
  55. package/build/eventsourcing/index.js +47 -0
  56. package/build/eventsourcing/index.js.map +1 -0
  57. package/build/eventsourcing/invariants.d.ts +19 -0
  58. package/build/eventsourcing/invariants.d.ts.map +1 -0
  59. package/build/eventsourcing/invariants.js +3 -0
  60. package/build/eventsourcing/invariants.js.map +1 -0
  61. package/build/eventsourcing/utils.d.ts +4 -0
  62. package/build/eventsourcing/utils.d.ts.map +1 -0
  63. package/build/eventsourcing/utils.js +3 -0
  64. package/build/eventsourcing/utils.js.map +1 -0
  65. package/build/index.d.ts +16 -0
  66. package/build/index.d.ts.map +1 -0
  67. package/build/index.js +32 -0
  68. package/build/index.js.map +1 -0
  69. package/build/infrastructure.d.ts +40 -0
  70. package/build/infrastructure.d.ts.map +1 -0
  71. package/build/infrastructure.js +11 -0
  72. package/build/infrastructure.js.map +1 -0
  73. package/build/logger.d.ts +32 -0
  74. package/build/logger.d.ts.map +1 -0
  75. package/build/logger.js +29 -0
  76. package/build/logger.js.map +1 -0
  77. package/build/outboxManager.d.ts +38 -0
  78. package/build/outboxManager.d.ts.map +1 -0
  79. package/build/outboxManager.js +21 -0
  80. package/build/outboxManager.js.map +1 -0
  81. package/build/ports.d.ts +39 -0
  82. package/build/ports.d.ts.map +1 -0
  83. package/build/ports.js +3 -0
  84. package/build/ports.js.map +1 -0
  85. package/build/routesAuth.d.ts +58 -0
  86. package/build/routesAuth.d.ts.map +1 -0
  87. package/build/routesAuth.js +37 -0
  88. package/build/routesAuth.js.map +1 -0
  89. package/build/typedEventEmitter.d.ts +23 -0
  90. package/build/typedEventEmitter.d.ts.map +1 -0
  91. package/build/typedEventEmitter.js +55 -0
  92. package/build/typedEventEmitter.js.map +1 -0
  93. package/build/validation.d.ts +64 -0
  94. package/build/validation.d.ts.map +1 -0
  95. package/build/validation.js +57 -0
  96. package/build/validation.js.map +1 -0
  97. package/package.json +15 -0
  98. package/src/authentication.ts +273 -0
  99. package/src/cache.ts +109 -0
  100. package/src/clusterAdministration.ts +216 -0
  101. package/src/configuration.ts +71 -0
  102. package/src/database.ts +157 -0
  103. package/src/endpoints.ts +198 -0
  104. package/src/evenstore.ts +27 -0
  105. package/src/eventsourcing/aggregateBuilder.ts +11 -0
  106. package/src/eventsourcing/commandBuilder.ts +64 -0
  107. package/src/eventsourcing/commandHandlers.ts +137 -0
  108. package/src/eventsourcing/eventHandlers.ts +118 -0
  109. package/src/eventsourcing/eventHandlersBuilder.ts +42 -0
  110. package/src/eventsourcing/externalSystemBuilder.ts +20 -0
  111. package/src/eventsourcing/index.ts +111 -0
  112. package/src/eventsourcing/invariants.ts +27 -0
  113. package/src/eventsourcing/utils.ts +4 -0
  114. package/src/index.ts +15 -0
  115. package/src/infrastructure.ts +41 -0
  116. package/src/logger.ts +45 -0
  117. package/src/outboxManager.ts +36 -0
  118. package/src/ports.ts +42 -0
  119. package/src/routesAuth.ts +58 -0
  120. package/src/typedEventEmitter.ts +73 -0
  121. package/src/validation.ts +89 -0
  122. package/tsconfig.json +15 -0
@@ -0,0 +1,642 @@
1
+ /// <reference types="ramda/node_modules/ts-toolbelt" />
2
+ import { CommittedEvent } from '@bett3r-dev/pv3-types';
3
+ export type ClusterStructureType = {
4
+ getCurrentState: (id?: string) => Promise<StructureState>;
5
+ getStructureRevision: (version: number) => Promise<StructureState | null>;
6
+ subscribeToStructureChanges: (onStructureChanges: (change: StructureState) => void) => Promise<{
7
+ unsubscribe: () => void;
8
+ }>;
9
+ stop: () => Promise<void>;
10
+ } & {
11
+ [key in keyof CommandTypes]: (payload: CommandTypes[key], expectedVersion?: number) => Promise<StructureState>;
12
+ };
13
+ export type StructureState = {
14
+ state: StructureAggregateType;
15
+ version: number;
16
+ };
17
+ export type StructureCommittedEventType = CommittedEvent<StructureAggregateType & {
18
+ change: {
19
+ broker: {
20
+ host: string;
21
+ };
22
+ service: {
23
+ host: string;
24
+ };
25
+ subscriptions: {
26
+ subscriptions: Record<string, number>;
27
+ };
28
+ };
29
+ }>;
30
+ export declare const StructureServiceSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
31
+ port?: number | undefined;
32
+ channel?: "http" | "tcp" | "local" | undefined;
33
+ isExternal?: boolean | undefined;
34
+ possibleSubscriptions?: string[] | undefined;
35
+ possibleModules?: {
36
+ [x: string]: string[];
37
+ } | undefined;
38
+ isService?: boolean | undefined;
39
+ isBroker?: boolean | undefined;
40
+ endpoints?: string[] | undefined;
41
+ openApiEndpoint?: string | undefined;
42
+ produces?: {
43
+ [x: string]: string[];
44
+ } | undefined;
45
+ consumes?: {
46
+ [x: string]: string[];
47
+ } | undefined;
48
+ hosts: string[];
49
+ }, true>;
50
+ export type StructureServiceType = typeof StructureServiceSchema.type;
51
+ export declare const RetryableStatuses: number[];
52
+ export declare const StructureSubscriptionSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
53
+ events?: string[] | undefined;
54
+ endpoint?: string | undefined;
55
+ load?: number | undefined;
56
+ eventstore?: string | undefined;
57
+ manualDataSplits?: number | undefined;
58
+ mirrorDataSplitsWithConsumers?: boolean | undefined;
59
+ customDataSplits?: string[][] | undefined;
60
+ 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
+ consumer: string;
71
+ }, true>;
72
+ export type StructureSubscriptionType = typeof StructureSubscriptionSchema.type;
73
+ export declare const StructureBrokerSubscriptionSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
74
+ custom?: string[] | undefined;
75
+ host: string;
76
+ index: number;
77
+ }, true>;
78
+ export type StructureBrokerSubscriptionType = typeof StructureBrokerSubscriptionSchema.type;
79
+ export declare const StructureBrokerSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
80
+ subscriptions: {
81
+ [x: string]: {
82
+ [x: string]: {
83
+ custom?: string[] | undefined;
84
+ host: string;
85
+ index: number;
86
+ };
87
+ };
88
+ };
89
+ host: string;
90
+ }, true>;
91
+ export type StructureBrokerType = typeof StructureBrokerSchema.type;
92
+ export declare const StructureSubscriptionsSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
93
+ [x: string]: {
94
+ events?: string[] | undefined;
95
+ endpoint?: string | undefined;
96
+ load?: number | undefined;
97
+ eventstore?: string | undefined;
98
+ manualDataSplits?: number | undefined;
99
+ mirrorDataSplitsWithConsumers?: boolean | undefined;
100
+ customDataSplits?: string[][] | undefined;
101
+ 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
+ consumer: string;
112
+ };
113
+ }, true>;
114
+ export declare const StructureServicesSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
115
+ [x: string]: {
116
+ port?: number | undefined;
117
+ channel?: "http" | "tcp" | "local" | undefined;
118
+ isExternal?: boolean | undefined;
119
+ possibleSubscriptions?: string[] | undefined;
120
+ possibleModules?: {
121
+ [x: string]: string[];
122
+ } | undefined;
123
+ isService?: boolean | undefined;
124
+ isBroker?: boolean | undefined;
125
+ endpoints?: string[] | undefined;
126
+ openApiEndpoint?: string | undefined;
127
+ produces?: {
128
+ [x: string]: string[];
129
+ } | undefined;
130
+ consumes?: {
131
+ [x: string]: string[];
132
+ } | undefined;
133
+ hosts: string[];
134
+ };
135
+ }, true>;
136
+ export type StructureServicesType = typeof StructureServicesSchema.type;
137
+ export declare const StructureBrokersSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
138
+ [x: string]: import("Object/Omit")._Omit<{
139
+ subscriptions: {
140
+ [x: string]: {
141
+ [x: string]: {
142
+ custom?: string[] | undefined;
143
+ host: string;
144
+ index: number;
145
+ };
146
+ };
147
+ };
148
+ host: string;
149
+ }, "host">;
150
+ }, true>;
151
+ export declare const StructureAggregateSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
152
+ subscriptions: {
153
+ [x: string]: {
154
+ events?: string[] | undefined;
155
+ endpoint?: string | undefined;
156
+ load?: number | undefined;
157
+ eventstore?: string | undefined;
158
+ manualDataSplits?: number | undefined;
159
+ mirrorDataSplitsWithConsumers?: boolean | undefined;
160
+ customDataSplits?: string[][] | undefined;
161
+ 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
+ consumer: string;
172
+ };
173
+ };
174
+ services: {
175
+ [x: string]: {
176
+ port?: number | undefined;
177
+ channel?: "http" | "tcp" | "local" | undefined;
178
+ isExternal?: boolean | undefined;
179
+ possibleSubscriptions?: string[] | undefined;
180
+ possibleModules?: {
181
+ [x: string]: string[];
182
+ } | undefined;
183
+ isService?: boolean | undefined;
184
+ isBroker?: boolean | undefined;
185
+ endpoints?: string[] | undefined;
186
+ openApiEndpoint?: string | undefined;
187
+ produces?: {
188
+ [x: string]: string[];
189
+ } | undefined;
190
+ consumes?: {
191
+ [x: string]: string[];
192
+ } | undefined;
193
+ hosts: string[];
194
+ };
195
+ };
196
+ brokers: {
197
+ [x: string]: import("Object/Omit")._Omit<{
198
+ subscriptions: {
199
+ [x: string]: {
200
+ [x: string]: {
201
+ custom?: string[] | undefined;
202
+ host: string;
203
+ index: number;
204
+ };
205
+ };
206
+ };
207
+ host: string;
208
+ }, "host">;
209
+ };
210
+ clusterRevision: number;
211
+ servicesRevisionAck: string[];
212
+ }, true>;
213
+ export type StructureAggregateType = typeof StructureAggregateSchema.type;
214
+ export declare const AddSubscriptionsCommandSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
215
+ doNotRebalance?: boolean | undefined;
216
+ subscriptions: {
217
+ [x: string]: {
218
+ events?: string[] | undefined;
219
+ endpoint?: string | undefined;
220
+ load?: number | undefined;
221
+ eventstore?: string | undefined;
222
+ manualDataSplits?: number | undefined;
223
+ mirrorDataSplitsWithConsumers?: boolean | undefined;
224
+ customDataSplits?: string[][] | undefined;
225
+ 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
+ consumer: string;
236
+ };
237
+ };
238
+ }, true>;
239
+ export declare const EditSubscriptionCommandSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
240
+ doNotRebalance?: boolean | undefined;
241
+ 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;
246
+ 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>;
256
+ dataSplits?: import("Object/Optional").OptionalDeep<{
257
+ custom?: (string | undefined)[] | undefined;
258
+ manual?: (string | undefined)[] | undefined;
259
+ automatic?: (string | undefined)[] | undefined;
260
+ } | undefined>;
261
+ };
262
+ }, true>;
263
+ export declare const DeleteSubscriptionCommandSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
264
+ doNotRebalance?: boolean | undefined;
265
+ id: string;
266
+ }, true>;
267
+ export declare const UpsertHostCommandSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
268
+ port?: number | undefined;
269
+ channel?: "http" | "tcp" | "local" | undefined;
270
+ isExternal?: boolean | undefined;
271
+ possibleSubscriptions?: string[] | undefined;
272
+ possibleModules?: {
273
+ [x: string]: string[];
274
+ } | undefined;
275
+ isService?: boolean | undefined;
276
+ isBroker?: boolean | undefined;
277
+ endpoints?: string[] | undefined;
278
+ openApiEndpoint?: string | undefined;
279
+ produces?: {
280
+ [x: string]: string[];
281
+ } | undefined;
282
+ consumes?: {
283
+ [x: string]: string[];
284
+ } | undefined;
285
+ host: string;
286
+ doNotRebalance?: boolean | undefined;
287
+ service: string;
288
+ }, true>;
289
+ export type UpsertHostCommandType = typeof UpsertHostCommandSchema.type;
290
+ export declare const RemoveHostCommandSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
291
+ host: string;
292
+ }, true>;
293
+ export declare const SetStructureUpsertHostCommandSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
294
+ port?: number | undefined;
295
+ channel?: "http" | "tcp" | "local" | undefined;
296
+ isExternal?: boolean | undefined;
297
+ possibleSubscriptions?: string[] | undefined;
298
+ possibleModules?: {
299
+ [x: string]: string[];
300
+ } | undefined;
301
+ isService?: boolean | undefined;
302
+ isBroker?: boolean | undefined;
303
+ endpoints?: string[] | undefined;
304
+ openApiEndpoint?: string | undefined;
305
+ produces?: {
306
+ [x: string]: string[];
307
+ } | undefined;
308
+ consumes?: {
309
+ [x: string]: string[];
310
+ } | undefined;
311
+ hosts: string[];
312
+ service: string;
313
+ }, true>;
314
+ 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;
337
+ upsertHosts: {
338
+ port?: number | undefined;
339
+ channel?: "http" | "tcp" | "local" | undefined;
340
+ isExternal?: boolean | undefined;
341
+ possibleSubscriptions?: string[] | undefined;
342
+ possibleModules?: {
343
+ [x: string]: string[];
344
+ } | undefined;
345
+ isService?: boolean | undefined;
346
+ isBroker?: boolean | undefined;
347
+ endpoints?: string[] | undefined;
348
+ openApiEndpoint?: string | undefined;
349
+ produces?: {
350
+ [x: string]: string[];
351
+ } | undefined;
352
+ consumes?: {
353
+ [x: string]: string[];
354
+ } | undefined;
355
+ host: string;
356
+ doNotRebalance?: boolean | undefined;
357
+ service: string;
358
+ }[];
359
+ removeHosts: string[];
360
+ }, true>;
361
+ export declare const RebalanceSubscriptionsCommandSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
362
+ [x: string]: import("Object/Omit")._Omit<{
363
+ subscriptions: {
364
+ [x: string]: {
365
+ [x: string]: {
366
+ custom?: string[] | undefined;
367
+ host: string;
368
+ index: number;
369
+ };
370
+ };
371
+ };
372
+ host: string;
373
+ }, "host">;
374
+ }, true>;
375
+ export type RebalanceSubscriptionsCommandType = typeof RebalanceSubscriptionsCommandSchema.type;
376
+ export declare const RemoveBrokerCommandSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
377
+ host: string;
378
+ }, true>;
379
+ export declare const AckStructureSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
380
+ host: string;
381
+ revision: number;
382
+ }, true>;
383
+ export type CommandTypes = {
384
+ UpsertHost: typeof UpsertHostCommandSchema.type;
385
+ RemoveHost: typeof RemoveHostCommandSchema.type;
386
+ RebalanceSubscriptions: typeof RebalanceSubscriptionsCommandSchema.type;
387
+ AddSubscriptions: typeof AddSubscriptionsCommandSchema.type;
388
+ EditSubscription: typeof EditSubscriptionCommandSchema.type;
389
+ DeleteSubscription: typeof DeleteSubscriptionCommandSchema.type;
390
+ SetStructure: typeof SetStructureCommandSchema.type;
391
+ AckStructure: typeof AckStructureSchema.type;
392
+ };
393
+ 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;
410
+ services: {
411
+ [x: string]: {
412
+ port?: number | undefined;
413
+ channel?: "http" | "tcp" | "local" | undefined;
414
+ isExternal?: boolean | undefined;
415
+ possibleSubscriptions?: string[] | undefined;
416
+ possibleModules?: {
417
+ [x: string]: string[];
418
+ } | undefined;
419
+ isService?: boolean | undefined;
420
+ isBroker?: boolean | undefined;
421
+ endpoints?: string[] | undefined;
422
+ openApiEndpoint?: string | undefined;
423
+ produces?: {
424
+ [x: string]: string[];
425
+ } | undefined;
426
+ consumes?: {
427
+ [x: string]: string[];
428
+ } | undefined;
429
+ hosts: string[];
430
+ };
431
+ };
432
+ }, any>;
433
+ HostRemoved: () => import("@bett3r-dev/pv3-types").EventInstance<{
434
+ host: string;
435
+ brokers: {
436
+ [x: string]: import("Object/Omit")._Omit<{
437
+ subscriptions: {
438
+ [x: string]: {
439
+ [x: string]: {
440
+ custom?: string[] | undefined;
441
+ host: string;
442
+ index: number;
443
+ };
444
+ };
445
+ };
446
+ host: string;
447
+ }, "host">;
448
+ };
449
+ service: string;
450
+ }, any>;
451
+ SubscriptionsRebalanced: () => import("@bett3r-dev/pv3-types").EventInstance<{
452
+ brokers: {
453
+ [x: string]: import("Object/Omit")._Omit<{
454
+ subscriptions: {
455
+ [x: string]: {
456
+ [x: string]: {
457
+ custom?: string[] | undefined;
458
+ host: string;
459
+ index: number;
460
+ };
461
+ };
462
+ };
463
+ host: string;
464
+ }, "host">;
465
+ };
466
+ }, any>;
467
+ SubscriptionsAdded: () => import("@bett3r-dev/pv3-types").EventInstance<{
468
+ brokers?: {
469
+ [x: string]: import("Object/Omit")._Omit<{
470
+ subscriptions: {
471
+ [x: string]: {
472
+ [x: string]: {
473
+ custom?: string[] | undefined;
474
+ host: string;
475
+ index: number;
476
+ };
477
+ };
478
+ };
479
+ host: string;
480
+ }, "host">;
481
+ } | undefined;
482
+ doNotRebalance?: boolean | undefined;
483
+ subscriptions: {
484
+ [x: string]: {
485
+ events?: string[] | undefined;
486
+ endpoint?: string | undefined;
487
+ load?: number | undefined;
488
+ eventstore?: string | undefined;
489
+ manualDataSplits?: number | undefined;
490
+ mirrorDataSplitsWithConsumers?: boolean | undefined;
491
+ customDataSplits?: string[][] | undefined;
492
+ 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
+ consumer: string;
503
+ };
504
+ };
505
+ }, any>;
506
+ SubscriptionEdited: () => import("@bett3r-dev/pv3-types").EventInstance<{
507
+ brokers?: {
508
+ [x: string]: import("Object/Omit")._Omit<{
509
+ subscriptions: {
510
+ [x: string]: {
511
+ [x: string]: {
512
+ custom?: string[] | undefined;
513
+ host: string;
514
+ index: number;
515
+ };
516
+ };
517
+ };
518
+ host: string;
519
+ }, "host">;
520
+ } | undefined;
521
+ doNotRebalance?: boolean | undefined;
522
+ subscriptions: {
523
+ [x: string]: {
524
+ events?: string[] | undefined;
525
+ endpoint?: string | undefined;
526
+ load?: number | undefined;
527
+ eventstore?: string | undefined;
528
+ manualDataSplits?: number | undefined;
529
+ mirrorDataSplitsWithConsumers?: boolean | undefined;
530
+ customDataSplits?: string[][] | undefined;
531
+ 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
+ consumer: string;
542
+ };
543
+ };
544
+ }, any>;
545
+ SubscriptionDeleted: () => import("@bett3r-dev/pv3-types").EventInstance<{
546
+ brokers?: {
547
+ [x: string]: import("Object/Omit")._Omit<{
548
+ subscriptions: {
549
+ [x: string]: {
550
+ [x: string]: {
551
+ custom?: string[] | undefined;
552
+ host: string;
553
+ index: number;
554
+ };
555
+ };
556
+ };
557
+ host: string;
558
+ }, "host">;
559
+ } | undefined;
560
+ doNotRebalance?: boolean | undefined;
561
+ id: string;
562
+ }, any>;
563
+ StructureSet: () => import("@bett3r-dev/pv3-types").EventInstance<{
564
+ subscriptions: {
565
+ [x: string]: {
566
+ events?: string[] | undefined;
567
+ endpoint?: string | undefined;
568
+ load?: number | undefined;
569
+ eventstore?: string | undefined;
570
+ manualDataSplits?: number | undefined;
571
+ mirrorDataSplitsWithConsumers?: boolean | undefined;
572
+ customDataSplits?: string[][] | undefined;
573
+ streams?: string | undefined;
574
+ retryAfterSecs?: number | undefined;
575
+ retryableStatuses?: number[] | undefined;
576
+ dataSplits?: {
577
+ custom?: (string | undefined)[] | undefined;
578
+ manual?: (string | undefined)[] | undefined;
579
+ automatic?: (string | undefined)[] | undefined;
580
+ } | undefined;
581
+ producers: string[];
582
+ module: string;
583
+ consumer: string;
584
+ };
585
+ };
586
+ services: {
587
+ [x: string]: {
588
+ port?: number | undefined;
589
+ channel?: "http" | "tcp" | "local" | undefined;
590
+ isExternal?: boolean | undefined;
591
+ possibleSubscriptions?: string[] | undefined;
592
+ possibleModules?: {
593
+ [x: string]: string[];
594
+ } | undefined;
595
+ isService?: boolean | undefined;
596
+ isBroker?: boolean | undefined;
597
+ endpoints?: string[] | undefined;
598
+ openApiEndpoint?: string | undefined;
599
+ produces?: {
600
+ [x: string]: string[];
601
+ } | undefined;
602
+ consumes?: {
603
+ [x: string]: string[];
604
+ } | undefined;
605
+ hosts: string[];
606
+ };
607
+ };
608
+ brokers: {
609
+ [x: string]: import("Object/Omit")._Omit<{
610
+ subscriptions: {
611
+ [x: string]: {
612
+ [x: string]: {
613
+ custom?: string[] | undefined;
614
+ host: string;
615
+ index: number;
616
+ };
617
+ };
618
+ };
619
+ host: string;
620
+ }, "host">;
621
+ };
622
+ clusterRevision: number;
623
+ servicesRevisionAck: string[];
624
+ }, any>;
625
+ StructureAcked: () => import("@bett3r-dev/pv3-types").EventInstance<{
626
+ host: string;
627
+ revision: number;
628
+ }, any>;
629
+ };
630
+ export declare const ClusterRoutesConfigSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
631
+ clusterRoutesAggregateCollection?: string | undefined;
632
+ clusterRoutesEventstoreCollection?: string | undefined;
633
+ clusterRoutesEventstoreStream?: string | undefined;
634
+ }, true>;
635
+ export type ClusterRoutesConfigType = typeof ClusterRoutesConfigSchema.type;
636
+ export declare const ClusterStructureConfigSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
637
+ structureEventstoreStream?: string | undefined;
638
+ structureAggregateCollection?: string | undefined;
639
+ structureEventstoreCollection?: string | undefined;
640
+ }, true>;
641
+ export type ClusterStructureConfigType = typeof ClusterStructureConfigSchema.type;
642
+ //# sourceMappingURL=clusterAdministration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clusterAdministration.d.ts","sourceRoot":"","sources":["../src/clusterAdministration.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAS,MAAM,uBAAuB,CAAC;AAE9D,MAAM,MAAM,oBAAoB,GAAG;IACjC,eAAe,EAAE,CAAE,EAAE,CAAC,EAAE,MAAM,KAAM,OAAO,CAAC,cAAc,CAAC,CAAC;IAC5D,oBAAoB,EAAE,CAAE,OAAO,EAAC,MAAM,KAAM,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC3E,2BAA2B,EAAE,CAAE,kBAAkB,EAAE,CAAE,MAAM,EAAE,cAAc,KAAM,IAAI,KAAM,OAAO,CAAC;QAAE,WAAW,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC,CAAC;IAChI,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B,GAAG;KACD,GAAG,IAAI,MAAM,YAAY,GAAG,CAAE,OAAO,EAAE,YAAY,CAAC,GAA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