@miradorlabs/web-grpc 2.10.0 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -12,6 +12,43 @@ import { ResponseStatus } from "../../common/v1/status";
|
|
|
12
12
|
|
|
13
13
|
export const protobufPackage = "gateway.web.v1";
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* The signal a definition derives from. Log and metric sources are planned and will be added as
|
|
17
|
+
* new values; unset reads as TRACE.
|
|
18
|
+
*/
|
|
19
|
+
export enum DerivedMetricSource {
|
|
20
|
+
DERIVED_METRIC_SOURCE_UNSPECIFIED = 0,
|
|
21
|
+
DERIVED_METRIC_SOURCE_TRACE = 1,
|
|
22
|
+
UNRECOGNIZED = -1,
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function derivedMetricSourceFromJSON(object: any): DerivedMetricSource {
|
|
26
|
+
switch (object) {
|
|
27
|
+
case 0:
|
|
28
|
+
case "DERIVED_METRIC_SOURCE_UNSPECIFIED":
|
|
29
|
+
return DerivedMetricSource.DERIVED_METRIC_SOURCE_UNSPECIFIED;
|
|
30
|
+
case 1:
|
|
31
|
+
case "DERIVED_METRIC_SOURCE_TRACE":
|
|
32
|
+
return DerivedMetricSource.DERIVED_METRIC_SOURCE_TRACE;
|
|
33
|
+
case -1:
|
|
34
|
+
case "UNRECOGNIZED":
|
|
35
|
+
default:
|
|
36
|
+
return DerivedMetricSource.UNRECOGNIZED;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function derivedMetricSourceToJSON(object: DerivedMetricSource): string {
|
|
41
|
+
switch (object) {
|
|
42
|
+
case DerivedMetricSource.DERIVED_METRIC_SOURCE_UNSPECIFIED:
|
|
43
|
+
return "DERIVED_METRIC_SOURCE_UNSPECIFIED";
|
|
44
|
+
case DerivedMetricSource.DERIVED_METRIC_SOURCE_TRACE:
|
|
45
|
+
return "DERIVED_METRIC_SOURCE_TRACE";
|
|
46
|
+
case DerivedMetricSource.UNRECOGNIZED:
|
|
47
|
+
default:
|
|
48
|
+
return "UNRECOGNIZED";
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
15
52
|
export enum DerivedMetricOutcome {
|
|
16
53
|
DERIVED_METRIC_OUTCOME_UNSPECIFIED = 0,
|
|
17
54
|
DERIVED_METRIC_OUTCOME_EMITTED = 1,
|
|
@@ -186,6 +223,7 @@ export interface DerivedMetric {
|
|
|
186
223
|
program: DerivedMetricProgram | undefined;
|
|
187
224
|
createdAt: Date | undefined;
|
|
188
225
|
updatedAt: Date | undefined;
|
|
226
|
+
source: DerivedMetricSource;
|
|
189
227
|
}
|
|
190
228
|
|
|
191
229
|
export interface DerivedMetricProgram {
|
|
@@ -216,6 +254,7 @@ export interface CreateDerivedMetricRequest {
|
|
|
216
254
|
enabled: boolean;
|
|
217
255
|
unit: string;
|
|
218
256
|
program: DerivedMetricProgram | undefined;
|
|
257
|
+
source: DerivedMetricSource;
|
|
219
258
|
}
|
|
220
259
|
|
|
221
260
|
export interface CreateDerivedMetricResponse {
|
|
@@ -389,6 +428,7 @@ function createBaseDerivedMetric(): DerivedMetric {
|
|
|
389
428
|
program: undefined,
|
|
390
429
|
createdAt: undefined,
|
|
391
430
|
updatedAt: undefined,
|
|
431
|
+
source: 0,
|
|
392
432
|
};
|
|
393
433
|
}
|
|
394
434
|
|
|
@@ -430,6 +470,9 @@ export const DerivedMetric: MessageFns<DerivedMetric> = {
|
|
|
430
470
|
if (message.updatedAt !== undefined) {
|
|
431
471
|
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(98).fork()).join();
|
|
432
472
|
}
|
|
473
|
+
if (message.source !== 0) {
|
|
474
|
+
writer.uint32(104).int32(message.source);
|
|
475
|
+
}
|
|
433
476
|
return writer;
|
|
434
477
|
},
|
|
435
478
|
|
|
@@ -536,6 +579,14 @@ export const DerivedMetric: MessageFns<DerivedMetric> = {
|
|
|
536
579
|
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
537
580
|
continue;
|
|
538
581
|
}
|
|
582
|
+
case 13: {
|
|
583
|
+
if (tag !== 104) {
|
|
584
|
+
break;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
message.source = reader.int32() as any;
|
|
588
|
+
continue;
|
|
589
|
+
}
|
|
539
590
|
}
|
|
540
591
|
if ((tag & 7) === 4 || tag === 0) {
|
|
541
592
|
break;
|
|
@@ -583,6 +634,7 @@ export const DerivedMetric: MessageFns<DerivedMetric> = {
|
|
|
583
634
|
: isSet(object.updated_at)
|
|
584
635
|
? fromJsonTimestamp(object.updated_at)
|
|
585
636
|
: undefined,
|
|
637
|
+
source: isSet(object.source) ? derivedMetricSourceFromJSON(object.source) : 0,
|
|
586
638
|
};
|
|
587
639
|
},
|
|
588
640
|
|
|
@@ -624,6 +676,9 @@ export const DerivedMetric: MessageFns<DerivedMetric> = {
|
|
|
624
676
|
if (message.updatedAt !== undefined) {
|
|
625
677
|
obj.updatedAt = message.updatedAt.toISOString();
|
|
626
678
|
}
|
|
679
|
+
if (message.source !== 0) {
|
|
680
|
+
obj.source = derivedMetricSourceToJSON(message.source);
|
|
681
|
+
}
|
|
627
682
|
return obj;
|
|
628
683
|
},
|
|
629
684
|
|
|
@@ -646,6 +701,7 @@ export const DerivedMetric: MessageFns<DerivedMetric> = {
|
|
|
646
701
|
: undefined;
|
|
647
702
|
message.createdAt = object.createdAt ?? undefined;
|
|
648
703
|
message.updatedAt = object.updatedAt ?? undefined;
|
|
704
|
+
message.source = object.source ?? 0;
|
|
649
705
|
return message;
|
|
650
706
|
},
|
|
651
707
|
};
|
|
@@ -762,6 +818,7 @@ function createBaseCreateDerivedMetricRequest(): CreateDerivedMetricRequest {
|
|
|
762
818
|
enabled: false,
|
|
763
819
|
unit: "",
|
|
764
820
|
program: undefined,
|
|
821
|
+
source: 0,
|
|
765
822
|
};
|
|
766
823
|
}
|
|
767
824
|
|
|
@@ -791,6 +848,9 @@ export const CreateDerivedMetricRequest: MessageFns<CreateDerivedMetricRequest>
|
|
|
791
848
|
if (message.program !== undefined) {
|
|
792
849
|
DerivedMetricProgram.encode(message.program, writer.uint32(66).fork()).join();
|
|
793
850
|
}
|
|
851
|
+
if (message.source !== 0) {
|
|
852
|
+
writer.uint32(72).int32(message.source);
|
|
853
|
+
}
|
|
794
854
|
return writer;
|
|
795
855
|
},
|
|
796
856
|
|
|
@@ -865,6 +925,14 @@ export const CreateDerivedMetricRequest: MessageFns<CreateDerivedMetricRequest>
|
|
|
865
925
|
message.program = DerivedMetricProgram.decode(reader, reader.uint32());
|
|
866
926
|
continue;
|
|
867
927
|
}
|
|
928
|
+
case 9: {
|
|
929
|
+
if (tag !== 72) {
|
|
930
|
+
break;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
message.source = reader.int32() as any;
|
|
934
|
+
continue;
|
|
935
|
+
}
|
|
868
936
|
}
|
|
869
937
|
if ((tag & 7) === 4 || tag === 0) {
|
|
870
938
|
break;
|
|
@@ -896,6 +964,7 @@ export const CreateDerivedMetricRequest: MessageFns<CreateDerivedMetricRequest>
|
|
|
896
964
|
enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false,
|
|
897
965
|
unit: isSet(object.unit) ? globalThis.String(object.unit) : "",
|
|
898
966
|
program: isSet(object.program) ? DerivedMetricProgram.fromJSON(object.program) : undefined,
|
|
967
|
+
source: isSet(object.source) ? derivedMetricSourceFromJSON(object.source) : 0,
|
|
899
968
|
};
|
|
900
969
|
},
|
|
901
970
|
|
|
@@ -925,6 +994,9 @@ export const CreateDerivedMetricRequest: MessageFns<CreateDerivedMetricRequest>
|
|
|
925
994
|
if (message.program !== undefined) {
|
|
926
995
|
obj.program = DerivedMetricProgram.toJSON(message.program);
|
|
927
996
|
}
|
|
997
|
+
if (message.source !== 0) {
|
|
998
|
+
obj.source = derivedMetricSourceToJSON(message.source);
|
|
999
|
+
}
|
|
928
1000
|
return obj;
|
|
929
1001
|
},
|
|
930
1002
|
|
|
@@ -943,6 +1015,7 @@ export const CreateDerivedMetricRequest: MessageFns<CreateDerivedMetricRequest>
|
|
|
943
1015
|
message.program = (object.program !== undefined && object.program !== null)
|
|
944
1016
|
? DerivedMetricProgram.fromPartial(object.program)
|
|
945
1017
|
: undefined;
|
|
1018
|
+
message.source = object.source ?? 0;
|
|
946
1019
|
return message;
|
|
947
1020
|
},
|
|
948
1021
|
};
|
|
@@ -36,6 +36,7 @@ goog.exportSymbol('proto.gateway.web.v1.DerivedMetricEventAttributes', null, glo
|
|
|
36
36
|
goog.exportSymbol('proto.gateway.web.v1.DerivedMetricOutcome', null, global);
|
|
37
37
|
goog.exportSymbol('proto.gateway.web.v1.DerivedMetricOutcomeCount', null, global);
|
|
38
38
|
goog.exportSymbol('proto.gateway.web.v1.DerivedMetricProgram', null, global);
|
|
39
|
+
goog.exportSymbol('proto.gateway.web.v1.DerivedMetricSource', null, global);
|
|
39
40
|
goog.exportSymbol('proto.gateway.web.v1.DryRunDerivedMetricRequest', null, global);
|
|
40
41
|
goog.exportSymbol('proto.gateway.web.v1.DryRunDerivedMetricResponse', null, global);
|
|
41
42
|
goog.exportSymbol('proto.gateway.web.v1.DryRunEmission', null, global);
|
|
@@ -577,7 +578,8 @@ metricName: jspb.Message.getFieldWithDefault(msg, 8, ""),
|
|
|
577
578
|
unit: jspb.Message.getFieldWithDefault(msg, 9, ""),
|
|
578
579
|
program: (f = msg.getProgram()) && proto.gateway.web.v1.DerivedMetricProgram.toObject(includeInstance, f),
|
|
579
580
|
createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
|
|
580
|
-
updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
|
|
581
|
+
updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
|
|
582
|
+
source: jspb.Message.getFieldWithDefault(msg, 13, 0)
|
|
581
583
|
};
|
|
582
584
|
|
|
583
585
|
if (includeInstance) {
|
|
@@ -665,6 +667,10 @@ proto.gateway.web.v1.DerivedMetric.deserializeBinaryFromReader = function(msg, r
|
|
|
665
667
|
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
|
|
666
668
|
msg.setUpdatedAt(value);
|
|
667
669
|
break;
|
|
670
|
+
case 13:
|
|
671
|
+
var value = /** @type {!proto.gateway.web.v1.DerivedMetricSource} */ (reader.readEnum());
|
|
672
|
+
msg.setSource(value);
|
|
673
|
+
break;
|
|
668
674
|
default:
|
|
669
675
|
reader.skipField();
|
|
670
676
|
break;
|
|
@@ -781,6 +787,13 @@ proto.gateway.web.v1.DerivedMetric.serializeBinaryToWriter = function(message, w
|
|
|
781
787
|
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
|
|
782
788
|
);
|
|
783
789
|
}
|
|
790
|
+
f = message.getSource();
|
|
791
|
+
if (f !== 0.0) {
|
|
792
|
+
writer.writeEnum(
|
|
793
|
+
13,
|
|
794
|
+
f
|
|
795
|
+
);
|
|
796
|
+
}
|
|
784
797
|
};
|
|
785
798
|
|
|
786
799
|
|
|
@@ -1057,6 +1070,24 @@ proto.gateway.web.v1.DerivedMetric.prototype.hasUpdatedAt = function() {
|
|
|
1057
1070
|
};
|
|
1058
1071
|
|
|
1059
1072
|
|
|
1073
|
+
/**
|
|
1074
|
+
* optional DerivedMetricSource source = 13;
|
|
1075
|
+
* @return {!proto.gateway.web.v1.DerivedMetricSource}
|
|
1076
|
+
*/
|
|
1077
|
+
proto.gateway.web.v1.DerivedMetric.prototype.getSource = function() {
|
|
1078
|
+
return /** @type {!proto.gateway.web.v1.DerivedMetricSource} */ (jspb.Message.getFieldWithDefault(this, 13, 0));
|
|
1079
|
+
};
|
|
1080
|
+
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* @param {!proto.gateway.web.v1.DerivedMetricSource} value
|
|
1084
|
+
* @return {!proto.gateway.web.v1.DerivedMetric} returns this
|
|
1085
|
+
*/
|
|
1086
|
+
proto.gateway.web.v1.DerivedMetric.prototype.setSource = function(value) {
|
|
1087
|
+
return jspb.Message.setProto3EnumField(this, 13, value);
|
|
1088
|
+
};
|
|
1089
|
+
|
|
1090
|
+
|
|
1060
1091
|
|
|
1061
1092
|
/**
|
|
1062
1093
|
* List of repeated fields within this message type.
|
|
@@ -1312,7 +1343,8 @@ displayName: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
|
|
1312
1343
|
description: jspb.Message.getFieldWithDefault(msg, 5, ""),
|
|
1313
1344
|
enabled: jspb.Message.getBooleanFieldWithDefault(msg, 6, false),
|
|
1314
1345
|
unit: jspb.Message.getFieldWithDefault(msg, 7, ""),
|
|
1315
|
-
program: (f = msg.getProgram()) && proto.gateway.web.v1.DerivedMetricProgram.toObject(includeInstance, f)
|
|
1346
|
+
program: (f = msg.getProgram()) && proto.gateway.web.v1.DerivedMetricProgram.toObject(includeInstance, f),
|
|
1347
|
+
source: jspb.Message.getFieldWithDefault(msg, 9, 0)
|
|
1316
1348
|
};
|
|
1317
1349
|
|
|
1318
1350
|
if (includeInstance) {
|
|
@@ -1382,6 +1414,10 @@ proto.gateway.web.v1.CreateDerivedMetricRequest.deserializeBinaryFromReader = fu
|
|
|
1382
1414
|
reader.readMessage(value,proto.gateway.web.v1.DerivedMetricProgram.deserializeBinaryFromReader);
|
|
1383
1415
|
msg.setProgram(value);
|
|
1384
1416
|
break;
|
|
1417
|
+
case 9:
|
|
1418
|
+
var value = /** @type {!proto.gateway.web.v1.DerivedMetricSource} */ (reader.readEnum());
|
|
1419
|
+
msg.setSource(value);
|
|
1420
|
+
break;
|
|
1385
1421
|
default:
|
|
1386
1422
|
reader.skipField();
|
|
1387
1423
|
break;
|
|
@@ -1468,6 +1504,13 @@ proto.gateway.web.v1.CreateDerivedMetricRequest.serializeBinaryToWriter = functi
|
|
|
1468
1504
|
proto.gateway.web.v1.DerivedMetricProgram.serializeBinaryToWriter
|
|
1469
1505
|
);
|
|
1470
1506
|
}
|
|
1507
|
+
f = message.getSource();
|
|
1508
|
+
if (f !== 0.0) {
|
|
1509
|
+
writer.writeEnum(
|
|
1510
|
+
9,
|
|
1511
|
+
f
|
|
1512
|
+
);
|
|
1513
|
+
}
|
|
1471
1514
|
};
|
|
1472
1515
|
|
|
1473
1516
|
|
|
@@ -1634,6 +1677,24 @@ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.hasProgram = function(
|
|
|
1634
1677
|
};
|
|
1635
1678
|
|
|
1636
1679
|
|
|
1680
|
+
/**
|
|
1681
|
+
* optional DerivedMetricSource source = 9;
|
|
1682
|
+
* @return {!proto.gateway.web.v1.DerivedMetricSource}
|
|
1683
|
+
*/
|
|
1684
|
+
proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.getSource = function() {
|
|
1685
|
+
return /** @type {!proto.gateway.web.v1.DerivedMetricSource} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
|
|
1686
|
+
};
|
|
1687
|
+
|
|
1688
|
+
|
|
1689
|
+
/**
|
|
1690
|
+
* @param {!proto.gateway.web.v1.DerivedMetricSource} value
|
|
1691
|
+
* @return {!proto.gateway.web.v1.CreateDerivedMetricRequest} returns this
|
|
1692
|
+
*/
|
|
1693
|
+
proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.setSource = function(value) {
|
|
1694
|
+
return jspb.Message.setProto3EnumField(this, 9, value);
|
|
1695
|
+
};
|
|
1696
|
+
|
|
1697
|
+
|
|
1637
1698
|
|
|
1638
1699
|
|
|
1639
1700
|
|
|
@@ -5824,6 +5885,14 @@ proto.gateway.web.v1.DerivedMetricEventAttributes.prototype.clearAttributesList
|
|
|
5824
5885
|
};
|
|
5825
5886
|
|
|
5826
5887
|
|
|
5888
|
+
/**
|
|
5889
|
+
* @enum {number}
|
|
5890
|
+
*/
|
|
5891
|
+
proto.gateway.web.v1.DerivedMetricSource = {
|
|
5892
|
+
DERIVED_METRIC_SOURCE_UNSPECIFIED: 0,
|
|
5893
|
+
DERIVED_METRIC_SOURCE_TRACE: 1
|
|
5894
|
+
};
|
|
5895
|
+
|
|
5827
5896
|
/**
|
|
5828
5897
|
* @enum {number}
|
|
5829
5898
|
*/
|