@cratis/chronicle.contracts 19.31.10 → 19.32.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 (39) hide show
  1. package/dist/cjs/generated/alerts.d.ts +207 -0
  2. package/dist/cjs/generated/alerts.d.ts.map +1 -0
  3. package/dist/cjs/generated/alerts.js +2113 -0
  4. package/dist/cjs/generated/alerts.js.map +1 -0
  5. package/dist/cjs/generated/captures.js +0 -2
  6. package/dist/cjs/generated/captures.js.map +1 -1
  7. package/dist/cjs/generated/descriptorSet.js +1 -1
  8. package/dist/cjs/generated/descriptorSet.js.map +1 -1
  9. package/dist/cjs/generated/index.d.ts +5 -3
  10. package/dist/cjs/generated/index.d.ts.map +1 -1
  11. package/dist/cjs/index.js +43 -15
  12. package/dist/cjs/index.js.map +1 -1
  13. package/dist/esm/generated/alerts.d.ts +207 -0
  14. package/dist/esm/generated/alerts.d.ts.map +1 -0
  15. package/dist/esm/generated/alerts.js +2086 -0
  16. package/dist/esm/generated/alerts.js.map +1 -0
  17. package/dist/esm/generated/captures.js +1 -2
  18. package/dist/esm/generated/captures.js.map +1 -1
  19. package/dist/esm/generated/descriptorSet.js +1 -1
  20. package/dist/esm/generated/descriptorSet.js.map +1 -1
  21. package/dist/esm/generated/index.d.ts +5 -3
  22. package/dist/esm/generated/index.d.ts.map +1 -1
  23. package/dist/esm/index.js +3 -2
  24. package/dist/esm/index.js.map +1 -1
  25. package/dist/generated/alerts.d.ts +207 -0
  26. package/dist/generated/alerts.d.ts.map +1 -0
  27. package/dist/generated/alerts.js +2083 -0
  28. package/dist/generated/alerts.js.map +1 -0
  29. package/dist/generated/descriptorSet.js +1 -1
  30. package/dist/generated/descriptorSet.js.map +1 -1
  31. package/dist/generated/index.d.ts +5 -3
  32. package/dist/generated/index.d.ts.map +1 -1
  33. package/dist/generated/index.js +3 -2
  34. package/dist/generated/index.js.map +1 -1
  35. package/dist/tsconfig.tsbuildinfo +1 -1
  36. package/generated/alerts.ts +2423 -0
  37. package/generated/descriptorSet.ts +1 -1
  38. package/generated/index.ts +6 -3
  39. package/package.json +1 -1
