@kronos-ts/axon-server 0.4.0 → 0.5.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 (84) hide show
  1. package/dist/axon-server-event-store.d.ts +0 -16
  2. package/dist/axon-server-event-store.d.ts.map +1 -1
  3. package/dist/axon-server-event-store.js +47 -14
  4. package/dist/axon-server-event-store.js.map +1 -1
  5. package/dist/axon-server-snapshotting-event-store.d.ts +30 -0
  6. package/dist/axon-server-snapshotting-event-store.d.ts.map +1 -0
  7. package/dist/axon-server-snapshotting-event-store.js +153 -0
  8. package/dist/axon-server-snapshotting-event-store.js.map +1 -0
  9. package/dist/axon-server.d.ts +33 -60
  10. package/dist/axon-server.d.ts.map +1 -1
  11. package/dist/axon-server.js +58 -59
  12. package/dist/axon-server.js.map +1 -1
  13. package/dist/connection-manager.d.ts +2 -2
  14. package/dist/connection-manager.d.ts.map +1 -1
  15. package/dist/connection.d.ts +23 -21
  16. package/dist/connection.d.ts.map +1 -1
  17. package/dist/connection.js +6 -5
  18. package/dist/connection.js.map +1 -1
  19. package/dist/context-view.d.ts +2 -2
  20. package/dist/context-view.d.ts.map +1 -1
  21. package/dist/control-plane.d.ts +5 -5
  22. package/dist/control-plane.d.ts.map +1 -1
  23. package/dist/event-processor-info.d.ts +4 -4
  24. package/dist/event-processor-info.d.ts.map +1 -1
  25. package/dist/flow-controlled-sender.d.ts +2 -2
  26. package/dist/flow-controlled-sender.d.ts.map +1 -1
  27. package/dist/generated/command.d.ts +20 -20
  28. package/dist/generated/command.d.ts.map +1 -1
  29. package/dist/generated/common.d.ts +20 -20
  30. package/dist/generated/common.d.ts.map +1 -1
  31. package/dist/generated/control.d.ts +36 -40
  32. package/dist/generated/control.d.ts.map +1 -1
  33. package/dist/generated/dcb.d.ts +88 -94
  34. package/dist/generated/dcb.d.ts.map +1 -1
  35. package/dist/generated/event.d.ts +81 -84
  36. package/dist/generated/event.d.ts.map +1 -1
  37. package/dist/generated/google/protobuf/empty.d.ts +3 -4
  38. package/dist/generated/google/protobuf/empty.d.ts.map +1 -1
  39. package/dist/generated/query.d.ts +40 -40
  40. package/dist/generated/query.d.ts.map +1 -1
  41. package/dist/index.d.ts +1 -1
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +1 -1
  44. package/dist/index.js.map +1 -1
  45. package/dist/message-size.d.ts +2 -2
  46. package/dist/message-size.d.ts.map +1 -1
  47. package/dist/outbound-stream.d.ts +2 -2
  48. package/dist/outbound-stream.d.ts.map +1 -1
  49. package/dist/platform-service.d.ts +4 -4
  50. package/dist/platform-service.d.ts.map +1 -1
  51. package/dist/resilience.d.ts +62 -0
  52. package/dist/resilience.d.ts.map +1 -0
  53. package/dist/resilience.js +103 -0
  54. package/dist/resilience.js.map +1 -0
  55. package/dist/shutdown-latch.d.ts +4 -4
  56. package/dist/shutdown-latch.d.ts.map +1 -1
  57. package/package.json +3 -3
  58. package/src/axon-server-event-store.ts +46 -14
  59. package/src/axon-server-snapshotting-event-store.ts +191 -0
  60. package/src/axon-server.ts +72 -77
  61. package/src/connection-manager.ts +1 -1
  62. package/src/connection.ts +16 -14
  63. package/src/context-view.ts +1 -1
  64. package/src/control-plane.ts +3 -3
  65. package/src/event-processor-info.ts +2 -2
  66. package/src/flow-controlled-sender.ts +1 -1
  67. package/src/generated/command.ts +10 -10
  68. package/src/generated/common.ts +10 -10
  69. package/src/generated/control.ts +20 -20
  70. package/src/generated/dcb.ts +47 -47
  71. package/src/generated/event.ts +42 -42
  72. package/src/generated/google/protobuf/empty.ts +2 -2
  73. package/src/generated/query.ts +20 -20
  74. package/src/index.ts +1 -1
  75. package/src/message-size.ts +1 -1
  76. package/src/outbound-stream.ts +1 -1
  77. package/src/platform-service.ts +2 -2
  78. package/src/resilience.ts +149 -0
  79. package/src/shutdown-latch.ts +2 -2
  80. package/dist/axon-server-snapshot-store.d.ts +0 -12
  81. package/dist/axon-server-snapshot-store.d.ts.map +0 -1
  82. package/dist/axon-server-snapshot-store.js +0 -82
  83. package/dist/axon-server-snapshot-store.js.map +0 -1
  84. package/src/axon-server-snapshot-store.ts +0 -110
