@cratis/chronicle.contracts 19.31.11 → 19.32.1

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