@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
package/src/connection.ts CHANGED
@@ -7,7 +7,8 @@ import {
7
7
  } from "nice-grpc"
8
8
  import { ChannelCredentials as GrpcChannelCredentials } from "@grpc/grpc-js"
9
9
  import { readFileSync } from "node:fs"
10
- import { withRetry, healthCheck, type ResilienceConfig, type Serializer } from "@kronos-ts/core"
10
+ import type { Serializer } from "@kronos-ts/core"
11
+ import { withRetry, healthCheck, type ResilienceConfig } from "./resilience.js"
11
12
  import { PlatformServiceDefinition } from "./generated/control.js"
12
13
  import { CommandServiceDefinition } from "./generated/command.js"
13
14
  import { QueryServiceDefinition } from "./generated/query.js"
@@ -22,7 +23,7 @@ import {
22
23
  /**
23
24
  * Configuration for connecting to Axon Server.
24
25
  */
25
- export interface AxonServerConnectionConfig {
26
+ export type AxonServerConnectionConfig = {
26
27
  /**
27
28
  * Host of the Axon Server. Defaults to "localhost".
28
29
  * For single-server setups.
@@ -107,7 +108,7 @@ export type ConnectionState =
107
108
  * An active connection to Axon Server, providing typed gRPC clients
108
109
  * for all services. Supports reconnection on failure.
109
110
  */
110
- export interface AxonServerConnection {
111
+ export type AxonServerConnection = {
111
112
  /** The underlying gRPC channel. */
112
113
  readonly channel: Channel
113
114
  /** Platform service — connection management, topology. */
@@ -321,10 +322,10 @@ export function connectToAxonServer(config: AxonServerConnectionConfig): AxonSer
321
322
  * of a bus. Every event, snapshot, command payload and query result this
322
323
  * process exchanges with Axon Server goes through the same codec, so it is
323
324
  * named once, here — which is also what leaves
324
- * `axonServerEventStore(conn, context)` and `axonServerCommandBus(conn, local)`
325
+ * `axonServerEventStore(conn, context)` and `axonServerCommandBus(local, conn)`
325
326
  * their honest two-argument shapes.
326
327
  */
327
- export interface AxonServerConnectionOptions extends AxonServerConnectionConfig {
328
+ export type AxonServerConnectionOptions = AxonServerConnectionConfig & {
328
329
  /** Payload codec for every message this client exchanges with Axon Server. */
329
330
  serializer: Serializer
330
331
  /** Retry / health-check policy for the initial connect and stream re-establishment. */
@@ -350,13 +351,13 @@ export interface AxonServerConnectionOptions extends AxonServerConnectionConfig
350
351
  * the codec. Narrower than the handle on purpose — a test can drive a store
351
352
  * with a fake `connection` and nothing else.
352
353
  */
353
- export interface AxonServerStoreSource {
354
+ export type AxonServerStoreSource = {
354
355
  readonly connection: AxonServerConnection
355
356
  readonly serializer: Serializer
356
357
  }
357
358
 
358
359
  /** What a BUS borrows: a store's two, plus the drain latch and the retry policy. */
359
- export interface AxonServerBusSource extends AxonServerStoreSource {
360
+ export type AxonServerBusSource = AxonServerStoreSource & {
360
361
  /**
361
362
  * The connection-wide drain latch. In-flight dispatches register on it and
362
363
  * `close()` waits for them, so a bus never has the transport pulled out from
@@ -367,7 +368,7 @@ export interface AxonServerBusSource extends AxonServerStoreSource {
367
368
  }
368
369
 
369
370
  /** What the CONTROL PLANE borrows: the platform stream, and only that. */
370
- export interface AxonServerPlatformSource {
371
+ export type AxonServerPlatformSource = {
371
372
  readonly platform: PlatformConnection
372
373
  }
373
374
 
@@ -376,12 +377,12 @@ export interface AxonServerPlatformSource {
376
377
  * stream riding on it, and the lifecycle pair.
377
378
  *
378
379
  * The stores and buses are NOT on it — `axonServerEventStore(conn, context)`,
379
- * `axonServerCommandBus(conn, local)` and friends are plain functions over
380
+ * `axonServerCommandBus(local, conn)` and friends are plain functions over
380
381
  * this, and a caller who wants only commands builds only that one. Multiple
381
382
  * contexts share this ONE channel: the per-call `AxonIQ-Context` header is what
382
383
  * separates them.
383
384
  */
384
- export interface AxonServerConnectionHandle extends AxonServerBusSource, AxonServerPlatformSource {
385
+ export type AxonServerConnectionHandle = AxonServerBusSource & AxonServerPlatformSource & {
385
386
  /** Config after defaults — the resolved host, context, client id. */
386
387
  readonly config: AxonServerConnection["config"]
387
388
  /**
@@ -410,13 +411,14 @@ export interface AxonServerConnectionHandle extends AxonServerBusSource, AxonSer
410
411
  * serializer: jsonSerializer(),
411
412
  * })
412
413
  * const eventStore = axonServerEventStore(axon, "default")
413
- * const snapshotStore = axonServerSnapshotStore(axon, "default")
414
+ * const eventStore = axonServerSnapshottingEventStore(
415
+ * axonServerEventStore(axon, "default"), axon, "default")
414
416
  * const commandBus = interceptingCommandBus(
415
- * axonServerCommandBus(axon, simpleCommandBus(unitOfWork)), lineage)
417
+ * axonServerCommandBus(localCommandBus(unitOfWork), axon), correlation)
416
418
  * const queryBus = interceptingQueryBus(
417
- * axonServerQueryBus(axon, simpleQueryBus(unitOfWork)), lineage)
419
+ * axonServerQueryBus(localQueryBus(unitOfWork), axon), correlation)
418
420
  *
419
- * const app = kronos({ states, commandHandlers, queryHandlers })
421
+ * const app = kronos({ commandHandlers, queryHandlers })
420
422
  * await axon.start() // readiness barrier: the server can route to us
421
423
  * // opt in to remote administration
422
424
  * const control = await axonServerControlPlane(axon, app.processors.values())
@@ -12,7 +12,7 @@ import type { AxonServerStoreSource } from "./connection.js"
12
12
  * channel, the codec or the drain latch differs between them; only this header
13
13
  * does, which is why the whole difference fits in one small record.
14
14
  */
15
- export interface AxonServerContextView extends AxonServerStoreSource {
15
+ export type AxonServerContextView = AxonServerStoreSource & {
16
16
  /** The Axon Server context every call through this view addresses. */
17
17
  readonly context: string
18
18
  /**
@@ -19,7 +19,7 @@
19
19
  *
20
20
  * ```ts
21
21
  * const axon = await axonServerConnection({ ... })
22
- * const app = kronos({ states, commandHandlers, queryHandlers, eventHandlers })
22
+ * const app = kronos({ commandHandlers, queryHandlers, eventHandlers })
23
23
  * await axon.start() // data path only
24
24
  *
25
25
  * // opt in to remote administration
@@ -53,7 +53,7 @@ import type { ProcessorStatus, SegmentStatus } from "./event-processor-info.js"
53
53
  * may not implement (a subscribing processor has no segments), and the
54
54
  * instruction handler simply skips what is absent.
55
55
  */
56
- export interface ManagedEventProcessor {
56
+ export type ManagedEventProcessor = {
57
57
  readonly name: string
58
58
  readonly running?: boolean
59
59
  readonly replaying?: boolean
@@ -79,7 +79,7 @@ export interface ManagedEventProcessor {
79
79
  * A running control plane. The platform stream is live; instructions are being
80
80
  * routed and status is being reported until `close()`.
81
81
  */
82
- export interface AxonServerControlPlane {
82
+ export type AxonServerControlPlane = {
83
83
  /**
84
84
  * The processors this control plane addresses, keyed by name — the snapshot
85
85
  * taken at construction. Exposed for introspection and tests.
@@ -4,7 +4,7 @@ import type { EventProcessorInfo, EventProcessorInfo_SegmentStatus } from "./gen
4
4
  * Status of a single event processor, reported to Axon Server.
5
5
  * Aligned with Java's EventProcessorInfo proto message.
6
6
  */
7
- export interface ProcessorStatus {
7
+ export type ProcessorStatus = {
8
8
  readonly name: string
9
9
  readonly running: boolean
10
10
  readonly mode: "Tracking" | "Subscribing"
@@ -17,7 +17,7 @@ export interface ProcessorStatus {
17
17
  readonly segments: SegmentStatus[]
18
18
  }
19
19
 
20
- export interface SegmentStatus {
20
+ export type SegmentStatus = {
21
21
  readonly segmentId: number
22
22
  readonly caughtUp: boolean
23
23
  readonly replaying: boolean
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Aligned with Java's `FlowControlledResponseSender`.
9
9
  */
10
- export interface FlowControlledSender<T> {
10
+ export type FlowControlledSender<T> = {
11
11
  /** Send an update. Buffers if no permits available. */
12
12
  offer(value: T): boolean
13
13
  /** Grant additional permits to the sender. */
@@ -19,7 +19,7 @@ import {
19
19
  export const protobufPackage = "io.axoniq.axonserver.grpc.command";
20
20
 
21
21
  /** An instruction from the components that provides the Command Handler towards AxonServer. */
22
- export interface CommandProviderOutbound {
22
+ export type CommandProviderOutbound = {
23
23
  /** Instruction to subscribe this component as handler of a specific type of command */
24
24
  subscribe?:
25
25
  | CommandSubscription
@@ -45,7 +45,7 @@ export interface CommandProviderOutbound {
45
45
  }
46
46
 
47
47
  /** An instruction or confirmation from AxonServer towards the component that provides the Command Handler */
48
- export interface CommandProviderInbound {
48
+ export type CommandProviderInbound = {
49
49
  /** Acknowledgement of previously sent instruction via outbound stream */
50
50
  ack?:
51
51
  | InstructionAck
@@ -59,7 +59,7 @@ export interface CommandProviderInbound {
59
59
  }
60
60
 
61
61
  /** A message representing a Command that needs to be routed to a component capable of handling it */
62
- export interface Command {
62
+ export type Command = {
63
63
  /** The unique identifier of the Command Message */
64
64
  messageIdentifier: string;
65
65
  /** The name of the command, used for routing it to a destination capable of handling it */
@@ -80,13 +80,13 @@ export interface Command {
80
80
  componentName: string;
81
81
  }
82
82
 
83
- export interface Command_MetaDataEntry {
83
+ export type Command_MetaDataEntry = {
84
84
  key: string;
85
85
  value: MetaDataValue | undefined;
86
86
  }
87
87
 
88
88
  /** Message representing the result of Command Handler execution */
89
- export interface CommandResponse {
89
+ export type CommandResponse = {
90
90
  /** The unique identifier of the response message */
91
91
  messageIdentifier: string;
92
92
  /** An error code describing the error, if any */
@@ -107,13 +107,13 @@ export interface CommandResponse {
107
107
  requestIdentifier: string;
108
108
  }
109
109
 
110
- export interface CommandResponse_MetaDataEntry {
110
+ export type CommandResponse_MetaDataEntry = {
111
111
  key: string;
112
112
  value: MetaDataValue | undefined;
113
113
  }
114
114
 
115
115
  /** Message describing a component's capability of handling a command type */
116
- export interface CommandSubscription {
116
+ export type CommandSubscription = {
117
117
  /**
118
118
  * A unique identifier for this subscription. This identifier is returned in Acknowledgements to allow
119
119
  * pipelining of subscription messages
@@ -1183,7 +1183,7 @@ export const CommandServiceDefinition = {
1183
1183
  },
1184
1184
  } as const;
1185
1185
 
1186
- export interface CommandServiceImplementation<CallContextExt = {}> {
1186
+ export type CommandServiceImplementation<CallContextExt = {}> = {
1187
1187
  /** Opens a stream allowing clients to register command handlers and receive commands. */
1188
1188
  openStream(
1189
1189
  request: AsyncIterable<CommandProviderOutbound>,
@@ -1193,7 +1193,7 @@ export interface CommandServiceImplementation<CallContextExt = {}> {
1193
1193
  dispatch(request: Command, context: CallContext & CallContextExt): Promise<DeepPartial<CommandResponse>>;
1194
1194
  }
1195
1195
 
1196
- export interface CommandServiceClient<CallOptionsExt = {}> {
1196
+ export type CommandServiceClient<CallOptionsExt = {}> = {
1197
1197
  /** Opens a stream allowing clients to register command handlers and receive commands. */
1198
1198
  openStream(
1199
1199
  request: AsyncIterable<DeepPartial<CommandProviderOutbound>>,
@@ -1221,7 +1221,7 @@ function isSet(value: any): boolean {
1221
1221
 
1222
1222
  export type ServerStreamingMethodResult<Response> = { [Symbol.asyncIterator](): AsyncIterator<Response, void> };
1223
1223
 
1224
- export interface MessageFns<T> {
1224
+ export type MessageFns<T> = {
1225
1225
  encode(message: T, writer?: BinaryWriter): BinaryWriter;
1226
1226
  decode(input: BinaryReader | Uint8Array, length?: number): T;
1227
1227
  fromJSON(object: any): T;
@@ -131,7 +131,7 @@ export function taskStatusToJSON(object: TaskStatus): string {
131
131
  }
132
132
 
133
133
  /** Describes a serialized object */
134
- export interface SerializedObject {
134
+ export type SerializedObject = {
135
135
  /** The type identifier of the serialized object. */
136
136
  type: string;
137
137
  /** The revision of the serialized form of the given type. */
@@ -141,7 +141,7 @@ export interface SerializedObject {
141
141
  }
142
142
 
143
143
  /** The value of a MetaData entry. */
144
- export interface MetaDataValue {
144
+ export type MetaDataValue = {
145
145
  /** The text value of the Meta Data entry. */
146
146
  textValue?:
147
147
  | string
@@ -163,7 +163,7 @@ export interface MetaDataValue {
163
163
  }
164
164
 
165
165
  /** An instruction for routing components when routing or processing a message. */
166
- export interface ProcessingInstruction {
166
+ export type ProcessingInstruction = {
167
167
  /** The type of processing message. */
168
168
  key: ProcessingKey;
169
169
  /** The value associated with the processing key. */
@@ -171,7 +171,7 @@ export interface ProcessingInstruction {
171
171
  }
172
172
 
173
173
  /** Message containing details of an error */
174
- export interface ErrorMessage {
174
+ export type ErrorMessage = {
175
175
  /** A human readable message explaining the error */
176
176
  message: string;
177
177
  /** A description of the location (client component, server) where the error occurred */
@@ -183,7 +183,7 @@ export interface ErrorMessage {
183
183
  }
184
184
 
185
185
  /** Message used for Flow Control instruction, providing the counterpart with additional permits for sending messages */
186
- export interface FlowControl {
186
+ export type FlowControl = {
187
187
  /** The ClientID of the component providing additional permits */
188
188
  clientId: string;
189
189
  /** The number of permits to provide */
@@ -191,7 +191,7 @@ export interface FlowControl {
191
191
  }
192
192
 
193
193
  /** Message describing instruction acknowledgement */
194
- export interface InstructionAck {
194
+ export type InstructionAck = {
195
195
  /** The identifier of the instruction */
196
196
  instructionId: string;
197
197
  /** Indicator whether the instruction was acknowledged successfully */
@@ -201,7 +201,7 @@ export interface InstructionAck {
201
201
  }
202
202
 
203
203
  /** Message describing the result of the execution of an instruction */
204
- export interface InstructionResult {
204
+ export type InstructionResult = {
205
205
  /** The identifier of the instruction */
206
206
  instructionId: string;
207
207
  /** Indicator whether the instruction was processed successfully */
@@ -210,11 +210,11 @@ export interface InstructionResult {
210
210
  error: ErrorMessage | undefined;
211
211
  }
212
212
 
213
- export interface Component {
213
+ export type Component = {
214
214
  component: string;
215
215
  }
216
216
 
217
- export interface Principal {
217
+ export type Principal = {
218
218
  user: string;
219
219
  }
220
220
 
@@ -1087,7 +1087,7 @@ function isSet(value: any): boolean {
1087
1087
  return value !== null && value !== undefined;
1088
1088
  }
1089
1089
 
1090
- export interface MessageFns<T> {
1090
+ export type MessageFns<T> = {
1091
1091
  encode(message: T, writer?: BinaryWriter): BinaryWriter;
1092
1092
  decode(input: BinaryReader | Uint8Array, length?: number): T;
1093
1093
  fromJSON(object: any): T;
@@ -68,7 +68,7 @@ export function updateTypeToJSON(object: UpdateType): string {
68
68
  }
69
69
 
70
70
  /** An instruction from Application Node to the AxonServer platform */
71
- export interface PlatformInboundInstruction {
71
+ export type PlatformInboundInstruction = {
72
72
  /**
73
73
  * Information about the client being connected.
74
74
  * This information is used by AxonServer to monitor the topology of connected applications.
@@ -111,15 +111,15 @@ export interface PlatformInboundInstruction {
111
111
  }
112
112
 
113
113
  /** Message to subscribe to topology changes within the control channel's context */
114
- export interface SubscribeTopologyChanges {
114
+ export type SubscribeTopologyChanges = {
115
115
  }
116
116
 
117
117
  /** Message to unsubscribe from topology changes within the control channel's context */
118
- export interface UnsubscribeTopologyChanges {
118
+ export type UnsubscribeTopologyChanges = {
119
119
  }
120
120
 
121
121
  /** An instruction or information from the AxonServer Platform to the Application Node */
122
- export interface PlatformOutboundInstruction {
122
+ export type PlatformOutboundInstruction = {
123
123
  /** Information provided by AxonServer which provides information about the AxonServer node the application is connected with */
124
124
  nodeNotification?:
125
125
  | NodeInfo
@@ -176,11 +176,11 @@ export interface PlatformOutboundInstruction {
176
176
  }
177
177
 
178
178
  /** Message send when AxonServer requests the client to re-establish its connection with the Platform */
179
- export interface RequestReconnect {
179
+ export type RequestReconnect = {
180
180
  }
181
181
 
182
182
  /** Message containing connection information of the node to Connect with */
183
- export interface PlatformInfo {
183
+ export type PlatformInfo = {
184
184
  /** The connection details of the node the client should connect with */
185
185
  primary:
186
186
  | NodeInfo
@@ -193,7 +193,7 @@ export interface PlatformInfo {
193
193
  }
194
194
 
195
195
  /** Message containing connection information for an AxonServer Node */
196
- export interface NodeInfo {
196
+ export type NodeInfo = {
197
197
  /** The host name to use when connecting to this node */
198
198
  hostName: string;
199
199
  /** The port number for gRPC connections */
@@ -207,7 +207,7 @@ export interface NodeInfo {
207
207
  }
208
208
 
209
209
  /** Message containing details about the Client Application */
210
- export interface ClientIdentification {
210
+ export type ClientIdentification = {
211
211
  /** A unique identifier for this client instance. Is used to distinguish different instances of the same component */
212
212
  clientId: string;
213
213
  /** The name of the component. Several instances of the same component should share this name */
@@ -218,13 +218,13 @@ export interface ClientIdentification {
218
218
  version: string;
219
219
  }
220
220
 
221
- export interface ClientIdentification_TagsEntry {
221
+ export type ClientIdentification_TagsEntry = {
222
222
  key: string;
223
223
  value: string;
224
224
  }
225
225
 
226
226
  /** Message containing information about the status of an Event Processor */
227
- export interface EventProcessorInfo {
227
+ export type EventProcessorInfo = {
228
228
  /** The logical name of this processor. */
229
229
  processorName: string;
230
230
  /** The mode in which this processor is reading Events, for example: 'Tracking' or 'Subscribing' */
@@ -257,7 +257,7 @@ export interface EventProcessorInfo {
257
257
  }
258
258
 
259
259
  /** Message containing information about the status of a Segment of a Streaming Event Processor */
260
- export interface EventProcessorInfo_SegmentStatus {
260
+ export type EventProcessorInfo_SegmentStatus = {
261
261
  /** The ID of the Segment for which the status is reported */
262
262
  segmentId: number;
263
263
  /** Indicates whether the Segment has "Caught Up" with the Head of the Event Stream */
@@ -273,23 +273,23 @@ export interface EventProcessorInfo_SegmentStatus {
273
273
  }
274
274
 
275
275
  /** Message providing reference to an Event Processor */
276
- export interface EventProcessorReference {
276
+ export type EventProcessorReference = {
277
277
  /** The name of the Event Processor */
278
278
  processorName: string;
279
279
  }
280
280
 
281
281
  /** Message providing reference to a Segment of an Event Processor */
282
- export interface EventProcessorSegmentReference {
282
+ export type EventProcessorSegmentReference = {
283
283
  /** The name of the Event Processor */
284
284
  processorName: string;
285
285
  /** The identifier of the Segment */
286
286
  segmentIdentifier: number;
287
287
  }
288
288
 
289
- export interface Heartbeat {
289
+ export type Heartbeat = {
290
290
  }
291
291
 
292
- export interface TopologyChange {
292
+ export type TopologyChange = {
293
293
  updateType: UpdateType;
294
294
  context: string;
295
295
  /** The client ID of the component requesting the update */
@@ -306,14 +306,14 @@ export interface TopologyChange {
306
306
  query?: QuerySubscription | undefined;
307
307
  }
308
308
 
309
- export interface CommandSubscription {
309
+ export type CommandSubscription = {
310
310
  /** The subscription ID to add or remove */
311
311
  name: string;
312
312
  /** The load factor for the subscription */
313
313
  loadFactor: number;
314
314
  }
315
315
 
316
- export interface QuerySubscription {
316
+ export type QuerySubscription = {
317
317
  /** The subscription ID to add or remove */
318
318
  name: string;
319
319
  }
@@ -2365,7 +2365,7 @@ export const PlatformServiceDefinition = {
2365
2365
  },
2366
2366
  } as const;
2367
2367
 
2368
- export interface PlatformServiceImplementation<CallContextExt = {}> {
2368
+ export type PlatformServiceImplementation<CallContextExt = {}> = {
2369
2369
  /** Obtains connection information for the Server that a Client should use for its connections. */
2370
2370
  getPlatformServer(
2371
2371
  request: ClientIdentification,
@@ -2378,7 +2378,7 @@ export interface PlatformServiceImplementation<CallContextExt = {}> {
2378
2378
  ): ServerStreamingMethodResult<DeepPartial<PlatformOutboundInstruction>>;
2379
2379
  }
2380
2380
 
2381
- export interface PlatformServiceClient<CallOptionsExt = {}> {
2381
+ export type PlatformServiceClient<CallOptionsExt = {}> = {
2382
2382
  /** Obtains connection information for the Server that a Client should use for its connections. */
2383
2383
  getPlatformServer(
2384
2384
  request: DeepPartial<ClientIdentification>,
@@ -2409,7 +2409,7 @@ function isSet(value: any): boolean {
2409
2409
 
2410
2410
  export type ServerStreamingMethodResult<Response> = { [Symbol.asyncIterator](): AsyncIterator<Response, void> };
2411
2411
 
2412
- export interface MessageFns<T> {
2412
+ export type MessageFns<T> = {
2413
2413
  encode(message: T, writer?: BinaryWriter): BinaryWriter;
2414
2414
  decode(input: BinaryReader | Uint8Array, length?: number): T;
2415
2415
  fromJSON(object: any): T;