@miradorlabs/web-grpc 2.36.0 → 2.37.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miradorlabs/web-grpc",
3
- "version": "2.36.0",
3
+ "version": "2.37.0",
4
4
  "description": "Generated gRPC (grpc-js) client stubs for the Mirador web gateway.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -171,11 +171,14 @@ export interface DerivedMetric {
171
171
  export interface DerivedMetricProgram {
172
172
  /**
173
173
  * Selects which finished traces CONTRIBUTE -- eligibility, never success. A success condition here
174
- * would emit only the good traces and leave any ratio over them at 100% forever. Immutable after
175
- * create; empty matches every finished trace.
174
+ * would emit only the good traces and leave any ratio over them at 100% forever. Editable in place
175
+ * via UpdateDerivedMetric (forward-only); empty matches every finished trace.
176
176
  */
177
177
  populationExpression: string;
178
- /** Evaluates to a number, or to an empty optional meaning no sample. */
178
+ /**
179
+ * Evaluates to a number, or to an empty optional meaning no sample. Editable in place via
180
+ * UpdateDerivedMetric (forward-only).
181
+ */
179
182
  valueExpression: string;
180
183
  /**
181
184
  * Trace attribute keys stamped onto every emitted point, so any dashboard widget can group or
@@ -234,14 +237,19 @@ export interface UpdateDerivedMetricRequest {
234
237
 
235
238
  export interface UpdateDerivedMetricRequest_DerivedMetricUpdates {
236
239
  displayName?: string | undefined;
237
- description?:
238
- | string
240
+ description?: string | undefined;
241
+ enabled?:
242
+ | boolean
239
243
  | undefined;
240
244
  /**
241
- * The measurement (population, value, dimensions, unit, slug) is immutable -- changing it
242
- * means a new metric.
245
+ * population_expression and value_expression are editable in place (the slug, and therefore the
246
+ * series identity, is preserved). Editing is forward-only: new finished traces derive under the
247
+ * new program immediately; already-emitted points are only corrected if their trace re-settles.
248
+ * dimensions, unit and slug stay immutable -- changing those rewrites series identity, so they
249
+ * still mean a new metric. optional so unset != cleared (an empty population matches every trace).
243
250
  */
244
- enabled?: boolean | undefined;
251
+ populationExpression?: string | undefined;
252
+ valueExpression?: string | undefined;
245
253
  }
246
254
 
247
255
  export interface UpdateDerivedMetricResponse {
@@ -1564,7 +1572,13 @@ export const UpdateDerivedMetricRequest: MessageFns<UpdateDerivedMetricRequest>
1564
1572
  };
1565
1573
 
1566
1574
  function createBaseUpdateDerivedMetricRequest_DerivedMetricUpdates(): UpdateDerivedMetricRequest_DerivedMetricUpdates {
1567
- return { displayName: undefined, description: undefined, enabled: undefined };
1575
+ return {
1576
+ displayName: undefined,
1577
+ description: undefined,
1578
+ enabled: undefined,
1579
+ populationExpression: undefined,
1580
+ valueExpression: undefined,
1581
+ };
1568
1582
  }
1569
1583
 
1570
1584
  export const UpdateDerivedMetricRequest_DerivedMetricUpdates: MessageFns<
@@ -1583,6 +1597,12 @@ export const UpdateDerivedMetricRequest_DerivedMetricUpdates: MessageFns<
1583
1597
  if (message.enabled !== undefined) {
1584
1598
  writer.uint32(24).bool(message.enabled);
1585
1599
  }
1600
+ if (message.populationExpression !== undefined) {
1601
+ writer.uint32(34).string(message.populationExpression);
1602
+ }
1603
+ if (message.valueExpression !== undefined) {
1604
+ writer.uint32(42).string(message.valueExpression);
1605
+ }
1586
1606
  return writer;
1587
1607
  },
1588
1608
 
@@ -1623,6 +1643,22 @@ export const UpdateDerivedMetricRequest_DerivedMetricUpdates: MessageFns<
1623
1643
  message.enabled = reader.bool();
1624
1644
  continue;
1625
1645
  }
1646
+ case 4: {
1647
+ if (tag !== 34) {
1648
+ break;
1649
+ }
1650
+
1651
+ message.populationExpression = reader.string();
1652
+ continue;
1653
+ }
1654
+ case 5: {
1655
+ if (tag !== 42) {
1656
+ break;
1657
+ }
1658
+
1659
+ message.valueExpression = reader.string();
1660
+ continue;
1661
+ }
1626
1662
  }
1627
1663
  if ((tag & 7) === 4 || tag === 0) {
1628
1664
  break;
@@ -1644,6 +1680,16 @@ export const UpdateDerivedMetricRequest_DerivedMetricUpdates: MessageFns<
1644
1680
  : undefined,
1645
1681
  description: isSet(object.description) ? globalThis.String(object.description) : undefined,
1646
1682
  enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : undefined,
1683
+ populationExpression: isSet(object.populationExpression)
1684
+ ? globalThis.String(object.populationExpression)
1685
+ : isSet(object.population_expression)
1686
+ ? globalThis.String(object.population_expression)
1687
+ : undefined,
1688
+ valueExpression: isSet(object.valueExpression)
1689
+ ? globalThis.String(object.valueExpression)
1690
+ : isSet(object.value_expression)
1691
+ ? globalThis.String(object.value_expression)
1692
+ : undefined,
1647
1693
  };
