@smartspectra/node-sdk 3.4.0-rc.5 → 3.4.0-rc.7

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.
@@ -1653,7 +1653,9 @@ $root.presage = (function() {
1653
1653
  * @property {number|null} [rmssd] root mean square of successive differences between normal heartbeats
1654
1654
  * @property {number|null} [meanNn] mean normal-to-normal (NN) interval length
1655
1655
  * @property {number|null} [sdnn] Standard Deviation of normal-to-normal (NN) Intervals
1656
- * @property {number|null} [baevsky] Baevsky's Stress Index, in 1/ms^2 (inverse-square milliseconds)
1656
+ * @property {number|null} [baevsky] Baevsky's Stress Index: a measure of autonomic balance derived from the
1657
+ * NN interval distribution, computed as `AMo / (2 * Mo * MxDMn)`. Reported
1658
+ * without a unit, matching the HRV model card.
1657
1659
  * @property {number|Long|null} [timestamp] Absolute timestamp at which the HRV measurement was taken, in microseconds, since Linux epoch
1658
1660
  * @property {number|null} [confidence] Confidence score for the HRV measurement, expressed as a percentage in the range [0.0, 100.0]
1659
1661
  * @property {boolean|null} [stable] Whether the HRV measurement is considered stable/reliable
@@ -1699,7 +1701,9 @@ $root.presage = (function() {
1699
1701
  Hrv.prototype.sdnn = 0;
1700
1702
 
1701
1703
  /**
1702
- * Baevsky's Stress Index, in 1/ms^2 (inverse-square milliseconds)
1704
+ * Baevsky's Stress Index: a measure of autonomic balance derived from the
1705
+ * NN interval distribution, computed as `AMo / (2 * Mo * MxDMn)`. Reported
1706
+ * without a unit, matching the HRV model card.
1703
1707
  * @member {number} baevsky
1704
1708
  * @memberof presage.smartspectra.Hrv
1705
1709
  * @instance
@@ -2048,6 +2052,7 @@ $root.presage = (function() {
2048
2052
  * @memberof presage.smartspectra
2049
2053
  * @interface IStrict
2050
2054
  * @property {number|null} [value] The strict value requiring high precision
2055
+ * @property {number|Long|null} [timestamp] End of the completed measurement window, in microseconds on the session input timeline
2051
2056
  */
2052
2057
 
2053
2058
  /**
@@ -2074,6 +2079,14 @@ $root.presage = (function() {
2074
2079
  */
2075
2080
  Strict.prototype.value = 0;
2076
2081
 
2082
+ /**
2083
+ * End of the completed measurement window, in microseconds on the session input timeline
2084
+ * @member {number|Long} timestamp
2085
+ * @memberof presage.smartspectra.Strict
2086
+ * @instance
2087
+ */
2088
+ Strict.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
2089
+
2077
2090
  /**
2078
2091
  * Creates a new Strict instance using the specified properties.
2079
2092
  * @function create
@@ -2104,6 +2117,8 @@ $root.presage = (function() {
2104
2117
  throw Error("max depth exceeded");
2105
2118
  if (message.value != null && Object.hasOwnProperty.call(message, "value"))
2106
2119
  writer.uint32(/* id 1, wireType 5 =*/13).float(message.value);
2120
+ if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
2121
+ writer.uint32(/* id 2, wireType 0 =*/16).int64(message.timestamp);
2107
2122
  return writer;
2108
2123
  };
2109
2124
 
@@ -2158,6 +2173,10 @@ $root.presage = (function() {
2158
2173
  message.value = reader.float();
2159
2174
  break;
2160
2175
  }
2176
+ case 2: {
2177
+ message.timestamp = reader.int64();
2178
+ break;
2179
+ }
2161
2180
  default:
2162
2181
  reader.skipType(tag & 7, long);
2163
2182
  break;
@@ -2205,6 +2224,9 @@ $root.presage = (function() {
2205
2224
  if (message.value != null && Object.hasOwnProperty.call(message, "value"))
2206
2225
  if (typeof message.value !== "number")
2207
2226
  return "value: number expected";
2227
+ if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
2228
+ if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
2229
+ return "timestamp: integer|Long expected";
2208
2230
  return null;
2209
2231
  };
2210
2232
 
@@ -2228,6 +2250,15 @@ $root.presage = (function() {
2228
2250
  var message = new $root.presage.smartspectra.Strict();
2229
2251
  if (object.value != null)
2230
2252
  message.value = Number(object.value);
2253
+ if (object.timestamp != null)
2254
+ if ($util.Long)
2255
+ message.timestamp = $util.Long.fromValue(object.timestamp, false);
2256
+ else if (typeof object.timestamp === "string")
2257
+ message.timestamp = parseInt(object.timestamp, 10);
2258
+ else if (typeof object.timestamp === "number")
2259
+ message.timestamp = object.timestamp;
2260
+ else if (typeof object.timestamp === "object")
2261
+ message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber();
2231
2262
  return message;
2232
2263
  };
2233
2264
 
@@ -2248,10 +2279,23 @@ $root.presage = (function() {
2248
2279
  if (q > $util.recursionLimit)
2249
2280
  throw Error("max depth exceeded");
2250
2281
  var object = {};
2251
- if (options.defaults)
2282
+ if (options.defaults) {
2252
2283
  object.value = 0;
2284
+ if ($util.Long) {
2285
+ var long = new $util.Long(0, 0, false);
2286
+ object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
2287
+ } else
2288
+ object.timestamp = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
2289
+ }
2253
2290
  if (message.value != null && Object.hasOwnProperty.call(message, "value"))
2254
2291
  object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value;
2292
+ if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
2293
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
2294
+ object.timestamp = typeof message.timestamp === "number" ? BigInt(message.timestamp) : $util.Long.fromBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0, false).toBigInt();
2295
+ else if (typeof message.timestamp === "number")
2296
+ object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
2297
+ else
2298
+ object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp;
2255
2299
  return object;
2256
2300
  };
2257
2301
 
@@ -2293,7 +2337,7 @@ $root.presage = (function() {
2293
2337
  * @property {Array.<presage.smartspectra.IMeasurementWithConfidence>|null} [rate] Heart rate measurements with confidence scores
2294
2338
  * @property {Array.<presage.smartspectra.IMeasurement>|null} [trace] Raw pulse trace measurements
2295
2339
  * @property {Array.<presage.smartspectra.IMeasurement>|null} [pulseRespirationQuotient] Pulse-respiration quotient measurements indicating cardio-respiratory coupling
2296
- * @property {presage.smartspectra.IStrict|null} [strict] Strict/high-precision pulse measurements over a fixed time interval.
2340
+ * @property {presage.smartspectra.IStrict|null} [pulseRateStrict] Strict/high-precision pulse measurements over a fixed time interval.
2297
2341
  * Populated when strict mode analysis is enabled.
2298
2342
  */
2299
2343
 
@@ -2343,11 +2387,11 @@ $root.presage = (function() {
2343
2387
  /**
2344
2388
  * Strict/high-precision pulse measurements over a fixed time interval.
2345
2389
  * Populated when strict mode analysis is enabled.
2346
- * @member {presage.smartspectra.IStrict|null|undefined} strict
2390
+ * @member {presage.smartspectra.IStrict|null|undefined} pulseRateStrict
2347
2391
  * @memberof presage.smartspectra.Pulse
2348
2392
  * @instance
2349
2393
  */
2350
- Pulse.prototype.strict = null;
2394
+ Pulse.prototype.pulseRateStrict = null;
2351
2395
 
2352
2396
  /**
2353
2397
  * Creates a new Pulse instance using the specified properties.
@@ -2386,8 +2430,8 @@ $root.presage = (function() {
2386
2430
  if (message.pulseRespirationQuotient != null && message.pulseRespirationQuotient.length)
2387
2431
  for (var i = 0; i < message.pulseRespirationQuotient.length; ++i)
2388
2432
  $root.presage.smartspectra.Measurement.encode(message.pulseRespirationQuotient[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim();
2389
- if (message.strict != null && Object.hasOwnProperty.call(message, "strict"))
2390
- $root.presage.smartspectra.Strict.encode(message.strict, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim();
2433
+ if (message.pulseRateStrict != null && Object.hasOwnProperty.call(message, "pulseRateStrict"))
2434
+ $root.presage.smartspectra.Strict.encode(message.pulseRateStrict, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim();
2391
2435
  return writer;
2392
2436
  };
2393
2437
 
@@ -2457,7 +2501,7 @@ $root.presage = (function() {
2457
2501
  break;
2458
2502
  }
2459
2503
  case 4: {
2460
- message.strict = $root.presage.smartspectra.Strict.decode(reader, reader.uint32(), undefined, long + 1);
2504
+ message.pulseRateStrict = $root.presage.smartspectra.Strict.decode(reader, reader.uint32(), undefined, long + 1);
2461
2505
  break;
2462
2506
  }
2463
2507
  default:
@@ -2531,10 +2575,10 @@ $root.presage = (function() {
2531
2575
  return "pulseRespirationQuotient." + error;
2532
2576
  }
2533
2577
  }
2534
- if (message.strict != null && Object.hasOwnProperty.call(message, "strict")) {
2535
- var error = $root.presage.smartspectra.Strict.verify(message.strict, long + 1);
2578
+ if (message.pulseRateStrict != null && Object.hasOwnProperty.call(message, "pulseRateStrict")) {
2579
+ var error = $root.presage.smartspectra.Strict.verify(message.pulseRateStrict, long + 1);
2536
2580
  if (error)
2537
- return "strict." + error;
2581
+ return "pulseRateStrict." + error;
2538
2582
  }
2539
2583
  return null;
2540
2584
  };
@@ -2587,10 +2631,10 @@ $root.presage = (function() {
2587
2631
  message.pulseRespirationQuotient[i] = $root.presage.smartspectra.Measurement.fromObject(object.pulseRespirationQuotient[i], long + 1);
2588
2632
  }
2589
2633
  }
2590
- if (object.strict != null) {
2591
- if (!$util.isObject(object.strict))
2592
- throw TypeError(".presage.smartspectra.Pulse.strict: object expected");
2593
- message.strict = $root.presage.smartspectra.Strict.fromObject(object.strict, long + 1);
2634
+ if (object.pulseRateStrict != null) {
2635
+ if (!$util.isObject(object.pulseRateStrict))
2636
+ throw TypeError(".presage.smartspectra.Pulse.pulseRateStrict: object expected");
2637
+ message.pulseRateStrict = $root.presage.smartspectra.Strict.fromObject(object.pulseRateStrict, long + 1);
2594
2638
  }
2595
2639
  return message;
2596
2640
  };
@@ -2618,7 +2662,7 @@ $root.presage = (function() {
2618
2662
  object.pulseRespirationQuotient = [];
2619
2663
  }
2620
2664
  if (options.defaults)
2621
- object.strict = null;
2665
+ object.pulseRateStrict = null;
2622
2666
  if (message.rate && message.rate.length) {
2623
2667
  object.rate = [];
2624
2668
  for (var j = 0; j < message.rate.length; ++j)
@@ -2634,8 +2678,8 @@ $root.presage = (function() {
2634
2678
  for (var j = 0; j < message.pulseRespirationQuotient.length; ++j)
2635
2679
  object.pulseRespirationQuotient[j] = $root.presage.smartspectra.Measurement.toObject(message.pulseRespirationQuotient[j], options, q + 1);
2636
2680
  }
2637
- if (message.strict != null && Object.hasOwnProperty.call(message, "strict"))
2638
- object.strict = $root.presage.smartspectra.Strict.toObject(message.strict, options, q + 1);
2681
+ if (message.pulseRateStrict != null && Object.hasOwnProperty.call(message, "pulseRateStrict"))
2682
+ object.pulseRateStrict = $root.presage.smartspectra.Strict.toObject(message.pulseRateStrict, options, q + 1);
2639
2683
  return object;
2640
2684
  };
2641
2685
 
@@ -2690,8 +2734,9 @@ $root.presage = (function() {
2690
2734
  * @property {Array.<presage.smartspectra.IMeasurement>|null} [respiratoryLineLength] Respiratory line length measurements for breathing pattern analysis
2691
2735
  * @property {Array.<presage.smartspectra.IMeasurement>|null} [baseline] Baseline breathing measurements
2692
2736
  * @property {Array.<presage.smartspectra.IMeasurement>|null} [inhaleExhaleRatio] Inhale to exhale duration ratio measurements
2693
- * @property {presage.smartspectra.IStrict|null} [strict] Strict/high-precision breathing measurements over a fixed time interval.
2694
- * Populated when strict mode analysis is enabled.
2737
+ * @property {presage.smartspectra.IStrict|null} [breathingRateStrict] Strict/high-precision breathing measurements over a fixed time interval.
2738
+ * Populated only when BREATHING_RATE_STRICT is requested and a value is
2739
+ * available.
2695
2740
  */
2696
2741
 
2697
2742
  /**
@@ -2792,12 +2837,13 @@ $root.presage = (function() {
2792
2837
 
2793
2838
  /**
2794
2839
  * Strict/high-precision breathing measurements over a fixed time interval.
2795
- * Populated when strict mode analysis is enabled.
2796
- * @member {presage.smartspectra.IStrict|null|undefined} strict
2840
+ * Populated only when BREATHING_RATE_STRICT is requested and a value is
2841
+ * available.
2842
+ * @member {presage.smartspectra.IStrict|null|undefined} breathingRateStrict
2797
2843
  * @memberof presage.smartspectra.Breathing
2798
2844
  * @instance
2799
2845
  */
2800
- Breathing.prototype.strict = null;
2846
+ Breathing.prototype.breathingRateStrict = null;
2801
2847
 
2802
2848
  /**
2803
2849
  * Creates a new Breathing instance using the specified properties.
@@ -2851,8 +2897,8 @@ $root.presage = (function() {
2851
2897
  if (message.inhaleExhaleRatio != null && message.inhaleExhaleRatio.length)
2852
2898
  for (var i = 0; i < message.inhaleExhaleRatio.length; ++i)
2853
2899
  $root.presage.smartspectra.Measurement.encode(message.inhaleExhaleRatio[i], writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim();
2854
- if (message.strict != null && Object.hasOwnProperty.call(message, "strict"))
2855
- $root.presage.smartspectra.Strict.encode(message.strict, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim();
2900
+ if (message.breathingRateStrict != null && Object.hasOwnProperty.call(message, "breathingRateStrict"))
2901
+ $root.presage.smartspectra.Strict.encode(message.breathingRateStrict, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim();
2856
2902
  return writer;
2857
2903
  };
2858
2904
 
@@ -2952,7 +2998,7 @@ $root.presage = (function() {
2952
2998
  break;
2953
2999
  }
2954
3000
  case 9: {
2955
- message.strict = $root.presage.smartspectra.Strict.decode(reader, reader.uint32(), undefined, long + 1);
3001
+ message.breathingRateStrict = $root.presage.smartspectra.Strict.decode(reader, reader.uint32(), undefined, long + 1);
2956
3002
  break;
2957
3003
  }
2958
3004
  default:
@@ -3071,10 +3117,10 @@ $root.presage = (function() {
3071
3117
  return "inhaleExhaleRatio." + error;
3072
3118
  }
3073
3119
  }
3074
- if (message.strict != null && Object.hasOwnProperty.call(message, "strict")) {
3075
- var error = $root.presage.smartspectra.Strict.verify(message.strict, long + 1);
3120
+ if (message.breathingRateStrict != null && Object.hasOwnProperty.call(message, "breathingRateStrict")) {
3121
+ var error = $root.presage.smartspectra.Strict.verify(message.breathingRateStrict, long + 1);
3076
3122
  if (error)
3077
- return "strict." + error;
3123
+ return "breathingRateStrict." + error;
3078
3124
  }
3079
3125
  return null;
3080
3126
  };
@@ -3177,10 +3223,10 @@ $root.presage = (function() {
3177
3223
  message.inhaleExhaleRatio[i] = $root.presage.smartspectra.Measurement.fromObject(object.inhaleExhaleRatio[i], long + 1);
3178
3224
  }
3179
3225
  }
3180
- if (object.strict != null) {
3181
- if (!$util.isObject(object.strict))
3182
- throw TypeError(".presage.smartspectra.Breathing.strict: object expected");
3183
- message.strict = $root.presage.smartspectra.Strict.fromObject(object.strict, long + 1);
3226
+ if (object.breathingRateStrict != null) {
3227
+ if (!$util.isObject(object.breathingRateStrict))
3228
+ throw TypeError(".presage.smartspectra.Breathing.breathingRateStrict: object expected");
3229
+ message.breathingRateStrict = $root.presage.smartspectra.Strict.fromObject(object.breathingRateStrict, long + 1);
3184
3230
  }
3185
3231
  return message;
3186
3232
  };
@@ -3213,7 +3259,7 @@ $root.presage = (function() {
3213
3259
  object.inhaleExhaleRatio = [];
3214
3260
  }
3215
3261
  if (options.defaults)
3216
- object.strict = null;
3262
+ object.breathingRateStrict = null;
3217
3263
  if (message.rate && message.rate.length) {
3218
3264
  object.rate = [];
3219
3265
  for (var j = 0; j < message.rate.length; ++j)
@@ -3254,8 +3300,8 @@ $root.presage = (function() {
3254
3300
  for (var j = 0; j < message.inhaleExhaleRatio.length; ++j)
3255
3301
  object.inhaleExhaleRatio[j] = $root.presage.smartspectra.Measurement.toObject(message.inhaleExhaleRatio[j], options, q + 1);
3256
3302
  }
3257
- if (message.strict != null && Object.hasOwnProperty.call(message, "strict"))
3258
- object.strict = $root.presage.smartspectra.Strict.toObject(message.strict, options, q + 1);
3303
+ if (message.breathingRateStrict != null && Object.hasOwnProperty.call(message, "breathingRateStrict"))
3304
+ object.breathingRateStrict = $root.presage.smartspectra.Strict.toObject(message.breathingRateStrict, options, q + 1);
3259
3305
  return object;
3260
3306
  };
3261
3307
 
@@ -4630,6 +4676,8 @@ $root.presage = (function() {
4630
4676
  * (+/-5 ms), which corresponds to confidence >= 50; see the
4631
4677
  * [HRV model card](https://vandv.presagetech.com/hrv_model_card.html)
4632
4678
  * for the confidence-to-error mapping.
4679
+ * @property {presage.smartspectra.IStrict|null} [pulseRateStrict] Strict pulse-rate measurement. Populated only when PULSE_RATE_STRICT is
4680
+ * requested and a value is available.
4633
4681
  */
4634
4682
 
4635
4683
  /**
@@ -4686,6 +4734,15 @@ $root.presage = (function() {
4686
4734
  */
4687
4735
  Cardio.prototype.hrv = $util.emptyArray;
4688
4736
 
4737
+ /**
4738
+ * Strict pulse-rate measurement. Populated only when PULSE_RATE_STRICT is
4739
+ * requested and a value is available.
4740
+ * @member {presage.smartspectra.IStrict|null|undefined} pulseRateStrict
4741
+ * @memberof presage.smartspectra.Cardio
4742
+ * @instance
4743
+ */
4744
+ Cardio.prototype.pulseRateStrict = null;
4745
+
4689
4746
  /**
4690
4747
  * Creates a new Cardio instance using the specified properties.
4691
4748
  * @function create
@@ -4723,6 +4780,8 @@ $root.presage = (function() {
4723
4780
  if (message.hrv != null && message.hrv.length)
4724
4781
  for (var i = 0; i < message.hrv.length; ++i)
4725
4782
  $root.presage.smartspectra.Hrv.encode(message.hrv[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim();
4783
+ if (message.pulseRateStrict != null && Object.hasOwnProperty.call(message, "pulseRateStrict"))
4784
+ $root.presage.smartspectra.Strict.encode(message.pulseRateStrict, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim();
4726
4785
  return writer;
4727
4786
  };
4728
4787
 
@@ -4791,6 +4850,10 @@ $root.presage = (function() {
4791
4850
  message.hrv.push($root.presage.smartspectra.Hrv.decode(reader, reader.uint32(), undefined, long + 1));
4792
4851
  break;
4793
4852
  }
4853
+ case 4: {
4854
+ message.pulseRateStrict = $root.presage.smartspectra.Strict.decode(reader, reader.uint32(), undefined, long + 1);
4855
+ break;
4856
+ }
4794
4857
  default:
4795
4858
  reader.skipType(tag & 7, long);
4796
4859
  break;
@@ -4862,6 +4925,11 @@ $root.presage = (function() {
4862
4925
  return "hrv." + error;
4863
4926
  }
4864
4927
  }
4928
+ if (message.pulseRateStrict != null && Object.hasOwnProperty.call(message, "pulseRateStrict")) {
4929
+ var error = $root.presage.smartspectra.Strict.verify(message.pulseRateStrict, long + 1);
4930
+ if (error)
4931
+ return "pulseRateStrict." + error;
4932
+ }
4865
4933
  return null;
4866
4934
  };
4867
4935
 
@@ -4913,6 +4981,11 @@ $root.presage = (function() {
4913
4981
  message.hrv[i] = $root.presage.smartspectra.Hrv.fromObject(object.hrv[i], long + 1);
4914
4982
  }
4915
4983
  }
4984
+ if (object.pulseRateStrict != null) {
4985
+ if (!$util.isObject(object.pulseRateStrict))
4986
+ throw TypeError(".presage.smartspectra.Cardio.pulseRateStrict: object expected");
4987
+ message.pulseRateStrict = $root.presage.smartspectra.Strict.fromObject(object.pulseRateStrict, long + 1);
4988
+ }
4916
4989
  return message;
4917
4990
  };
4918
4991
 
@@ -4938,6 +5011,8 @@ $root.presage = (function() {
4938
5011
  object.arterialPressureTrace = [];
4939
5012
  object.hrv = [];
4940
5013
  }
5014
+ if (options.defaults)
5015
+ object.pulseRateStrict = null;
4941
5016
  if (message.pulseRate && message.pulseRate.length) {
4942
5017
  object.pulseRate = [];
4943
5018
  for (var j = 0; j < message.pulseRate.length; ++j)
@@ -4953,6 +5028,8 @@ $root.presage = (function() {
4953
5028
  for (var j = 0; j < message.hrv.length; ++j)
4954
5029
  object.hrv[j] = $root.presage.smartspectra.Hrv.toObject(message.hrv[j], options, q + 1);
4955
5030
  }
5031
+ if (message.pulseRateStrict != null && Object.hasOwnProperty.call(message, "pulseRateStrict"))
5032
+ object.pulseRateStrict = $root.presage.smartspectra.Strict.toObject(message.pulseRateStrict, options, q + 1);
4956
5033
  return object;
4957
5034
  };
4958
5035
 
@@ -6170,6 +6247,457 @@ $root.presage = (function() {
6170
6247
  return Point3dFloat;
6171
6248
  })();
6172
6249
 
6250
+ /**
6251
+ * FeatureType enum.
6252
+ * @name presage.smartspectra.FeatureType
6253
+ * @enum {number}
6254
+ * @property {number} BREATHING=0 BREATHING value
6255
+ * @property {number} MICROMOTION=1 MICROMOTION value
6256
+ * @property {number} EDA=2 EDA value
6257
+ * @property {number} FACE=3 FACE value
6258
+ * @property {number} CARDIO=4 CARDIO value
6259
+ */
6260
+ smartspectra.FeatureType = (function() {
6261
+ var valuesById = {}, values = Object.create(valuesById);
6262
+ values[valuesById[0] = "BREATHING"] = 0;
6263
+ values[valuesById[1] = "MICROMOTION"] = 1;
6264
+ values[valuesById[2] = "EDA"] = 2;
6265
+ values[valuesById[3] = "FACE"] = 3;
6266
+ values[valuesById[4] = "CARDIO"] = 4;
6267
+ return values;
6268
+ })();
6269
+
6270
+ /**
6271
+ * MetricType enum.
6272
+ * @name presage.smartspectra.MetricType
6273
+ * @enum {number}
6274
+ * @property {number} CHEST_BREATHING=0 CHEST_BREATHING value
6275
+ * @property {number} ABDOMEN_BREATHING=1 ABDOMEN_BREATHING value
6276
+ * @property {number} BREATHING_RATE=2 BREATHING_RATE value
6277
+ * @property {number} BREATHING_AMPLITUDE=3 BREATHING_AMPLITUDE value
6278
+ * @property {number} APNEA=4 APNEA value
6279
+ * @property {number} RESPIRATORY_LINE_LENGTH=5 RESPIRATORY_LINE_LENGTH value
6280
+ * @property {number} BASELINE=6 BASELINE value
6281
+ * @property {number} INHALE_EXHALE_RATIO=7 INHALE_EXHALE_RATIO value
6282
+ * @property {number} GLUTES_MICROMOTION=8 GLUTES_MICROMOTION value
6283
+ * @property {number} KNEES_MICROMOTION=9 KNEES_MICROMOTION value
6284
+ * @property {number} EDA_TRACE=10 EDA_TRACE value
6285
+ * @property {number} FACE_LANDMARKS=11 FACE_LANDMARKS value
6286
+ * @property {number} BLINKING=12 BLINKING value
6287
+ * @property {number} TALKING=13 TALKING value
6288
+ * @property {number} EXPRESSIONS=14 EXPRESSIONS value
6289
+ * @property {number} PULSE_RATE=15 PULSE_RATE value
6290
+ * @property {number} ARTERIAL_PRESSURE_TRACE=16 ARTERIAL_PRESSURE_TRACE value
6291
+ * @property {number} HRV=17 HRV value
6292
+ * @property {number} PULSE_RATE_STRICT=18 PULSE_RATE_STRICT value
6293
+ * @property {number} BREATHING_RATE_STRICT=19 BREATHING_RATE_STRICT value
6294
+ */
6295
+ smartspectra.MetricType = (function() {
6296
+ var valuesById = {}, values = Object.create(valuesById);
6297
+ values[valuesById[0] = "CHEST_BREATHING"] = 0;
6298
+ values[valuesById[1] = "ABDOMEN_BREATHING"] = 1;
6299
+ values[valuesById[2] = "BREATHING_RATE"] = 2;
6300
+ values[valuesById[3] = "BREATHING_AMPLITUDE"] = 3;
6301
+ values[valuesById[4] = "APNEA"] = 4;
6302
+ values[valuesById[5] = "RESPIRATORY_LINE_LENGTH"] = 5;
6303
+ values[valuesById[6] = "BASELINE"] = 6;
6304
+ values[valuesById[7] = "INHALE_EXHALE_RATIO"] = 7;
6305
+ values[valuesById[8] = "GLUTES_MICROMOTION"] = 8;
6306
+ values[valuesById[9] = "KNEES_MICROMOTION"] = 9;
6307
+ values[valuesById[10] = "EDA_TRACE"] = 10;
6308
+ values[valuesById[11] = "FACE_LANDMARKS"] = 11;
6309
+ values[valuesById[12] = "BLINKING"] = 12;
6310
+ values[valuesById[13] = "TALKING"] = 13;
6311
+ values[valuesById[14] = "EXPRESSIONS"] = 14;
6312
+ values[valuesById[15] = "PULSE_RATE"] = 15;
6313
+ values[valuesById[16] = "ARTERIAL_PRESSURE_TRACE"] = 16;
6314
+ values[valuesById[17] = "HRV"] = 17;
6315
+ values[valuesById[18] = "PULSE_RATE_STRICT"] = 18;
6316
+ values[valuesById[19] = "BREATHING_RATE_STRICT"] = 19;
6317
+ return values;
6318
+ })();
6319
+
6320
+ smartspectra.RequestedMetrics = (function() {
6321
+
6322
+ /**
6323
+ * Properties of a RequestedMetrics.
6324
+ * @memberof presage.smartspectra
6325
+ * @interface IRequestedMetrics
6326
+ * @property {Array.<presage.smartspectra.MetricType>|null} [metrics] RequestedMetrics metrics
6327
+ */
6328
+
6329
+ /**
6330
+ * Constructs a new RequestedMetrics.
6331
+ * @memberof presage.smartspectra
6332
+ * @classdesc Represents a RequestedMetrics.
6333
+ * @implements IRequestedMetrics
6334
+ * @constructor
6335
+ * @param {presage.smartspectra.IRequestedMetrics=} [properties] Properties to set
6336
+ */
6337
+ function RequestedMetrics(properties) {
6338
+ this.metrics = [];
6339
+ if (properties)
6340
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
6341
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
6342
+ this[keys[i]] = properties[keys[i]];
6343
+ }
6344
+
6345
+ /**
6346
+ * RequestedMetrics metrics.
6347
+ * @member {Array.<presage.smartspectra.MetricType>} metrics
6348
+ * @memberof presage.smartspectra.RequestedMetrics
6349
+ * @instance
6350
+ */
6351
+ RequestedMetrics.prototype.metrics = $util.emptyArray;
6352
+
6353
+ /**
6354
+ * Creates a new RequestedMetrics instance using the specified properties.
6355
+ * @function create
6356
+ * @memberof presage.smartspectra.RequestedMetrics
6357
+ * @static
6358
+ * @param {presage.smartspectra.IRequestedMetrics=} [properties] Properties to set
6359
+ * @returns {presage.smartspectra.RequestedMetrics} RequestedMetrics instance
6360
+ */
6361
+ RequestedMetrics.create = function create(properties) {
6362
+ return new RequestedMetrics(properties);
6363
+ };
6364
+
6365
+ /**
6366
+ * Encodes the specified RequestedMetrics message. Does not implicitly {@link presage.smartspectra.RequestedMetrics.verify|verify} messages.
6367
+ * @function encode
6368
+ * @memberof presage.smartspectra.RequestedMetrics
6369
+ * @static
6370
+ * @param {presage.smartspectra.IRequestedMetrics} message RequestedMetrics message or plain object to encode
6371
+ * @param {$protobuf.Writer} [writer] Writer to encode to
6372
+ * @returns {$protobuf.Writer} Writer
6373
+ */
6374
+ RequestedMetrics.encode = function encode(message, writer, q) {
6375
+ if (!writer)
6376
+ writer = $Writer.create();
6377
+ if (q === undefined)
6378
+ q = 0;
6379
+ if (q > $util.recursionLimit)
6380
+ throw Error("max depth exceeded");
6381
+ if (message.metrics != null && message.metrics.length) {
6382
+ writer.uint32(/* id 1, wireType 2 =*/10).fork();
6383
+ for (var i = 0; i < message.metrics.length; ++i)
6384
+ writer.int32(message.metrics[i]);
6385
+ writer.ldelim();
6386
+ }
6387
+ return writer;
6388
+ };
6389
+
6390
+ /**
6391
+ * Encodes the specified RequestedMetrics message, length delimited. Does not implicitly {@link presage.smartspectra.RequestedMetrics.verify|verify} messages.
6392
+ * @function encodeDelimited
6393
+ * @memberof presage.smartspectra.RequestedMetrics
6394
+ * @static
6395
+ * @param {presage.smartspectra.IRequestedMetrics} message RequestedMetrics message or plain object to encode
6396
+ * @param {$protobuf.Writer} [writer] Writer to encode to
6397
+ * @returns {$protobuf.Writer} Writer
6398
+ */
6399
+ RequestedMetrics.encodeDelimited = function encodeDelimited(message, writer) {
6400
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
6401
+ };
6402
+
6403
+ /**
6404
+ * Decodes a RequestedMetrics message from the specified reader or buffer.
6405
+ * @function decode
6406
+ * @memberof presage.smartspectra.RequestedMetrics
6407
+ * @static
6408
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
6409
+ * @param {number} [length] Message length if known beforehand
6410
+ * @returns {presage.smartspectra.RequestedMetrics} RequestedMetrics
6411
+ * @throws {Error} If the payload is not a reader or valid buffer
6412
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
6413
+ */
6414
+ RequestedMetrics.decode = function decode(reader, length, error, long) {
6415
+ if (!(reader instanceof $Reader))
6416
+ reader = $Reader.create(reader);
6417
+ if (long === undefined)
6418
+ long = 0;
6419
+ if (long > $Reader.recursionLimit)
6420
+ throw Error("maximum nesting depth exceeded");
6421
+ var end, message;
6422
+ if (length === undefined)
6423
+ end = reader.len;
6424
+ else {
6425
+ end = reader.pos + length;
6426
+ if (end > reader.len)
6427
+ throw RangeError("index out of range");
6428
+ length = reader.len;
6429
+ reader.len = end;
6430
+ }
6431
+ message = new $root.presage.smartspectra.RequestedMetrics();
6432
+ while (reader.pos < end) {
6433
+ var tag = reader.uint32();
6434
+ if (tag === error)
6435
+ break;
6436
+ switch (tag >>> 3) {
6437
+ case 1: {
6438
+ if (!(message.metrics && message.metrics.length))
6439
+ message.metrics = [];
6440
+ if ((tag & 7) === 2) {
6441
+ var end2 = reader.uint32() + reader.pos;
6442
+ if (end2 > reader.len)
6443
+ throw RangeError("index out of range");
6444
+ reader.len = end2;
6445
+ while (reader.pos < end2)
6446
+ message.metrics.push(reader.int32());
6447
+ if (reader.pos !== end2)
6448
+ throw RangeError("index out of range");
6449
+ reader.len = end;
6450
+ } else
6451
+ message.metrics.push(reader.int32());
6452
+ break;
6453
+ }
6454
+ default:
6455
+ reader.skipType(tag & 7, long);
6456
+ break;
6457
+ }
6458
+ }
6459
+ if (length !== undefined) {
6460
+ if (reader.pos !== end)
6461
+ throw RangeError("index out of range");
6462
+ reader.len = length;
6463
+ }
6464
+ return message;
6465
+ };
6466
+
6467
+ /**
6468
+ * Decodes a RequestedMetrics message from the specified reader or buffer, length delimited.
6469
+ * @function decodeDelimited
6470
+ * @memberof presage.smartspectra.RequestedMetrics
6471
+ * @static
6472
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
6473
+ * @returns {presage.smartspectra.RequestedMetrics} RequestedMetrics
6474
+ * @throws {Error} If the payload is not a reader or valid buffer
6475
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
6476
+ */
6477
+ RequestedMetrics.decodeDelimited = function decodeDelimited(reader) {
6478
+ if (!(reader instanceof $Reader))
6479
+ reader = new $Reader(reader);
6480
+ return this.decode(reader, reader.uint32());
6481
+ };
6482
+
6483
+ /**
6484
+ * Verifies a RequestedMetrics message.
6485
+ * @function verify
6486
+ * @memberof presage.smartspectra.RequestedMetrics
6487
+ * @static
6488
+ * @param {Object.<string,*>} message Plain object to verify
6489
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
6490
+ */
6491
+ RequestedMetrics.verify = function verify(message, long) {
6492
+ if (typeof message !== "object" || message === null)
6493
+ return "object expected";
6494
+ if (long === undefined)
6495
+ long = 0;
6496
+ if (long > $util.recursionLimit)
6497
+ return "maximum nesting depth exceeded";
6498
+ if (message.metrics != null && Object.hasOwnProperty.call(message, "metrics")) {
6499
+ if (!Array.isArray(message.metrics))
6500
+ return "metrics: array expected";
6501
+ for (var i = 0; i < message.metrics.length; ++i)
6502
+ switch (message.metrics[i]) {
6503
+ default:
6504
+ return "metrics: enum value[] expected";
6505
+ case 0:
6506
+ case 1:
6507
+ case 2:
6508
+ case 3:
6509
+ case 4:
6510
+ case 5:
6511
+ case 6:
6512
+ case 7:
6513
+ case 8:
6514
+ case 9:
6515
+ case 10:
6516
+ case 11:
6517
+ case 12:
6518
+ case 13:
6519
+ case 14:
6520
+ case 15:
6521
+ case 16:
6522
+ case 17:
6523
+ case 18:
6524
+ case 19:
6525
+ break;
6526
+ }
6527
+ }
6528
+ return null;
6529
+ };
6530
+
6531
+ /**
6532
+ * Creates a RequestedMetrics message from a plain object. Also converts values to their respective internal types.
6533
+ * @function fromObject
6534
+ * @memberof presage.smartspectra.RequestedMetrics
6535
+ * @static
6536
+ * @param {Object.<string,*>} object Plain object
6537
+ * @returns {presage.smartspectra.RequestedMetrics} RequestedMetrics
6538
+ */
6539
+ RequestedMetrics.fromObject = function fromObject(object, long) {
6540
+ if (object instanceof $root.presage.smartspectra.RequestedMetrics)
6541
+ return object;
6542
+ if (!$util.isObject(object))
6543
+ throw TypeError(".presage.smartspectra.RequestedMetrics: object expected");
6544
+ if (long === undefined)
6545
+ long = 0;
6546
+ if (long > $util.recursionLimit)
6547
+ throw Error("maximum nesting depth exceeded");
6548
+ var message = new $root.presage.smartspectra.RequestedMetrics();
6549
+ if (object.metrics) {
6550
+ if (!Array.isArray(object.metrics))
6551
+ throw TypeError(".presage.smartspectra.RequestedMetrics.metrics: array expected");
6552
+ message.metrics = [];
6553
+ for (var i = 0; i < object.metrics.length; ++i)
6554
+ switch (object.metrics[i]) {
6555
+ default:
6556
+ if (typeof object.metrics[i] === "number") {
6557
+ message.metrics[i] = object.metrics[i];
6558
+ break;
6559
+ }
6560
+ case "CHEST_BREATHING":
6561
+ case 0:
6562
+ message.metrics[i] = 0;
6563
+ break;
6564
+ case "ABDOMEN_BREATHING":
6565
+ case 1:
6566
+ message.metrics[i] = 1;
6567
+ break;
6568
+ case "BREATHING_RATE":
6569
+ case 2:
6570
+ message.metrics[i] = 2;
6571
+ break;
6572
+ case "BREATHING_AMPLITUDE":
6573
+ case 3:
6574
+ message.metrics[i] = 3;
6575
+ break;
6576
+ case "APNEA":
6577
+ case 4:
6578
+ message.metrics[i] = 4;
6579
+ break;
6580
+ case "RESPIRATORY_LINE_LENGTH":
6581
+ case 5:
6582
+ message.metrics[i] = 5;
6583
+ break;
6584
+ case "BASELINE":
6585
+ case 6:
6586
+ message.metrics[i] = 6;
6587
+ break;
6588
+ case "INHALE_EXHALE_RATIO":
6589
+ case 7:
6590
+ message.metrics[i] = 7;
6591
+ break;
6592
+ case "GLUTES_MICROMOTION":
6593
+ case 8:
6594
+ message.metrics[i] = 8;
6595
+ break;
6596
+ case "KNEES_MICROMOTION":
6597
+ case 9:
6598
+ message.metrics[i] = 9;
6599
+ break;
6600
+ case "EDA_TRACE":
6601
+ case 10:
6602
+ message.metrics[i] = 10;
6603
+ break;
6604
+ case "FACE_LANDMARKS":
6605
+ case 11:
6606
+ message.metrics[i] = 11;
6607
+ break;
6608
+ case "BLINKING":
6609
+ case 12:
6610
+ message.metrics[i] = 12;
6611
+ break;
6612
+ case "TALKING":
6613
+ case 13:
6614
+ message.metrics[i] = 13;
6615
+ break;
6616
+ case "EXPRESSIONS":
6617
+ case 14:
6618
+ message.metrics[i] = 14;
6619
+ break;
6620
+ case "PULSE_RATE":
6621
+ case 15:
6622
+ message.metrics[i] = 15;
6623
+ break;
6624
+ case "ARTERIAL_PRESSURE_TRACE":
6625
+ case 16:
6626
+ message.metrics[i] = 16;
6627
+ break;
6628
+ case "HRV":
6629
+ case 17:
6630
+ message.metrics[i] = 17;
6631
+ break;
6632
+ case "PULSE_RATE_STRICT":
6633
+ case 18:
6634
+ message.metrics[i] = 18;
6635
+ break;
6636
+ case "BREATHING_RATE_STRICT":
6637
+ case 19:
6638
+ message.metrics[i] = 19;
6639
+ break;
6640
+ }
6641
+ }
6642
+ return message;
6643
+ };
6644
+
6645
+ /**
6646
+ * Creates a plain object from a RequestedMetrics message. Also converts values to other types if specified.
6647
+ * @function toObject
6648
+ * @memberof presage.smartspectra.RequestedMetrics
6649
+ * @static
6650
+ * @param {presage.smartspectra.RequestedMetrics} message RequestedMetrics
6651
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
6652
+ * @returns {Object.<string,*>} Plain object
6653
+ */
6654
+ RequestedMetrics.toObject = function toObject(message, options, q) {
6655
+ if (!options)
6656
+ options = {};
6657
+ if (q === undefined)
6658
+ q = 0;
6659
+ if (q > $util.recursionLimit)
6660
+ throw Error("max depth exceeded");
6661
+ var object = {};
6662
+ if (options.arrays || options.defaults)
6663
+ object.metrics = [];
6664
+ if (message.metrics && message.metrics.length) {
6665
+ object.metrics = [];
6666
+ for (var j = 0; j < message.metrics.length; ++j)
6667
+ object.metrics[j] = options.enums === String ? $root.presage.smartspectra.MetricType[message.metrics[j]] === undefined ? message.metrics[j] : $root.presage.smartspectra.MetricType[message.metrics[j]] : message.metrics[j];
6668
+ }
6669
+ return object;
6670
+ };
6671
+
6672
+ /**
6673
+ * Converts this RequestedMetrics to JSON.
6674
+ * @function toJSON
6675
+ * @memberof presage.smartspectra.RequestedMetrics
6676
+ * @instance
6677
+ * @returns {Object.<string,*>} JSON object
6678
+ */
6679
+ RequestedMetrics.prototype.toJSON = function toJSON() {
6680
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
6681
+ };
6682
+
6683
+ /**
6684
+ * Gets the default type url for RequestedMetrics
6685
+ * @function getTypeUrl
6686
+ * @memberof presage.smartspectra.RequestedMetrics
6687
+ * @static
6688
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
6689
+ * @returns {string} The default type url
6690
+ */
6691
+ RequestedMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
6692
+ if (typeUrlPrefix === undefined) {
6693
+ typeUrlPrefix = "type.googleapis.com";
6694
+ }
6695
+ return typeUrlPrefix + "/presage.smartspectra.RequestedMetrics";
6696
+ };
6697
+
6698
+ return RequestedMetrics;
6699
+ })();
6700
+
6173
6701
  return smartspectra;
6174
6702
  })();
6175
6703