@cratis/chronicle.contracts 19.121.0 → 19.122.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/cjs/generated/descriptorSet.js +1 -1
- package/dist/cjs/generated/descriptorSet.js.map +1 -1
- package/dist/cjs/generated/index.d.ts +2 -2
- package/dist/cjs/generated/index.d.ts.map +1 -1
- package/dist/cjs/generated/observation_reactors.d.ts +38 -0
- package/dist/cjs/generated/observation_reactors.d.ts.map +1 -1
- package/dist/cjs/generated/observation_reactors.js +522 -2
- package/dist/cjs/generated/observation_reactors.js.map +1 -1
- package/dist/cjs/generated/observation_reducers.d.ts +39 -0
- package/dist/cjs/generated/observation_reducers.d.ts.map +1 -1
- package/dist/cjs/generated/observation_reducers.js +538 -2
- package/dist/cjs/generated/observation_reducers.js.map +1 -1
- package/dist/cjs/index.js +10 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/generated/descriptorSet.js +1 -1
- package/dist/esm/generated/descriptorSet.js.map +1 -1
- package/dist/esm/generated/index.d.ts +2 -2
- package/dist/esm/generated/index.d.ts.map +1 -1
- package/dist/esm/generated/observation_reactors.d.ts +38 -0
- package/dist/esm/generated/observation_reactors.d.ts.map +1 -1
- package/dist/esm/generated/observation_reactors.js +518 -3
- package/dist/esm/generated/observation_reactors.js.map +1 -1
- package/dist/esm/generated/observation_reducers.d.ts +39 -0
- package/dist/esm/generated/observation_reducers.d.ts.map +1 -1
- package/dist/esm/generated/observation_reducers.js +534 -3
- package/dist/esm/generated/observation_reducers.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/generated/descriptorSet.js +1 -1
- package/dist/generated/descriptorSet.js.map +1 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +2 -2
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/observation_reactors.d.ts +38 -0
- package/dist/generated/observation_reactors.d.ts.map +1 -1
- package/dist/generated/observation_reactors.js +517 -2
- package/dist/generated/observation_reactors.js.map +1 -1
- package/dist/generated/observation_reducers.d.ts +39 -0
- package/dist/generated/observation_reducers.d.ts.map +1 -1
- package/dist/generated/observation_reducers.js +533 -2
- package/dist/generated/observation_reducers.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/generated/descriptorSet.ts +1 -1
- package/generated/index.ts +2 -2
- package/generated/observation_reactors.ts +581 -2
- package/generated/observation_reducers.ts +599 -2
- package/package.json +1 -1
|
@@ -85,10 +85,62 @@ export function eventObservationStateToJSON(object: EventObservationState): stri
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
export enum ObservationOrigin {
|
|
89
|
+
Unknown = 0,
|
|
90
|
+
Live = 1,
|
|
91
|
+
CatchingUp = 2,
|
|
92
|
+
Replaying = 3,
|
|
93
|
+
Retrying = 4,
|
|
94
|
+
UNRECOGNIZED = -1,
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function observationOriginFromJSON(object: any): ObservationOrigin {
|
|
98
|
+
switch (object) {
|
|
99
|
+
case 0:
|
|
100
|
+
case "Unknown":
|
|
101
|
+
return ObservationOrigin.Unknown;
|
|
102
|
+
case 1:
|
|
103
|
+
case "Live":
|
|
104
|
+
return ObservationOrigin.Live;
|
|
105
|
+
case 2:
|
|
106
|
+
case "CatchingUp":
|
|
107
|
+
return ObservationOrigin.CatchingUp;
|
|
108
|
+
case 3:
|
|
109
|
+
case "Replaying":
|
|
110
|
+
return ObservationOrigin.Replaying;
|
|
111
|
+
case 4:
|
|
112
|
+
case "Retrying":
|
|
113
|
+
return ObservationOrigin.Retrying;
|
|
114
|
+
case -1:
|
|
115
|
+
case "UNRECOGNIZED":
|
|
116
|
+
default:
|
|
117
|
+
return ObservationOrigin.UNRECOGNIZED;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function observationOriginToJSON(object: ObservationOrigin): string {
|
|
122
|
+
switch (object) {
|
|
123
|
+
case ObservationOrigin.Unknown:
|
|
124
|
+
return "Unknown";
|
|
125
|
+
case ObservationOrigin.Live:
|
|
126
|
+
return "Live";
|
|
127
|
+
case ObservationOrigin.CatchingUp:
|
|
128
|
+
return "CatchingUp";
|
|
129
|
+
case ObservationOrigin.Replaying:
|
|
130
|
+
return "Replaying";
|
|
131
|
+
case ObservationOrigin.Retrying:
|
|
132
|
+
return "Retrying";
|
|
133
|
+
case ObservationOrigin.UNRECOGNIZED:
|
|
134
|
+
default:
|
|
135
|
+
return "UNRECOGNIZED";
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
88
139
|
export enum ObservationState {
|
|
89
140
|
OBSERVATION_STATE_None = 0,
|
|
90
141
|
Success = 1,
|
|
91
142
|
Failed = 2,
|
|
143
|
+
Deferred = 3,
|
|
92
144
|
UNRECOGNIZED = -1,
|
|
93
145
|
}
|
|
94
146
|
|
|
@@ -103,6 +155,9 @@ export function observationStateFromJSON(object: any): ObservationState {
|
|
|
103
155
|
case 2:
|
|
104
156
|
case "Failed":
|
|
105
157
|
return ObservationState.Failed;
|
|
158
|
+
case 3:
|
|
159
|
+
case "Deferred":
|
|
160
|
+
return ObservationState.Deferred;
|
|
106
161
|
case -1:
|
|
107
162
|
case "UNRECOGNIZED":
|
|
108
163
|
default:
|
|
@@ -118,6 +173,8 @@ export function observationStateToJSON(object: ObservationState): string {
|
|
|
118
173
|
return "Success";
|
|
119
174
|
case ObservationState.Failed:
|
|
120
175
|
return "Failed";
|
|
176
|
+
case ObservationState.Deferred:
|
|
177
|
+
return "Deferred";
|
|
121
178
|
case ObservationState.UNRECOGNIZED:
|
|
122
179
|
default:
|
|
123
180
|
return "UNRECOGNIZED";
|
|
@@ -247,6 +304,8 @@ export interface EventsToObserve {
|
|
|
247
304
|
ReplayState: ReplayState;
|
|
248
305
|
DeliveryId: bigint;
|
|
249
306
|
DeliverWithinMilliseconds: bigint;
|
|
307
|
+
Partitions: PartitionEvents[];
|
|
308
|
+
Origin: ObservationOrigin;
|
|
250
309
|
}
|
|
251
310
|
|
|
252
311
|
export interface HasReactorRequest {
|
|
@@ -284,6 +343,28 @@ export interface OneOfRegisterReactorReactorResult {
|
|
|
284
343
|
Value1: ReactorResult | undefined;
|
|
285
344
|
}
|
|
286
345
|
|
|
346
|
+
export interface PageDelivery {
|
|
347
|
+
Enabled: boolean;
|
|
348
|
+
MaxEventsPerPage: number;
|
|
349
|
+
MaxBytesPerPage: number;
|
|
350
|
+
MaxDelayMilliseconds: number;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
export interface PartitionEvents {
|
|
354
|
+
Partition: string;
|
|
355
|
+
Events: AppendedEvent[];
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
export interface PartitionResult {
|
|
359
|
+
Partition: string;
|
|
360
|
+
State: ObservationState;
|
|
361
|
+
LastSuccessfulObservation: bigint;
|
|
362
|
+
ExceptionMessages: string[];
|
|
363
|
+
ExceptionStackTrace: string;
|
|
364
|
+
RetryAfterMilliseconds: bigint;
|
|
365
|
+
ReadModelState: string;
|
|
366
|
+
}
|
|
367
|
+
|
|
287
368
|
export interface ReactorDefinition {
|
|
288
369
|
ReactorId: string;
|
|
289
370
|
EventSequenceId: string;
|
|
@@ -308,6 +389,8 @@ export interface ReactorResult {
|
|
|
308
389
|
ExceptionMessages: string[];
|
|
309
390
|
ExceptionStackTrace: string;
|
|
310
391
|
DeliveryId: bigint;
|
|
392
|
+
RetryAfterMilliseconds: bigint;
|
|
393
|
+
Partitions: PartitionResult[];
|
|
311
394
|
}
|
|
312
395
|
|
|
313
396
|
export interface RegisterReactor {
|
|
@@ -315,6 +398,7 @@ export interface RegisterReactor {
|
|
|
315
398
|
EventStore: string;
|
|
316
399
|
Namespace: string;
|
|
317
400
|
Reactor: ReactorDefinition | undefined;
|
|
401
|
+
PageDelivery: PageDelivery | undefined;
|
|
318
402
|
}
|
|
319
403
|
|
|
320
404
|
/** Represents a DateTimeOffset value as an ISO 8601 string (e.g., "2024-01-15T12:30:00.0000000+02:00"). */
|
|
@@ -1510,7 +1594,15 @@ export const EventTypeWithKeyExpression: MessageFns<EventTypeWithKeyExpression>
|
|
|
1510
1594
|
};
|
|
1511
1595
|
|
|
1512
1596
|
function createBaseEventsToObserve(): EventsToObserve {
|
|
1513
|
-
return {
|
|
1597
|
+
return {
|
|
1598
|
+
Partition: "",
|
|
1599
|
+
Events: [],
|
|
1600
|
+
ReplayState: 0,
|
|
1601
|
+
DeliveryId: 0n,
|
|
1602
|
+
DeliverWithinMilliseconds: 0n,
|
|
1603
|
+
Partitions: [],
|
|
1604
|
+
Origin: 0,
|
|
1605
|
+
};
|
|
1514
1606
|
}
|
|
1515
1607
|
|
|
1516
1608
|
export const EventsToObserve: MessageFns<EventsToObserve> = {
|
|
@@ -1538,6 +1630,12 @@ export const EventsToObserve: MessageFns<EventsToObserve> = {
|
|
|
1538
1630
|
}
|
|
1539
1631
|
writer.uint32(40).uint64(message.DeliverWithinMilliseconds);
|
|
1540
1632
|
}
|
|
1633
|
+
for (const v of message.Partitions) {
|
|
1634
|
+
PartitionEvents.encode(v!, writer.uint32(50).fork()).join();
|
|
1635
|
+
}
|
|
1636
|
+
if (message.Origin !== 0) {
|
|
1637
|
+
writer.uint32(56).int32(message.Origin);
|
|
1638
|
+
}
|
|
1541
1639
|
return writer;
|
|
1542
1640
|
},
|
|
1543
1641
|
|
|
@@ -1594,6 +1692,22 @@ export const EventsToObserve: MessageFns<EventsToObserve> = {
|
|
|
1594
1692
|
message.DeliverWithinMilliseconds = reader.uint64() as bigint;
|
|
1595
1693
|
continue;
|
|
1596
1694
|
}
|
|
1695
|
+
case 6: {
|
|
1696
|
+
if (tag !== 50) {
|
|
1697
|
+
break;
|
|
1698
|
+
}
|
|
1699
|
+
|
|
1700
|
+
message.Partitions.push(PartitionEvents.decode(reader, reader.uint32()));
|
|
1701
|
+
continue;
|
|
1702
|
+
}
|
|
1703
|
+
case 7: {
|
|
1704
|
+
if (tag !== 56) {
|
|
1705
|
+
break;
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
message.Origin = reader.int32() as any;
|
|
1709
|
+
continue;
|
|
1710
|
+
}
|
|
1597
1711
|
}
|
|
1598
1712
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1599
1713
|
break;
|
|
@@ -1615,6 +1729,10 @@ export const EventsToObserve: MessageFns<EventsToObserve> = {
|
|
|
1615
1729
|
DeliverWithinMilliseconds: isSet(object.DeliverWithinMilliseconds)
|
|
1616
1730
|
? BigInt(object.DeliverWithinMilliseconds)
|
|
1617
1731
|
: 0n,
|
|
1732
|
+
Partitions: globalThis.Array.isArray(object?.Partitions)
|
|
1733
|
+
? object.Partitions.map((e: any) => PartitionEvents.fromJSON(e))
|
|
1734
|
+
: [],
|
|
1735
|
+
Origin: isSet(object.Origin) ? observationOriginFromJSON(object.Origin) : 0,
|
|
1618
1736
|
};
|
|
1619
1737
|
},
|
|
1620
1738
|
|
|
@@ -1635,6 +1753,12 @@ export const EventsToObserve: MessageFns<EventsToObserve> = {
|
|
|
1635
1753
|
if (message.DeliverWithinMilliseconds !== 0n) {
|
|
1636
1754
|
obj.DeliverWithinMilliseconds = message.DeliverWithinMilliseconds.toString();
|
|
1637
1755
|
}
|
|
1756
|
+
if (message.Partitions?.length) {
|
|
1757
|
+
obj.Partitions = message.Partitions.map((e) => PartitionEvents.toJSON(e));
|
|
1758
|
+
}
|
|
1759
|
+
if (message.Origin !== 0) {
|
|
1760
|
+
obj.Origin = observationOriginToJSON(message.Origin);
|
|
1761
|
+
}
|
|
1638
1762
|
return obj;
|
|
1639
1763
|
},
|
|
1640
1764
|
|
|
@@ -1653,6 +1777,8 @@ export const EventsToObserve: MessageFns<EventsToObserve> = {
|
|
|
1653
1777
|
(object.DeliverWithinMilliseconds !== undefined && object.DeliverWithinMilliseconds !== null)
|
|
1654
1778
|
? BigInt(object.DeliverWithinMilliseconds)
|
|
1655
1779
|
: 0n;
|
|
1780
|
+
message.Partitions = object.Partitions?.map((e) => PartitionEvents.fromPartial(e)) || [];
|
|
1781
|
+
message.Origin = object.Origin ?? 0;
|
|
1656
1782
|
return message;
|
|
1657
1783
|
},
|
|
1658
1784
|
};
|
|
@@ -2239,6 +2365,399 @@ export const OneOfRegisterReactorReactorResult: MessageFns<OneOfRegisterReactorR
|
|
|
2239
2365
|
},
|
|
2240
2366
|
};
|
|
2241
2367
|
|
|
2368
|
+
function createBasePageDelivery(): PageDelivery {
|
|
2369
|
+
return { Enabled: false, MaxEventsPerPage: 0, MaxBytesPerPage: 0, MaxDelayMilliseconds: 0 };
|
|
2370
|
+
}
|
|
2371
|
+
|
|
2372
|
+
export const PageDelivery: MessageFns<PageDelivery> = {
|
|
2373
|
+
encode(message: PageDelivery, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2374
|
+
if (message.Enabled !== false) {
|
|
2375
|
+
writer.uint32(8).bool(message.Enabled);
|
|
2376
|
+
}
|
|
2377
|
+
if (message.MaxEventsPerPage !== 0) {
|
|
2378
|
+
writer.uint32(16).uint32(message.MaxEventsPerPage);
|
|
2379
|
+
}
|
|
2380
|
+
if (message.MaxBytesPerPage !== 0) {
|
|
2381
|
+
writer.uint32(24).uint32(message.MaxBytesPerPage);
|
|
2382
|
+
}
|
|
2383
|
+
if (message.MaxDelayMilliseconds !== 0) {
|
|
2384
|
+
writer.uint32(32).uint32(message.MaxDelayMilliseconds);
|
|
2385
|
+
}
|
|
2386
|
+
return writer;
|
|
2387
|
+
},
|
|
2388
|
+
|
|
2389
|
+
decode(input: BinaryReader | Uint8Array, length?: number): PageDelivery {
|
|
2390
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2391
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
2392
|
+
if (previousRecursionDepth >= 100) {
|
|
2393
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2394
|
+
}
|
|
2395
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2396
|
+
try {
|
|
2397
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2398
|
+
const message = createBasePageDelivery();
|
|
2399
|
+
while (reader.pos < end) {
|
|
2400
|
+
const tag = reader.uint32();
|
|
2401
|
+
switch (tag >>> 3) {
|
|
2402
|
+
case 1: {
|
|
2403
|
+
if (tag !== 8) {
|
|
2404
|
+
break;
|
|
2405
|
+
}
|
|
2406
|
+
|
|
2407
|
+
message.Enabled = reader.bool();
|
|
2408
|
+
continue;
|
|
2409
|
+
}
|
|
2410
|
+
case 2: {
|
|
2411
|
+
if (tag !== 16) {
|
|
2412
|
+
break;
|
|
2413
|
+
}
|
|
2414
|
+
|
|
2415
|
+
message.MaxEventsPerPage = reader.uint32();
|
|
2416
|
+
continue;
|
|
2417
|
+
}
|
|
2418
|
+
case 3: {
|
|
2419
|
+
if (tag !== 24) {
|
|
2420
|
+
break;
|
|
2421
|
+
}
|
|
2422
|
+
|
|
2423
|
+
message.MaxBytesPerPage = reader.uint32();
|
|
2424
|
+
continue;
|
|
2425
|
+
}
|
|
2426
|
+
case 4: {
|
|
2427
|
+
if (tag !== 32) {
|
|
2428
|
+
break;
|
|
2429
|
+
}
|
|
2430
|
+
|
|
2431
|
+
message.MaxDelayMilliseconds = reader.uint32();
|
|
2432
|
+
continue;
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2435
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2436
|
+
break;
|
|
2437
|
+
}
|
|
2438
|
+
reader.skip(tag & 7);
|
|
2439
|
+
}
|
|
2440
|
+
return message;
|
|
2441
|
+
} finally {
|
|
2442
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2443
|
+
}
|
|
2444
|
+
},
|
|
2445
|
+
|
|
2446
|
+
fromJSON(object: any): PageDelivery {
|
|
2447
|
+
return {
|
|
2448
|
+
Enabled: isSet(object.Enabled) ? globalThis.Boolean(object.Enabled) : false,
|
|
2449
|
+
MaxEventsPerPage: isSet(object.MaxEventsPerPage) ? globalThis.Number(object.MaxEventsPerPage) : 0,
|
|
2450
|
+
MaxBytesPerPage: isSet(object.MaxBytesPerPage) ? globalThis.Number(object.MaxBytesPerPage) : 0,
|
|
2451
|
+
MaxDelayMilliseconds: isSet(object.MaxDelayMilliseconds) ? globalThis.Number(object.MaxDelayMilliseconds) : 0,
|
|
2452
|
+
};
|
|
2453
|
+
},
|
|
2454
|
+
|
|
2455
|
+
toJSON(message: PageDelivery): unknown {
|
|
2456
|
+
const obj: any = {};
|
|
2457
|
+
if (message.Enabled !== false) {
|
|
2458
|
+
obj.Enabled = message.Enabled;
|
|
2459
|
+
}
|
|
2460
|
+
if (message.MaxEventsPerPage !== 0) {
|
|
2461
|
+
obj.MaxEventsPerPage = Math.round(message.MaxEventsPerPage);
|
|
2462
|
+
}
|
|
2463
|
+
if (message.MaxBytesPerPage !== 0) {
|
|
2464
|
+
obj.MaxBytesPerPage = Math.round(message.MaxBytesPerPage);
|
|
2465
|
+
}
|
|
2466
|
+
if (message.MaxDelayMilliseconds !== 0) {
|
|
2467
|
+
obj.MaxDelayMilliseconds = Math.round(message.MaxDelayMilliseconds);
|
|
2468
|
+
}
|
|
2469
|
+
return obj;
|
|
2470
|
+
},
|
|
2471
|
+
|
|
2472
|
+
create(base?: DeepPartial<PageDelivery>): PageDelivery {
|
|
2473
|
+
return PageDelivery.fromPartial(base ?? {});
|
|
2474
|
+
},
|
|
2475
|
+
fromPartial(object: DeepPartial<PageDelivery>): PageDelivery {
|
|
2476
|
+
const message = createBasePageDelivery();
|
|
2477
|
+
message.Enabled = object.Enabled ?? false;
|
|
2478
|
+
message.MaxEventsPerPage = object.MaxEventsPerPage ?? 0;
|
|
2479
|
+
message.MaxBytesPerPage = object.MaxBytesPerPage ?? 0;
|
|
2480
|
+
message.MaxDelayMilliseconds = object.MaxDelayMilliseconds ?? 0;
|
|
2481
|
+
return message;
|
|
2482
|
+
},
|
|
2483
|
+
};
|
|
2484
|
+
|
|
2485
|
+
function createBasePartitionEvents(): PartitionEvents {
|
|
2486
|
+
return { Partition: "", Events: [] };
|
|
2487
|
+
}
|
|
2488
|
+
|
|
2489
|
+
export const PartitionEvents: MessageFns<PartitionEvents> = {
|
|
2490
|
+
encode(message: PartitionEvents, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2491
|
+
if (message.Partition !== "") {
|
|
2492
|
+
writer.uint32(10).string(message.Partition);
|
|
2493
|
+
}
|
|
2494
|
+
for (const v of message.Events) {
|
|
2495
|
+
AppendedEvent.encode(v!, writer.uint32(18).fork()).join();
|
|
2496
|
+
}
|
|
2497
|
+
return writer;
|
|
2498
|
+
},
|
|
2499
|
+
|
|
2500
|
+
decode(input: BinaryReader | Uint8Array, length?: number): PartitionEvents {
|
|
2501
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2502
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
2503
|
+
if (previousRecursionDepth >= 100) {
|
|
2504
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2505
|
+
}
|
|
2506
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2507
|
+
try {
|
|
2508
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2509
|
+
const message = createBasePartitionEvents();
|
|
2510
|
+
while (reader.pos < end) {
|
|
2511
|
+
const tag = reader.uint32();
|
|
2512
|
+
switch (tag >>> 3) {
|
|
2513
|
+
case 1: {
|
|
2514
|
+
if (tag !== 10) {
|
|
2515
|
+
break;
|
|
2516
|
+
}
|
|
2517
|
+
|
|
2518
|
+
message.Partition = reader.string();
|
|
2519
|
+
continue;
|
|
2520
|
+
}
|
|
2521
|
+
case 2: {
|
|
2522
|
+
if (tag !== 18) {
|
|
2523
|
+
break;
|
|
2524
|
+
}
|
|
2525
|
+
|
|
2526
|
+
message.Events.push(AppendedEvent.decode(reader, reader.uint32()));
|
|
2527
|
+
continue;
|
|
2528
|
+
}
|
|
2529
|
+
}
|
|
2530
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2531
|
+
break;
|
|
2532
|
+
}
|
|
2533
|
+
reader.skip(tag & 7);
|
|
2534
|
+
}
|
|
2535
|
+
return message;
|
|
2536
|
+
} finally {
|
|
2537
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2538
|
+
}
|
|
2539
|
+
},
|
|
2540
|
+
|
|
2541
|
+
fromJSON(object: any): PartitionEvents {
|
|
2542
|
+
return {
|
|
2543
|
+
Partition: isSet(object.Partition) ? globalThis.String(object.Partition) : "",
|
|
2544
|
+
Events: globalThis.Array.isArray(object?.Events) ? object.Events.map((e: any) => AppendedEvent.fromJSON(e)) : [],
|
|
2545
|
+
};
|
|
2546
|
+
},
|
|
2547
|
+
|
|
2548
|
+
toJSON(message: PartitionEvents): unknown {
|
|
2549
|
+
const obj: any = {};
|
|
2550
|
+
if (message.Partition !== "") {
|
|
2551
|
+
obj.Partition = message.Partition;
|
|
2552
|
+
}
|
|
2553
|
+
if (message.Events?.length) {
|
|
2554
|
+
obj.Events = message.Events.map((e) => AppendedEvent.toJSON(e));
|
|
2555
|
+
}
|
|
2556
|
+
return obj;
|
|
2557
|
+
},
|
|
2558
|
+
|
|
2559
|
+
create(base?: DeepPartial<PartitionEvents>): PartitionEvents {
|
|
2560
|
+
return PartitionEvents.fromPartial(base ?? {});
|
|
2561
|
+
},
|
|
2562
|
+
fromPartial(object: DeepPartial<PartitionEvents>): PartitionEvents {
|
|
2563
|
+
const message = createBasePartitionEvents();
|
|
2564
|
+
message.Partition = object.Partition ?? "";
|
|
2565
|
+
message.Events = object.Events?.map((e) => AppendedEvent.fromPartial(e)) || [];
|
|
2566
|
+
return message;
|
|
2567
|
+
},
|
|
2568
|
+
};
|
|
2569
|
+
|
|
2570
|
+
function createBasePartitionResult(): PartitionResult {
|
|
2571
|
+
return {
|
|
2572
|
+
Partition: "",
|
|
2573
|
+
State: 0,
|
|
2574
|
+
LastSuccessfulObservation: 0n,
|
|
2575
|
+
ExceptionMessages: [],
|
|
2576
|
+
ExceptionStackTrace: "",
|
|
2577
|
+
RetryAfterMilliseconds: 0n,
|
|
2578
|
+
ReadModelState: "",
|
|
2579
|
+
};
|
|
2580
|
+
}
|
|
2581
|
+
|
|
2582
|
+
export const PartitionResult: MessageFns<PartitionResult> = {
|
|
2583
|
+
encode(message: PartitionResult, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2584
|
+
if (message.Partition !== "") {
|
|
2585
|
+
writer.uint32(10).string(message.Partition);
|
|
2586
|
+
}
|
|
2587
|
+
if (message.State !== 0) {
|
|
2588
|
+
writer.uint32(16).int32(message.State);
|
|
2589
|
+
}
|
|
2590
|
+
if (message.LastSuccessfulObservation !== 0n) {
|
|
2591
|
+
if (BigInt.asUintN(64, message.LastSuccessfulObservation) !== message.LastSuccessfulObservation) {
|
|
2592
|
+
throw new globalThis.Error(
|
|
2593
|
+
"value provided for field message.LastSuccessfulObservation of type uint64 too large",
|
|
2594
|
+
);
|
|
2595
|
+
}
|
|
2596
|
+
writer.uint32(24).uint64(message.LastSuccessfulObservation);
|
|
2597
|
+
}
|
|
2598
|
+
for (const v of message.ExceptionMessages) {
|
|
2599
|
+
writer.uint32(34).string(v!);
|
|
2600
|
+
}
|
|
2601
|
+
if (message.ExceptionStackTrace !== "") {
|
|
2602
|
+
writer.uint32(42).string(message.ExceptionStackTrace);
|
|
2603
|
+
}
|
|
2604
|
+
if (message.RetryAfterMilliseconds !== 0n) {
|
|
2605
|
+
if (BigInt.asUintN(64, message.RetryAfterMilliseconds) !== message.RetryAfterMilliseconds) {
|
|
2606
|
+
throw new globalThis.Error("value provided for field message.RetryAfterMilliseconds of type uint64 too large");
|
|
2607
|
+
}
|
|
2608
|
+
writer.uint32(48).uint64(message.RetryAfterMilliseconds);
|
|
2609
|
+
}
|
|
2610
|
+
if (message.ReadModelState !== "") {
|
|
2611
|
+
writer.uint32(58).string(message.ReadModelState);
|
|
2612
|
+
}
|
|
2613
|
+
return writer;
|
|
2614
|
+
},
|
|
2615
|
+
|
|
2616
|
+
decode(input: BinaryReader | Uint8Array, length?: number): PartitionResult {
|
|
2617
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2618
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
2619
|
+
if (previousRecursionDepth >= 100) {
|
|
2620
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2621
|
+
}
|
|
2622
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2623
|
+
try {
|
|
2624
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2625
|
+
const message = createBasePartitionResult();
|
|
2626
|
+
while (reader.pos < end) {
|
|
2627
|
+
const tag = reader.uint32();
|
|
2628
|
+
switch (tag >>> 3) {
|
|
2629
|
+
case 1: {
|
|
2630
|
+
if (tag !== 10) {
|
|
2631
|
+
break;
|
|
2632
|
+
}
|
|
2633
|
+
|
|
2634
|
+
message.Partition = reader.string();
|
|
2635
|
+
continue;
|
|
2636
|
+
}
|
|
2637
|
+
case 2: {
|
|
2638
|
+
if (tag !== 16) {
|
|
2639
|
+
break;
|
|
2640
|
+
}
|
|
2641
|
+
|
|
2642
|
+
message.State = reader.int32() as any;
|
|
2643
|
+
continue;
|
|
2644
|
+
}
|
|
2645
|
+
case 3: {
|
|
2646
|
+
if (tag !== 24) {
|
|
2647
|
+
break;
|
|
2648
|
+
}
|
|
2649
|
+
|
|
2650
|
+
message.LastSuccessfulObservation = reader.uint64() as bigint;
|
|
2651
|
+
continue;
|
|
2652
|
+
}
|
|
2653
|
+
case 4: {
|
|
2654
|
+
if (tag !== 34) {
|
|
2655
|
+
break;
|
|
2656
|
+
}
|
|
2657
|
+
|
|
2658
|
+
message.ExceptionMessages.push(reader.string());
|
|
2659
|
+
continue;
|
|
2660
|
+
}
|
|
2661
|
+
case 5: {
|
|
2662
|
+
if (tag !== 42) {
|
|
2663
|
+
break;
|
|
2664
|
+
}
|
|
2665
|
+
|
|
2666
|
+
message.ExceptionStackTrace = reader.string();
|
|
2667
|
+
continue;
|
|
2668
|
+
}
|
|
2669
|
+
case 6: {
|
|
2670
|
+
if (tag !== 48) {
|
|
2671
|
+
break;
|
|
2672
|
+
}
|
|
2673
|
+
|
|
2674
|
+
message.RetryAfterMilliseconds = reader.uint64() as bigint;
|
|
2675
|
+
continue;
|
|
2676
|
+
}
|
|
2677
|
+
case 7: {
|
|
2678
|
+
if (tag !== 58) {
|
|
2679
|
+
break;
|
|
2680
|
+
}
|
|
2681
|
+
|
|
2682
|
+
message.ReadModelState = reader.string();
|
|
2683
|
+
continue;
|
|
2684
|
+
}
|
|
2685
|
+
}
|
|
2686
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2687
|
+
break;
|
|
2688
|
+
}
|
|
2689
|
+
reader.skip(tag & 7);
|
|
2690
|
+
}
|
|
2691
|
+
return message;
|
|
2692
|
+
} finally {
|
|
2693
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2694
|
+
}
|
|
2695
|
+
},
|
|
2696
|
+
|
|
2697
|
+
fromJSON(object: any): PartitionResult {
|
|
2698
|
+
return {
|
|
2699
|
+
Partition: isSet(object.Partition) ? globalThis.String(object.Partition) : "",
|
|
2700
|
+
State: isSet(object.State) ? observationStateFromJSON(object.State) : 0,
|
|
2701
|
+
LastSuccessfulObservation: isSet(object.LastSuccessfulObservation)
|
|
2702
|
+
? BigInt(object.LastSuccessfulObservation)
|
|
2703
|
+
: 0n,
|
|
2704
|
+
ExceptionMessages: globalThis.Array.isArray(object?.ExceptionMessages)
|
|
2705
|
+
? object.ExceptionMessages.map((e: any) => globalThis.String(e))
|
|
2706
|
+
: [],
|
|
2707
|
+
ExceptionStackTrace: isSet(object.ExceptionStackTrace) ? globalThis.String(object.ExceptionStackTrace) : "",
|
|
2708
|
+
RetryAfterMilliseconds: isSet(object.RetryAfterMilliseconds) ? BigInt(object.RetryAfterMilliseconds) : 0n,
|
|
2709
|
+
ReadModelState: isSet(object.ReadModelState) ? globalThis.String(object.ReadModelState) : "",
|
|
2710
|
+
};
|
|
2711
|
+
},
|
|
2712
|
+
|
|
2713
|
+
toJSON(message: PartitionResult): unknown {
|
|
2714
|
+
const obj: any = {};
|
|
2715
|
+
if (message.Partition !== "") {
|
|
2716
|
+
obj.Partition = message.Partition;
|
|
2717
|
+
}
|
|
2718
|
+
if (message.State !== 0) {
|
|
2719
|
+
obj.State = observationStateToJSON(message.State);
|
|
2720
|
+
}
|
|
2721
|
+
if (message.LastSuccessfulObservation !== 0n) {
|
|
2722
|
+
obj.LastSuccessfulObservation = message.LastSuccessfulObservation.toString();
|
|
2723
|
+
}
|
|
2724
|
+
if (message.ExceptionMessages?.length) {
|
|
2725
|
+
obj.ExceptionMessages = message.ExceptionMessages;
|
|
2726
|
+
}
|
|
2727
|
+
if (message.ExceptionStackTrace !== "") {
|
|
2728
|
+
obj.ExceptionStackTrace = message.ExceptionStackTrace;
|
|
2729
|
+
}
|
|
2730
|
+
if (message.RetryAfterMilliseconds !== 0n) {
|
|
2731
|
+
obj.RetryAfterMilliseconds = message.RetryAfterMilliseconds.toString();
|
|
2732
|
+
}
|
|
2733
|
+
if (message.ReadModelState !== "") {
|
|
2734
|
+
obj.ReadModelState = message.ReadModelState;
|
|
2735
|
+
}
|
|
2736
|
+
return obj;
|
|
2737
|
+
},
|
|
2738
|
+
|
|
2739
|
+
create(base?: DeepPartial<PartitionResult>): PartitionResult {
|
|
2740
|
+
return PartitionResult.fromPartial(base ?? {});
|
|
2741
|
+
},
|
|
2742
|
+
fromPartial(object: DeepPartial<PartitionResult>): PartitionResult {
|
|
2743
|
+
const message = createBasePartitionResult();
|
|
2744
|
+
message.Partition = object.Partition ?? "";
|
|
2745
|
+
message.State = object.State ?? 0;
|
|
2746
|
+
message.LastSuccessfulObservation =
|
|
2747
|
+
(object.LastSuccessfulObservation !== undefined && object.LastSuccessfulObservation !== null)
|
|
2748
|
+
? BigInt(object.LastSuccessfulObservation)
|
|
2749
|
+
: 0n;
|
|
2750
|
+
message.ExceptionMessages = object.ExceptionMessages?.map((e) => e) || [];
|
|
2751
|
+
message.ExceptionStackTrace = object.ExceptionStackTrace ?? "";
|
|
2752
|
+
message.RetryAfterMilliseconds =
|
|
2753
|
+
(object.RetryAfterMilliseconds !== undefined && object.RetryAfterMilliseconds !== null)
|
|
2754
|
+
? BigInt(object.RetryAfterMilliseconds)
|
|
2755
|
+
: 0n;
|
|
2756
|
+
message.ReadModelState = object.ReadModelState ?? "";
|
|
2757
|
+
return message;
|
|
2758
|
+
},
|
|
2759
|
+
};
|
|
2760
|
+
|
|
2242
2761
|
function createBaseReactorDefinition(): ReactorDefinition {
|
|
2243
2762
|
return {
|
|
2244
2763
|
ReactorId: "",
|
|
@@ -2529,6 +3048,8 @@ function createBaseReactorResult(): ReactorResult {
|
|
|
2529
3048
|
ExceptionMessages: [],
|
|
2530
3049
|
ExceptionStackTrace: "",
|
|
2531
3050
|
DeliveryId: 0n,
|
|
3051
|
+
RetryAfterMilliseconds: 0n,
|
|
3052
|
+
Partitions: [],
|
|
2532
3053
|
};
|
|
2533
3054
|
}
|
|
2534
3055
|
|
|
@@ -2560,6 +3081,15 @@ export const ReactorResult: MessageFns<ReactorResult> = {
|
|
|
2560
3081
|
}
|
|
2561
3082
|
writer.uint32(48).uint64(message.DeliveryId);
|
|
2562
3083
|
}
|
|
3084
|
+
if (message.RetryAfterMilliseconds !== 0n) {
|
|
3085
|
+
if (BigInt.asUintN(64, message.RetryAfterMilliseconds) !== message.RetryAfterMilliseconds) {
|
|
3086
|
+
throw new globalThis.Error("value provided for field message.RetryAfterMilliseconds of type uint64 too large");
|
|
3087
|
+
}
|
|
3088
|
+
writer.uint32(56).uint64(message.RetryAfterMilliseconds);
|
|
3089
|
+
}
|
|
3090
|
+
for (const v of message.Partitions) {
|
|
3091
|
+
PartitionResult.encode(v!, writer.uint32(66).fork()).join();
|
|
3092
|
+
}
|
|
2563
3093
|
return writer;
|
|
2564
3094
|
},
|
|
2565
3095
|
|
|
@@ -2624,6 +3154,22 @@ export const ReactorResult: MessageFns<ReactorResult> = {
|
|
|
2624
3154
|
message.DeliveryId = reader.uint64() as bigint;
|
|
2625
3155
|
continue;
|
|
2626
3156
|
}
|
|
3157
|
+
case 7: {
|
|
3158
|
+
if (tag !== 56) {
|
|
3159
|
+
break;
|
|
3160
|
+
}
|
|
3161
|
+
|
|
3162
|
+
message.RetryAfterMilliseconds = reader.uint64() as bigint;
|
|
3163
|
+
continue;
|
|
3164
|
+
}
|
|
3165
|
+
case 8: {
|
|
3166
|
+
if (tag !== 66) {
|
|
3167
|
+
break;
|
|
3168
|
+
}
|
|
3169
|
+
|
|
3170
|
+
message.Partitions.push(PartitionResult.decode(reader, reader.uint32()));
|
|
3171
|
+
continue;
|
|
3172
|
+
}
|
|
2627
3173
|
}
|
|
2628
3174
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2629
3175
|
break;
|
|
@@ -2648,6 +3194,10 @@ export const ReactorResult: MessageFns<ReactorResult> = {
|
|
|
2648
3194
|
: [],
|
|
2649
3195
|
ExceptionStackTrace: isSet(object.ExceptionStackTrace) ? globalThis.String(object.ExceptionStackTrace) : "",
|
|
2650
3196
|
DeliveryId: isSet(object.DeliveryId) ? BigInt(object.DeliveryId) : 0n,
|
|
3197
|
+
RetryAfterMilliseconds: isSet(object.RetryAfterMilliseconds) ? BigInt(object.RetryAfterMilliseconds) : 0n,
|
|
3198
|
+
Partitions: globalThis.Array.isArray(object?.Partitions)
|
|
3199
|
+
? object.Partitions.map((e: any) => PartitionResult.fromJSON(e))
|
|
3200
|
+
: [],
|
|
2651
3201
|
};
|
|
2652
3202
|
},
|
|
2653
3203
|
|
|
@@ -2671,6 +3221,12 @@ export const ReactorResult: MessageFns<ReactorResult> = {
|
|
|
2671
3221
|
if (message.DeliveryId !== 0n) {
|
|
2672
3222
|
obj.DeliveryId = message.DeliveryId.toString();
|
|
2673
3223
|
}
|
|
3224
|
+
if (message.RetryAfterMilliseconds !== 0n) {
|
|
3225
|
+
obj.RetryAfterMilliseconds = message.RetryAfterMilliseconds.toString();
|
|
3226
|
+
}
|
|
3227
|
+
if (message.Partitions?.length) {
|
|
3228
|
+
obj.Partitions = message.Partitions.map((e) => PartitionResult.toJSON(e));
|
|
3229
|
+
}
|
|
2674
3230
|
return obj;
|
|
2675
3231
|
},
|
|
2676
3232
|
|
|
@@ -2690,12 +3246,17 @@ export const ReactorResult: MessageFns<ReactorResult> = {
|
|
|
2690
3246
|
message.DeliveryId = (object.DeliveryId !== undefined && object.DeliveryId !== null)
|
|
2691
3247
|
? BigInt(object.DeliveryId)
|
|
2692
3248
|
: 0n;
|
|
3249
|
+
message.RetryAfterMilliseconds =
|
|
3250
|
+
(object.RetryAfterMilliseconds !== undefined && object.RetryAfterMilliseconds !== null)
|
|
3251
|
+
? BigInt(object.RetryAfterMilliseconds)
|
|
3252
|
+
: 0n;
|
|
3253
|
+
message.Partitions = object.Partitions?.map((e) => PartitionResult.fromPartial(e)) || [];
|
|
2693
3254
|
return message;
|
|
2694
3255
|
},
|
|
2695
3256
|
};
|
|
2696
3257
|
|
|
2697
3258
|
function createBaseRegisterReactor(): RegisterReactor {
|
|
2698
|
-
return { ConnectionId: "", EventStore: "", Namespace: "", Reactor: undefined };
|
|
3259
|
+
return { ConnectionId: "", EventStore: "", Namespace: "", Reactor: undefined, PageDelivery: undefined };
|
|
2699
3260
|
}
|
|
2700
3261
|
|
|
2701
3262
|
export const RegisterReactor: MessageFns<RegisterReactor> = {
|
|
@@ -2712,6 +3273,9 @@ export const RegisterReactor: MessageFns<RegisterReactor> = {
|
|
|
2712
3273
|
if (message.Reactor !== undefined) {
|
|
2713
3274
|
ReactorDefinition.encode(message.Reactor, writer.uint32(34).fork()).join();
|
|
2714
3275
|
}
|
|
3276
|
+
if (message.PageDelivery !== undefined) {
|
|
3277
|
+
PageDelivery.encode(message.PageDelivery, writer.uint32(42).fork()).join();
|
|
3278
|
+
}
|
|
2715
3279
|
return writer;
|
|
2716
3280
|
},
|
|
2717
3281
|
|
|
@@ -2760,6 +3324,14 @@ export const RegisterReactor: MessageFns<RegisterReactor> = {
|
|
|
2760
3324
|
message.Reactor = ReactorDefinition.decode(reader, reader.uint32());
|
|
2761
3325
|
continue;
|
|
2762
3326
|
}
|
|
3327
|
+
case 5: {
|
|
3328
|
+
if (tag !== 42) {
|
|
3329
|
+
break;
|
|
3330
|
+
}
|
|
3331
|
+
|
|
3332
|
+
message.PageDelivery = PageDelivery.decode(reader, reader.uint32());
|
|
3333
|
+
continue;
|
|
3334
|
+
}
|
|
2763
3335
|
}
|
|
2764
3336
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2765
3337
|
break;
|
|
@@ -2778,6 +3350,7 @@ export const RegisterReactor: MessageFns<RegisterReactor> = {
|
|
|
2778
3350
|
EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "",
|
|
2779
3351
|
Namespace: isSet(object.Namespace) ? globalThis.String(object.Namespace) : "",
|
|
2780
3352
|
Reactor: isSet(object.Reactor) ? ReactorDefinition.fromJSON(object.Reactor) : undefined,
|
|
3353
|
+
PageDelivery: isSet(object.PageDelivery) ? PageDelivery.fromJSON(object.PageDelivery) : undefined,
|
|
2781
3354
|
};
|
|
2782
3355
|
},
|
|
2783
3356
|
|
|
@@ -2795,6 +3368,9 @@ export const RegisterReactor: MessageFns<RegisterReactor> = {
|
|
|
2795
3368
|
if (message.Reactor !== undefined) {
|
|
2796
3369
|
obj.Reactor = ReactorDefinition.toJSON(message.Reactor);
|
|
2797
3370
|
}
|
|
3371
|
+
if (message.PageDelivery !== undefined) {
|
|
3372
|
+
obj.PageDelivery = PageDelivery.toJSON(message.PageDelivery);
|
|
3373
|
+
}
|
|
2798
3374
|
return obj;
|
|
2799
3375
|
},
|
|
2800
3376
|
|
|
@@ -2809,6 +3385,9 @@ export const RegisterReactor: MessageFns<RegisterReactor> = {
|
|
|
2809
3385
|
message.Reactor = (object.Reactor !== undefined && object.Reactor !== null)
|
|
2810
3386
|
? ReactorDefinition.fromPartial(object.Reactor)
|
|
2811
3387
|
: undefined;
|
|
3388
|
+
message.PageDelivery = (object.PageDelivery !== undefined && object.PageDelivery !== null)
|
|
3389
|
+
? PageDelivery.fromPartial(object.PageDelivery)
|
|
3390
|
+
: undefined;
|
|
2812
3391
|
return message;
|
|
2813
3392
|
},
|
|
2814
3393
|
};
|