@garmin/fitsdk 21.201.0 → 21.205.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 +24 -22
- package/src/accumulator.js +2 -2
- package/src/bit-stream.js +56 -9
- package/src/crc-calculator.js +2 -2
- package/src/decoder.js +43 -81
- package/src/encoder.js +2 -39
- package/src/fit.js +5 -2
- package/src/index.d.ts +22 -0
- package/src/index.js +2 -2
- package/src/mesg-definition.js +2 -2
- package/src/output-stream.js +2 -2
- package/src/profile.js +68 -4
- package/src/stream.js +107 -90
- package/src/types/crc-calculator.d.ts +34 -0
- package/src/types/decoder.d.ts +140 -0
- package/src/types/encoder.d.ts +69 -0
- package/src/types/mesg.d.ts +35 -0
- package/src/types/mesgs.d.ts +2638 -0
- package/src/types/profile.d.ts +96 -0
- package/src/types/stream.d.ts +118 -0
- package/src/types/types.d.ts +4871 -0
- package/src/types/utils.d.ts +55 -0
- package/src/utils-hr-mesg.js +2 -2
- package/src/utils-internal.js +14 -6
- package/src/utils-memo-glob.js +2 -2
- package/src/utils.js +2 -16
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
2
|
+
// Copyright 2026 Garmin International, Inc.
|
|
3
|
+
// Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
|
|
4
|
+
// may not use this file except in compliance with the Flexible and Interoperable Data
|
|
5
|
+
// Transfer (FIT) Protocol License.
|
|
6
|
+
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
7
|
+
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
|
|
8
|
+
// Profile Version = 21.205.0Release
|
|
9
|
+
// Tag = production/release/21.205.0-0-gb3c261eb
|
|
10
|
+
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
import Types from "./types";
|
|
14
|
+
|
|
15
|
+
/** A FIT field value — a scalar or array of one of the primitive FIT base types. */
|
|
16
|
+
export type FieldValue =
|
|
17
|
+
| string
|
|
18
|
+
| number
|
|
19
|
+
| boolean
|
|
20
|
+
| bigint
|
|
21
|
+
| Date
|
|
22
|
+
| (string | number | boolean | bigint | Date)[];
|
|
23
|
+
|
|
24
|
+
/** Developer-defined fields keyed by developer field key. */
|
|
25
|
+
export type DeveloperFields = { [developerFieldKey: string]: FieldValue | undefined };
|
|
26
|
+
|
|
27
|
+
/** Base interface for all decoded FIT messages. */
|
|
28
|
+
export interface Mesg {
|
|
29
|
+
/** Global FIT message number identifying the message type. */
|
|
30
|
+
mesgNum?: Types.MesgNum;
|
|
31
|
+
/** Developer-defined field values attached to this message. */
|
|
32
|
+
developerFields?: DeveloperFields;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type Encodable<T extends Mesg> = T & Required<Pick<Mesg, 'mesgNum'>>;
|