1648
1694
  },
1649
1695
 
@@ -1658,6 +1704,12 @@ export const UpdateDerivedMetricRequest_DerivedMetricUpdates: MessageFns<
1658
1704
  if (message.enabled !== undefined) {
1659
1705
  obj.enabled = message.enabled;
1660
1706
  }
1707
+ if (message.populationExpression !== undefined) {
1708
+ obj.populationExpression = message.populationExpression;
1709
+ }
1710
+ if (message.valueExpression !== undefined) {
1711
+ obj.valueExpression = message.valueExpression;
1712
+ }
1661
1713
  return obj;
1662
1714
  },
1663
1715
 
@@ -1673,6 +1725,8 @@ export const UpdateDerivedMetricRequest_DerivedMetricUpdates: MessageFns<
1673
1725
  message.displayName = object.displayName ?? undefined;
1674
1726
  message.description = object.description ?? undefined;
1675
1727
  message.enabled = object.enabled ?? undefined;
1728
+ message.populationExpression = object.populationExpression ?? undefined;
1729
+ message.valueExpression = object.valueExpression ?? undefined;
1676
1730
  return message;
1677
1731
  },
1678
1732
  };
@@ -2755,7 +2755,9 @@ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.toObject =
2755
2755
  var f, obj = {
2756
2756
  displayName: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
2757
2757
  description: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
2758
- enabled: (f = jspb.Message.getBooleanField(msg, 3)) == null ? undefined : f
2758
+ enabled: (f = jspb.Message.getBooleanField(msg, 3)) == null ? undefined : f,
2759
+ populationExpression: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f,
2760
+ valueExpression: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f
2759
2761
  };
2760
2762
 
2761
2763
  if (includeInstance) {
@@ -2804,6 +2806,14 @@ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.deserialize
2804
2806
  var value = /** @type {boolean} */ (reader.readBool());
2805
2807
  msg.setEnabled(value);
2806
2808
  break;
2809
+ case 4:
2810
+ var value = /** @type {string} */ (reader.readString());
2811
+ msg.setPopulationExpression(value);
2812
+ break;
2813
+ case 5:
2814
+ var value = /** @type {string} */ (reader.readString());
2815
+ msg.setValueExpression(value);
2816
+ break;
2807
2817
  default:
2808
2818
  reader.skipField();
2809
2819
  break;
@@ -2854,6 +2864,20 @@ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.serializeBi
2854
2864
  f
2855
2865
  );
2856
2866
  }
2867
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
2868
+ if (f != null) {
2869
+ writer.writeString(
2870
+ 4,
2871
+ f
2872
+ );
2873
+ }
2874
+ f = /** @type {string} */ (jspb.Message.getField(message, 5));
2875
+ if (f != null) {
2876
+ writer.writeString(
2877
+ 5,
2878
+ f
2879
+ );
2880
+ }
2857
2881
  };
2858
2882
 
2859
2883
 
@@ -2965,6 +2989,78 @@ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.prototype.h
2965
2989
  };
2966
2990
 
2967
2991
 
2992
+ /**
2993
+ * optional string population_expression = 4;
2994
+ * @return {string}
2995
+ */
2996
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.prototype.getPopulationExpression = function() {
2997
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
2998
+ };
2999
+
3000
+
3001
+ /**
3002
+ * @param {string} value
3003
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates} returns this
3004
+ */
3005
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.prototype.setPopulationExpression = function(value) {
3006
+ return jspb.Message.setField(this, 4, value);
3007
+ };
3008
+
3009
+
3010
+ /**
3011
+ * Clears the field making it undefined.
3012
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates} returns this
3013
+ */
3014
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.prototype.clearPopulationExpression = function() {
3015
+ return jspb.Message.setField(this, 4, undefined);
3016
+ };
3017
+
3018
+
3019
+ /**
3020
+ * Returns whether this field is set.
3021
+ * @return {boolean}
3022
+ */
3023
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.prototype.hasPopulationExpression = function() {
3024
+ return jspb.Message.getField(this, 4) != null;
3025
+ };
3026
+
3027
+
3028
+ /**
3029
+ * optional string value_expression = 5;
3030
+ * @return {string}
3031
+ */
3032
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.prototype.getValueExpression = function() {
3033
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
3034
+ };
3035
+
3036
+
3037
+ /**
3038
+ * @param {string} value
3039
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates} returns this
3040
+ */
3041
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.prototype.setValueExpression = function(value) {
3042
+ return jspb.Message.setField(this, 5, value);
3043
+ };
3044
+
3045
+
3046
+ /**
3047
+ * Clears the field making it undefined.
3048
+ * @return {!proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates} returns this
3049
+ */
3050
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.prototype.clearValueExpression = function() {
3051
+ return jspb.Message.setField(this, 5, undefined);
3052
+ };
3053
+
3054
+
3055
+ /**
3056
+ * Returns whether this field is set.
3057
+ * @return {boolean}
3058
+ */
3059
+ proto.gateway.web.v1.UpdateDerivedMetricRequest.DerivedMetricUpdates.prototype.hasValueExpression = function() {
3060
+ return jspb.Message.getField(this, 5) != null;
3061
+ };
3062
+
3063
+
2968
3064
  /**
2969
3065
  * optional string organization_id = 1;
2970
3066
  * @return {string}