@@ -0,0 +1,2086 @@
1
+ import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
2
+ import { Guid } from './protobuf-net/bcl.js';
3
+
4
+ const protobufPackage = "Cratis.Chronicle.Contracts.Alerts";
5
+ var AlertIncidentsReadinessState;
6
+ (function (AlertIncidentsReadinessState) {
7
+ AlertIncidentsReadinessState[AlertIncidentsReadinessState["CatchingUp"] = 0] = "CatchingUp";
8
+ AlertIncidentsReadinessState[AlertIncidentsReadinessState["Ready"] = 1] = "Ready";
9
+ AlertIncidentsReadinessState[AlertIncidentsReadinessState["Degraded"] = 2] = "Degraded";
10
+ AlertIncidentsReadinessState[AlertIncidentsReadinessState["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
11
+ })(AlertIncidentsReadinessState || (AlertIncidentsReadinessState = {}));
12
+ function alertIncidentsReadinessStateFromJSON(object) {
13
+ switch (object) {
14
+ case 0:
15
+ case "CatchingUp":
16
+ return AlertIncidentsReadinessState.CatchingUp;
17
+ case 1:
18
+ case "Ready":
19
+ return AlertIncidentsReadinessState.Ready;
20
+ case 2:
21
+ case "Degraded":
22
+ return AlertIncidentsReadinessState.Degraded;
23
+ case -1:
24
+ case "UNRECOGNIZED":
25
+ default:
26
+ return AlertIncidentsReadinessState.UNRECOGNIZED;
27
+ }
28
+ }
29
+ function alertIncidentsReadinessStateToJSON(object) {
30
+ switch (object) {
31
+ case AlertIncidentsReadinessState.CatchingUp:
32
+ return "CatchingUp";
33
+ case AlertIncidentsReadinessState.Ready:
34
+ return "Ready";
35
+ case AlertIncidentsReadinessState.Degraded:
36
+ return "Degraded";
37
+ case AlertIncidentsReadinessState.UNRECOGNIZED:
38
+ default:
39
+ return "UNRECOGNIZED";
40
+ }
41
+ }
42
+ var AlertSeverity;
43
+ (function (AlertSeverity) {
44
+ AlertSeverity[AlertSeverity["ALERT_SEVERITY_Warning"] = 0] = "ALERT_SEVERITY_Warning";
45
+ AlertSeverity[AlertSeverity["Critical"] = 1] = "Critical";
46
+ AlertSeverity[AlertSeverity["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
47
+ })(AlertSeverity || (AlertSeverity = {}));
48
+ function alertSeverityFromJSON(object) {
49
+ switch (object) {
50
+ case 0:
51
+ case "ALERT_SEVERITY_Warning":
52
+ return AlertSeverity.ALERT_SEVERITY_Warning;
53
+ case 1:
54
+ case "Critical":
55
+ return AlertSeverity.Critical;
56
+ case -1:
57
+ case "UNRECOGNIZED":
58
+ default:
59
+ return AlertSeverity.UNRECOGNIZED;
60
+ }
61
+ }
62
+ function alertSeverityToJSON(object) {
63
+ switch (object) {
64
+ case AlertSeverity.ALERT_SEVERITY_Warning:
65
+ return "ALERT_SEVERITY_Warning";
66
+ case AlertSeverity.Critical:
67
+ return "Critical";
68
+ case AlertSeverity.UNRECOGNIZED:
69
+ default:
70
+ return "UNRECOGNIZED";
71
+ }
72
+ }
73
+ var FailureKind;
74
+ (function (FailureKind) {
75
+ FailureKind[FailureKind["FAILURE_KIND_Unknown"] = 0] = "FAILURE_KIND_Unknown";
76
+ FailureKind[FailureKind["Handling"] = 1] = "Handling";
77
+ FailureKind[FailureKind["Timeout"] = 2] = "Timeout";
78
+ FailureKind[FailureKind["Disconnected"] = 3] = "Disconnected";
79
+ FailureKind[FailureKind["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
80
+ })(FailureKind || (FailureKind = {}));
81
+ function failureKindFromJSON(object) {
82
+ switch (object) {
83
+ case 0:
84
+ case "FAILURE_KIND_Unknown":
85
+ return FailureKind.FAILURE_KIND_Unknown;
86
+ case 1:
87
+ case "Handling":
88
+ return FailureKind.Handling;
89
+ case 2:
90
+ case "Timeout":
91
+ return FailureKind.Timeout;
92
+ case 3:
93
+ case "Disconnected":
94
+ return FailureKind.Disconnected;
95
+ case -1:
96
+ case "UNRECOGNIZED":
97
+ default:
98
+ return FailureKind.UNRECOGNIZED;
99
+ }
100
+ }
101
+ function failureKindToJSON(object) {
102
+ switch (object) {
103
+ case FailureKind.FAILURE_KIND_Unknown:
104
+ return "FAILURE_KIND_Unknown";
105
+ case FailureKind.Handling:
106
+ return "Handling";
107
+ case FailureKind.Timeout:
108
+ return "Timeout";
109
+ case FailureKind.Disconnected:
110
+ return "Disconnected";
111
+ case FailureKind.UNRECOGNIZED:
112
+ default:
113
+ return "UNRECOGNIZED";
114
+ }
115
+ }
116
+ var ValidationResultSeverity;
117
+ (function (ValidationResultSeverity) {
118
+ ValidationResultSeverity[ValidationResultSeverity["VALIDATION_RESULT_SEVERITY_Unknown"] = 0] = "VALIDATION_RESULT_SEVERITY_Unknown";
119
+ ValidationResultSeverity[ValidationResultSeverity["Information"] = 1] = "Information";
120
+ ValidationResultSeverity[ValidationResultSeverity["VALIDATION_RESULT_SEVERITY_Warning"] = 2] = "VALIDATION_RESULT_SEVERITY_Warning";
121
+ ValidationResultSeverity[ValidationResultSeverity["Error"] = 3] = "Error";
122
+ ValidationResultSeverity[ValidationResultSeverity["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
123
+ })(ValidationResultSeverity || (ValidationResultSeverity = {}));
124
+ function validationResultSeverityFromJSON(object) {
125
+ switch (object) {
126
+ case 0:
127
+ case "VALIDATION_RESULT_SEVERITY_Unknown":
128
+ return ValidationResultSeverity.VALIDATION_RESULT_SEVERITY_Unknown;
129
+ case 1:
130
+ case "Information":
131
+ return ValidationResultSeverity.Information;
132
+ case 2:
133
+ case "VALIDATION_RESULT_SEVERITY_Warning":
134
+ return ValidationResultSeverity.VALIDATION_RESULT_SEVERITY_Warning;
135
+ case 3:
136
+ case "Error":
137
+ return ValidationResultSeverity.Error;
138
+ case -1:
139
+ case "UNRECOGNIZED":
140
+ default:
141
+ return ValidationResultSeverity.UNRECOGNIZED;
142
+ }
143
+ }
144
+ function validationResultSeverityToJSON(object) {
145
+ switch (object) {
146
+ case ValidationResultSeverity.VALIDATION_RESULT_SEVERITY_Unknown:
147
+ return "VALIDATION_RESULT_SEVERITY_Unknown";
148
+ case ValidationResultSeverity.Information:
149
+ return "Information";
150
+ case ValidationResultSeverity.VALIDATION_RESULT_SEVERITY_Warning:
151
+ return "VALIDATION_RESULT_SEVERITY_Warning";
152
+ case ValidationResultSeverity.Error:
153
+ return "Error";
154
+ case ValidationResultSeverity.UNRECOGNIZED:
155
+ default:
156
+ return "UNRECOGNIZED";
157
+ }
158
+ }
159
+ function createBaseAlertEvidence() {
160
+ return { AttemptCount: 0, FirstFailure: undefined, LastFailure: undefined, FailureKind: 0, Message: "" };
161
+ }
162
+ const AlertEvidence = {
163
+ encode(message, writer = new BinaryWriter()) {
164
+ if (message.AttemptCount !== 0) {
165
+ writer.uint32(8).int32(message.AttemptCount);
166
+ }
167
+ if (message.FirstFailure !== undefined) {
168
+ SerializableDateTimeOffset.encode(message.FirstFailure, writer.uint32(18).fork()).join();
169
+ }
170
+ if (message.LastFailure !== undefined) {
171
+ SerializableDateTimeOffset.encode(message.LastFailure, writer.uint32(26).fork()).join();
172
+ }
173
+ if (message.FailureKind !== 0) {
174
+ writer.uint32(32).int32(message.FailureKind);
175
+ }
176
+ if (message.Message !== "") {
177
+ writer.uint32(42).string(message.Message);
178
+ }
179
+ return writer;
180
+ },
181
+ decode(input, length) {
182
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
183
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
184
+ if (previousRecursionDepth >= 100) {
185
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
186
+ }
187
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
188
+ try {
189
+ const end = length === undefined ? reader.len : reader.pos + length;
190
+ const message = createBaseAlertEvidence();
191
+ while (reader.pos < end) {
192
+ const tag = reader.uint32();
193
+ switch (tag >>> 3) {
194
+ case 1: {
195
+ if (tag !== 8) {
196
+ break;
197
+ }
198
+ message.AttemptCount = reader.int32();
199
+ continue;
200
+ }
201
+ case 2: {
202
+ if (tag !== 18) {
203
+ break;
204
+ }
205
+ message.FirstFailure = SerializableDateTimeOffset.decode(reader, reader.uint32());
206
+ continue;
207
+ }
208
+ case 3: {
209
+ if (tag !== 26) {
210
+ break;
211
+ }
212
+ message.LastFailure = SerializableDateTimeOffset.decode(reader, reader.uint32());
213
+ continue;
214
+ }
215
+ case 4: {
216
+ if (tag !== 32) {
217
+ break;
218
+ }
219
+ message.FailureKind = reader.int32();
220
+ continue;
221
+ }
222
+ case 5: {
223
+ if (tag !== 42) {
224
+ break;
225
+ }
226
+ message.Message = reader.string();
227
+ continue;
228
+ }
229
+ }
230
+ if ((tag & 7) === 4 || tag === 0) {
231
+ break;
232
+ }
233
+ reader.skip(tag & 7);
234
+ }
235
+ return message;
236
+ }
237
+ finally {
238
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
239
+ }
240
+ },
241
+ fromJSON(object) {
242
+ return {
243
+ AttemptCount: isSet(object.AttemptCount) ? globalThis.Number(object.AttemptCount) : 0,
244
+ FirstFailure: isSet(object.FirstFailure) ? SerializableDateTimeOffset.fromJSON(object.FirstFailure) : undefined,
245
+ LastFailure: isSet(object.LastFailure) ? SerializableDateTimeOffset.fromJSON(object.LastFailure) : undefined,
246
+ FailureKind: isSet(object.FailureKind) ? failureKindFromJSON(object.FailureKind) : 0,
247
+ Message: isSet(object.Message) ? globalThis.String(object.Message) : "",
248
+ };
249
+ },
250
+ toJSON(message) {
251
+ const obj = {};
252
+ if (message.AttemptCount !== 0) {
253
+ obj.AttemptCount = Math.round(message.AttemptCount);
254
+ }
255
+ if (message.FirstFailure !== undefined) {
256
+ obj.FirstFailure = SerializableDateTimeOffset.toJSON(message.FirstFailure);
257
+ }
258
+ if (message.LastFailure !== undefined) {
259
+ obj.LastFailure = SerializableDateTimeOffset.toJSON(message.LastFailure);
260
+ }
261
+ if (message.FailureKind !== 0) {
262
+ obj.FailureKind = failureKindToJSON(message.FailureKind);
263
+ }
264
+ if (message.Message !== "") {
265
+ obj.Message = message.Message;
266
+ }
267
+ return obj;
268
+ },
269
+ create(base) {
270
+ return AlertEvidence.fromPartial(base ?? {});
271
+ },
272
+ fromPartial(object) {
273
+ const message = createBaseAlertEvidence();
274
+ message.AttemptCount = object.AttemptCount ?? 0;
275
+ message.FirstFailure = (object.FirstFailure !== undefined && object.FirstFailure !== null)
276
+ ? SerializableDateTimeOffset.fromPartial(object.FirstFailure)
277
+ : undefined;
278
+ message.LastFailure = (object.LastFailure !== undefined && object.LastFailure !== null)
279
+ ? SerializableDateTimeOffset.fromPartial(object.LastFailure)
280
+ : undefined;
281
+ message.FailureKind = object.FailureKind ?? 0;
282
+ message.Message = object.Message ?? "";
283
+ return message;
284
+ },
285
+ };
286
+ function createBaseAlertIncidentContinuation() {
287
+ return { RaisedSequenceNumber: 0n, IncidentId: undefined };
288
+ }
289
+ const AlertIncidentContinuation = {
290
+ encode(message, writer = new BinaryWriter()) {
291
+ if (message.RaisedSequenceNumber !== 0n) {
292
+ if (BigInt.asUintN(64, message.RaisedSequenceNumber) !== message.RaisedSequenceNumber) {
293
+ throw new globalThis.Error("value provided for field message.RaisedSequenceNumber of type uint64 too large");
294
+ }
295
+ writer.uint32(8).uint64(message.RaisedSequenceNumber);
296
+ }
297
+ if (message.IncidentId !== undefined) {
298
+ Guid.encode(message.IncidentId, writer.uint32(18).fork()).join();
299
+ }
300
+ return writer;
301
+ },
302
+ decode(input, length) {
303
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
304
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
305
+ if (previousRecursionDepth >= 100) {
306
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
307
+ }
308
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
309
+ try {
310
+ const end = length === undefined ? reader.len : reader.pos + length;
311
+ const message = createBaseAlertIncidentContinuation();
312
+ while (reader.pos < end) {
313
+ const tag = reader.uint32();
314
+ switch (tag >>> 3) {
315
+ case 1: {
316
+ if (tag !== 8) {
317
+ break;
318
+ }
319
+ message.RaisedSequenceNumber = reader.uint64();
320
+ continue;
321
+ }
322
+ case 2: {
323
+ if (tag !== 18) {
324
+ break;
325
+ }
326
+ message.IncidentId = Guid.decode(reader, reader.uint32());
327
+ continue;
328
+ }
329
+ }
330
+ if ((tag & 7) === 4 || tag === 0) {
331
+ break;
332
+ }
333
+ reader.skip(tag & 7);
334
+ }
335
+ return message;
336
+ }
337
+ finally {
338
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
339
+ }
340
+ },
341
+ fromJSON(object) {
342
+ return {
343
+ RaisedSequenceNumber: isSet(object.RaisedSequenceNumber) ? BigInt(object.RaisedSequenceNumber) : 0n,
344
+ IncidentId: isSet(object.IncidentId) ? Guid.fromJSON(object.IncidentId) : undefined,
345
+ };
346
+ },
347
+ toJSON(message) {
348
+ const obj = {};
349
+ if (message.RaisedSequenceNumber !== 0n) {
350
+ obj.RaisedSequenceNumber = message.RaisedSequenceNumber.toString();
351
+ }
352
+ if (message.IncidentId !== undefined) {
353
+ obj.IncidentId = Guid.toJSON(message.IncidentId);
354
+ }
355
+ return obj;
356
+ },
357
+ create(base) {
358
+ return AlertIncidentContinuation.fromPartial(base ?? {});
359
+ },
360
+ fromPartial(object) {
361
+ const message = createBaseAlertIncidentContinuation();
362
+ message.RaisedSequenceNumber = (object.RaisedSequenceNumber !== undefined && object.RaisedSequenceNumber !== null)
363
+ ? BigInt(object.RaisedSequenceNumber)
364
+ : 0n;
365
+ message.IncidentId = (object.IncidentId !== undefined && object.IncidentId !== null)
366
+ ? Guid.fromPartial(object.IncidentId)
367
+ : undefined;
368
+ return message;
369
+ },
370
+ };
371
+ function createBaseAlertIncidentCountDetails() {
372
+ return { Namespace: "", Condition: "", Severity: 0, Count: 0n };
373
+ }
374
+ const AlertIncidentCountDetails = {
375
+ encode(message, writer = new BinaryWriter()) {
376
+ if (message.Namespace !== "") {
377
+ writer.uint32(10).string(message.Namespace);
378
+ }
379
+ if (message.Condition !== "") {
380
+ writer.uint32(18).string(message.Condition);
381
+ }
382
+ if (message.Severity !== 0) {
383
+ writer.uint32(24).int32(message.Severity);
384
+ }
385
+ if (message.Count !== 0n) {
386
+ if (BigInt.asIntN(64, message.Count) !== message.Count) {
387
+ throw new globalThis.Error("value provided for field message.Count of type int64 too large");
388
+ }
389
+ writer.uint32(32).int64(message.Count);
390
+ }
391
+ return writer;
392
+ },
393
+ decode(input, length) {
394
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
395
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
396
+ if (previousRecursionDepth >= 100) {
397
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
398
+ }
399
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
400
+ try {
401
+ const end = length === undefined ? reader.len : reader.pos + length;
402
+ const message = createBaseAlertIncidentCountDetails();
403
+ while (reader.pos < end) {
404
+ const tag = reader.uint32();
405
+ switch (tag >>> 3) {
406
+ case 1: {
407
+ if (tag !== 10) {
408
+ break;
409
+ }
410
+ message.Namespace = reader.string();
411
+ continue;
412
+ }
413
+ case 2: {
414
+ if (tag !== 18) {
415
+ break;
416
+ }
417
+ message.Condition = reader.string();
418
+ continue;
419
+ }
420
+ case 3: {
421
+ if (tag !== 24) {
422
+ break;
423
+ }
424
+ message.Severity = reader.int32();
425
+ continue;
426
+ }
427
+ case 4: {
428
+ if (tag !== 32) {
429
+ break;
430
+ }
431
+ message.Count = reader.int64();
432
+ continue;
433
+ }
434
+ }
435
+ if ((tag & 7) === 4 || tag === 0) {
436
+ break;
437
+ }
438
+ reader.skip(tag & 7);
439
+ }
440
+ return message;
441
+ }
442
+ finally {
443
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
444
+ }
445
+ },
446
+ fromJSON(object) {
447
+ return {
448
+ Namespace: isSet(object.Namespace) ? globalThis.String(object.Namespace) : "",
449
+ Condition: isSet(object.Condition) ? globalThis.String(object.Condition) : "",
450
+ Severity: isSet(object.Severity) ? alertSeverityFromJSON(object.Severity) : 0,
451
+ Count: isSet(object.Count) ? BigInt(object.Count) : 0n,
452
+ };
453
+ },
454
+ toJSON(message) {
455
+ const obj = {};
456
+ if (message.Namespace !== "") {
457
+ obj.Namespace = message.Namespace;
458
+ }
459
+ if (message.Condition !== "") {
460
+ obj.Condition = message.Condition;
461
+ }
462
+ if (message.Severity !== 0) {
463
+ obj.Severity = alertSeverityToJSON(message.Severity);
464
+ }
465
+ if (message.Count !== 0n) {
466
+ obj.Count = message.Count.toString();
467
+ }
468
+ return obj;
469
+ },
470
+ create(base) {
471
+ return AlertIncidentCountDetails.fromPartial(base ?? {});
472
+ },
473
+ fromPartial(object) {
474
+ const message = createBaseAlertIncidentCountDetails();
475
+ message.Namespace = object.Namespace ?? "";
476
+ message.Condition = object.Condition ?? "";
477
+ message.Severity = object.Severity ?? 0;
478
+ message.Count = (object.Count !== undefined && object.Count !== null) ? BigInt(object.Count) : 0n;
479
+ return message;
480
+ },
481
+ };
482
+ function createBaseAlertIncidentDetails() {
483
+ return {
484
+ Id: undefined,
485
+ Target: undefined,
486
+ Condition: "",
487
+ Severity: 0,
488
+ Evidence: undefined,
489
+ RaisedAt: undefined,
490
+ LastChangedAt: undefined,
491
+ RaisedSequenceNumber: 0n,
492
+ LastTransitionSequenceNumber: 0n,
493
+ };
494
+ }
495
+ const AlertIncidentDetails = {
496
+ encode(message, writer = new BinaryWriter()) {
497
+ if (message.Id !== undefined) {
498
+ Guid.encode(message.Id, writer.uint32(10).fork()).join();
499
+ }
500
+ if (message.Target !== undefined) {
501
+ AlertTarget.encode(message.Target, writer.uint32(18).fork()).join();
502
+ }
503
+ if (message.Condition !== "") {
504
+ writer.uint32(26).string(message.Condition);
505
+ }
506
+ if (message.Severity !== 0) {
507
+ writer.uint32(32).int32(message.Severity);
508
+ }
509
+ if (message.Evidence !== undefined) {
510
+ AlertEvidence.encode(message.Evidence, writer.uint32(42).fork()).join();
511
+ }
512
+ if (message.RaisedAt !== undefined) {
513
+ SerializableDateTimeOffset.encode(message.RaisedAt, writer.uint32(50).fork()).join();
514
+ }
515
+ if (message.LastChangedAt !== undefined) {
516
+ SerializableDateTimeOffset.encode(message.LastChangedAt, writer.uint32(58).fork()).join();
517
+ }
518
+ if (message.RaisedSequenceNumber !== 0n) {
519
+ if (BigInt.asUintN(64, message.RaisedSequenceNumber) !== message.RaisedSequenceNumber) {
520
+ throw new globalThis.Error("value provided for field message.RaisedSequenceNumber of type uint64 too large");
521
+ }
522
+ writer.uint32(64).uint64(message.RaisedSequenceNumber);
523
+ }
524
+ if (message.LastTransitionSequenceNumber !== 0n) {
525
+ if (BigInt.asUintN(64, message.LastTransitionSequenceNumber) !== message.LastTransitionSequenceNumber) {
526
+ throw new globalThis.Error("value provided for field message.LastTransitionSequenceNumber of type uint64 too large");
527
+ }
528
+ writer.uint32(72).uint64(message.LastTransitionSequenceNumber);
529
+ }
530
+ return writer;
531
+ },
532
+ decode(input, length) {
533
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
534
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
535
+ if (previousRecursionDepth >= 100) {
536
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
537
+ }
538
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
539
+ try {
540
+ const end = length === undefined ? reader.len : reader.pos + length;
541
+ const message = createBaseAlertIncidentDetails();
542
+ while (reader.pos < end) {
543
+ const tag = reader.uint32();
544
+ switch (tag >>> 3) {
545
+ case 1: {
546
+ if (tag !== 10) {
547
+ break;
548
+ }
549
+ message.Id = Guid.decode(reader, reader.uint32());
550
+ continue;
551
+ }
552
+ case 2: {
553
+ if (tag !== 18) {
554
+ break;
555
+ }
556
+ message.Target = AlertTarget.decode(reader, reader.uint32());
557
+ continue;
558
+ }
559
+ case 3: {
560
+ if (tag !== 26) {
561
+ break;
562
+ }
563
+ message.Condition = reader.string();
564
+ continue;
565
+ }
566
+ case 4: {
567
+ if (tag !== 32) {
568
+ break;
569
+ }
570
+ message.Severity = reader.int32();
571
+ continue;
572
+ }
573
+ case 5: {
574
+ if (tag !== 42) {
575
+ break;
576
+ }
577
+ message.Evidence = AlertEvidence.decode(reader, reader.uint32());
578
+ continue;
579
+ }
580
+ case 6: {
581
+ if (tag !== 50) {
582
+ break;
583
+ }
584
+ message.RaisedAt = SerializableDateTimeOffset.decode(reader, reader.uint32());
585
+ continue;
586
+ }
587
+ case 7: {
588
+ if (tag !== 58) {
589
+ break;
590
+ }
591
+ message.LastChangedAt = SerializableDateTimeOffset.decode(reader, reader.uint32());
592
+ continue;
593
+ }
594
+ case 8: {
595
+ if (tag !== 64) {
596
+ break;
597
+ }
598
+ message.RaisedSequenceNumber = reader.uint64();
599
+ continue;
600
+ }
601
+ case 9: {
602
+ if (tag !== 72) {
603
+ break;
604
+ }
605
+ message.LastTransitionSequenceNumber = reader.uint64();
606
+ continue;
607
+ }
608
+ }
609
+ if ((tag & 7) === 4 || tag === 0) {
610
+ break;
611
+ }
612
+ reader.skip(tag & 7);
613
+ }
614
+ return message;
615
+ }
616
+ finally {
617
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
618
+ }
619
+ },
620
+ fromJSON(object) {
621
+ return {
622
+ Id: isSet(object.Id) ? Guid.fromJSON(object.Id) : undefined,
623
+ Target: isSet(object.Target) ? AlertTarget.fromJSON(object.Target) : undefined,
624
+ Condition: isSet(object.Condition) ? globalThis.String(object.Condition) : "",
625
+ Severity: isSet(object.Severity) ? alertSeverityFromJSON(object.Severity) : 0,
626
+ Evidence: isSet(object.Evidence) ? AlertEvidence.fromJSON(object.Evidence) : undefined,
627
+ RaisedAt: isSet(object.RaisedAt) ? SerializableDateTimeOffset.fromJSON(object.RaisedAt) : undefined,
628
+ LastChangedAt: isSet(object.LastChangedAt)
629
+ ? SerializableDateTimeOffset.fromJSON(object.LastChangedAt)
630
+ : undefined,
631
+ RaisedSequenceNumber: isSet(object.RaisedSequenceNumber) ? BigInt(object.RaisedSequenceNumber) : 0n,
632
+ LastTransitionSequenceNumber: isSet(object.LastTransitionSequenceNumber)
633
+ ? BigInt(object.LastTransitionSequenceNumber)
634
+ : 0n,
635
+ };
636
+ },
637
+ toJSON(message) {
638
+ const obj = {};
639
+ if (message.Id !== undefined) {
640
+ obj.Id = Guid.toJSON(message.Id);
641
+ }
642
+ if (message.Target !== undefined) {
643
+ obj.Target = AlertTarget.toJSON(message.Target);
644
+ }
645
+ if (message.Condition !== "") {
646
+ obj.Condition = message.Condition;
647
+ }
648
+ if (message.Severity !== 0) {
649
+ obj.Severity = alertSeverityToJSON(message.Severity);
650
+ }
651
+ if (message.Evidence !== undefined) {
652
+ obj.Evidence = AlertEvidence.toJSON(message.Evidence);
653
+ }
654
+ if (message.RaisedAt !== undefined) {
655
+ obj.RaisedAt = SerializableDateTimeOffset.toJSON(message.RaisedAt);
656
+ }
657
+ if (message.LastChangedAt !== undefined) {
658
+ obj.LastChangedAt = SerializableDateTimeOffset.toJSON(message.LastChangedAt);
659
+ }
660
+ if (message.RaisedSequenceNumber !== 0n) {
661
+ obj.RaisedSequenceNumber = message.RaisedSequenceNumber.toString();
662
+ }
663
+ if (message.LastTransitionSequenceNumber !== 0n) {
664
+ obj.LastTransitionSequenceNumber = message.LastTransitionSequenceNumber.toString();
665
+ }
666
+ return obj;
667
+ },
668
+ create(base) {
669
+ return AlertIncidentDetails.fromPartial(base ?? {});
670
+ },
671
+ fromPartial(object) {
672
+ const message = createBaseAlertIncidentDetails();
673
+ message.Id = (object.Id !== undefined && object.Id !== null) ? Guid.fromPartial(object.Id) : undefined;
674
+ message.Target = (object.Target !== undefined && object.Target !== null)
675
+ ? AlertTarget.fromPartial(object.Target)
676
+ : undefined;
677
+ message.Condition = object.Condition ?? "";
678
+ message.Severity = object.Severity ?? 0;
679
+ message.Evidence = (object.Evidence !== undefined && object.Evidence !== null)
680
+ ? AlertEvidence.fromPartial(object.Evidence)
681
+ : undefined;
682
+ message.RaisedAt = (object.RaisedAt !== undefined && object.RaisedAt !== null)
683
+ ? SerializableDateTimeOffset.fromPartial(object.RaisedAt)
684
+ : undefined;
685
+ message.LastChangedAt = (object.LastChangedAt !== undefined && object.LastChangedAt !== null)
686
+ ? SerializableDateTimeOffset.fromPartial(object.LastChangedAt)
687
+ : undefined;
688
+ message.RaisedSequenceNumber = (object.RaisedSequenceNumber !== undefined && object.RaisedSequenceNumber !== null)
689
+ ? BigInt(object.RaisedSequenceNumber)
690
+ : 0n;
691
+ message.LastTransitionSequenceNumber =
692
+ (object.LastTransitionSequenceNumber !== undefined && object.LastTransitionSequenceNumber !== null)
693
+ ? BigInt(object.LastTransitionSequenceNumber)
694
+ : 0n;
695
+ return message;
696
+ },
697
+ };
698
+ function createBaseAlertIncidentLookupResponse() {
699
+ return { Status: 0, Incident: undefined };
700
+ }
701
+ const AlertIncidentLookupResponse = {
702
+ encode(message, writer = new BinaryWriter()) {
703
+ if (message.Status !== 0) {
704
+ writer.uint32(8).int32(message.Status);
705
+ }
706
+ if (message.Incident !== undefined) {
707
+ AlertIncidentDetails.encode(message.Incident, writer.uint32(18).fork()).join();
708
+ }
709
+ return writer;
710
+ },
711
+ decode(input, length) {
712
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
713
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
714
+ if (previousRecursionDepth >= 100) {
715
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
716
+ }
717
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
718
+ try {
719
+ const end = length === undefined ? reader.len : reader.pos + length;
720
+ const message = createBaseAlertIncidentLookupResponse();
721
+ while (reader.pos < end) {
722
+ const tag = reader.uint32();
723
+ switch (tag >>> 3) {
724
+ case 1: {
725
+ if (tag !== 8) {
726
+ break;
727
+ }
728
+ message.Status = reader.int32();
729
+ continue;
730
+ }
731
+ case 2: {
732
+ if (tag !== 18) {
733
+ break;
734
+ }
735
+ message.Incident = AlertIncidentDetails.decode(reader, reader.uint32());
736
+ continue;
737
+ }
738
+ }
739
+ if ((tag & 7) === 4 || tag === 0) {
740
+ break;
741
+ }
742
+ reader.skip(tag & 7);
743
+ }
744
+ return message;
745
+ }
746
+ finally {
747
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
748
+ }
749
+ },
750
+ fromJSON(object) {
751
+ return {
752
+ Status: isSet(object.Status) ? alertIncidentsReadinessStateFromJSON(object.Status) : 0,
753
+ Incident: isSet(object.Incident) ? AlertIncidentDetails.fromJSON(object.Incident) : undefined,
754
+ };
755
+ },
756
+ toJSON(message) {
757
+ const obj = {};
758
+ if (message.Status !== 0) {
759
+ obj.Status = alertIncidentsReadinessStateToJSON(message.Status);
760
+ }
761
+ if (message.Incident !== undefined) {
762
+ obj.Incident = AlertIncidentDetails.toJSON(message.Incident);
763
+ }
764
+ return obj;
765
+ },
766
+ create(base) {
767
+ return AlertIncidentLookupResponse.fromPartial(base ?? {});
768
+ },
769
+ fromPartial(object) {
770
+ const message = createBaseAlertIncidentLookupResponse();
771
+ message.Status = object.Status ?? 0;
772
+ message.Incident = (object.Incident !== undefined && object.Incident !== null)
773
+ ? AlertIncidentDetails.fromPartial(object.Incident)
774
+ : undefined;
775
+ return message;
776
+ },
777
+ };
778
+ function createBaseAlertIncidentPageResponse() {
779
+ return { Status: 0, Items: [], Next: undefined };
780
+ }
781
+ const AlertIncidentPageResponse = {
782
+ encode(message, writer = new BinaryWriter()) {
783
+ if (message.Status !== 0) {
784
+ writer.uint32(8).int32(message.Status);
785
+ }
786
+ for (const v of message.Items) {
787
+ AlertIncidentDetails.encode(v, writer.uint32(18).fork()).join();
788
+ }
789
+ if (message.Next !== undefined) {
790
+ AlertIncidentContinuation.encode(message.Next, writer.uint32(26).fork()).join();
791
+ }
792
+ return writer;
793
+ },
794
+ decode(input, length) {
795
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
796
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
797
+ if (previousRecursionDepth >= 100) {
798
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
799
+ }
800
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
801
+ try {
802
+ const end = length === undefined ? reader.len : reader.pos + length;
803
+ const message = createBaseAlertIncidentPageResponse();
804
+ while (reader.pos < end) {
805
+ const tag = reader.uint32();
806
+ switch (tag >>> 3) {
807
+ case 1: {
808
+ if (tag !== 8) {
809
+ break;
810
+ }
811
+ message.Status = reader.int32();
812
+ continue;
813
+ }
814
+ case 2: {
815
+ if (tag !== 18) {
816
+ break;
817
+ }
818
+ message.Items.push(AlertIncidentDetails.decode(reader, reader.uint32()));
819
+ continue;
820
+ }
821
+ case 3: {
822
+ if (tag !== 26) {
823
+ break;
824
+ }
825
+ message.Next = AlertIncidentContinuation.decode(reader, reader.uint32());
826
+ continue;
827
+ }
828
+ }
829
+ if ((tag & 7) === 4 || tag === 0) {
830
+ break;
831
+ }
832
+ reader.skip(tag & 7);
833
+ }
834
+ return message;
835
+ }
836
+ finally {
837
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
838
+ }
839
+ },
840
+ fromJSON(object) {
841
+ return {
842
+ Status: isSet(object.Status) ? alertIncidentsReadinessStateFromJSON(object.Status) : 0,
843
+ Items: globalThis.Array.isArray(object?.Items)
844
+ ? object.Items.map((e) => AlertIncidentDetails.fromJSON(e))
845
+ : [],
846
+ Next: isSet(object.Next) ? AlertIncidentContinuation.fromJSON(object.Next) : undefined,
847
+ };
848
+ },
849
+ toJSON(message) {
850
+ const obj = {};
851
+ if (message.Status !== 0) {
852
+ obj.Status = alertIncidentsReadinessStateToJSON(message.Status);
853
+ }
854
+ if (message.Items?.length) {
855
+ obj.Items = message.Items.map((e) => AlertIncidentDetails.toJSON(e));
856
+ }
857
+ if (message.Next !== undefined) {
858
+ obj.Next = AlertIncidentContinuation.toJSON(message.Next);
859
+ }
860
+ return obj;
861
+ },
862
+ create(base) {
863
+ return AlertIncidentPageResponse.fromPartial(base ?? {});
864
+ },
865
+ fromPartial(object) {
866
+ const message = createBaseAlertIncidentPageResponse();
867
+ message.Status = object.Status ?? 0;
868
+ message.Items = object.Items?.map((e) => AlertIncidentDetails.fromPartial(e)) || [];
869
+ message.Next = (object.Next !== undefined && object.Next !== null)
870
+ ? AlertIncidentContinuation.fromPartial(object.Next)
871
+ : undefined;
872
+ return message;
873
+ },
874
+ };
875
+ function createBaseAlertIncidentSummaryResponse() {
876
+ return { Status: 0, Counts: [] };
877
+ }
878
+ const AlertIncidentSummaryResponse = {
879
+ encode(message, writer = new BinaryWriter()) {
880
+ if (message.Status !== 0) {
881
+ writer.uint32(8).int32(message.Status);
882
+ }
883
+ for (const v of message.Counts) {
884
+ AlertIncidentCountDetails.encode(v, writer.uint32(18).fork()).join();
885
+ }
886
+ return writer;
887
+ },
888
+ decode(input, length) {
889
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
890
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
891
+ if (previousRecursionDepth >= 100) {
892
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
893
+ }
894
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
895
+ try {
896
+ const end = length === undefined ? reader.len : reader.pos + length;
897
+ const message = createBaseAlertIncidentSummaryResponse();
898
+ while (reader.pos < end) {
899
+ const tag = reader.uint32();
900
+ switch (tag >>> 3) {
901
+ case 1: {
902
+ if (tag !== 8) {
903
+ break;
904
+ }
905
+ message.Status = reader.int32();
906
+ continue;
907
+ }
908
+ case 2: {
909
+ if (tag !== 18) {
910
+ break;
911
+ }
912
+ message.Counts.push(AlertIncidentCountDetails.decode(reader, reader.uint32()));
913
+ continue;
914
+ }
915
+ }
916
+ if ((tag & 7) === 4 || tag === 0) {
917
+ break;
918
+ }
919
+ reader.skip(tag & 7);
920
+ }
921
+ return message;
922
+ }
923
+ finally {
924
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
925
+ }
926
+ },
927
+ fromJSON(object) {
928
+ return {
929
+ Status: isSet(object.Status) ? alertIncidentsReadinessStateFromJSON(object.Status) : 0,
930
+ Counts: globalThis.Array.isArray(object?.Counts)
931
+ ? object.Counts.map((e) => AlertIncidentCountDetails.fromJSON(e))
932
+ : [],
933
+ };
934
+ },
935
+ toJSON(message) {
936
+ const obj = {};
937
+ if (message.Status !== 0) {
938
+ obj.Status = alertIncidentsReadinessStateToJSON(message.Status);
939
+ }
940
+ if (message.Counts?.length) {
941
+ obj.Counts = message.Counts.map((e) => AlertIncidentCountDetails.toJSON(e));
942
+ }
943
+ return obj;
944
+ },
945
+ create(base) {
946
+ return AlertIncidentSummaryResponse.fromPartial(base ?? {});
947
+ },
948
+ fromPartial(object) {
949
+ const message = createBaseAlertIncidentSummaryResponse();
950
+ message.Status = object.Status ?? 0;
951
+ message.Counts = object.Counts?.map((e) => AlertIncidentCountDetails.fromPartial(e)) || [];
952
+ return message;
953
+ },
954
+ };
955
+ function createBaseAlertTarget() {
956
+ return { EventStore: "", Namespace: "", ObserverId: "", EventSequenceId: "", Partition: "" };
957
+ }
958
+ const AlertTarget = {
959
+ encode(message, writer = new BinaryWriter()) {
960
+ if (message.EventStore !== "") {
961
+ writer.uint32(10).string(message.EventStore);
962
+ }
963
+ if (message.Namespace !== "") {
964
+ writer.uint32(18).string(message.Namespace);
965
+ }
966
+ if (message.ObserverId !== "") {
967
+ writer.uint32(26).string(message.ObserverId);
968
+ }
969
+ if (message.EventSequenceId !== "") {
970
+ writer.uint32(34).string(message.EventSequenceId);
971
+ }
972
+ if (message.Partition !== "") {
973
+ writer.uint32(42).string(message.Partition);
974
+ }
975
+ return writer;
976
+ },
977
+ decode(input, length) {
978
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
979
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
980
+ if (previousRecursionDepth >= 100) {
981
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
982
+ }
983
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
984
+ try {
985
+ const end = length === undefined ? reader.len : reader.pos + length;
986
+ const message = createBaseAlertTarget();
987
+ while (reader.pos < end) {
988
+ const tag = reader.uint32();
989
+ switch (tag >>> 3) {
990
+ case 1: {
991
+ if (tag !== 10) {
992
+ break;
993
+ }
994
+ message.EventStore = reader.string();
995
+ continue;
996
+ }
997
+ case 2: {
998
+ if (tag !== 18) {
999
+ break;
1000
+ }
1001
+ message.Namespace = reader.string();
1002
+ continue;
1003
+ }
1004
+ case 3: {
1005
+ if (tag !== 26) {
1006
+ break;
1007
+ }
1008
+ message.ObserverId = reader.string();
1009
+ continue;
1010
+ }
1011
+ case 4: {
1012
+ if (tag !== 34) {
1013
+ break;
1014
+ }
1015
+ message.EventSequenceId = reader.string();
1016
+ continue;
1017
+ }
1018
+ case 5: {
1019
+ if (tag !== 42) {
1020
+ break;
1021
+ }
1022
+ message.Partition = reader.string();
1023
+ continue;
1024
+ }
1025
+ }
1026
+ if ((tag & 7) === 4 || tag === 0) {
1027
+ break;
1028
+ }
1029
+ reader.skip(tag & 7);
1030
+ }
1031
+ return message;
1032
+ }
1033
+ finally {
1034
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1035
+ }
1036
+ },
1037
+ fromJSON(object) {
1038
+ return {
1039
+ EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "",
1040
+ Namespace: isSet(object.Namespace) ? globalThis.String(object.Namespace) : "",
1041
+ ObserverId: isSet(object.ObserverId) ? globalThis.String(object.ObserverId) : "",
1042
+ EventSequenceId: isSet(object.EventSequenceId) ? globalThis.String(object.EventSequenceId) : "",
1043
+ Partition: isSet(object.Partition) ? globalThis.String(object.Partition) : "",
1044
+ };
1045
+ },
1046
+ toJSON(message) {
1047
+ const obj = {};
1048
+ if (message.EventStore !== "") {
1049
+ obj.EventStore = message.EventStore;
1050
+ }
1051
+ if (message.Namespace !== "") {
1052
+ obj.Namespace = message.Namespace;
1053
+ }
1054
+ if (message.ObserverId !== "") {
1055
+ obj.ObserverId = message.ObserverId;
1056
+ }
1057
+ if (message.EventSequenceId !== "") {
1058
+ obj.EventSequenceId = message.EventSequenceId;
1059
+ }
1060
+ if (message.Partition !== "") {
1061
+ obj.Partition = message.Partition;
1062
+ }
1063
+ return obj;
1064
+ },
1065
+ create(base) {
1066
+ return AlertTarget.fromPartial(base ?? {});
1067
+ },
1068
+ fromPartial(object) {
1069
+ const message = createBaseAlertTarget();
1070
+ message.EventStore = object.EventStore ?? "";
1071
+ message.Namespace = object.Namespace ?? "";
1072
+ message.ObserverId = object.ObserverId ?? "";
1073
+ message.EventSequenceId = object.EventSequenceId ?? "";
1074
+ message.Partition = object.Partition ?? "";
1075
+ return message;
1076
+ },
1077
+ };
1078
+ function createBaseGetOpenIncidentCountsRequest() {
1079
+ return { EventStore: "", Namespace: "" };
1080
+ }
1081
+ const GetOpenIncidentCountsRequest = {
1082
+ encode(message, writer = new BinaryWriter()) {
1083
+ if (message.EventStore !== "") {
1084
+ writer.uint32(10).string(message.EventStore);
1085
+ }
1086
+ if (message.Namespace !== "") {
1087
+ writer.uint32(18).string(message.Namespace);
1088
+ }
1089
+ return writer;
1090
+ },
1091
+ decode(input, length) {
1092
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1093
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1094
+ if (previousRecursionDepth >= 100) {
1095
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1096
+ }
1097
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1098
+ try {
1099
+ const end = length === undefined ? reader.len : reader.pos + length;
1100
+ const message = createBaseGetOpenIncidentCountsRequest();
1101
+ while (reader.pos < end) {
1102
+ const tag = reader.uint32();
1103
+ switch (tag >>> 3) {
1104
+ case 1: {
1105
+ if (tag !== 10) {
1106
+ break;
1107
+ }
1108
+ message.EventStore = reader.string();
1109
+ continue;
1110
+ }
1111
+ case 2: {
1112
+ if (tag !== 18) {
1113
+ break;
1114
+ }
1115
+ message.Namespace = reader.string();
1116
+ continue;
1117
+ }
1118
+ }
1119
+ if ((tag & 7) === 4 || tag === 0) {
1120
+ break;
1121
+ }
1122
+ reader.skip(tag & 7);
1123
+ }
1124
+ return message;
1125
+ }
1126
+ finally {
1127
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1128
+ }
1129
+ },
1130
+ fromJSON(object) {
1131
+ return {
1132
+ EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "",
1133
+ Namespace: isSet(object.Namespace) ? globalThis.String(object.Namespace) : "",
1134
+ };
1135
+ },
1136
+ toJSON(message) {
1137
+ const obj = {};
1138
+ if (message.EventStore !== "") {
1139
+ obj.EventStore = message.EventStore;
1140
+ }
1141
+ if (message.Namespace !== "") {
1142
+ obj.Namespace = message.Namespace;
1143
+ }
1144
+ return obj;
1145
+ },
1146
+ create(base) {
1147
+ return GetOpenIncidentCountsRequest.fromPartial(base ?? {});
1148
+ },
1149
+ fromPartial(object) {
1150
+ const message = createBaseGetOpenIncidentCountsRequest();
1151
+ message.EventStore = object.EventStore ?? "";
1152
+ message.Namespace = object.Namespace ?? "";
1153
+ return message;
1154
+ },
1155
+ };
1156
+ function createBaseGetOpenIncidentRequest() {
1157
+ return { EventStore: "", IncidentId: undefined, Namespace: "" };
1158
+ }
1159
+ const GetOpenIncidentRequest = {
1160
+ encode(message, writer = new BinaryWriter()) {
1161
+ if (message.EventStore !== "") {
1162
+ writer.uint32(10).string(message.EventStore);
1163
+ }
1164
+ if (message.IncidentId !== undefined) {
1165
+ Guid.encode(message.IncidentId, writer.uint32(18).fork()).join();
1166
+ }
1167
+ if (message.Namespace !== "") {
1168
+ writer.uint32(26).string(message.Namespace);
1169
+ }
1170
+ return writer;
1171
+ },
1172
+ decode(input, length) {
1173
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1174
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1175
+ if (previousRecursionDepth >= 100) {
1176
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1177
+ }
1178
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1179
+ try {
1180
+ const end = length === undefined ? reader.len : reader.pos + length;
1181
+ const message = createBaseGetOpenIncidentRequest();
1182
+ while (reader.pos < end) {
1183
+ const tag = reader.uint32();
1184
+ switch (tag >>> 3) {
1185
+ case 1: {
1186
+ if (tag !== 10) {
1187
+ break;
1188
+ }
1189
+ message.EventStore = reader.string();
1190
+ continue;
1191
+ }
1192
+ case 2: {
1193
+ if (tag !== 18) {
1194
+ break;
1195
+ }
1196
+ message.IncidentId = Guid.decode(reader, reader.uint32());
1197
+ continue;
1198
+ }
1199
+ case 3: {
1200
+ if (tag !== 26) {
1201
+ break;
1202
+ }
1203
+ message.Namespace = reader.string();
1204
+ continue;
1205
+ }
1206
+ }
1207
+ if ((tag & 7) === 4 || tag === 0) {
1208
+ break;
1209
+ }
1210
+ reader.skip(tag & 7);
1211
+ }
1212
+ return message;
1213
+ }
1214
+ finally {
1215
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1216
+ }
1217
+ },
1218
+ fromJSON(object) {
1219
+ return {
1220
+ EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "",
1221
+ IncidentId: isSet(object.IncidentId) ? Guid.fromJSON(object.IncidentId) : undefined,
1222
+ Namespace: isSet(object.Namespace) ? globalThis.String(object.Namespace) : "",
1223
+ };
1224
+ },
1225
+ toJSON(message) {
1226
+ const obj = {};
1227
+ if (message.EventStore !== "") {
1228
+ obj.EventStore = message.EventStore;
1229
+ }
1230
+ if (message.IncidentId !== undefined) {
1231
+ obj.IncidentId = Guid.toJSON(message.IncidentId);
1232
+ }
1233
+ if (message.Namespace !== "") {
1234
+ obj.Namespace = message.Namespace;
1235
+ }
1236
+ return obj;
1237
+ },
1238
+ create(base) {
1239
+ return GetOpenIncidentRequest.fromPartial(base ?? {});
1240
+ },
1241
+ fromPartial(object) {
1242
+ const message = createBaseGetOpenIncidentRequest();
1243
+ message.EventStore = object.EventStore ?? "";
1244
+ message.IncidentId = (object.IncidentId !== undefined && object.IncidentId !== null)
1245
+ ? Guid.fromPartial(object.IncidentId)
1246
+ : undefined;
1247
+ message.Namespace = object.Namespace ?? "";
1248
+ return message;
1249
+ },
1250
+ };
1251
+ function createBaseGetOpenIncidentsRequest() {
1252
+ return {
1253
+ EventStore: "",
1254
+ Namespace: "",
1255
+ ObserverId: "",
1256
+ Condition: "",
1257
+ MinimumSeverity: 0,
1258
+ Limit: 0,
1259
+ AfterRaisedSequenceNumber: 0n,
1260
+ AfterIncidentId: undefined,
1261
+ };
1262
+ }
1263
+ const GetOpenIncidentsRequest = {
1264
+ encode(message, writer = new BinaryWriter()) {
1265
+ if (message.EventStore !== "") {
1266
+ writer.uint32(10).string(message.EventStore);
1267
+ }
1268
+ if (message.Namespace !== "") {
1269
+ writer.uint32(18).string(message.Namespace);
1270
+ }
1271
+ if (message.ObserverId !== "") {
1272
+ writer.uint32(26).string(message.ObserverId);
1273
+ }
1274
+ if (message.Condition !== "") {
1275
+ writer.uint32(34).string(message.Condition);
1276
+ }
1277
+ if (message.MinimumSeverity !== 0) {
1278
+ writer.uint32(40).int32(message.MinimumSeverity);
1279
+ }
1280
+ if (message.Limit !== 0) {
1281
+ writer.uint32(48).int32(message.Limit);
1282
+ }
1283
+ if (message.AfterRaisedSequenceNumber !== 0n) {
1284
+ if (BigInt.asUintN(64, message.AfterRaisedSequenceNumber) !== message.AfterRaisedSequenceNumber) {
1285
+ throw new globalThis.Error("value provided for field message.AfterRaisedSequenceNumber of type uint64 too large");
1286
+ }
1287
+ writer.uint32(56).uint64(message.AfterRaisedSequenceNumber);
1288
+ }
1289
+ if (message.AfterIncidentId !== undefined) {
1290
+ Guid.encode(message.AfterIncidentId, writer.uint32(66).fork()).join();
1291
+ }
1292
+ return writer;
1293
+ },
1294
+ decode(input, length) {
1295
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1296
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1297
+ if (previousRecursionDepth >= 100) {
1298
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1299
+ }
1300
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1301
+ try {
1302
+ const end = length === undefined ? reader.len : reader.pos + length;
1303
+ const message = createBaseGetOpenIncidentsRequest();
1304
+ while (reader.pos < end) {
1305
+ const tag = reader.uint32();
1306
+ switch (tag >>> 3) {
1307
+ case 1: {
1308
+ if (tag !== 10) {
1309
+ break;
1310
+ }
1311
+ message.EventStore = reader.string();
1312
+ continue;
1313
+ }
1314
+ case 2: {
1315
+ if (tag !== 18) {
1316
+ break;
1317
+ }
1318
+ message.Namespace = reader.string();
1319
+ continue;
1320
+ }
1321
+ case 3: {
1322
+ if (tag !== 26) {
1323
+ break;
1324
+ }
1325
+ message.ObserverId = reader.string();
1326
+ continue;
1327
+ }
1328
+ case 4: {
1329
+ if (tag !== 34) {
1330
+ break;
1331
+ }
1332
+ message.Condition = reader.string();
1333
+ continue;
1334
+ }
1335
+ case 5: {
1336
+ if (tag !== 40) {
1337
+ break;
1338
+ }
1339
+ message.MinimumSeverity = reader.int32();
1340
+ continue;
1341
+ }
1342
+ case 6: {
1343
+ if (tag !== 48) {
1344
+ break;
1345
+ }
1346
+ message.Limit = reader.int32();
1347
+ continue;
1348
+ }
1349
+ case 7: {
1350
+ if (tag !== 56) {
1351
+ break;
1352
+ }
1353
+ message.AfterRaisedSequenceNumber = reader.uint64();
1354
+ continue;
1355
+ }
1356
+ case 8: {
1357
+ if (tag !== 66) {
1358
+ break;
1359
+ }
1360
+ message.AfterIncidentId = Guid.decode(reader, reader.uint32());
1361
+ continue;
1362
+ }
1363
+ }
1364
+ if ((tag & 7) === 4 || tag === 0) {
1365
+ break;
1366
+ }
1367
+ reader.skip(tag & 7);
1368
+ }
1369
+ return message;
1370
+ }
1371
+ finally {
1372
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1373
+ }
1374
+ },
1375
+ fromJSON(object) {
1376
+ return {
1377
+ EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "",
1378
+ Namespace: isSet(object.Namespace) ? globalThis.String(object.Namespace) : "",
1379
+ ObserverId: isSet(object.ObserverId) ? globalThis.String(object.ObserverId) : "",
1380
+ Condition: isSet(object.Condition) ? globalThis.String(object.Condition) : "",
1381
+ MinimumSeverity: isSet(object.MinimumSeverity) ? alertSeverityFromJSON(object.MinimumSeverity) : 0,
1382
+ Limit: isSet(object.Limit) ? globalThis.Number(object.Limit) : 0,
1383
+ AfterRaisedSequenceNumber: isSet(object.AfterRaisedSequenceNumber)
1384
+ ? BigInt(object.AfterRaisedSequenceNumber)
1385
+ : 0n,
1386
+ AfterIncidentId: isSet(object.AfterIncidentId) ? Guid.fromJSON(object.AfterIncidentId) : undefined,
1387
+ };
1388
+ },
1389
+ toJSON(message) {
1390
+ const obj = {};
1391
+ if (message.EventStore !== "") {
1392
+ obj.EventStore = message.EventStore;
1393
+ }
1394
+ if (message.Namespace !== "") {
1395
+ obj.Namespace = message.Namespace;
1396
+ }
1397
+ if (message.ObserverId !== "") {
1398
+ obj.ObserverId = message.ObserverId;
1399
+ }
1400
+ if (message.Condition !== "") {
1401
+ obj.Condition = message.Condition;
1402
+ }
1403
+ if (message.MinimumSeverity !== 0) {
1404
+ obj.MinimumSeverity = alertSeverityToJSON(message.MinimumSeverity);
1405
+ }
1406
+ if (message.Limit !== 0) {
1407
+ obj.Limit = Math.round(message.Limit);
1408
+ }
1409
+ if (message.AfterRaisedSequenceNumber !== 0n) {
1410
+ obj.AfterRaisedSequenceNumber = message.AfterRaisedSequenceNumber.toString();
1411
+ }
1412
+ if (message.AfterIncidentId !== undefined) {
1413
+ obj.AfterIncidentId = Guid.toJSON(message.AfterIncidentId);
1414
+ }
1415
+ return obj;
1416
+ },
1417
+ create(base) {
1418
+ return GetOpenIncidentsRequest.fromPartial(base ?? {});
1419
+ },
1420
+ fromPartial(object) {
1421
+ const message = createBaseGetOpenIncidentsRequest();
1422
+ message.EventStore = object.EventStore ?? "";
1423
+ message.Namespace = object.Namespace ?? "";
1424
+ message.ObserverId = object.ObserverId ?? "";
1425
+ message.Condition = object.Condition ?? "";
1426
+ message.MinimumSeverity = object.MinimumSeverity ?? 0;
1427
+ message.Limit = object.Limit ?? 0;
1428
+ message.AfterRaisedSequenceNumber =
1429
+ (object.AfterRaisedSequenceNumber !== undefined && object.AfterRaisedSequenceNumber !== null)
1430
+ ? BigInt(object.AfterRaisedSequenceNumber)
1431
+ : 0n;
1432
+ message.AfterIncidentId = (object.AfterIncidentId !== undefined && object.AfterIncidentId !== null)
1433
+ ? Guid.fromPartial(object.AfterIncidentId)
1434
+ : undefined;
1435
+ return message;
1436
+ },
1437
+ };
1438
+ function createBaseQueryResultAlertIncidentLookupResponse() {
1439
+ return {
1440
+ CorrelationId: undefined,
1441
+ IsAuthorized: false,
1442
+ ValidationResults: [],
1443
+ ExceptionMessages: [],
1444
+ ExceptionStackTrace: "",
1445
+ Data: undefined,
1446
+ };
1447
+ }
1448
+ const QueryResultAlertIncidentLookupResponse = {
1449
+ encode(message, writer = new BinaryWriter()) {
1450
+ if (message.CorrelationId !== undefined) {
1451
+ Guid.encode(message.CorrelationId, writer.uint32(10).fork()).join();
1452
+ }
1453
+ if (message.IsAuthorized !== false) {
1454
+ writer.uint32(16).bool(message.IsAuthorized);
1455
+ }
1456
+ for (const v of message.ValidationResults) {
1457
+ ValidationResult.encode(v, writer.uint32(26).fork()).join();
1458
+ }
1459
+ for (const v of message.ExceptionMessages) {
1460
+ writer.uint32(34).string(v);
1461
+ }
1462
+ if (message.ExceptionStackTrace !== "") {
1463
+ writer.uint32(42).string(message.ExceptionStackTrace);
1464
+ }
1465
+ if (message.Data !== undefined) {
1466
+ AlertIncidentLookupResponse.encode(message.Data, writer.uint32(50).fork()).join();
1467
+ }
1468
+ return writer;
1469
+ },
1470
+ decode(input, length) {
1471
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1472
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1473
+ if (previousRecursionDepth >= 100) {
1474
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1475
+ }
1476
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1477
+ try {
1478
+ const end = length === undefined ? reader.len : reader.pos + length;
1479
+ const message = createBaseQueryResultAlertIncidentLookupResponse();
1480
+ while (reader.pos < end) {
1481
+ const tag = reader.uint32();
1482
+ switch (tag >>> 3) {
1483
+ case 1: {
1484
+ if (tag !== 10) {
1485
+ break;
1486
+ }
1487
+ message.CorrelationId = Guid.decode(reader, reader.uint32());
1488
+ continue;
1489
+ }
1490
+ case 2: {
1491
+ if (tag !== 16) {
1492
+ break;
1493
+ }
1494
+ message.IsAuthorized = reader.bool();
1495
+ continue;
1496
+ }
1497
+ case 3: {
1498
+ if (tag !== 26) {
1499
+ break;
1500
+ }
1501
+ message.ValidationResults.push(ValidationResult.decode(reader, reader.uint32()));
1502
+ continue;
1503
+ }
1504
+ case 4: {
1505
+ if (tag !== 34) {
1506
+ break;
1507
+ }
1508
+ message.ExceptionMessages.push(reader.string());
1509
+ continue;
1510
+ }
1511
+ case 5: {
1512
+ if (tag !== 42) {
1513
+ break;
1514
+ }
1515
+ message.ExceptionStackTrace = reader.string();
1516
+ continue;
1517
+ }
1518
+ case 6: {
1519
+ if (tag !== 50) {
1520
+ break;
1521
+ }
1522
+ message.Data = AlertIncidentLookupResponse.decode(reader, reader.uint32());
1523
+ continue;
1524
+ }
1525
+ }
1526
+ if ((tag & 7) === 4 || tag === 0) {
1527
+ break;
1528
+ }
1529
+ reader.skip(tag & 7);
1530
+ }
1531
+ return message;
1532
+ }
1533
+ finally {
1534
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1535
+ }
1536
+ },
1537
+ fromJSON(object) {
1538
+ return {
1539
+ CorrelationId: isSet(object.CorrelationId) ? Guid.fromJSON(object.CorrelationId) : undefined,
1540
+ IsAuthorized: isSet(object.IsAuthorized) ? globalThis.Boolean(object.IsAuthorized) : false,
1541
+ ValidationResults: globalThis.Array.isArray(object?.ValidationResults)
1542
+ ? object.ValidationResults.map((e) => ValidationResult.fromJSON(e))
1543
+ : [],
1544
+ ExceptionMessages: globalThis.Array.isArray(object?.ExceptionMessages)
1545
+ ? object.ExceptionMessages.map((e) => globalThis.String(e))
1546
+ : [],
1547
+ ExceptionStackTrace: isSet(object.ExceptionStackTrace) ? globalThis.String(object.ExceptionStackTrace) : "",
1548
+ Data: isSet(object.Data) ? AlertIncidentLookupResponse.fromJSON(object.Data) : undefined,
1549
+ };
1550
+ },
1551
+ toJSON(message) {
1552
+ const obj = {};
1553
+ if (message.CorrelationId !== undefined) {
1554
+ obj.CorrelationId = Guid.toJSON(message.CorrelationId);
1555
+ }
1556
+ if (message.IsAuthorized !== false) {
1557
+ obj.IsAuthorized = message.IsAuthorized;
1558
+ }
1559
+ if (message.ValidationResults?.length) {
1560
+ obj.ValidationResults = message.ValidationResults.map((e) => ValidationResult.toJSON(e));
1561
+ }
1562
+ if (message.ExceptionMessages?.length) {
1563
+ obj.ExceptionMessages = message.ExceptionMessages;
1564
+ }
1565
+ if (message.ExceptionStackTrace !== "") {
1566
+ obj.ExceptionStackTrace = message.ExceptionStackTrace;
1567
+ }
1568
+ if (message.Data !== undefined) {
1569
+ obj.Data = AlertIncidentLookupResponse.toJSON(message.Data);
1570
+ }
1571
+ return obj;
1572
+ },
1573
+ create(base) {
1574
+ return QueryResultAlertIncidentLookupResponse.fromPartial(base ?? {});
1575
+ },
1576
+ fromPartial(object) {
1577
+ const message = createBaseQueryResultAlertIncidentLookupResponse();
1578
+ message.CorrelationId = (object.CorrelationId !== undefined && object.CorrelationId !== null)
1579
+ ? Guid.fromPartial(object.CorrelationId)
1580
+ : undefined;
1581
+ message.IsAuthorized = object.IsAuthorized ?? false;
1582
+ message.ValidationResults = object.ValidationResults?.map((e) => ValidationResult.fromPartial(e)) || [];
1583
+ message.ExceptionMessages = object.ExceptionMessages?.map((e) => e) || [];
1584
+ message.ExceptionStackTrace = object.ExceptionStackTrace ?? "";
1585
+ message.Data = (object.Data !== undefined && object.Data !== null)
1586
+ ? AlertIncidentLookupResponse.fromPartial(object.Data)
1587
+ : undefined;
1588
+ return message;
1589
+ },
1590
+ };
1591
+ function createBaseQueryResultAlertIncidentPageResponse() {
1592
+ return {
1593
+ CorrelationId: undefined,
1594
+ IsAuthorized: false,
1595
+ ValidationResults: [],
1596
+ ExceptionMessages: [],
1597
+ ExceptionStackTrace: "",
1598
+ Data: undefined,
1599
+ };
1600
+ }
1601
+ const QueryResultAlertIncidentPageResponse = {
1602
+ encode(message, writer = new BinaryWriter()) {
1603
+ if (message.CorrelationId !== undefined) {
1604
+ Guid.encode(message.CorrelationId, writer.uint32(10).fork()).join();
1605
+ }
1606
+ if (message.IsAuthorized !== false) {
1607
+ writer.uint32(16).bool(message.IsAuthorized);
1608
+ }
1609
+ for (const v of message.ValidationResults) {
1610
+ ValidationResult.encode(v, writer.uint32(26).fork()).join();
1611
+ }
1612
+ for (const v of message.ExceptionMessages) {
1613
+ writer.uint32(34).string(v);
1614
+ }
1615
+ if (message.ExceptionStackTrace !== "") {
1616
+ writer.uint32(42).string(message.ExceptionStackTrace);
1617
+ }
1618
+ if (message.Data !== undefined) {
1619
+ AlertIncidentPageResponse.encode(message.Data, writer.uint32(50).fork()).join();
1620
+ }
1621
+ return writer;
1622
+ },
1623
+ decode(input, length) {
1624
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1625
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1626
+ if (previousRecursionDepth >= 100) {
1627
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1628
+ }
1629
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1630
+ try {
1631
+ const end = length === undefined ? reader.len : reader.pos + length;
1632
+ const message = createBaseQueryResultAlertIncidentPageResponse();
1633
+ while (reader.pos < end) {
1634
+ const tag = reader.uint32();
1635
+ switch (tag >>> 3) {
1636
+ case 1: {
1637
+ if (tag !== 10) {
1638
+ break;
1639
+ }
1640
+ message.CorrelationId = Guid.decode(reader, reader.uint32());
1641
+ continue;
1642
+ }
1643
+ case 2: {
1644
+ if (tag !== 16) {
1645
+ break;
1646
+ }
1647
+ message.IsAuthorized = reader.bool();
1648
+ continue;
1649
+ }
1650
+ case 3: {
1651
+ if (tag !== 26) {
1652
+ break;
1653
+ }
1654
+ message.ValidationResults.push(ValidationResult.decode(reader, reader.uint32()));
1655
+ continue;
1656
+ }
1657
+ case 4: {
1658
+ if (tag !== 34) {
1659
+ break;
1660
+ }
1661
+ message.ExceptionMessages.push(reader.string());
1662
+ continue;
1663
+ }
1664
+ case 5: {
1665
+ if (tag !== 42) {
1666
+ break;
1667
+ }
1668
+ message.ExceptionStackTrace = reader.string();
1669
+ continue;
1670
+ }
1671
+ case 6: {
1672
+ if (tag !== 50) {
1673
+ break;
1674
+ }
1675
+ message.Data = AlertIncidentPageResponse.decode(reader, reader.uint32());
1676
+ continue;
1677
+ }
1678
+ }
1679
+ if ((tag & 7) === 4 || tag === 0) {
1680
+ break;
1681
+ }
1682
+ reader.skip(tag & 7);
1683
+ }
1684
+ return message;
1685
+ }
1686
+ finally {
1687
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1688
+ }
1689
+ },
1690
+ fromJSON(object) {
1691
+ return {
1692
+ CorrelationId: isSet(object.CorrelationId) ? Guid.fromJSON(object.CorrelationId) : undefined,
1693
+ IsAuthorized: isSet(object.IsAuthorized) ? globalThis.Boolean(object.IsAuthorized) : false,
1694
+ ValidationResults: globalThis.Array.isArray(object?.ValidationResults)
1695
+ ? object.ValidationResults.map((e) => ValidationResult.fromJSON(e))
1696
+ : [],
1697
+ ExceptionMessages: globalThis.Array.isArray(object?.ExceptionMessages)
1698
+ ? object.ExceptionMessages.map((e) => globalThis.String(e))
1699
+ : [],
1700
+ ExceptionStackTrace: isSet(object.ExceptionStackTrace) ? globalThis.String(object.ExceptionStackTrace) : "",
1701
+ Data: isSet(object.Data) ? AlertIncidentPageResponse.fromJSON(object.Data) : undefined,
1702
+ };
1703
+ },
1704
+ toJSON(message) {
1705
+ const obj = {};
1706
+ if (message.CorrelationId !== undefined) {
1707
+ obj.CorrelationId = Guid.toJSON(message.CorrelationId);
1708
+ }
1709
+ if (message.IsAuthorized !== false) {
1710
+ obj.IsAuthorized = message.IsAuthorized;
1711
+ }
1712
+ if (message.ValidationResults?.length) {
1713
+ obj.ValidationResults = message.ValidationResults.map((e) => ValidationResult.toJSON(e));
1714
+ }
1715
+ if (message.ExceptionMessages?.length) {
1716
+ obj.ExceptionMessages = message.ExceptionMessages;
1717
+ }
1718
+ if (message.ExceptionStackTrace !== "") {
1719
+ obj.ExceptionStackTrace = message.ExceptionStackTrace;
1720
+ }
1721
+ if (message.Data !== undefined) {
1722
+ obj.Data = AlertIncidentPageResponse.toJSON(message.Data);
1723
+ }
1724
+ return obj;
1725
+ },
1726
+ create(base) {
1727
+ return QueryResultAlertIncidentPageResponse.fromPartial(base ?? {});
1728
+ },
1729
+ fromPartial(object) {
1730
+ const message = createBaseQueryResultAlertIncidentPageResponse();
1731
+ message.CorrelationId = (object.CorrelationId !== undefined && object.CorrelationId !== null)
1732
+ ? Guid.fromPartial(object.CorrelationId)
1733
+ : undefined;
1734
+ message.IsAuthorized = object.IsAuthorized ?? false;
1735
+ message.ValidationResults = object.ValidationResults?.map((e) => ValidationResult.fromPartial(e)) || [];
1736
+ message.ExceptionMessages = object.ExceptionMessages?.map((e) => e) || [];
1737
+ message.ExceptionStackTrace = object.ExceptionStackTrace ?? "";
1738
+ message.Data = (object.Data !== undefined && object.Data !== null)
1739
+ ? AlertIncidentPageResponse.fromPartial(object.Data)
1740
+ : undefined;
1741
+ return message;
1742
+ },
1743
+ };
1744
+ function createBaseQueryResultAlertIncidentSummaryResponse() {
1745
+ return {
1746
+ CorrelationId: undefined,
1747
+ IsAuthorized: false,
1748
+ ValidationResults: [],
1749
+ ExceptionMessages: [],
1750
+ ExceptionStackTrace: "",
1751
+ Data: undefined,
1752
+ };
1753
+ }
1754
+ const QueryResultAlertIncidentSummaryResponse = {
1755
+ encode(message, writer = new BinaryWriter()) {
1756
+ if (message.CorrelationId !== undefined) {
1757
+ Guid.encode(message.CorrelationId, writer.uint32(10).fork()).join();
1758
+ }
1759
+ if (message.IsAuthorized !== false) {
1760
+ writer.uint32(16).bool(message.IsAuthorized);
1761
+ }
1762
+ for (const v of message.ValidationResults) {
1763
+ ValidationResult.encode(v, writer.uint32(26).fork()).join();
1764
+ }
1765
+ for (const v of message.ExceptionMessages) {
1766
+ writer.uint32(34).string(v);
1767
+ }
1768
+ if (message.ExceptionStackTrace !== "") {
1769
+ writer.uint32(42).string(message.ExceptionStackTrace);
1770
+ }
1771
+ if (message.Data !== undefined) {
1772
+ AlertIncidentSummaryResponse.encode(message.Data, writer.uint32(50).fork()).join();
1773
+ }
1774
+ return writer;
1775
+ },
1776
+ decode(input, length) {
1777
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1778
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1779
+ if (previousRecursionDepth >= 100) {
1780
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1781
+ }
1782
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1783
+ try {
1784
+ const end = length === undefined ? reader.len : reader.pos + length;
1785
+ const message = createBaseQueryResultAlertIncidentSummaryResponse();
1786
+ while (reader.pos < end) {
1787
+ const tag = reader.uint32();
1788
+ switch (tag >>> 3) {
1789
+ case 1: {
1790
+ if (tag !== 10) {
1791
+ break;
1792
+ }
1793
+ message.CorrelationId = Guid.decode(reader, reader.uint32());
1794
+ continue;
1795
+ }
1796
+ case 2: {
1797
+ if (tag !== 16) {
1798
+ break;
1799
+ }
1800
+ message.IsAuthorized = reader.bool();
1801
+ continue;
1802
+ }
1803
+ case 3: {
1804
+ if (tag !== 26) {
1805
+ break;
1806
+ }
1807
+ message.ValidationResults.push(ValidationResult.decode(reader, reader.uint32()));
1808
+ continue;
1809
+ }
1810
+ case 4: {
1811
+ if (tag !== 34) {
1812
+ break;
1813
+ }
1814
+ message.ExceptionMessages.push(reader.string());
1815
+ continue;
1816
+ }
1817
+ case 5: {
1818
+ if (tag !== 42) {
1819
+ break;
1820
+ }
1821
+ message.ExceptionStackTrace = reader.string();
1822
+ continue;
1823
+ }
1824
+ case 6: {
1825
+ if (tag !== 50) {
1826
+ break;
1827
+ }
1828
+ message.Data = AlertIncidentSummaryResponse.decode(reader, reader.uint32());
1829
+ continue;
1830
+ }
1831
+ }
1832
+ if ((tag & 7) === 4 || tag === 0) {
1833
+ break;
1834
+ }
1835
+ reader.skip(tag & 7);
1836
+ }
1837
+ return message;
1838
+ }
1839
+ finally {
1840
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1841
+ }
1842
+ },
1843
+ fromJSON(object) {
1844
+ return {
1845
+ CorrelationId: isSet(object.CorrelationId) ? Guid.fromJSON(object.CorrelationId) : undefined,
1846
+ IsAuthorized: isSet(object.IsAuthorized) ? globalThis.Boolean(object.IsAuthorized) : false,
1847
+ ValidationResults: globalThis.Array.isArray(object?.ValidationResults)
1848
+ ? object.ValidationResults.map((e) => ValidationResult.fromJSON(e))
1849
+ : [],
1850
+ ExceptionMessages: globalThis.Array.isArray(object?.ExceptionMessages)
1851
+ ? object.ExceptionMessages.map((e) => globalThis.String(e))
1852
+ : [],
1853
+ ExceptionStackTrace: isSet(object.ExceptionStackTrace) ? globalThis.String(object.ExceptionStackTrace) : "",
1854
+ Data: isSet(object.Data) ? AlertIncidentSummaryResponse.fromJSON(object.Data) : undefined,
1855
+ };
1856
+ },
1857
+ toJSON(message) {
1858
+ const obj = {};
1859
+ if (message.CorrelationId !== undefined) {
1860
+ obj.CorrelationId = Guid.toJSON(message.CorrelationId);
1861
+ }
1862
+ if (message.IsAuthorized !== false) {
1863
+ obj.IsAuthorized = message.IsAuthorized;
1864
+ }
1865
+ if (message.ValidationResults?.length) {
1866
+ obj.ValidationResults = message.ValidationResults.map((e) => ValidationResult.toJSON(e));
1867
+ }
1868
+ if (message.ExceptionMessages?.length) {
1869
+ obj.ExceptionMessages = message.ExceptionMessages;
1870
+ }
1871
+ if (message.ExceptionStackTrace !== "") {
1872
+ obj.ExceptionStackTrace = message.ExceptionStackTrace;
1873
+ }
1874
+ if (message.Data !== undefined) {
1875
+ obj.Data = AlertIncidentSummaryResponse.toJSON(message.Data);
1876
+ }
1877
+ return obj;
1878
+ },
1879
+ create(base) {
1880
+ return QueryResultAlertIncidentSummaryResponse.fromPartial(base ?? {});
1881
+ },
1882
+ fromPartial(object) {
1883
+ const message = createBaseQueryResultAlertIncidentSummaryResponse();
1884
+ message.CorrelationId = (object.CorrelationId !== undefined && object.CorrelationId !== null)
1885
+ ? Guid.fromPartial(object.CorrelationId)
1886
+ : undefined;
1887
+ message.IsAuthorized = object.IsAuthorized ?? false;
1888
+ message.ValidationResults = object.ValidationResults?.map((e) => ValidationResult.fromPartial(e)) || [];
1889
+ message.ExceptionMessages = object.ExceptionMessages?.map((e) => e) || [];
1890
+ message.ExceptionStackTrace = object.ExceptionStackTrace ?? "";
1891
+ message.Data = (object.Data !== undefined && object.Data !== null)
1892
+ ? AlertIncidentSummaryResponse.fromPartial(object.Data)
1893
+ : undefined;
1894
+ return message;
1895
+ },
1896
+ };
1897
+ function createBaseSerializableDateTimeOffset() {
1898
+ return { Value: "" };
1899
+ }
1900
+ const SerializableDateTimeOffset = {
1901
+ encode(message, writer = new BinaryWriter()) {
1902
+ if (message.Value !== "") {
1903
+ writer.uint32(10).string(message.Value);
1904
+ }
1905
+ return writer;
1906
+ },
1907
+ decode(input, length) {
1908
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1909
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1910
+ if (previousRecursionDepth >= 100) {
1911
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1912
+ }
1913
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1914
+ try {
1915
+ const end = length === undefined ? reader.len : reader.pos + length;
1916
+ const message = createBaseSerializableDateTimeOffset();
1917
+ while (reader.pos < end) {
1918
+ const tag = reader.uint32();
1919
+ switch (tag >>> 3) {
1920
+ case 1: {
1921
+ if (tag !== 10) {
1922
+ break;
1923
+ }
1924
+ message.Value = reader.string();
1925
+ continue;
1926
+ }
1927
+ }
1928
+ if ((tag & 7) === 4 || tag === 0) {
1929
+ break;
1930
+ }
1931
+ reader.skip(tag & 7);
1932
+ }
1933
+ return message;
1934
+ }
1935
+ finally {
1936
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1937
+ }
1938
+ },
1939
+ fromJSON(object) {
1940
+ return { Value: isSet(object.Value) ? globalThis.String(object.Value) : "" };
1941
+ },
1942
+ toJSON(message) {
1943
+ const obj = {};
1944
+ if (message.Value !== "") {
1945
+ obj.Value = message.Value;
1946
+ }
1947
+ return obj;
1948
+ },
1949
+ create(base) {
1950
+ return SerializableDateTimeOffset.fromPartial(base ?? {});
1951
+ },
1952
+ fromPartial(object) {
1953
+ const message = createBaseSerializableDateTimeOffset();
1954
+ message.Value = object.Value ?? "";
1955
+ return message;
1956
+ },
1957
+ };
1958
+ function createBaseValidationResult() {
1959
+ return { Severity: 0, Message: "", Members: [] };
1960
+ }
1961
+ const ValidationResult = {
1962
+ encode(message, writer = new BinaryWriter()) {
1963
+ if (message.Severity !== 0) {
1964
+ writer.uint32(8).int32(message.Severity);
1965
+ }
1966
+ if (message.Message !== "") {
1967
+ writer.uint32(18).string(message.Message);
1968
+ }
1969
+ for (const v of message.Members) {
1970
+ writer.uint32(26).string(v);
1971
+ }
1972
+ return writer;
1973
+ },
1974
+ decode(input, length) {
1975
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1976
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1977
+ if (previousRecursionDepth >= 100) {
1978
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1979
+ }
1980
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1981
+ try {
1982
+ const end = length === undefined ? reader.len : reader.pos + length;
1983
+ const message = createBaseValidationResult();
1984
+ while (reader.pos < end) {
1985
+ const tag = reader.uint32();
1986
+ switch (tag >>> 3) {
1987
+ case 1: {
1988
+ if (tag !== 8) {
1989
+ break;
1990
+ }
1991
+ message.Severity = reader.int32();
1992
+ continue;
1993
+ }
1994
+ case 2: {
1995
+ if (tag !== 18) {
1996
+ break;
1997
+ }
1998
+ message.Message = reader.string();
1999
+ continue;
2000
+ }
2001
+ case 3: {
2002
+ if (tag !== 26) {
2003
+ break;
2004
+ }
2005
+ message.Members.push(reader.string());
2006
+ continue;
2007
+ }
2008
+ }
2009
+ if ((tag & 7) === 4 || tag === 0) {
2010
+ break;
2011
+ }
2012
+ reader.skip(tag & 7);
2013
+ }
2014
+ return message;
2015
+ }
2016
+ finally {
2017
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2018
+ }
2019
+ },
2020
+ fromJSON(object) {
2021
+ return {
2022
+ Severity: isSet(object.Severity) ? validationResultSeverityFromJSON(object.Severity) : 0,
2023
+ Message: isSet(object.Message) ? globalThis.String(object.Message) : "",
2024
+ Members: globalThis.Array.isArray(object?.Members) ? object.Members.map((e) => globalThis.String(e)) : [],
2025
+ };
2026
+ },
2027
+ toJSON(message) {
2028
+ const obj = {};
2029
+ if (message.Severity !== 0) {
2030
+ obj.Severity = validationResultSeverityToJSON(message.Severity);
2031
+ }
2032
+ if (message.Message !== "") {
2033
+ obj.Message = message.Message;
2034
+ }
2035
+ if (message.Members?.length) {
2036
+ obj.Members = message.Members;
2037
+ }
2038
+ return obj;
2039
+ },
2040
+ create(base) {
2041
+ return ValidationResult.fromPartial(base ?? {});
2042
+ },
2043
+ fromPartial(object) {
2044
+ const message = createBaseValidationResult();
2045
+ message.Severity = object.Severity ?? 0;
2046
+ message.Message = object.Message ?? "";
2047
+ message.Members = object.Members?.map((e) => e) || [];
2048
+ return message;
2049
+ },
2050
+ };
2051
+ const AlertsDefinition = {
2052
+ name: "Alerts",
2053
+ fullName: "Cratis.Chronicle.Contracts.Alerts.Alerts",
2054
+ methods: {
2055
+ getOpenIncident: {
2056
+ name: "GetOpenIncident",
2057
+ requestType: GetOpenIncidentRequest,
2058
+ requestStream: false,
2059
+ responseType: QueryResultAlertIncidentLookupResponse,
2060
+ responseStream: false,
2061
+ options: {},
2062
+ },
2063
+ getOpenIncidentCounts: {
2064
+ name: "GetOpenIncidentCounts",
2065
+ requestType: GetOpenIncidentCountsRequest,
2066
+ requestStream: false,
2067
+ responseType: QueryResultAlertIncidentSummaryResponse,
2068
+ responseStream: false,
2069
+ options: {},
2070
+ },
2071
+ getOpenIncidents: {
2072
+ name: "GetOpenIncidents",
2073
+ requestType: GetOpenIncidentsRequest,
2074
+ requestStream: false,
2075
+ responseType: QueryResultAlertIncidentPageResponse,
2076
+ responseStream: false,
2077
+ options: {},
2078
+ },
2079
+ },
2080
+ };
2081
+ function isSet(value) {
2082
+ return value !== null && value !== undefined;
2083
+ }
2084
+
2085
+ export { AlertEvidence, AlertIncidentContinuation, AlertIncidentCountDetails, AlertIncidentDetails, AlertIncidentLookupResponse, AlertIncidentPageResponse, AlertIncidentSummaryResponse, AlertIncidentsReadinessState, AlertSeverity, AlertTarget, AlertsDefinition, FailureKind, GetOpenIncidentCountsRequest, GetOpenIncidentRequest, GetOpenIncidentsRequest, QueryResultAlertIncidentLookupResponse, QueryResultAlertIncidentPageResponse, QueryResultAlertIncidentSummaryResponse, SerializableDateTimeOffset, ValidationResult, ValidationResultSeverity, alertIncidentsReadinessStateFromJSON, alertIncidentsReadinessStateToJSON, alertSeverityFromJSON, alertSeverityToJSON, failureKindFromJSON, failureKindToJSON, protobufPackage, validationResultSeverityFromJSON, validationResultSeverityToJSON };
2086
+ //# sourceMappingURL=alerts.js.map