@kronos-ts/axon-server 0.3.2 → 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.
- package/dist/axon-server-event-store.d.ts +3 -15
- package/dist/axon-server-event-store.d.ts.map +1 -1
- package/dist/axon-server-event-store.js +85 -44
- package/dist/axon-server-event-store.js.map +1 -1
- package/dist/axon-server-snapshotting-event-store.d.ts +30 -0
- package/dist/axon-server-snapshotting-event-store.d.ts.map +1 -0
- package/dist/axon-server-snapshotting-event-store.js +153 -0
- package/dist/axon-server-snapshotting-event-store.js.map +1 -0
- package/dist/axon-server.d.ts +92 -208
- package/dist/axon-server.d.ts.map +1 -1
- package/dist/axon-server.js +221 -323
- package/dist/axon-server.js.map +1 -1
- package/dist/connection-manager.d.ts +2 -2
- package/dist/connection-manager.d.ts.map +1 -1
- package/dist/connection.d.ts +134 -4
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +135 -10
- package/dist/connection.js.map +1 -1
- package/dist/context-view.d.ts +30 -0
- package/dist/context-view.d.ts.map +1 -0
- package/dist/context-view.js +19 -0
- package/dist/context-view.js.map +1 -0
- package/dist/control-plane.d.ts +18 -17
- package/dist/control-plane.d.ts.map +1 -1
- package/dist/control-plane.js +8 -6
- package/dist/control-plane.js.map +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/event-processor-info.d.ts +4 -4
- package/dist/event-processor-info.d.ts.map +1 -1
- package/dist/flow-controlled-sender.d.ts +2 -2
- package/dist/flow-controlled-sender.d.ts.map +1 -1
- package/dist/flow-controlled-sender.js.map +1 -1
- package/dist/generated/command.d.ts +20 -20
- package/dist/generated/command.d.ts.map +1 -1
- package/dist/generated/command.js.map +1 -1
- package/dist/generated/common.d.ts +20 -20
- package/dist/generated/common.d.ts.map +1 -1
- package/dist/generated/common.js.map +1 -1
- package/dist/generated/control.d.ts +36 -40
- package/dist/generated/control.d.ts.map +1 -1
- package/dist/generated/control.js.map +1 -1
- package/dist/generated/dcb.d.ts +88 -94
- package/dist/generated/dcb.d.ts.map +1 -1
- package/dist/generated/dcb.js.map +1 -1
- package/dist/generated/event.d.ts +81 -84
- package/dist/generated/event.d.ts.map +1 -1
- package/dist/generated/event.js.map +1 -1
- package/dist/generated/google/protobuf/empty.d.ts +3 -4
- package/dist/generated/google/protobuf/empty.d.ts.map +1 -1
- package/dist/generated/google/protobuf/empty.js.map +1 -1
- package/dist/generated/query.d.ts +40 -40
- package/dist/generated/query.d.ts.map +1 -1
- package/dist/generated/query.js.map +1 -1
- package/dist/index.d.ts +4 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/dist/message-size.d.ts +2 -2
- package/dist/message-size.d.ts.map +1 -1
- package/dist/metadata-conversion.d.ts +1 -1
- package/dist/metadata-conversion.d.ts.map +1 -1
- package/dist/outbound-stream.d.ts +2 -2
- package/dist/outbound-stream.d.ts.map +1 -1
- package/dist/platform-service.d.ts +4 -4
- package/dist/platform-service.d.ts.map +1 -1
- package/dist/resilience.d.ts +62 -0
- package/dist/resilience.d.ts.map +1 -0
- package/dist/resilience.js +103 -0
- package/dist/resilience.js.map +1 -0
- package/dist/shutdown-latch.d.ts +4 -4
- package/dist/shutdown-latch.d.ts.map +1 -1
- package/dist/shutdown-latch.js.map +1 -1
- package/package.json +5 -9
- package/src/axon-server-event-store.ts +97 -57
- package/src/axon-server-snapshotting-event-store.ts +191 -0
- package/src/axon-server.ts +365 -524
- package/src/connection-manager.ts +1 -1
- package/src/connection.ts +274 -20
- package/src/context-view.ts +46 -0
- package/src/control-plane.ts +19 -19
- package/src/event-processor-info.ts +2 -2
- package/src/flow-controlled-sender.ts +1 -1
- package/src/generated/command.ts +10 -10
- package/src/generated/common.ts +10 -10
- package/src/generated/control.ts +20 -20
- package/src/generated/dcb.ts +47 -47
- package/src/generated/event.ts +42 -42
- package/src/generated/google/protobuf/empty.ts +2 -2
- package/src/generated/query.ts +20 -20
- package/src/index.ts +12 -18
- package/src/message-size.ts +1 -1
- package/src/metadata-conversion.ts +1 -1
- package/src/outbound-stream.ts +1 -1
- package/src/platform-service.ts +2 -2
- package/src/resilience.ts +149 -0
- package/src/shutdown-latch.ts +2 -2
- package/dist/axon-server-snapshot-store.d.ts +0 -12
- package/dist/axon-server-snapshot-store.d.ts.map +0 -1
- package/dist/axon-server-snapshot-store.js +0 -88
- package/dist/axon-server-snapshot-store.js.map +0 -1
- package/src/axon-server-snapshot-store.ts +0 -118
package/src/generated/event.ts
CHANGED
|
@@ -63,11 +63,11 @@ export function transformationStateToJSON(object: TransformationState): string {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
/** Request to compact event store. */
|
|
66
|
-
export
|
|
66
|
+
export type CompactionRequest = {
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
/** The transformation data. */
|
|
70
|
-
export
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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;
|
package/src/generated/query.ts
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
@@ -1,29 +1,24 @@
|
|
|
1
1
|
export {
|
|
2
2
|
type AxonServerConnectionConfig,
|
|
3
3
|
type AxonServerConnection,
|
|
4
|
+
type AxonServerConnectionOptions,
|
|
5
|
+
type AxonServerConnectionHandle,
|
|
6
|
+
type AxonServerStoreSource,
|
|
7
|
+
type AxonServerBusSource,
|
|
8
|
+
type AxonServerPlatformSource,
|
|
4
9
|
connectToAxonServer,
|
|
10
|
+
axonServerConnection,
|
|
5
11
|
} from "./connection.js"
|
|
6
12
|
|
|
7
|
-
export {
|
|
8
|
-
type AxonServerConnectionManager,
|
|
9
|
-
connectionManager,
|
|
10
|
-
} from "./connection-manager.js"
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
axonServerEventStore,
|
|
14
|
-
} from "./axon-server-event-store.js"
|
|
13
|
+
export { axonServerEventStore } from "./axon-server-event-store.js"
|
|
15
14
|
|
|
16
|
-
export {
|
|
17
|
-
axonServerSnapshotStore,
|
|
18
|
-
} from "./axon-server-snapshot-store.js"
|
|
15
|
+
export { axonServerSnapshottingEventStore } from "./axon-server-snapshotting-event-store.js"
|
|
19
16
|
|
|
20
17
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
type
|
|
25
|
-
type AxonServerBackend,
|
|
26
|
-
type AxonServerComponents,
|
|
18
|
+
axonServerCommandBus,
|
|
19
|
+
axonServerQueryBus,
|
|
20
|
+
type AxonServerCommandBusOptions,
|
|
21
|
+
type AxonServerQueryBusOptions,
|
|
27
22
|
type FlowControlConfig,
|
|
28
23
|
type ProcessingInstructions,
|
|
29
24
|
} from "./axon-server.js"
|
|
@@ -83,4 +78,3 @@ export {
|
|
|
83
78
|
mapErrorCode,
|
|
84
79
|
isTransientError,
|
|
85
80
|
} from "./errors.js"
|
|
86
|
-
export type { AxonServerOptions } from "./axon-server.js"
|
package/src/message-size.ts
CHANGED
|
@@ -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
|
|
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 */
|
package/src/outbound-stream.ts
CHANGED
|
@@ -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
|
|
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. */
|
package/src/platform-service.ts
CHANGED
|
@@ -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
|
|
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
|
|
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 */
|