@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.
- package/README.md +27 -7
- package/js/camera-selection.js +57 -0
- package/js/constants.js +12 -3
- package/js/ffi.js +71 -12
- package/js/index.d.ts +71 -14
- package/js/index.js +4 -0
- package/js/messages/generated.d.ts +166 -8
- package/js/messages/generated.js +565 -37
- package/js/renderer/index.d.ts +2 -0
- package/js/smartspectra.js +50 -12
- package/package.json +9 -7
|
@@ -588,7 +588,11 @@ export namespace presage {
|
|
|
588
588
|
/** Standard Deviation of normal-to-normal (NN) Intervals */
|
|
589
589
|
sdnn?: (number|null);
|
|
590
590
|
|
|
591
|
-
/**
|
|
591
|
+
/**
|
|
592
|
+
* Baevsky's Stress Index: a measure of autonomic balance derived from the
|
|
593
|
+
* NN interval distribution, computed as `AMo / (2 * Mo * MxDMn)`. Reported
|
|
594
|
+
* without a unit, matching the HRV model card.
|
|
595
|
+
*/
|
|
592
596
|
baevsky?: (number|null);
|
|
593
597
|
|
|
594
598
|
/** Absolute timestamp at which the HRV measurement was taken, in microseconds, since Linux epoch */
|
|
@@ -619,7 +623,11 @@ export namespace presage {
|
|
|
619
623
|
/** Standard Deviation of normal-to-normal (NN) Intervals */
|
|
620
624
|
public sdnn: number;
|
|
621
625
|
|
|
622
|
-
/**
|
|
626
|
+
/**
|
|
627
|
+
* Baevsky's Stress Index: a measure of autonomic balance derived from the
|
|
628
|
+
* NN interval distribution, computed as `AMo / (2 * Mo * MxDMn)`. Reported
|
|
629
|
+
* without a unit, matching the HRV model card.
|
|
630
|
+
*/
|
|
623
631
|
public baevsky: number;
|
|
624
632
|
|
|
625
633
|
/** Absolute timestamp at which the HRV measurement was taken, in microseconds, since Linux epoch */
|
|
@@ -714,6 +722,9 @@ export namespace presage {
|
|
|
714
722
|
|
|
715
723
|
/** The strict value requiring high precision */
|
|
716
724
|
value?: (number|null);
|
|
725
|
+
|
|
726
|
+
/** End of the completed measurement window, in microseconds on the session input timeline */
|
|
727
|
+
timestamp?: (number|Long|null);
|
|
717
728
|
}
|
|
718
729
|
|
|
719
730
|
/**
|
|
@@ -731,6 +742,9 @@ export namespace presage {
|
|
|
731
742
|
/** The strict value requiring high precision */
|
|
732
743
|
public value: number;
|
|
733
744
|
|
|
745
|
+
/** End of the completed measurement window, in microseconds on the session input timeline */
|
|
746
|
+
public timestamp: (number|Long);
|
|
747
|
+
|
|
734
748
|
/**
|
|
735
749
|
* Creates a new Strict instance using the specified properties.
|
|
736
750
|
* @param [properties] Properties to set
|
|
@@ -825,7 +839,7 @@ export namespace presage {
|
|
|
825
839
|
* Strict/high-precision pulse measurements over a fixed time interval.
|
|
826
840
|
* Populated when strict mode analysis is enabled.
|
|
827
841
|
*/
|
|
828
|
-
|
|
842
|
+
pulseRateStrict?: (presage.smartspectra.IStrict|null);
|
|
829
843
|
}
|
|
830
844
|
|
|
831
845
|
/**
|
|
@@ -853,7 +867,7 @@ export namespace presage {
|
|
|
853
867
|
* Strict/high-precision pulse measurements over a fixed time interval.
|
|
854
868
|
* Populated when strict mode analysis is enabled.
|
|
855
869
|
*/
|
|
856
|
-
public
|
|
870
|
+
public pulseRateStrict?: (presage.smartspectra.IStrict|null);
|
|
857
871
|
|
|
858
872
|
/**
|
|
859
873
|
* Creates a new Pulse instance using the specified properties.
|
|
@@ -976,9 +990,10 @@ export namespace presage {
|
|
|
976
990
|
|
|
977
991
|
/**
|
|
978
992
|
* Strict/high-precision breathing measurements over a fixed time interval.
|
|
979
|
-
* Populated when
|
|
993
|
+
* Populated only when BREATHING_RATE_STRICT is requested and a value is
|
|
994
|
+
* available.
|
|
980
995
|
*/
|
|
981
|
-
|
|
996
|
+
breathingRateStrict?: (presage.smartspectra.IStrict|null);
|
|
982
997
|
}
|
|
983
998
|
|
|
984
999
|
/**
|
|
@@ -1033,9 +1048,10 @@ export namespace presage {
|
|
|
1033
1048
|
|
|
1034
1049
|
/**
|
|
1035
1050
|
* Strict/high-precision breathing measurements over a fixed time interval.
|
|
1036
|
-
* Populated when
|
|
1051
|
+
* Populated only when BREATHING_RATE_STRICT is requested and a value is
|
|
1052
|
+
* available.
|
|
1037
1053
|
*/
|
|
1038
|
-
public
|
|
1054
|
+
public breathingRateStrict?: (presage.smartspectra.IStrict|null);
|
|
1039
1055
|
|
|
1040
1056
|
/**
|
|
1041
1057
|
* Creates a new Breathing instance using the specified properties.
|
|
@@ -1586,6 +1602,12 @@ export namespace presage {
|
|
|
1586
1602
|
* for the confidence-to-error mapping.
|
|
1587
1603
|
*/
|
|
1588
1604
|
hrv?: (presage.smartspectra.IHrv[]|null);
|
|
1605
|
+
|
|
1606
|
+
/**
|
|
1607
|
+
* Strict pulse-rate measurement. Populated only when PULSE_RATE_STRICT is
|
|
1608
|
+
* requested and a value is available.
|
|
1609
|
+
*/
|
|
1610
|
+
pulseRateStrict?: (presage.smartspectra.IStrict|null);
|
|
1589
1611
|
}
|
|
1590
1612
|
|
|
1591
1613
|
/** Represents a Cardio. */
|
|
@@ -1624,6 +1646,12 @@ export namespace presage {
|
|
|
1624
1646
|
*/
|
|
1625
1647
|
public hrv: presage.smartspectra.IHrv[];
|
|
1626
1648
|
|
|
1649
|
+
/**
|
|
1650
|
+
* Strict pulse-rate measurement. Populated only when PULSE_RATE_STRICT is
|
|
1651
|
+
* requested and a value is available.
|
|
1652
|
+
*/
|
|
1653
|
+
public pulseRateStrict?: (presage.smartspectra.IStrict|null);
|
|
1654
|
+
|
|
1627
1655
|
/**
|
|
1628
1656
|
* Creates a new Cardio instance using the specified properties.
|
|
1629
1657
|
* @param [properties] Properties to set
|
|
@@ -2149,5 +2177,135 @@ export namespace presage {
|
|
|
2149
2177
|
*/
|
|
2150
2178
|
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
2151
2179
|
}
|
|
2180
|
+
|
|
2181
|
+
/** FeatureType enum. */
|
|
2182
|
+
enum FeatureType {
|
|
2183
|
+
BREATHING = 0,
|
|
2184
|
+
MICROMOTION = 1,
|
|
2185
|
+
EDA = 2,
|
|
2186
|
+
FACE = 3,
|
|
2187
|
+
CARDIO = 4
|
|
2188
|
+
}
|
|
2189
|
+
|
|
2190
|
+
/** MetricType enum. */
|
|
2191
|
+
enum MetricType {
|
|
2192
|
+
CHEST_BREATHING = 0,
|
|
2193
|
+
ABDOMEN_BREATHING = 1,
|
|
2194
|
+
BREATHING_RATE = 2,
|
|
2195
|
+
BREATHING_AMPLITUDE = 3,
|
|
2196
|
+
APNEA = 4,
|
|
2197
|
+
RESPIRATORY_LINE_LENGTH = 5,
|
|
2198
|
+
BASELINE = 6,
|
|
2199
|
+
INHALE_EXHALE_RATIO = 7,
|
|
2200
|
+
GLUTES_MICROMOTION = 8,
|
|
2201
|
+
KNEES_MICROMOTION = 9,
|
|
2202
|
+
EDA_TRACE = 10,
|
|
2203
|
+
FACE_LANDMARKS = 11,
|
|
2204
|
+
BLINKING = 12,
|
|
2205
|
+
TALKING = 13,
|
|
2206
|
+
EXPRESSIONS = 14,
|
|
2207
|
+
PULSE_RATE = 15,
|
|
2208
|
+
ARTERIAL_PRESSURE_TRACE = 16,
|
|
2209
|
+
HRV = 17,
|
|
2210
|
+
PULSE_RATE_STRICT = 18,
|
|
2211
|
+
BREATHING_RATE_STRICT = 19
|
|
2212
|
+
}
|
|
2213
|
+
|
|
2214
|
+
/** Properties of a RequestedMetrics. */
|
|
2215
|
+
interface IRequestedMetrics {
|
|
2216
|
+
|
|
2217
|
+
/** RequestedMetrics metrics */
|
|
2218
|
+
metrics?: (presage.smartspectra.MetricType[]|null);
|
|
2219
|
+
}
|
|
2220
|
+
|
|
2221
|
+
/** Represents a RequestedMetrics. */
|
|
2222
|
+
class RequestedMetrics implements IRequestedMetrics {
|
|
2223
|
+
|
|
2224
|
+
/**
|
|
2225
|
+
* Constructs a new RequestedMetrics.
|
|
2226
|
+
* @param [properties] Properties to set
|
|
2227
|
+
*/
|
|
2228
|
+
constructor(properties?: presage.smartspectra.IRequestedMetrics);
|
|
2229
|
+
|
|
2230
|
+
/** RequestedMetrics metrics. */
|
|
2231
|
+
public metrics: presage.smartspectra.MetricType[];
|
|
2232
|
+
|
|
2233
|
+
/**
|
|
2234
|
+
* Creates a new RequestedMetrics instance using the specified properties.
|
|
2235
|
+
* @param [properties] Properties to set
|
|
2236
|
+
* @returns RequestedMetrics instance
|
|
2237
|
+
*/
|
|
2238
|
+
public static create(properties?: presage.smartspectra.IRequestedMetrics): presage.smartspectra.RequestedMetrics;
|
|
2239
|
+
|
|
2240
|
+
/**
|
|
2241
|
+
* Encodes the specified RequestedMetrics message. Does not implicitly {@link presage.smartspectra.RequestedMetrics.verify|verify} messages.
|
|
2242
|
+
* @param message RequestedMetrics message or plain object to encode
|
|
2243
|
+
* @param [writer] Writer to encode to
|
|
2244
|
+
* @returns Writer
|
|
2245
|
+
*/
|
|
2246
|
+
public static encode(message: presage.smartspectra.IRequestedMetrics, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
2247
|
+
|
|
2248
|
+
/**
|
|
2249
|
+
* Encodes the specified RequestedMetrics message, length delimited. Does not implicitly {@link presage.smartspectra.RequestedMetrics.verify|verify} messages.
|
|
2250
|
+
* @param message RequestedMetrics message or plain object to encode
|
|
2251
|
+
* @param [writer] Writer to encode to
|
|
2252
|
+
* @returns Writer
|
|
2253
|
+
*/
|
|
2254
|
+
public static encodeDelimited(message: presage.smartspectra.IRequestedMetrics, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
2255
|
+
|
|
2256
|
+
/**
|
|
2257
|
+
* Decodes a RequestedMetrics message from the specified reader or buffer.
|
|
2258
|
+
* @param reader Reader or buffer to decode from
|
|
2259
|
+
* @param [length] Message length if known beforehand
|
|
2260
|
+
* @returns RequestedMetrics
|
|
2261
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2262
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2263
|
+
*/
|
|
2264
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): presage.smartspectra.RequestedMetrics;
|
|
2265
|
+
|
|
2266
|
+
/**
|
|
2267
|
+
* Decodes a RequestedMetrics message from the specified reader or buffer, length delimited.
|
|
2268
|
+
* @param reader Reader or buffer to decode from
|
|
2269
|
+
* @returns RequestedMetrics
|
|
2270
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2271
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2272
|
+
*/
|
|
2273
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): presage.smartspectra.RequestedMetrics;
|
|
2274
|
+
|
|
2275
|
+
/**
|
|
2276
|
+
* Verifies a RequestedMetrics message.
|
|
2277
|
+
* @param message Plain object to verify
|
|
2278
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
2279
|
+
*/
|
|
2280
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
2281
|
+
|
|
2282
|
+
/**
|
|
2283
|
+
* Creates a RequestedMetrics message from a plain object. Also converts values to their respective internal types.
|
|
2284
|
+
* @param object Plain object
|
|
2285
|
+
* @returns RequestedMetrics
|
|
2286
|
+
*/
|
|
2287
|
+
public static fromObject(object: { [k: string]: any }): presage.smartspectra.RequestedMetrics;
|
|
2288
|
+
|
|
2289
|
+
/**
|
|
2290
|
+
* Creates a plain object from a RequestedMetrics message. Also converts values to other types if specified.
|
|
2291
|
+
* @param message RequestedMetrics
|
|
2292
|
+
* @param [options] Conversion options
|
|
2293
|
+
* @returns Plain object
|
|
2294
|
+
*/
|
|
2295
|
+
public static toObject(message: presage.smartspectra.RequestedMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
2296
|
+
|
|
2297
|
+
/**
|
|
2298
|
+
* Converts this RequestedMetrics to JSON.
|
|
2299
|
+
* @returns JSON object
|
|
2300
|
+
*/
|
|
2301
|
+
public toJSON(): { [k: string]: any };
|
|
2302
|
+
|
|
2303
|
+
/**
|
|
2304
|
+
* Gets the default type url for RequestedMetrics
|
|
2305
|
+
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
2306
|
+
* @returns The default type url
|
|
2307
|
+
*/
|
|
2308
|
+
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
2309
|
+
}
|
|
2152
2310
|
}
|
|
2153
2311
|
}
|