trackswap 0.0.24 → 0.0.26
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/dist/index.cjs +26 -26
- package/dist/index.js +26 -26
- package/package.json +3 -2
- package/dist/FIT/base.d.ts +0 -61
- package/dist/FIT/crc.d.ts +0 -1
- package/dist/FIT/decoder.d.ts +0 -35
- package/dist/FIT/encoder.d.ts +0 -45
- package/dist/FIT/index.d.ts +0 -12
- package/dist/FIT/mesg.d.ts +0 -37
- package/dist/FIT/middleware.d.ts +0 -33
- package/dist/FIT/plugins.d.ts +0 -17
- package/dist/FIT/processor.d.ts +0 -34
- package/dist/FIT/types/course_point.d.ts +0 -56
- package/dist/FIT/types/event.d.ts +0 -49
- package/dist/FIT/types/event_type.d.ts +0 -18
- package/dist/FIT/types/file.d.ts +0 -23
- package/dist/FIT/types/index.d.ts +0 -119
- package/dist/FIT/types/mesg_num.d.ts +0 -105
- package/dist/FIT/types/sport.d.ts +0 -47
- package/dist/FIT/types.d.ts +0 -511
- package/dist/FIT/util.d.ts +0 -1
- package/dist/GPX/base.d.ts +0 -16
- package/dist/GPX/converters.d.ts +0 -62
- package/dist/GPX/decoder.d.ts +0 -43
- package/dist/GPX/encoder.d.ts +0 -45
- package/dist/GPX/extensions/index.d.ts +0 -14
- package/dist/GPX/index.d.ts +0 -13
- package/dist/GPX/middleware.d.ts +0 -18
- package/dist/GPX/processor.d.ts +0 -30
- package/dist/GPX/types.d.ts +0 -124
- package/dist/GPX/util.d.ts +0 -1
- package/dist/TCX/base.d.ts +0 -19
- package/dist/TCX/converters.d.ts +0 -52
- package/dist/TCX/decoder.d.ts +0 -33
- package/dist/TCX/encoder.d.ts +0 -41
- package/dist/TCX/index.d.ts +0 -7
- package/dist/TCX/middleware.d.ts +0 -25
- package/dist/TCX/processor.d.ts +0 -39
- package/dist/TCX/types.d.ts +0 -191
- package/dist/TrackSwap.d.ts +0 -48
- package/dist/core/base.d.ts +0 -73
- package/dist/core/index.d.ts +0 -2
- package/dist/core/xml-utils.d.ts +0 -17
- package/dist/index.d.ts +0 -8
- package/dist/types.d.ts +0 -74
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trackswap",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"description": "A powerful and flexible GPX parser and encoder library for Node.js and TypeScript. TrackSwap provides comprehensive support for GPX 1.1 format with advanced features like plugin system, middleware support, and optimized performance.",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -70,13 +70,14 @@
|
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/node": "^22.15.24",
|
|
73
|
+
"@types/tz-lookup": "^6.1.2",
|
|
73
74
|
"esbuild": "^0.19.12",
|
|
74
75
|
"terser": "^5.27.0",
|
|
75
76
|
"ts-node": "^10.9.2",
|
|
76
77
|
"typescript": "^5.8.3"
|
|
77
78
|
},
|
|
78
79
|
"dependencies": {
|
|
79
|
-
"@garmin/fitsdk": "^21.
|
|
80
|
+
"@garmin/fitsdk": "^21.195.0",
|
|
80
81
|
"dayjs": "^1.11.13",
|
|
81
82
|
"geolib": "^3.3.4",
|
|
82
83
|
"htmlparser2": "^10.0.0"
|
package/dist/FIT/base.d.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { IPlugin } from "../core/base.js";
|
|
2
|
-
import { FITContext, FITDecoderMesgs, FITFileType } from "./types.js";
|
|
3
|
-
export interface IFITMessageConverter extends IPlugin<FITContext> {
|
|
4
|
-
supportedMessageTypes: string[];
|
|
5
|
-
convertMessages(messages: any[], context: FITContext): any;
|
|
6
|
-
supports(messageType: string): boolean;
|
|
7
|
-
priority?: number;
|
|
8
|
-
}
|
|
9
|
-
export interface IFITStructurePlugin extends IPlugin<FITContext> {
|
|
10
|
-
structureData(messages: FITDecoderMesgs, context: FITContext): Partial<FITFileType>;
|
|
11
|
-
priority?: number;
|
|
12
|
-
}
|
|
13
|
-
export interface IFITMiddlewarePlugin extends IPlugin<FITContext> {
|
|
14
|
-
priority?: number;
|
|
15
|
-
onParse?(buffer: Buffer, context: FITContext): Promise<Buffer> | Buffer;
|
|
16
|
-
onExtractMessages?(messages: FITDecoderMesgs, context: FITContext): Promise<FITDecoderMesgs> | FITDecoderMesgs;
|
|
17
|
-
onStructure?(result: Partial<FITFileType>, context: FITContext): Promise<Partial<FITFileType>> | Partial<FITFileType>;
|
|
18
|
-
onComplete?(result: FITFileType, context: FITContext): Promise<FITFileType> | FITFileType;
|
|
19
|
-
onError?(error: Error, context: FITContext): Promise<void> | void;
|
|
20
|
-
}
|
|
21
|
-
export declare abstract class BaseFITMessageConverter implements IFITMessageConverter {
|
|
22
|
-
abstract name: string;
|
|
23
|
-
abstract supportedMessageTypes: string[];
|
|
24
|
-
version: string;
|
|
25
|
-
priority: number;
|
|
26
|
-
abstract convertMessages(messages: any[], context: FITContext): any;
|
|
27
|
-
supports(messageType: string): boolean;
|
|
28
|
-
initialize(context: FITContext): Promise<void>;
|
|
29
|
-
destroy(context: FITContext): Promise<void>;
|
|
30
|
-
validate(context: FITContext): Promise<boolean>;
|
|
31
|
-
protected parseTimestamp(timestamp: string | undefined): Date | undefined;
|
|
32
|
-
protected calculateDuration(startTime?: string, endTime?: string): number;
|
|
33
|
-
protected filterMessagesByTimeRange(messages: any[], startTime: string, endTime: string, tolerance?: number): any[];
|
|
34
|
-
protected groupMessagesByLap(records: any[], laps: any[]): Array<{
|
|
35
|
-
lap: any;
|
|
36
|
-
records: any[];
|
|
37
|
-
}>;
|
|
38
|
-
}
|
|
39
|
-
export declare abstract class BaseFITStructurePlugin implements IFITStructurePlugin {
|
|
40
|
-
abstract name: string;
|
|
41
|
-
version: string;
|
|
42
|
-
priority: number;
|
|
43
|
-
abstract structureData(messages: FITDecoderMesgs, context: FITContext): Partial<FITFileType>;
|
|
44
|
-
initialize(context: FITContext): Promise<void>;
|
|
45
|
-
destroy(context: FITContext): Promise<void>;
|
|
46
|
-
validate(context: FITContext): Promise<boolean>;
|
|
47
|
-
}
|
|
48
|
-
export declare abstract class BaseFITMiddleware implements IFITMiddlewarePlugin {
|
|
49
|
-
abstract name: string;
|
|
50
|
-
version: string;
|
|
51
|
-
description: string;
|
|
52
|
-
priority: number;
|
|
53
|
-
initialize(context: FITContext): Promise<void>;
|
|
54
|
-
destroy(context: FITContext): Promise<void>;
|
|
55
|
-
validate(context: FITContext): Promise<boolean>;
|
|
56
|
-
onParse(buffer: Buffer, context: FITContext): Promise<Buffer>;
|
|
57
|
-
onExtractMessages(messages: FITDecoderMesgs, context: FITContext): Promise<FITDecoderMesgs>;
|
|
58
|
-
onStructure(result: Partial<FITFileType>, context: FITContext): Promise<Partial<FITFileType>>;
|
|
59
|
-
onComplete(result: FITFileType, context: FITContext): Promise<FITFileType>;
|
|
60
|
-
onError(error: Error, context: FITContext): Promise<void>;
|
|
61
|
-
}
|
package/dist/FIT/crc.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function crc(buffer: ArrayBuffer | Uint8Array, initial?: number): number;
|
package/dist/FIT/decoder.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { IFITMessageConverter, IFITStructurePlugin, IFITMiddlewarePlugin } from "./base.js";
|
|
2
|
-
import { FITFileType } from "./types.js";
|
|
3
|
-
export declare class FITDecoder {
|
|
4
|
-
private converterPlugins;
|
|
5
|
-
private registeredPlugins;
|
|
6
|
-
private structurePlugins;
|
|
7
|
-
private middlewarePlugins;
|
|
8
|
-
private processors;
|
|
9
|
-
private initialized;
|
|
10
|
-
private defaultPluginsRegistered;
|
|
11
|
-
constructor();
|
|
12
|
-
private initializePipeline;
|
|
13
|
-
private registerDefaultPlugins;
|
|
14
|
-
private addConverterForMessageType;
|
|
15
|
-
private addStructurePlugin;
|
|
16
|
-
registerMessageConverter(plugin: IFITMessageConverter): Promise<void>;
|
|
17
|
-
registerStructurePlugin(plugin: IFITStructurePlugin): Promise<void>;
|
|
18
|
-
registerMiddleware(plugin: IFITMiddlewarePlugin): Promise<void>;
|
|
19
|
-
getConverter(messageType: string): IFITMessageConverter | undefined;
|
|
20
|
-
getConverters(messageType: string): IFITMessageConverter[];
|
|
21
|
-
unregisterPlugin(pluginName: string): boolean;
|
|
22
|
-
initialize(): Promise<void>;
|
|
23
|
-
destroy(): Promise<void>;
|
|
24
|
-
private createContext;
|
|
25
|
-
private executeMiddlewareHook;
|
|
26
|
-
parseByBuffer(buffer: Buffer, options?: {
|
|
27
|
-
skipValidation?: boolean;
|
|
28
|
-
enableStats?: boolean;
|
|
29
|
-
userData?: Record<string, any>;
|
|
30
|
-
}): Promise<FITFileType | undefined>;
|
|
31
|
-
}
|
|
32
|
-
declare const _default: {
|
|
33
|
-
FITDecoder: typeof FITDecoder;
|
|
34
|
-
};
|
|
35
|
-
export default _default;
|
package/dist/FIT/encoder.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { FITFileType } from "./types.js";
|
|
2
|
-
export interface FITEncoderOptions {
|
|
3
|
-
compact?: boolean;
|
|
4
|
-
defaultActivity?: string;
|
|
5
|
-
defaultSubActivity?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare class FITEncoder {
|
|
8
|
-
private localNum;
|
|
9
|
-
private mesgDefn;
|
|
10
|
-
private messages;
|
|
11
|
-
private options;
|
|
12
|
-
constructor(options?: FITEncoderOptions);
|
|
13
|
-
encode(fitData: FITFileType): Promise<Buffer>;
|
|
14
|
-
encodeCourse(fitData: FITFileType): Promise<Buffer>;
|
|
15
|
-
encodeToBlob(fitData: FITFileType, fileType?: "activity" | "course"): Promise<Blob>;
|
|
16
|
-
private reset;
|
|
17
|
-
private buildFITContent;
|
|
18
|
-
private buildActivityContent;
|
|
19
|
-
private buildCourseContent;
|
|
20
|
-
private buildFileId;
|
|
21
|
-
private buildSession;
|
|
22
|
-
private buildLaps;
|
|
23
|
-
private buildLap;
|
|
24
|
-
private buildRecords;
|
|
25
|
-
private buildRecord;
|
|
26
|
-
private buildEvent;
|
|
27
|
-
private buildActivity;
|
|
28
|
-
private buildCourse;
|
|
29
|
-
private buildEventsFromLaps;
|
|
30
|
-
private buildActivityFromSession;
|
|
31
|
-
private parseTimestamp;
|
|
32
|
-
private convertToSemicircles;
|
|
33
|
-
private validateRequiredFields;
|
|
34
|
-
private writeMesg;
|
|
35
|
-
get blob(): Blob;
|
|
36
|
-
get dataLen(): number;
|
|
37
|
-
get dataCrc(): number;
|
|
38
|
-
get header(): ArrayBuffer;
|
|
39
|
-
get trailer(): ArrayBuffer;
|
|
40
|
-
encoder(fitData: FITFileType): Promise<Buffer>;
|
|
41
|
-
}
|
|
42
|
-
declare const _default: {
|
|
43
|
-
FITEncoder: typeof FITEncoder;
|
|
44
|
-
};
|
|
45
|
-
export default _default;
|
package/dist/FIT/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export { FITDecoder } from "./decoder.js";
|
|
2
|
-
export { FITEncoder } from "./encoder.js";
|
|
3
|
-
export { IFITMessageConverter, IFITStructurePlugin, IFITMiddlewarePlugin, BaseFITMessageConverter, BaseFITStructurePlugin, BaseFITMiddleware, } from "./base.js";
|
|
4
|
-
export { SessionStructurePlugin, CourseStructurePlugin, FileHeaderPlugin, } from "./plugins.js";
|
|
5
|
-
export * from "./types.js";
|
|
6
|
-
import { FITDecoder } from "./decoder.js";
|
|
7
|
-
import { FITEncoder } from "./encoder.js";
|
|
8
|
-
declare const _default: {
|
|
9
|
-
FITDecoder: typeof FITDecoder;
|
|
10
|
-
FITEncoder: typeof FITEncoder;
|
|
11
|
-
};
|
|
12
|
-
export default _default;
|
package/dist/FIT/mesg.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { MesgNum } from "./types/mesg_num.js";
|
|
2
|
-
interface FieldDefn {
|
|
3
|
-
name: string;
|
|
4
|
-
number: number;
|
|
5
|
-
type: string;
|
|
6
|
-
}
|
|
7
|
-
interface Field {
|
|
8
|
-
name: string;
|
|
9
|
-
number: number;
|
|
10
|
-
type: string;
|
|
11
|
-
value: any;
|
|
12
|
-
}
|
|
13
|
-
interface ProcessedMesgDefn {
|
|
14
|
-
localNum: number;
|
|
15
|
-
mesgNum: MesgNum;
|
|
16
|
-
fieldDefns: {
|
|
17
|
-
number: number;
|
|
18
|
-
size: number;
|
|
19
|
-
baseType: number;
|
|
20
|
-
}[];
|
|
21
|
-
}
|
|
22
|
-
export declare class Mesg {
|
|
23
|
-
localNum: number;
|
|
24
|
-
mesgNum: MesgNum;
|
|
25
|
-
fields: Field[];
|
|
26
|
-
static check(mesgName: string, mesgNum: MesgNum | undefined, fieldDefns: FieldDefn[] | undefined, values: {
|
|
27
|
-
[key: string]: any;
|
|
28
|
-
}): void;
|
|
29
|
-
constructor(localNum: number, mesgName: string, values: {
|
|
30
|
-
[key: string]: any;
|
|
31
|
-
});
|
|
32
|
-
get mesgDefn(): ProcessedMesgDefn;
|
|
33
|
-
isSameDefn(mesgDefn: ProcessedMesgDefn): boolean;
|
|
34
|
-
get defnRecord(): ArrayBuffer;
|
|
35
|
-
get dataRecord(): ArrayBuffer;
|
|
36
|
-
}
|
|
37
|
-
export {};
|
package/dist/FIT/middleware.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { BaseFITMiddleware } from "./base.js";
|
|
2
|
-
import { FITDecoderMesgs, FITFileType, FITContext } from "./types.js";
|
|
3
|
-
export declare class PerformanceMiddleware extends BaseFITMiddleware {
|
|
4
|
-
name: string;
|
|
5
|
-
description: string;
|
|
6
|
-
onParse(buffer: Buffer, context: FITContext): Promise<Buffer>;
|
|
7
|
-
onExtractMessages(messages: FITDecoderMesgs, context: FITContext): Promise<FITDecoderMesgs>;
|
|
8
|
-
onStructure(result: Partial<FITFileType>, context: FITContext): Promise<Partial<FITFileType>>;
|
|
9
|
-
onComplete(result: FITFileType, context: FITContext): Promise<FITFileType>;
|
|
10
|
-
onError(error: Error, context: FITContext): Promise<void>;
|
|
11
|
-
private countMessages;
|
|
12
|
-
private analyzeStructure;
|
|
13
|
-
private getSummary;
|
|
14
|
-
}
|
|
15
|
-
export declare class ValidationMiddleware extends BaseFITMiddleware {
|
|
16
|
-
name: string;
|
|
17
|
-
description: string;
|
|
18
|
-
onComplete(result: FITFileType, context: FITContext): Promise<FITFileType>;
|
|
19
|
-
private validateFIT;
|
|
20
|
-
}
|
|
21
|
-
export declare class DataCleanupMiddleware extends BaseFITMiddleware {
|
|
22
|
-
name: string;
|
|
23
|
-
description: string;
|
|
24
|
-
onStructure(result: Partial<FITFileType>, context: FITContext): Promise<Partial<FITFileType>>;
|
|
25
|
-
private cleanupData;
|
|
26
|
-
}
|
|
27
|
-
export declare class FileInfoMiddleware extends BaseFITMiddleware {
|
|
28
|
-
name: string;
|
|
29
|
-
description: string;
|
|
30
|
-
onExtractMessages(messages: FITDecoderMesgs, context: FITContext): Promise<FITDecoderMesgs>;
|
|
31
|
-
private extractFileInfo;
|
|
32
|
-
}
|
|
33
|
-
export declare function registerDefaultMiddlewares(decoder: any): Promise<void>;
|
package/dist/FIT/plugins.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { BaseFITStructurePlugin } from "./base.js";
|
|
2
|
-
import { FITDecoderMesgs, FITFileType, FITContext } from "./types.js";
|
|
3
|
-
export declare class SessionStructurePlugin extends BaseFITStructurePlugin {
|
|
4
|
-
name: string;
|
|
5
|
-
priority: number;
|
|
6
|
-
structureData(messages: FITDecoderMesgs, context: FITContext): Partial<FITFileType>;
|
|
7
|
-
}
|
|
8
|
-
export declare class CourseStructurePlugin extends BaseFITStructurePlugin {
|
|
9
|
-
name: string;
|
|
10
|
-
priority: number;
|
|
11
|
-
structureData(messages: FITDecoderMesgs, context: FITContext): Partial<FITFileType>;
|
|
12
|
-
}
|
|
13
|
-
export declare class FileHeaderPlugin extends BaseFITStructurePlugin {
|
|
14
|
-
name: string;
|
|
15
|
-
priority: number;
|
|
16
|
-
structureData(messages: FITDecoderMesgs, context: FITContext): Partial<FITFileType>;
|
|
17
|
-
}
|
package/dist/FIT/processor.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { IFITMessageConverter, IFITStructurePlugin } from "./base.js";
|
|
2
|
-
import { FITContext } from "./types.js";
|
|
3
|
-
export declare enum FITPipelineStage {
|
|
4
|
-
PARSE = "parse",
|
|
5
|
-
EXTRACT = "extract",
|
|
6
|
-
STRUCTURE = "structure",
|
|
7
|
-
COMPLETE = "complete"
|
|
8
|
-
}
|
|
9
|
-
export interface IFITPipelineProcessor {
|
|
10
|
-
stage: FITPipelineStage;
|
|
11
|
-
process(context: FITContext): Promise<FITContext>;
|
|
12
|
-
}
|
|
13
|
-
export declare class ParseProcessor implements IFITPipelineProcessor {
|
|
14
|
-
stage: FITPipelineStage;
|
|
15
|
-
process(context: FITContext): Promise<FITContext>;
|
|
16
|
-
private parseWithFitSDK;
|
|
17
|
-
}
|
|
18
|
-
export declare class ExtractProcessor implements IFITPipelineProcessor {
|
|
19
|
-
private getConverters;
|
|
20
|
-
stage: FITPipelineStage;
|
|
21
|
-
constructor(getConverters: (messageType: string) => IFITMessageConverter[]);
|
|
22
|
-
process(context: FITContext): Promise<FITContext>;
|
|
23
|
-
}
|
|
24
|
-
export declare class StructureProcessor implements IFITPipelineProcessor {
|
|
25
|
-
private getStructurePlugins;
|
|
26
|
-
stage: FITPipelineStage;
|
|
27
|
-
constructor(getStructurePlugins: () => IFITStructurePlugin[]);
|
|
28
|
-
process(context: FITContext): Promise<FITContext>;
|
|
29
|
-
}
|
|
30
|
-
export declare class CompleteProcessor implements IFITPipelineProcessor {
|
|
31
|
-
stage: FITPipelineStage;
|
|
32
|
-
process(context: FITContext): Promise<FITContext>;
|
|
33
|
-
private countTotalMessages;
|
|
34
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
export declare enum CoursePoint {
|
|
2
|
-
GENERIC = 0,
|
|
3
|
-
SUMMIT = 1,
|
|
4
|
-
VALLEY = 2,
|
|
5
|
-
WATER = 3,
|
|
6
|
-
FOOD = 4,
|
|
7
|
-
DANGER = 5,
|
|
8
|
-
LEFT = 6,
|
|
9
|
-
RIGHT = 7,
|
|
10
|
-
STRAIGHT = 8,
|
|
11
|
-
FIRST_AID = 9,
|
|
12
|
-
FOURTH_CATEGORY = 10,
|
|
13
|
-
THIRD_CATEGORY = 11,
|
|
14
|
-
SECOND_CATEGORY = 12,
|
|
15
|
-
FIRST_CATEGORY = 13,
|
|
16
|
-
HORS_CATEGORY = 14,
|
|
17
|
-
SPRINT = 15,
|
|
18
|
-
LEFT_FORK = 16,
|
|
19
|
-
RIGHT_FORK = 17,
|
|
20
|
-
MIDDLE_FORK = 18,
|
|
21
|
-
SLIGHT_LEFT = 19,
|
|
22
|
-
SHARP_LEFT = 20,
|
|
23
|
-
SLIGHT_RIGHT = 21,
|
|
24
|
-
SHARP_RIGHT = 22,
|
|
25
|
-
U_TURN = 23,
|
|
26
|
-
SEGMENT_START = 24,
|
|
27
|
-
SEGMENT_END = 25,
|
|
28
|
-
CAMPSITE = 27,
|
|
29
|
-
AID_STATION = 28,
|
|
30
|
-
REST_AREA = 29,
|
|
31
|
-
GENERAL_DISTANCE = 30,
|
|
32
|
-
SERVICE = 31,
|
|
33
|
-
ENERGY_GEL = 32,
|
|
34
|
-
SPORTS_DRINK = 33,
|
|
35
|
-
MILE_MARKER = 34,
|
|
36
|
-
CHECKPOINT = 35,
|
|
37
|
-
SHELTER = 36,
|
|
38
|
-
MEETING_SPOT = 37,
|
|
39
|
-
OVERLOOK = 38,
|
|
40
|
-
TOILET = 39,
|
|
41
|
-
SHOWER = 40,
|
|
42
|
-
GEAR = 41,
|
|
43
|
-
SHARP_CURVE = 42,
|
|
44
|
-
STEEP_INCLINE = 43,
|
|
45
|
-
TUNNEL = 44,
|
|
46
|
-
BRIDGE = 45,
|
|
47
|
-
OBSTACLE = 46,
|
|
48
|
-
CROSSING = 47,
|
|
49
|
-
STORE = 48,
|
|
50
|
-
TRANSITION = 49,
|
|
51
|
-
NAVAID = 50,
|
|
52
|
-
TRANSPORT = 51,
|
|
53
|
-
ALERT = 52,
|
|
54
|
-
INFO = 53,
|
|
55
|
-
INVALID = 255
|
|
56
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
export declare enum Event {
|
|
2
|
-
TIMER = 0,
|
|
3
|
-
WORKOUT = 3,
|
|
4
|
-
WORKOUT_STEP = 4,
|
|
5
|
-
POWER_DOWN = 5,
|
|
6
|
-
POWER_UP = 6,
|
|
7
|
-
OFF_COURSE = 7,
|
|
8
|
-
SESSION = 8,
|
|
9
|
-
LAP = 9,
|
|
10
|
-
COURSE_POINT = 10,
|
|
11
|
-
BATTERY = 11,
|
|
12
|
-
VIRTUAL_PARTNER_PACE = 12,
|
|
13
|
-
HR_HIGH_ALERT = 13,
|
|
14
|
-
HR_LOW_ALERT = 14,
|
|
15
|
-
SPEED_HIGH_ALERT = 15,
|
|
16
|
-
SPEED_LOW_ALERT = 16,
|
|
17
|
-
CAD_HIGH_ALERT = 17,
|
|
18
|
-
CAD_LOW_ALERT = 18,
|
|
19
|
-
POWER_HIGH_ALERT = 19,
|
|
20
|
-
POWER_LOW_ALERT = 20,
|
|
21
|
-
RECOVERY_HR = 21,
|
|
22
|
-
BATTERY_LOW = 22,
|
|
23
|
-
TIME_DURATION_ALERT = 23,
|
|
24
|
-
DISTANCE_DURATION_ALERT = 24,
|
|
25
|
-
CALORIE_DURATION_ALERT = 25,
|
|
26
|
-
ACTIVITY = 26,
|
|
27
|
-
FITNESS_EQUIPMENT = 27,
|
|
28
|
-
LENGTH = 28,
|
|
29
|
-
USER_MARKER = 32,
|
|
30
|
-
SPORT_POINT = 33,
|
|
31
|
-
CALIBRATION = 36,
|
|
32
|
-
FRONT_GEAR_CHANGE = 42,
|
|
33
|
-
REAR_GEAR_CHANGE = 43,
|
|
34
|
-
RIDER_POSITION_CHANGE = 44,
|
|
35
|
-
ELEV_HIGH_ALERT = 45,
|
|
36
|
-
ELEV_LOW_ALERT = 46,
|
|
37
|
-
COMM_TIMEOUT = 47,
|
|
38
|
-
AUTO_ACTIVITY_DETECT = 54,
|
|
39
|
-
DIVE_ALERT = 56,
|
|
40
|
-
DIVE_GAS_SWITCHED = 57,
|
|
41
|
-
TANK_PRESSURE_RESERVE = 71,
|
|
42
|
-
TANK_PRESSURE_CRITICAL = 72,
|
|
43
|
-
TANK_LOST = 73,
|
|
44
|
-
RADAR_THREAT_ALERT = 75,
|
|
45
|
-
TANK_BATTERY_LOW = 76,
|
|
46
|
-
TANK_POD_CONNECTED = 81,
|
|
47
|
-
TANK_POD_DISCONNECTED = 82,
|
|
48
|
-
INVALID = 255
|
|
49
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare enum EventType {
|
|
2
|
-
START = 0,
|
|
3
|
-
STOP = 1,
|
|
4
|
-
CONSECUTIVE_DEPRECIATED = 2,
|
|
5
|
-
MARKER = 3,
|
|
6
|
-
STOP_ALL = 4,
|
|
7
|
-
BEGIN_DEPRECIATED = 5,
|
|
8
|
-
END_DEPRECIATED = 6,
|
|
9
|
-
END_ALL_DEPRECIATED = 7,
|
|
10
|
-
STOP_DISABLE = 8,
|
|
11
|
-
STOP_DISABLE_ALL = 9,
|
|
12
|
-
MARKER_START = 10,
|
|
13
|
-
MARKER_STOP = 11,
|
|
14
|
-
STOP_ALL_ENTER_RECOVERY = 12,
|
|
15
|
-
STOP_ENTER_RECOVERY = 13,
|
|
16
|
-
MARK_END = 14,
|
|
17
|
-
UNDEFINED = 255
|
|
18
|
-
}
|
package/dist/FIT/types/file.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export declare enum FITFile {
|
|
2
|
-
DEVICE = 1,
|
|
3
|
-
SETTINGS = 2,
|
|
4
|
-
SPORT = 3,
|
|
5
|
-
ACTIVITY = 4,
|
|
6
|
-
WORKOUT = 5,
|
|
7
|
-
COURSE = 6,
|
|
8
|
-
SCHEDULES = 7,
|
|
9
|
-
WEIGHT = 9,
|
|
10
|
-
TOTALS = 10,
|
|
11
|
-
GOALS = 11,
|
|
12
|
-
BLOOD_PRESSURE = 14,
|
|
13
|
-
MONITORING_A = 15,
|
|
14
|
-
ACTIVITY_SUMMARY = 20,
|
|
15
|
-
MONITORING_DAILY = 28,
|
|
16
|
-
MONITORING_B = 32,
|
|
17
|
-
SEGMENT = 34,
|
|
18
|
-
SEGMENT_LIST = 35,
|
|
19
|
-
EXD_CONFIGURATION = 40,
|
|
20
|
-
MFG_RANGE_MIN = 247,
|
|
21
|
-
MFG_RANGE_MAX = 254,
|
|
22
|
-
INVALID = 255
|
|
23
|
-
}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
export declare const types: {
|
|
2
|
-
enum_file: {
|
|
3
|
-
size: number;
|
|
4
|
-
baseType: number;
|
|
5
|
-
mapValue: (value: string | number) => any;
|
|
6
|
-
setValue: (this: DataView, byteOffset: number, value: number) => void;
|
|
7
|
-
};
|
|
8
|
-
enum_activity: {
|
|
9
|
-
size: number;
|
|
10
|
-
baseType: number;
|
|
11
|
-
mapValue: (value: string | number) => any;
|
|
12
|
-
setValue: (this: DataView, byteOffset: number, value: number) => void;
|
|
13
|
-
};
|
|
14
|
-
enum_sport: {
|
|
15
|
-
size: number;
|
|
16
|
-
baseType: number;
|
|
17
|
-
mapValue: (value: string | number) => any;
|
|
18
|
-
setValue: (this: DataView, byteOffset: number, value: number) => void;
|
|
19
|
-
};
|
|
20
|
-
enum_sub_sport: {
|
|
21
|
-
size: number;
|
|
22
|
-
baseType: number;
|
|
23
|
-
mapValue: (value: string | number) => any;
|
|
24
|
-
setValue: (this: DataView, byteOffset: number, value: number) => void;
|
|
25
|
-
};
|
|
26
|
-
enum_event: {
|
|
27
|
-
size: number;
|
|
28
|
-
baseType: number;
|
|
29
|
-
mapValue: (value: string | number) => any;
|
|
30
|
-
setValue: (this: DataView, byteOffset: number, value: number) => void;
|
|
31
|
-
};
|
|
32
|
-
enum_event_type: {
|
|
33
|
-
size: number;
|
|
34
|
-
baseType: number;
|
|
35
|
-
mapValue: (value: string | number) => any;
|
|
36
|
-
setValue: (this: DataView, byteOffset: number, value: number) => void;
|
|
37
|
-
};
|
|
38
|
-
enum_course_point: {
|
|
39
|
-
size: number;
|
|
40
|
-
baseType: number;
|
|
41
|
-
mapValue: (value: string | number) => any;
|
|
42
|
-
setValue: (this: DataView, byteOffset: number, value: number) => void;
|
|
43
|
-
};
|
|
44
|
-
uint8: {
|
|
45
|
-
size: number;
|
|
46
|
-
baseType: number;
|
|
47
|
-
setValue: (byteOffset: number, value: number) => void;
|
|
48
|
-
};
|
|
49
|
-
sint8: {
|
|
50
|
-
size: number;
|
|
51
|
-
baseType: number;
|
|
52
|
-
setValue: (byteOffset: number, value: number) => void;
|
|
53
|
-
};
|
|
54
|
-
uint16: {
|
|
55
|
-
size: number;
|
|
56
|
-
baseType: number;
|
|
57
|
-
setValue: (byteOffset: number, value: number, littleEndian?: boolean) => void;
|
|
58
|
-
};
|
|
59
|
-
sint16: {
|
|
60
|
-
size: number;
|
|
61
|
-
baseType: number;
|
|
62
|
-
setValue: (byteOffset: number, value: number, littleEndian?: boolean) => void;
|
|
63
|
-
};
|
|
64
|
-
uint32: {
|
|
65
|
-
size: number;
|
|
66
|
-
baseType: number;
|
|
67
|
-
setValue: (byteOffset: number, value: number, littleEndian?: boolean) => void;
|
|
68
|
-
};
|
|
69
|
-
sint32: {
|
|
70
|
-
size: number;
|
|
71
|
-
baseType: number;
|
|
72
|
-
setValue: (byteOffset: number, value: number, littleEndian?: boolean) => void;
|
|
73
|
-
};
|
|
74
|
-
string: {
|
|
75
|
-
size: number;
|
|
76
|
-
baseType: number;
|
|
77
|
-
mapValue: (value: string) => number[];
|
|
78
|
-
setValue: typeof dvSetUint8Array;
|
|
79
|
-
};
|
|
80
|
-
distance: {
|
|
81
|
-
size: number;
|
|
82
|
-
baseType: number;
|
|
83
|
-
setValue: (byteOffset: number, value: number, littleEndian?: boolean) => void;
|
|
84
|
-
mapValue: (value: number) => number;
|
|
85
|
-
};
|
|
86
|
-
speed: {
|
|
87
|
-
size: number;
|
|
88
|
-
baseType: number;
|
|
89
|
-
setValue: (byteOffset: number, value: number, littleEndian?: boolean) => void;
|
|
90
|
-
mapValue: (value: number) => number;
|
|
91
|
-
};
|
|
92
|
-
altitude: {
|
|
93
|
-
size: number;
|
|
94
|
-
baseType: number;
|
|
95
|
-
setValue: (byteOffset: number, value: number, littleEndian?: boolean) => void;
|
|
96
|
-
mapValue: (value: number) => number;
|
|
97
|
-
};
|
|
98
|
-
seconds: {
|
|
99
|
-
size: number;
|
|
100
|
-
baseType: number;
|
|
101
|
-
setValue: (byteOffset: number, value: number, littleEndian?: boolean) => void;
|
|
102
|
-
mapValue: (value: number) => number;
|
|
103
|
-
};
|
|
104
|
-
date_time: {
|
|
105
|
-
size: number;
|
|
106
|
-
baseType: number;
|
|
107
|
-
setValue: (byteOffset: number, value: number, littleEndian?: boolean) => void;
|
|
108
|
-
mapValue: (value: number | string | Date) => number;
|
|
109
|
-
};
|
|
110
|
-
semicircles: {
|
|
111
|
-
size: number;
|
|
112
|
-
baseType: number;
|
|
113
|
-
setValue: (byteOffset: number, value: number, littleEndian?: boolean) => void;
|
|
114
|
-
mapValue: (value: number) => number;
|
|
115
|
-
};
|
|
116
|
-
};
|
|
117
|
-
export declare function encodedStrlen(str: string): number;
|
|
118
|
-
declare function dvSetUint8Array(this: DataView, offset: number, values: number[]): void;
|
|
119
|
-
export {};
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
export declare enum MesgNum {
|
|
2
|
-
FILE_ID = 0,
|
|
3
|
-
CAPABILITIES = 1,
|
|
4
|
-
DEVICE_SETTINGS = 2,
|
|
5
|
-
USER_PROFILE = 3,
|
|
6
|
-
HRM_PROFILE = 4,
|
|
7
|
-
SDM_PROFILE = 5,
|
|
8
|
-
BIKE_PROFILE = 6,
|
|
9
|
-
ZONES_TARGET = 7,
|
|
10
|
-
HR_ZONE = 8,
|
|
11
|
-
POWER_ZONE = 9,
|
|
12
|
-
MET_ZONE = 10,
|
|
13
|
-
SPORT = 12,
|
|
14
|
-
GOAL = 15,
|
|
15
|
-
SESSION = 18,
|
|
16
|
-
LAP = 19,
|
|
17
|
-
RECORD = 20,
|
|
18
|
-
EVENT = 21,
|
|
19
|
-
DEVICE_INFO = 23,
|
|
20
|
-
WORKOUT = 26,
|
|
21
|
-
WORKOUT_STEP = 27,
|
|
22
|
-
SCHEDULE = 28,
|
|
23
|
-
WEIGHT_SCALE = 30,
|
|
24
|
-
COURSE = 31,
|
|
25
|
-
COURSE_POINT = 32,
|
|
26
|
-
TOTALS = 33,
|
|
27
|
-
ACTIVITY = 34,
|
|
28
|
-
SOFTWARE = 35,
|
|
29
|
-
FILE_CAPABILITIES = 37,
|
|
30
|
-
MESG_CAPABILITIES = 38,
|
|
31
|
-
FIELD_CAPABILITIES = 39,
|
|
32
|
-
FILE_CREATOR = 49,
|
|
33
|
-
BLOOD_PRESSURE = 51,
|
|
34
|
-
SPEED_ZONE = 53,
|
|
35
|
-
MONITORING = 55,
|
|
36
|
-
TRAINING_FILE = 72,
|
|
37
|
-
HRV = 78,
|
|
38
|
-
ANT_RX = 80,
|
|
39
|
-
ANT_TX = 81,
|
|
40
|
-
ANT_CHANNEL_ID = 82,
|
|
41
|
-
LENGTH = 101,
|
|
42
|
-
MONITORING_INFO = 103,
|
|
43
|
-
PAD = 105,
|
|
44
|
-
SLAVE_DEVICE = 106,
|
|
45
|
-
CONNECTIVITY = 127,
|
|
46
|
-
WEATHER_CONDITIONS = 128,
|
|
47
|
-
WEATHER_ALERT = 129,
|
|
48
|
-
CADENCE_ZONE = 131,
|
|
49
|
-
HR = 132,
|
|
50
|
-
SEGMENT_LAP = 142,
|
|
51
|
-
MEMO_GLOB = 145,
|
|
52
|
-
SEGMENT_ID = 148,
|
|
53
|
-
SEGMENT_LEADERBOARD_ENTRY = 149,
|
|
54
|
-
SEGMENT_POINT = 150,
|
|
55
|
-
SEGMENT_FILE = 151,
|
|
56
|
-
WORKOUT_SESSION = 158,
|
|
57
|
-
WATCHFACE_SETTINGS = 159,
|
|
58
|
-
GPS_METADATA = 160,
|
|
59
|
-
CAMERA_EVENT = 161,
|
|
60
|
-
TIMESTAMP_CORRELATION = 162,
|
|
61
|
-
GYROSCOPE_DATA = 164,
|
|
62
|
-
ACCELEROMETER_DATA = 165,
|
|
63
|
-
THREE_D_SENSOR_CALIBRATION = 167,
|
|
64
|
-
VIDEO_FRAME = 169,
|
|
65
|
-
OBDII_DATA = 174,
|
|
66
|
-
NMEA_SENTENCE = 177,
|
|
67
|
-
AVIATION_ATTITUDE = 178,
|
|
68
|
-
VIDEO = 184,
|
|
69
|
-
VIDEO_TITLE = 185,
|
|
70
|
-
VIDEO_DESCRIPTION = 186,
|
|
71
|
-
VIDEO_CLIP = 187,
|
|
72
|
-
SET = 225,
|
|
73
|
-
JUMP = 285,
|
|
74
|
-
CLIMB_PRO = 317,
|
|
75
|
-
FIELD_DESCRIPTION = 206,
|
|
76
|
-
DEVELOPER_DATA_ID = 207,
|
|
77
|
-
MAGNETOMETER_DATA = 208,
|
|
78
|
-
BAROMETER_DATA = 209,
|
|
79
|
-
ONE_D_SENSOR_CALIBRATION = 210,
|
|
80
|
-
MONITORING_HR_DATA = 211,
|
|
81
|
-
TIME_IN_ZONE = 216,
|
|
82
|
-
DIVE_SETTINGS = 258,
|
|
83
|
-
DIVE_GAS = 259,
|
|
84
|
-
DIVE_ALARM = 262,
|
|
85
|
-
EXERCISE_TITLE = 264,
|
|
86
|
-
DIVE_SUMMARY = 268,
|
|
87
|
-
SPLIT = 312,
|
|
88
|
-
SPLIT_SUMMARY = 313,
|
|
89
|
-
HSA_BODY_BATTERY_DATA = 314,
|
|
90
|
-
HSA_EVENT = 315,
|
|
91
|
-
TANK_UPDATE = 319,
|
|
92
|
-
TANK_SUMMARY = 323,
|
|
93
|
-
SLEEP_ASSESSMENT = 346,
|
|
94
|
-
HRV_STATUS_SUMMARY = 370,
|
|
95
|
-
HRV_VALUE = 371,
|
|
96
|
-
RAW_BBI = 372,
|
|
97
|
-
DEVICE_AUX_BATTERY_INFO = 375,
|
|
98
|
-
HSA_GYROSCOPE_DATA = 376,
|
|
99
|
-
CHRONO_SHOT_SESSION = 387,
|
|
100
|
-
CHRONO_SHOT_DATA = 388,
|
|
101
|
-
HSA_CONFIGURATION_DATA = 389,
|
|
102
|
-
DIVE_APNEA_ALARM = 393,
|
|
103
|
-
SKIN_TEMP_OVERNIGHT = 398,
|
|
104
|
-
HSA_WRIST_TEMPERATURE_DATA = 409
|
|
105
|
-
}
|