@@ -63,11 +63,11 @@ export function transformationStateToJSON(object: TransformationState): string {
63
63
  }
64
64
 
65
65
  /** Request to compact event store. */
66
- export interface CompactionRequest {
66
+ export type CompactionRequest = {
67
67
  }
68
68
 
69
69
  /** The transformation data. */
70
- export interface Transformation {
70
+ export type Transformation = {
71
71
  /** The identifier of the transformation. */
72
72
  transformationId:
73
73
  | TransformationId
@@ -89,13 +89,13 @@ export interface Transformation {
89
89
  }
90
90
 
91
91
  /** Request to start a transformation */
92
- export interface StartTransformationRequest {
92
+ export type StartTransformationRequest = {
93
93
  /** A description of the purpose of this transformation, for reference only */
94
94
  description: string;
95
95
  }
96
96
 
97
97
  /** Request to apply a transformation */
98
- export interface ApplyTransformationRequest {
98
+ export type ApplyTransformationRequest = {
99
99
  /** The identification of the transformation */
100
100
  transformationId:
101
101
  | TransformationId
@@ -105,7 +105,7 @@ export interface ApplyTransformationRequest {
105
105
  }
106
106
 
107
107
  /** Message containing one event to transform within a transformation */
108
- export interface TransformRequest {
108
+ export type TransformRequest = {
109
109
  /** The identification of the transformation */
110
110
  transformationId:
111
111
  | TransformationId
@@ -121,7 +121,7 @@ export interface TransformRequest {
121
121
  }
122
122
 
123
123
  /** Replaces the content of an event with the new content */
124
- export interface TransformedEvent {
124
+ export type TransformedEvent = {
125
125
  /** The global index of the event to replace */
126
126
  token: bigint;
127
127
  /** The new content of the event */
@@ -129,25 +129,25 @@ export interface TransformedEvent {
129
129
  }
130
130
 
131
131
  /** Deletes the content of an event */
132
- export interface DeletedEvent {
132
+ export type DeletedEvent = {
133
133
  /** The global index of the event to clear */
134
134
  token: bigint;
135
135
  }
136
136
 
137
137
  /** Uniquely identifies a transformation */
138
- export interface TransformationId {
138
+ export type TransformationId = {
139
139
  /** The value of the identifier. */
140
140
  id: string;
141
141
  }
142
142
 
143
143
  /** Acknowledgement that event with given token has been transformed successfully */
144
- export interface TransformRequestAck {
144
+ export type TransformRequestAck = {
145
145
  /** The sequence of the transformation request */
146
146
  sequence: bigint;
147
147
  }
148
148
 
149
149
  /** Request message to schedule an event */
150
- export interface ScheduleEventRequest {
150
+ export type ScheduleEventRequest = {
151
151
  /** timestamp when to publish the event */
152
152
  instant: bigint;
153
153
  /** the event to publish */
@@ -155,7 +155,7 @@ export interface ScheduleEventRequest {
155
155
  }
156
156
 
157
157
  /** Request message to reschedule an event */
158
- export interface RescheduleEventRequest {
158
+ export type RescheduleEventRequest = {
159
159
  /** optional token of scheduled event to cancel */
160
160
  token: string;
161
161
  /** timestamp when to publish the event */
@@ -165,39 +165,39 @@ export interface RescheduleEventRequest {
165
165
  }
166
166
 
167
167
  /** Request message to cancel an event */
168
- export interface CancelScheduledEventRequest {
168
+ export type CancelScheduledEventRequest = {
169
169
  /** token of scheduled event to cancel */
170
170
  token: string;
171
171
  }
172
172
 
173
173
  /** Token to manage a scheduled event */
174
- export interface ScheduleToken {
174
+ export type ScheduleToken = {
175
175
  /** Field defining the token identifier */
176
176
  token: string;
177
177
  }
178
178
 
179
179
  /** Request message to receive the first Token (Tail Token) of the Event Stream */
180
- export interface GetFirstTokenRequest {
180
+ export type GetFirstTokenRequest = {
181
181
  }
182
182
 
183
183
  /** Request message to receive the last Token (Head Token) of the Event Stream */
184
- export interface GetLastTokenRequest {
184
+ export type GetLastTokenRequest = {
185
185
  }
186
186
 
187
187
  /** Request message to receive the Token that starts streaming events from the given timestamp */
188
- export interface GetTokenAtRequest {
188
+ export type GetTokenAtRequest = {
189
189
  /** Timestamp expressed as milliseconds since epoch */
190
190
  instant: bigint;
191
191
  }
192
192
 
193
193
  /** Message containing the information necessary to track the position of events in the Event Stream */
194
- export interface TrackingToken {
194
+ export type TrackingToken = {
195
195
  /** The value of the Token */
196
196
  token: bigint;
197
197
  }
198
198
 
199
199
  /** Message wrapping an Event and a Tracking Token */
200
- export interface EventWithToken {
200
+ export type EventWithToken = {
201
201
  /** The Token representing the position of this Event in the Stream */
202
202
  token: bigint;
203
203
  /** The actual Event Message */
@@ -205,7 +205,7 @@ export interface EventWithToken {
205
205
  }
206
206
 
207
207
  /** Message providing the parameters for executing a Query against AxonServer. */
208
- export interface QueryEventsRequest {
208
+ export type QueryEventsRequest = {
209
209
  /** The query to execute against the Event Stream */
210
210
  query: string;
211
211
  /** The number of results AxonServer may send before new permits need to be provided */
@@ -227,7 +227,7 @@ export interface QueryEventsRequest {
227
227
  }
228
228
 
229
229
  /** A message describing a response to a Query request */
230
- export interface QueryEventsResponse {
230
+ export type QueryEventsResponse = {
231
231
  /** Provided when the response contains the names of the columns the response contains. This message typically arrives first. */
232
232
  columns?:
233
233
  | ColumnsResponse
@@ -241,13 +241,13 @@ export interface QueryEventsResponse {
241
241
  }
242
242
 
243
243
  /** Message containing the names of the columns returned in a Query */
244
- export interface ColumnsResponse {
244
+ export type ColumnsResponse = {
245
245
  /** The names of the columns provided in the query */
246
246
  column: string[];
247
247
  }
248
248
 
249
249
  /** Message providing Query Result data */
250
- export interface RowResponse {
250
+ export type RowResponse = {
251
251
  /** The values which, when combined, uniquely update this row. Any previously received values with the same identifiers should be replaced with this value */
252
252
  idValues: QueryValue[];
253
253
  /** The sorting values to use when sorting this response compared to the others. */
@@ -256,13 +256,13 @@ export interface RowResponse {
256
256
  values: { [key: string]: QueryValue };
257
257
  }
258
258
 
259
- export interface RowResponse_ValuesEntry {
259
+ export type RowResponse_ValuesEntry = {
260
260
  key: string;
261
261
  value: QueryValue | undefined;
262
262
  }
263
263
 
264
264
  /** Describes the combination of an Aggregate Identifier and first expected Sequence number when opening an Aggregate-specific Event Stream */
265
- export interface ReadHighestSequenceNrRequest {
265
+ export type ReadHighestSequenceNrRequest = {
266
266
  /** The Identifier of the Aggregate for which to load events */
267
267
  aggregateId: string;
268
268
  /** The Sequence Number of the first event expected */
@@ -270,13 +270,13 @@ export interface ReadHighestSequenceNrRequest {
270
270
  }
271
271
 
272
272
  /** The highest Sequence Number found for the provided request */
273
- export interface ReadHighestSequenceNrResponse {
273
+ export type ReadHighestSequenceNrResponse = {
274
274
  /** The sequence number of the latest event */
275
275
  toSequenceNr: bigint;
276
276
  }
277
277
 
278
278
  /** A confirmation to a request from the client */
279
- export interface Confirmation {
279
+ export type Confirmation = {
280
280
  /** True when successful, otherwise false */
281
281
  success: boolean;
282
282
  }
@@ -285,7 +285,7 @@ export interface Confirmation {
285
285
  * A confirmation to a request from the client, including an optional consistency marker to track the position of this confirmation in the Event Stream.
286
286
  * The consistency_marker is only set for AppendEvent requests towards a DCB context.
287
287
  */
288
- export interface ConfirmationWithConsistencyMarker {
288
+ export type ConfirmationWithConsistencyMarker = {
289
289
  /** True when successful, otherwise false */
290
290
  success: boolean;
291
291
  /** The consistency marker token */
@@ -293,13 +293,13 @@ export interface ConfirmationWithConsistencyMarker {
293
293
  }
294
294
 
295
295
  /** A marker to track the position of a Confirmation in the Event Stream, used for consistency tracking in DCB contexts */
296
- export interface ConsistencyMarker {
296
+ export type ConsistencyMarker = {
297
297
  /** The token representing the position of this marker in the Stream */
298
298
  token: bigint;
299
299
  }
300
300
 
301
301
  /** Request describing the desire to read events for a specific Aggregate */
302
- export interface GetAggregateEventsRequest {
302
+ export type GetAggregateEventsRequest = {
303
303
  /** The identifier of the aggregate to read events for */
304
304
  aggregateId: string;
305
305
  /** The sequence number of the first event to receive */
@@ -313,7 +313,7 @@ export interface GetAggregateEventsRequest {
313
313
  }
314
314
 
315
315
  /** Request message to retrieve Snapshot Events for a specific Aggregate instance */
316
- export interface GetAggregateSnapshotsRequest {
316
+ export type GetAggregateSnapshotsRequest = {
317
317
  /** The identifier to fetch the snapshots for */
318
318
  aggregateId: string;
319
319
  /** The minimal sequence number of the snapshots to retrieve */
@@ -325,7 +325,7 @@ export interface GetAggregateSnapshotsRequest {
325
325
  }
326
326
 
327
327
  /** Request message to open an Event Stream from the Event Store. */
328
- export interface GetEventsRequest {
328
+ export type GetEventsRequest = {
329
329
  /** The token to start streaming from */
330
330
  trackingToken: bigint;
331
331
  /** The number of messages the server may send before it needs to wait for more permits */
@@ -353,7 +353,7 @@ export interface GetEventsRequest {
353
353
  }
354
354
 
355
355
  /** Message containing the information of an Event */
356
- export interface Event {
356
+ export type Event = {
357
357
  /** The unique identifier of this event */
358
358
  messageIdentifier: string;
359
359
  /** The identifier of the Aggregate instance that published this event, if any */
@@ -374,13 +374,13 @@ export interface Event {
374
374
  snapshot: boolean;
375
375
  }
376
376
 
377
- export interface Event_MetaDataEntry {
377
+ export type Event_MetaDataEntry = {
378
378
  key: string;
379
379
  value: MetaDataValue | undefined;
380
380
  }
381
381
 
382
382
  /** Value used in Query Responses to represent a value in its original type */
383
- export interface QueryValue {
383
+ export type QueryValue = {
384
384
  /** The text value */
385
385
  textValue?:
386
386
  | string
@@ -398,7 +398,7 @@ export interface QueryValue {
398
398
  }
399
399
 
400
400
  /** Description of a Payload Type */
401
- export interface PayloadDescription {
401
+ export type PayloadDescription = {
402
402
  /** The type identifier of the Payload */
403
403
  type: string;
404
404
  /** The revision of the Payload Type */
@@ -3745,7 +3745,7 @@ export const EventStoreDefinition = {
3745
3745
  },
3746
3746
  } as const;
3747
3747
 
3748
- export interface EventStoreServiceImplementation<CallContextExt = {}> {
3748
+ export type EventStoreServiceImplementation<CallContextExt = {}> = {
3749
3749
  /** Accepts a stream of Events returning a Confirmation when completed. */
3750
3750
  appendEvent(
3751
3751
  request: AsyncIterable<Event>,
@@ -3799,7 +3799,7 @@ export interface EventStoreServiceImplementation<CallContextExt = {}> {
3799
3799
  getTokenAt(request: GetTokenAtRequest, context: CallContext & CallContextExt): Promise<DeepPartial<TrackingToken>>;
3800
3800
  }
3801
3801
 
3802
- export interface EventStoreClient<CallOptionsExt = {}> {
3802
+ export type EventStoreClient<CallOptionsExt = {}> = {
3803
3803
  /** Accepts a stream of Events returning a Confirmation when completed. */
3804
3804
  appendEvent(
3805
3805
  request: AsyncIterable<DeepPartial<Event>>,
@@ -3889,7 +3889,7 @@ export const EventSchedulerDefinition = {
3889
3889
  },
3890
3890
  } as const;
3891
3891
 
3892
- export interface EventSchedulerServiceImplementation<CallContextExt = {}> {
3892
+ export type EventSchedulerServiceImplementation<CallContextExt = {}> = {
3893
3893
  /** Schedule the given event for publication at the given time}. The returned ScheduleToken can be used to cancel the planned publication. */
3894
3894
  scheduleEvent(
3895
3895
  request: ScheduleEventRequest,
@@ -3907,7 +3907,7 @@ export interface EventSchedulerServiceImplementation<CallContextExt = {}> {
3907
3907
  ): Promise<DeepPartial<InstructionAck>>;
3908
3908
  }
3909
3909
 
3910
- export interface EventSchedulerClient<CallOptionsExt = {}> {
3910
+ export type EventSchedulerClient<CallOptionsExt = {}> = {
3911
3911
  /** Schedule the given event for publication at the given time}. The returned ScheduleToken can be used to cancel the planned publication. */
3912
3912
  scheduleEvent(
3913
3913
  request: DeepPartial<ScheduleEventRequest>,
@@ -3988,7 +3988,7 @@ export const EventTransformationServiceDefinition = {
3988
3988
  },
3989
3989
  } as const;
3990
3990
 
3991
- export interface EventTransformationServiceImplementation<CallContextExt = {}> {
3991
+ export type EventTransformationServiceImplementation<CallContextExt = {}> = {
3992
3992
  /** Returns the list of all transformations. */
3993
3993
  transformations(
3994
3994
  request: Empty,
@@ -4021,7 +4021,7 @@ export interface EventTransformationServiceImplementation<CallContextExt = {}> {
4021
4021
  ): ServerStreamingMethodResult<DeepPartial<Empty>>;
4022
4022
  }
4023
4023
 
4024
- export interface EventTransformationServiceClient<CallOptionsExt = {}> {
4024
+ export type EventTransformationServiceClient<CallOptionsExt = {}> = {
4025
4025
  /** Returns the list of all transformations. */
4026
4026
  transformations(request: DeepPartial<Empty>, options?: CallOptions & CallOptionsExt): AsyncIterable<Transformation>;
4027
4027
  /** Starts a new transformation. */
@@ -4066,7 +4066,7 @@ function isSet(value: any): boolean {
4066
4066
 
4067
4067
  export type ServerStreamingMethodResult<Response> = { [Symbol.asyncIterator](): AsyncIterator<Response, void> };
4068
4068
 
4069
- export interface MessageFns<T> {
4069
+ export type MessageFns<T> = {
4070
4070
  encode(message: T, writer?: BinaryWriter): BinaryWriter;
4071
4071
  decode(input: BinaryReader | Uint8Array, length?: number): T;
4072
4072
  fromJSON(object: any): T;
@@ -20,7 +20,7 @@ export const protobufPackage = "google.protobuf";
20
20
  *
21
21
  * The JSON representation for `Empty` is empty JSON object `{}`.
22
22
  */
23
- export interface Empty {
23
+ export type Empty = {
24
24
  }
25
25
 
26
26
  function createBaseEmpty(): Empty {
@@ -74,7 +74,7 @@ export type DeepPartial<T> = T extends Builtin ? T
74
74
  : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
75
75
  : Partial<T>;
76
76
 
77
- export interface MessageFns<T> {
77
+ export type MessageFns<T> = {
78
78
  encode(message: T, writer?: BinaryWriter): BinaryWriter;
79
79
  decode(input: BinaryReader | Uint8Array, length?: number): T;
80
80
  fromJSON(object: any): T;
@@ -19,7 +19,7 @@ import {
19
19
  export const protobufPackage = "io.axoniq.axonserver.grpc.query";
20
20
 
21
21
  /** Message containing Query related instructions for Axon Server */
22
- export interface QueryProviderOutbound {
22
+ export type QueryProviderOutbound = {
23
23
  /** Registers a Query Handler with AxonServer */
24
24
  subscribe?:
25
25
  | QuerySubscription
@@ -53,7 +53,7 @@ export interface QueryProviderOutbound {
53
53
  }
54
54
 
55
55
  /** Queries or Query related instructions from AxonServer for the connected application */
56
- export interface QueryProviderInbound {
56
+ export type QueryProviderInbound = {
57
57
  /** Acknowledgement of previously sent instruction via outbound stream */
58
58
  ack?:
59
59
  | InstructionAck
@@ -78,13 +78,13 @@ export interface QueryProviderInbound {
78
78
  instructionId: string;
79
79
  }
80
80
 
81
- export interface QueryReference {
81
+ export type QueryReference = {
82
82
  /** The identifier of the query request. */
83
83
  requestId: string;
84
84
  }
85
85
 
86
86
  /** Message indicating that query has been completed. */
87
- export interface QueryComplete {
87
+ export type QueryComplete = {
88
88
  /** A unique identifier for this message */
89
89
  messageId: string;
90
90
  /** The identifier of the incoming query to complete */
@@ -92,7 +92,7 @@ export interface QueryComplete {
92
92
  }
93
93
 
94
94
  /** Message indicating that consumer is requesting more messages from producer. */
95
- export interface QueryFlowControl {
95
+ export type QueryFlowControl = {
96
96
  /** The identifier of the incoming query to complete */
97
97
  queryReference:
98
98
  | QueryReference
@@ -102,7 +102,7 @@ export interface QueryFlowControl {
102
102
  }
103
103
 
104
104
  /** Message representing an incoming Query */
105
- export interface QueryRequest {
105
+ export type QueryRequest = {
106
106
  /** The message ID of the incoming Query */
107
107
  messageIdentifier: string;
108
108
  /** The name of the Query to execute */
@@ -131,13 +131,13 @@ export interface QueryRequest {
131
131
  componentName: string;
132
132
  }
133
133
 
134
- export interface QueryRequest_MetaDataEntry {
134
+ export type QueryRequest_MetaDataEntry = {
135
135
  key: string;
136
136
  value: MetaDataValue | undefined;
137
137
  }
138
138
 
139
139
  /** Message that represents the Response to a Query */
140
- export interface QueryResponse {
140
+ export type QueryResponse = {
141
141
  /** The unique identifier of the Response Message */
142
142
  messageIdentifier: string;
143
143
  /** An Error Code identifying the type of error, if any */
@@ -158,13 +158,13 @@ export interface QueryResponse {
158
158
  requestIdentifier: string;
159
159
  }
160
160
 
161
- export interface QueryResponse_MetaDataEntry {
161
+ export type QueryResponse_MetaDataEntry = {
162
162
  key: string;
163
163
  value: MetaDataValue | undefined;
164
164
  }
165
165
 
166
166
  /** Message that represents a Subscription Query */
167
- export interface SubscriptionQuery {
167
+ export type SubscriptionQuery = {
168
168
  /** A unique identifier for this subscription */
169
169
  subscriptionIdentifier: string;
170
170
  /** The number of messages the Server may send before needing to await additional permits */
@@ -182,7 +182,7 @@ export interface SubscriptionQuery {
182
182
  }
183
183
 
184
184
  /** A message containing an Update of a Query Subscription Response */
185
- export interface QueryUpdate {
185
+ export type QueryUpdate = {
186
186
  /** The unique identifier of this Update */
187
187
  messageIdentifier: string;
188
188
  /** The object representing the Update */
@@ -201,13 +201,13 @@ export interface QueryUpdate {
201
201
  errorMessage: ErrorMessage | undefined;
202
202
  }
203
203
 
204
- export interface QueryUpdate_MetaDataEntry {
204
+ export type QueryUpdate_MetaDataEntry = {
205
205
  key: string;
206
206
  value: MetaDataValue | undefined;
207
207
  }
208
208
 
209
209
  /** Message indicating that all relevant Updates have been sent for a Subscription Query, and that no further Updates are available */
210
- export interface QueryUpdateComplete {
210
+ export type QueryUpdateComplete = {
211
211
  /** The identifier of the Client instance providing the Update */
212
212
  clientId: string;
213
213
  /** The Component Name of the Client providing the Update */
@@ -215,7 +215,7 @@ export interface QueryUpdateComplete {
215
215
  }
216
216
 
217
217
  /** Message indicating that an Error occurred and that no Updates will be sent for a Subscription Query */
218
- export interface QueryUpdateCompleteExceptionally {
218
+ export type QueryUpdateCompleteExceptionally = {
219
219
  /** The identifier of the Client instance providing the Update */
220
220
  clientId: string;
221
221
  /** The Component Name of the Client providing the Update */
@@ -227,7 +227,7 @@ export interface QueryUpdateCompleteExceptionally {
227
227
  }
228
228
 
229
229
  /** Message describing possible interactions for a Subscription Query */
230
- export interface SubscriptionQueryRequest {
230
+ export type SubscriptionQueryRequest = {
231
231
  /** Start a Subscription Query with the given details. */
232
232
  subscribe?:
233
233
  | SubscriptionQuery
@@ -255,7 +255,7 @@ export interface SubscriptionQueryRequest {
255
255
  }
256
256
 
257
257
  /** Represents a Response Message for a Subscription Query */
258
- export interface SubscriptionQueryResponse {
258
+ export type SubscriptionQueryResponse = {
259
259
  /** The unique identifier for this message */
260
260
  messageIdentifier: string;
261
261
  /** The identifier of the subscription query this is a response for */
@@ -277,7 +277,7 @@ export interface SubscriptionQueryResponse {
277
277
  }
278
278
 
279
279
  /** Message containing details of a Registration of a Query Handler in a component */
280
- export interface QuerySubscription {
280
+ export type QuerySubscription = {
281
281
  /** The unique identifier of this Message */
282
282
  messageId: string;
283
283
  /** The name of the Query the Handler is subscribed to */
@@ -2662,7 +2662,7 @@ export const QueryServiceDefinition = {
2662
2662
  },
2663
2663
  } as const;
2664
2664
 
2665
- export interface QueryServiceImplementation<CallContextExt = {}> {
2665
+ export type QueryServiceImplementation<CallContextExt = {}> = {
2666
2666
  /** Opens a Query- and Instruction stream to AxonServer. */
2667
2667
  openStream(
2668
2668
  request: AsyncIterable<QueryProviderOutbound>,
@@ -2680,7 +2680,7 @@ export interface QueryServiceImplementation<CallContextExt = {}> {
2680
2680
  ): ServerStreamingMethodResult<DeepPartial<SubscriptionQueryResponse>>;
2681
2681
  }
2682
2682
 
2683
- export interface QueryServiceClient<CallOptionsExt = {}> {
2683
+ export type QueryServiceClient<CallOptionsExt = {}> = {
2684
2684
  /** Opens a Query- and Instruction stream to AxonServer. */
2685
2685
  openStream(
2686
2686
  request: AsyncIterable<DeepPartial<QueryProviderOutbound>>,
@@ -2713,7 +2713,7 @@ function isSet(value: any): boolean {
2713
2713
 
2714
2714
  export type ServerStreamingMethodResult<Response> = { [Symbol.asyncIterator](): AsyncIterator<Response, void> };
2715
2715
 
2716
- export interface MessageFns<T> {
2716
+ export type MessageFns<T> = {
2717
2717
  encode(message: T, writer?: BinaryWriter): BinaryWriter;
2718
2718
  decode(input: BinaryReader | Uint8Array, length?: number): T;
2719
2719
  fromJSON(object: any): T;
package/src/index.ts CHANGED
@@ -12,7 +12,7 @@ export {
12
12
 
13
13
  export { axonServerEventStore } from "./axon-server-event-store.js"
14
14
 
15
- export { axonServerSnapshotStore } from "./axon-server-snapshot-store.js"
15
+ export { axonServerSnapshottingEventStore } from "./axon-server-snapshotting-event-store.js"
16
16
 
17
17
  export {
18
18
  axonServerCommandBus,
@@ -12,7 +12,7 @@ const DEFAULT_MAX_MESSAGE_SIZE = 4 * 1024 * 1024
12
12
  /** Warning threshold as a fraction of max size. */
13
13
  const WARNING_THRESHOLD = 0.75
14
14
 
15
- export interface MessageSizeConfig {
15
+ export type MessageSizeConfig = {
16
16
  /** Maximum message size in bytes. Default: 4MB */
17
17
  maxMessageSize?: number
18
18
  /** Warning threshold as a fraction (0-1). Default: 0.75 */
@@ -3,7 +3,7 @@
3
3
  * bidirectional gRPC stream. Buffers messages when the stream isn't
4
4
  * consuming, and resolves promises when the stream is waiting.
5
5
  */
6
- export interface OutboundStream<T> {
6
+ export type OutboundStream<T> = {
7
7
  /** Send a message into the stream. */
8
8
  send(message: T): void
9
9
  /** The async iterable to pass to the gRPC client. */
@@ -35,7 +35,7 @@ export type InstructionHandler = (instruction: PlatformInstruction) => void | Pr
35
35
  * - Heartbeat protocol to detect dead connections
36
36
  * - Receives server-initiated instructions (pause, resume, split, merge segments)
37
37
  */
38
- export interface PlatformConnection {
38
+ export type PlatformConnection = {
39
39
  /**
40
40
  * DATA PATH. Open the platform stream, register this client, and arm the
41
41
  * heartbeat that calls `connection.reconnect()` when the server stops
@@ -104,7 +104,7 @@ export interface PlatformConnection {
104
104
  subscriptionsAcked(): Promise<boolean>
105
105
  }
106
106
 
107
- export interface PlatformServiceOptions {
107
+ export type PlatformServiceOptions = {
108
108
  /** Heartbeat interval in ms. Default: 10000 */
109
109
  heartbeatIntervalMs?: number
110
110
  /** Heartbeat timeout in ms. If no response within this window, reconnect. Default: 7500 */