@flow-js/garmin-connect 1.6.3

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.
Files changed (109) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +627 -0
  3. package/dist/common/CFClient.d.ts +22 -0
  4. package/dist/common/CFClient.js +137 -0
  5. package/dist/common/CFClient.js.map +1 -0
  6. package/dist/common/DateUtils.d.ts +1 -0
  7. package/dist/common/DateUtils.js +11 -0
  8. package/dist/common/DateUtils.js.map +1 -0
  9. package/dist/common/HttpClient.d.ts +37 -0
  10. package/dist/common/HttpClient.js +496 -0
  11. package/dist/common/HttpClient.js.map +1 -0
  12. package/dist/garmin/GarminConnect.d.ts +112 -0
  13. package/dist/garmin/GarminConnect.js +816 -0
  14. package/dist/garmin/GarminConnect.js.map +1 -0
  15. package/dist/garmin/UrlClass.d.ts +53 -0
  16. package/dist/garmin/UrlClass.js +267 -0
  17. package/dist/garmin/UrlClass.js.map +1 -0
  18. package/dist/garmin/Urls.d.ts +56 -0
  19. package/dist/garmin/Urls.js +88 -0
  20. package/dist/garmin/Urls.js.map +1 -0
  21. package/dist/garmin/common/DateUtils.d.ts +6 -0
  22. package/dist/garmin/common/DateUtils.js +38 -0
  23. package/dist/garmin/common/DateUtils.js.map +1 -0
  24. package/dist/garmin/common/GpxUtils.d.ts +2 -0
  25. package/dist/garmin/common/GpxUtils.js +28 -0
  26. package/dist/garmin/common/GpxUtils.js.map +1 -0
  27. package/dist/garmin/common/HydrationUtils.d.ts +2 -0
  28. package/dist/garmin/common/HydrationUtils.js +16 -0
  29. package/dist/garmin/common/HydrationUtils.js.map +1 -0
  30. package/dist/garmin/common/WeightUtils.d.ts +1 -0
  31. package/dist/garmin/common/WeightUtils.js +9 -0
  32. package/dist/garmin/common/WeightUtils.js.map +1 -0
  33. package/dist/garmin/types/activity.d.ts +408 -0
  34. package/dist/garmin/types/activity.js +27 -0
  35. package/dist/garmin/types/activity.js.map +1 -0
  36. package/dist/garmin/types/gear.d.ts +20 -0
  37. package/dist/garmin/types/gear.js +3 -0
  38. package/dist/garmin/types/gear.js.map +1 -0
  39. package/dist/garmin/types/golf.d.ts +67 -0
  40. package/dist/garmin/types/golf.js +3 -0
  41. package/dist/garmin/types/golf.js.map +1 -0
  42. package/dist/garmin/types/gpx.d.ts +171 -0
  43. package/dist/garmin/types/gpx.js +15 -0
  44. package/dist/garmin/types/gpx.js.map +1 -0
  45. package/dist/garmin/types/heartrate.d.ts +22 -0
  46. package/dist/garmin/types/heartrate.js +2 -0
  47. package/dist/garmin/types/heartrate.js.map +1 -0
  48. package/dist/garmin/types/hydration.d.ts +28 -0
  49. package/dist/garmin/types/hydration.js +2 -0
  50. package/dist/garmin/types/hydration.js.map +1 -0
  51. package/dist/garmin/types/index.d.ts +445 -0
  52. package/dist/garmin/types/index.js +37 -0
  53. package/dist/garmin/types/index.js.map +1 -0
  54. package/dist/garmin/types/sleep.d.ts +120 -0
  55. package/dist/garmin/types/sleep.js +3 -0
  56. package/dist/garmin/types/sleep.js.map +1 -0
  57. package/dist/garmin/types/weight.d.ts +42 -0
  58. package/dist/garmin/types/weight.js +3 -0
  59. package/dist/garmin/types/weight.js.map +1 -0
  60. package/dist/garmin/types/workout-builder.d.ts +138 -0
  61. package/dist/garmin/types/workout-builder.js +286 -0
  62. package/dist/garmin/types/workout-builder.js.map +1 -0
  63. package/dist/garmin/types/workout.d.ts +56 -0
  64. package/dist/garmin/types/workout.js +3 -0
  65. package/dist/garmin/types/workout.js.map +1 -0
  66. package/dist/garmin/types.d.ts +504 -0
  67. package/dist/garmin/types.js +3 -0
  68. package/dist/garmin/types.js.map +1 -0
  69. package/dist/garmin/workout-builder/duration.d.ts +87 -0
  70. package/dist/garmin/workout-builder/duration.js +173 -0
  71. package/dist/garmin/workout-builder/duration.js.map +1 -0
  72. package/dist/garmin/workout-builder/index.d.ts +5 -0
  73. package/dist/garmin/workout-builder/index.js +22 -0
  74. package/dist/garmin/workout-builder/index.js.map +1 -0
  75. package/dist/garmin/workout-builder/step.d.ts +28 -0
  76. package/dist/garmin/workout-builder/step.js +60 -0
  77. package/dist/garmin/workout-builder/step.js.map +1 -0
  78. package/dist/garmin/workout-builder/target.d.ts +49 -0
  79. package/dist/garmin/workout-builder/target.js +193 -0
  80. package/dist/garmin/workout-builder/target.js.map +1 -0
  81. package/dist/garmin/workout-builder/workout-builder.d.ts +12 -0
  82. package/dist/garmin/workout-builder/workout-builder.js +37 -0
  83. package/dist/garmin/workout-builder/workout-builder.js.map +1 -0
  84. package/dist/garmin/workout-builder/workout-type.d.ts +11 -0
  85. package/dist/garmin/workout-builder/workout-type.js +26 -0
  86. package/dist/garmin/workout-builder/workout-type.js.map +1 -0
  87. package/dist/garmin/workouts/Running.d.ts +16 -0
  88. package/dist/garmin/workouts/Running.js +64 -0
  89. package/dist/garmin/workouts/Running.js.map +1 -0
  90. package/dist/garmin/workouts/templates/RunningTemplate.d.ts +68 -0
  91. package/dist/garmin/workouts/templates/RunningTemplate.js +78 -0
  92. package/dist/garmin/workouts/templates/RunningTemplate.js.map +1 -0
  93. package/dist/garmin/workouts/workout-builder.d.ts +138 -0
  94. package/dist/garmin/workouts/workout-builder.js +286 -0
  95. package/dist/garmin/workouts/workout-builder.js.map +1 -0
  96. package/dist/garmin/workouts-builder/workout-builder.d.ts +138 -0
  97. package/dist/garmin/workouts-builder/workout-builder.js +286 -0
  98. package/dist/garmin/workouts-builder/workout-builder.js.map +1 -0
  99. package/dist/index.d.ts +4 -0
  100. package/dist/index.js +26 -0
  101. package/dist/index.js.map +1 -0
  102. package/dist/utils.d.ts +3 -0
  103. package/dist/utils.js +46 -0
  104. package/dist/utils.js.map +1 -0
  105. package/examples/assets/paris-marathon.gpx +2037 -0
  106. package/examples/example-gpx-file.js +54 -0
  107. package/examples/example-workout.js +162 -0
  108. package/examples/example.js +34 -0
  109. package/package.json +67 -0
@@ -0,0 +1,171 @@
1
+ export declare enum GpxActivityType {
2
+ Running = 1,
3
+ Running_Road = 1,
4
+ Running_Trail = 1,
5
+ Cycling = 10,
6
+ Cycling_Road = 10,
7
+ Cycling_Gravel = 143,
8
+ Hiking = 3,
9
+ Other = 4
10
+ }
11
+ export interface ImportedGpxResponse {
12
+ courseId: number | null;
13
+ courseName: string | null;
14
+ description: string | null;
15
+ openStreetMap: boolean;
16
+ matchedToSegments: boolean;
17
+ userProfilePk: number | null;
18
+ userGroupPk: number | null;
19
+ rulePK: number | null;
20
+ firstName: string | null;
21
+ lastName: string | null;
22
+ displayName: string | null;
23
+ geoRoutePk: number | null;
24
+ sourceTypeId: number | null;
25
+ sourcePk: number | null;
26
+ distanceMeter: number | null;
27
+ elevationGainMeter: number | null;
28
+ elevationLossMeter: number | null;
29
+ startPoint: string | null;
30
+ coursePoints: CoursePoint[];
31
+ boundingBox: unknown | null;
32
+ hasShareableEvent: boolean | null;
33
+ hasTurnDetectionDisabled: boolean;
34
+ activityTypePk: number | null;
35
+ virtualPartnerId: number | null;
36
+ includeLaps: boolean;
37
+ elapsedSeconds: number | null;
38
+ speedMeterPerSecond: number | null;
39
+ createDate: string | null;
40
+ updateDate: string | null;
41
+ courseLines: CourseLine[];
42
+ coordinateSystem: string | null;
43
+ targetCoordinateSystem: string | null;
44
+ originalCoordinateSystem: string | null;
45
+ consumer: string | null;
46
+ elevationSource: string | null;
47
+ hasPaceBand: boolean;
48
+ hasPowerGuide: boolean;
49
+ favorite: boolean;
50
+ startNote: string | null;
51
+ finishNote: string | null;
52
+ cutoffDuration: number | null;
53
+ geoPoints: GeoPoint[];
54
+ }
55
+ export interface CourseRequest {
56
+ activityTypePk: GpxActivityType;
57
+ hasTurnDetectionDisabled: boolean;
58
+ geoPoints: GeoPoint[];
59
+ courseLines: [];
60
+ coursePoints: CoursePoint[];
61
+ startPoint: GeoPoint;
62
+ elapsedSeconds: number | null;
63
+ openStreetMap: boolean;
64
+ coordinateSystem: string;
65
+ rulePK: number;
66
+ courseName: string;
67
+ matchedToSegments: boolean;
68
+ includeLaps: boolean;
69
+ hasPaceBand: boolean;
70
+ hasPowerGuide: boolean;
71
+ favorite: boolean;
72
+ speedMeterPerSecond: number | null;
73
+ sourceTypeId: number;
74
+ }
75
+ export interface CoursePoint {
76
+ coursePointId: number | null;
77
+ name: string | null;
78
+ coursePk: number | null;
79
+ coursePointType: string | null;
80
+ lon: number;
81
+ lat: number;
82
+ distance: number;
83
+ elevation: number | null;
84
+ derivedElevation: number | null;
85
+ timestamp: number | null;
86
+ createdDate: string | null;
87
+ modifiedDate: string | null;
88
+ uuid: string | null;
89
+ note: string | null;
90
+ cutoffDuration: number | null;
91
+ restDuration: number | null;
92
+ }
93
+ export interface CourseLine {
94
+ courseId: number | null;
95
+ sortOrder: number;
96
+ numberOfPoints: number;
97
+ distanceInMeters: number;
98
+ bearing: number;
99
+ points: unknown | null;
100
+ coordinateSystem: string | null;
101
+ originalCoordinateSystem: string | null;
102
+ }
103
+ export interface GeoPoint {
104
+ latitude: number;
105
+ longitude: number;
106
+ elevation: number | null;
107
+ distance: number;
108
+ timestamp: number | null;
109
+ }
110
+ export interface ListCoursesResponse {
111
+ coursesForUser: {
112
+ courseId: number;
113
+ userProfileId: number;
114
+ displayName: string;
115
+ userGroupId: number | null;
116
+ geoRoutePk: number | null;
117
+ activityType: {
118
+ typeId: number;
119
+ typeKey: string;
120
+ parentTypeId: number;
121
+ isHidden: boolean;
122
+ restricted: boolean;
123
+ trimmable: boolean;
124
+ };
125
+ courseName: string;
126
+ courseDescription: string | null;
127
+ createdDate: number;
128
+ updatedDate: number;
129
+ privacyRule: {
130
+ typeId: number;
131
+ typeKey: string;
132
+ };
133
+ distanceInMeters: number;
134
+ elevationGainInMeters: number;
135
+ elevationLossInMeters: number;
136
+ startLatitude: number;
137
+ startLongitude: number;
138
+ speedInMetersPerSecond: number;
139
+ sourceTypeId: number;
140
+ sourcePk: number | null;
141
+ elapsedSeconds: number | null;
142
+ coordinateSystem: string;
143
+ originalCoordinateSystem: string;
144
+ consumer: string;
145
+ elevationSource: number;
146
+ hasShareableEvent: boolean;
147
+ hasPaceBand: boolean;
148
+ hasPowerGuide: boolean;
149
+ favorite: boolean;
150
+ hasTurnDetectionDisabled: boolean;
151
+ curatedCourseId: number | null;
152
+ startNote: string | null;
153
+ finishNote: string | null;
154
+ cutoffDuration: number | null;
155
+ activityTypeId: {
156
+ typeId: number;
157
+ typeKey: string;
158
+ parentTypeId: number;
159
+ isHidden: boolean;
160
+ restricted: boolean;
161
+ trimmable: boolean;
162
+ };
163
+ public: boolean;
164
+ createdDateFormatted: string;
165
+ updatedDateFormatted: string;
166
+ applicationName: string;
167
+ companyName: string;
168
+ companyWebsite: string;
169
+ imageURL: string;
170
+ }[];
171
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GpxActivityType = void 0;
4
+ var GpxActivityType;
5
+ (function (GpxActivityType) {
6
+ GpxActivityType[GpxActivityType["Running"] = 1] = "Running";
7
+ GpxActivityType[GpxActivityType["Running_Road"] = 1] = "Running_Road";
8
+ GpxActivityType[GpxActivityType["Running_Trail"] = 1] = "Running_Trail";
9
+ GpxActivityType[GpxActivityType["Cycling"] = 10] = "Cycling";
10
+ GpxActivityType[GpxActivityType["Cycling_Road"] = 10] = "Cycling_Road";
11
+ GpxActivityType[GpxActivityType["Cycling_Gravel"] = 143] = "Cycling_Gravel";
12
+ GpxActivityType[GpxActivityType["Hiking"] = 3] = "Hiking";
13
+ GpxActivityType[GpxActivityType["Other"] = 4] = "Other";
14
+ })(GpxActivityType = exports.GpxActivityType || (exports.GpxActivityType = {}));
15
+ //# sourceMappingURL=gpx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gpx.js","sourceRoot":"","sources":["../../../src/garmin/types/gpx.ts"],"names":[],"mappings":";;;AAAA,IAAY,eASX;AATD,WAAY,eAAe;IACvB,2DAAW,CAAA;IACX,qEAAgB,CAAA;IAChB,uEAAiB,CAAA;IACjB,4DAAY,CAAA;IACZ,sEAAiB,CAAA;IACjB,2EAAoB,CAAA;IACpB,yDAAU,CAAA;IACV,uDAAS,CAAA;AACb,CAAC,EATW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAS1B"}
@@ -0,0 +1,22 @@
1
+ interface HeartRateValueDescriptor {
2
+ key: string;
3
+ index: number;
4
+ }
5
+ interface HeartRateEntry {
6
+ timestamp: number;
7
+ heartrate: number;
8
+ }
9
+ interface HeartRate {
10
+ userProfilePK: number;
11
+ calendarDate: string;
12
+ startTimestampGMT: string;
13
+ endTimestampGMT: string;
14
+ startTimestampLocal: string;
15
+ endTimestampLocal: string;
16
+ maxHeartRate: number;
17
+ minHeartRate: number;
18
+ restingHeartRate: number;
19
+ lastSevenDaysAvgRestingHeartRate: number;
20
+ heartRateValueDescriptors: HeartRateValueDescriptor[];
21
+ heartRateValues: HeartRateEntry[][];
22
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=heartrate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"heartrate.js","sourceRoot":"","sources":["../../../src/garmin/types/heartrate.ts"],"names":[],"mappings":""}
@@ -0,0 +1,28 @@
1
+ interface HydrationData {
2
+ userId: number;
3
+ calendarDate: string;
4
+ lastEntryTimestampLocal: string;
5
+ valueInML: number;
6
+ goalInML: number;
7
+ baseGoalInML: number;
8
+ sweatLossInML: number;
9
+ activityIntakeInML: number;
10
+ hydrationMeasurementUnit: string;
11
+ hydrationContainers: HydrationContainer[];
12
+ hydrationAutoGoalEnabled: boolean;
13
+ }
14
+ interface HydrationContainer {
15
+ name: string | null;
16
+ volume: number;
17
+ unit: string;
18
+ }
19
+ interface WaterIntake {
20
+ userId: number;
21
+ calendarDate: string;
22
+ valueInML: number;
23
+ goalInML: number;
24
+ dailyAverageinML: number | null;
25
+ lastEntryTimestampLocal: string;
26
+ sweatLossInML: number | null;
27
+ activityIntakeInML: number;
28
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=hydration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hydration.js","sourceRoot":"","sources":["../../../src/garmin/types/hydration.ts"],"names":[],"mappings":""}
@@ -0,0 +1,445 @@
1
+ export type GCUserProfileId = number;
2
+ export type GCUserHash = string;
3
+ export type GCWorkoutId = string;
4
+ export type GCGearId = string;
5
+ export type GCBadgeId = number;
6
+ export type GarminDomain = 'garmin.com' | 'garmin.cn';
7
+ export declare enum ExportFileType {
8
+ tcx = "tcx",
9
+ gpx = "gpx",
10
+ kml = "kml",
11
+ zip = "zip"
12
+ }
13
+ export declare enum UploadFileType {
14
+ tcx = "tcx",
15
+ gpx = "gpx",
16
+ fit = "fit"
17
+ }
18
+ export type ExportFileTypeValue = keyof typeof ExportFileType;
19
+ export type UploadFileTypeTypeValue = keyof typeof UploadFileType;
20
+ export interface IUserInfo {
21
+ userProfileId: GCUserProfileId;
22
+ username: string;
23
+ emailAddress: string;
24
+ locale: string;
25
+ measurementSystemKey: string;
26
+ timeFormatKey: string;
27
+ dateFormatKey: string;
28
+ numberFormatKey: string;
29
+ heartRateDisplayFormatKey: string;
30
+ powerDisplayFormatKey: string;
31
+ timeZoneGroupKey: string;
32
+ dayKey: unknown;
33
+ isPublicByDefault: boolean;
34
+ roles: string[];
35
+ displayName: GCUserHash;
36
+ tocAcceptedDate: string;
37
+ defaultActivityPrivacy: unknown;
38
+ customerId: string;
39
+ birthdate: unknown;
40
+ socialNetwork: string;
41
+ socialIcon: string;
42
+ systemUser: boolean;
43
+ systemMetricUser: boolean;
44
+ underAge: boolean;
45
+ }
46
+ export interface ISocialProfile {
47
+ id: number;
48
+ profileId: GCUserProfileId;
49
+ garminGUID: string;
50
+ displayName: GCUserHash;
51
+ fullName: string;
52
+ userName: string;
53
+ profileImageUuid: unknown;
54
+ profileImageUrlLarge: string;
55
+ profileImageUrlMedium: string;
56
+ profileImageUrlSmall: string;
57
+ location: string;
58
+ facebookUrl: unknown;
59
+ twitterUrl: unknown;
60
+ personalWebsite: unknown;
61
+ motivation: unknown;
62
+ bio: unknown;
63
+ primaryActivity: unknown;
64
+ favoriteActivityTypes: unknown[];
65
+ runningTrainingSpeed: number;
66
+ cyclingTrainingSpeed: number;
67
+ favoriteCyclingActivityTypes: unknown[];
68
+ cyclingClassification: unknown;
69
+ cyclingMaxAvgPower: number;
70
+ swimmingTrainingSpeed: number;
71
+ profileVisibility: string;
72
+ activityStartVisibility: string;
73
+ activityMapVisibility: string;
74
+ courseVisibility: string;
75
+ activityHeartRateVisibility: string;
76
+ activityPowerVisibility: string;
77
+ badgeVisibility: string;
78
+ showAge: boolean;
79
+ showWeight: boolean;
80
+ showHeight: boolean;
81
+ showWeightClass: boolean;
82
+ showAgeRange: boolean;
83
+ showGender: boolean;
84
+ showActivityClass: boolean;
85
+ showVO2Max: boolean;
86
+ showPersonalRecords: boolean;
87
+ showLast12Months: boolean;
88
+ showLifetimeTotals: boolean;
89
+ showUpcomingEvents: boolean;
90
+ showRecentFavorites: boolean;
91
+ showRecentDevice: boolean;
92
+ showRecentGear: boolean;
93
+ showBadges: boolean;
94
+ otherActivity: null;
95
+ otherPrimaryActivity: null;
96
+ otherMotivation: null;
97
+ userRoles: string[];
98
+ nameApproved: boolean;
99
+ userProfileFullName: string;
100
+ makeGolfScorecardsPrivate: boolean;
101
+ allowGolfLiveScoring: boolean;
102
+ allowGolfScoringByConnections: boolean;
103
+ userLevel: number;
104
+ userPoint: number;
105
+ levelUpdateDate: string;
106
+ levelIsViewed: boolean;
107
+ levelPointThreshold: number;
108
+ userPointOffset: number;
109
+ userPro: boolean;
110
+ }
111
+ export interface ISocialConnection {
112
+ userId: number;
113
+ displayName: GCUserHash;
114
+ fullName: string;
115
+ location: string;
116
+ profileImageUrlMedium: string;
117
+ profileImageUrlSmall: string;
118
+ userLevel: number;
119
+ connectionRequestId: number;
120
+ connectionRequestorId: number;
121
+ userConnectionStatus: number;
122
+ userRoles: string[];
123
+ profileVisibility: number;
124
+ deviceInvitations: unknown[];
125
+ nameApproved: boolean;
126
+ badgeVisibility: number;
127
+ userPro: boolean;
128
+ }
129
+ export interface ISocialConnections {
130
+ fullName: string;
131
+ userConnections: ISocialConnection[];
132
+ pagination: unknown;
133
+ }
134
+ export interface IBadgeSocialConnection {
135
+ userProfileId: GCUserProfileId;
136
+ fullName: string;
137
+ displayName: GCUserHash;
138
+ profileImageUrlMedium: string;
139
+ profileImageUrlSmall: string;
140
+ userLevel: number;
141
+ badgeEarnedDate: string;
142
+ }
143
+ export interface IBadgeRelated {
144
+ badgeId: GCBadgeId;
145
+ badgeKey: string;
146
+ badgeName: string;
147
+ badgeUuid: unknown;
148
+ badgeCategoryId: number;
149
+ badgeDifficultyId: number;
150
+ badgePoints: number;
151
+ badgeTypeIds: number[];
152
+ earnedByMe: boolean;
153
+ }
154
+ export interface IBadge {
155
+ badgeId: GCBadgeId;
156
+ badgeKey: string;
157
+ badgeName: string;
158
+ badgeUuid: unknown;
159
+ badgeCategoryId: number;
160
+ badgeDifficultyId: number;
161
+ badgePoints: number;
162
+ badgeTypeIds: number[];
163
+ badgeSeriesId: unknown;
164
+ badgeStartDate: string;
165
+ badgeEndDate: unknown;
166
+ userProfileId: number;
167
+ fullName: string;
168
+ displayName: string;
169
+ badgeEarnedDate: string;
170
+ badgeEarnedNumber: number;
171
+ badgeLimitCount: unknown;
172
+ badgeIsViewed: boolean;
173
+ badgeProgressValue: number;
174
+ badgeTargetValue: unknown;
175
+ badgeUnitId: unknown;
176
+ badgeAssocTypeId: number;
177
+ badgeAssocDataId: unknown;
178
+ badgeAssocDataName: unknown;
179
+ earnedByMe: boolean;
180
+ currentPlayerType: unknown;
181
+ userJoined: unknown;
182
+ badgeChallengeStatusId: unknown;
183
+ badgePromotionCodeType: unknown;
184
+ promotionCodeStatus: unknown;
185
+ createDate: string;
186
+ relatedBadges: IBadgeRelated[] | null;
187
+ connectionNumber: number;
188
+ connections: IBadgeSocialConnection[] | null;
189
+ }
190
+ export interface Gear {
191
+ gearPk: number;
192
+ uuid: string;
193
+ userProfilePk: number;
194
+ gearMakeName: string;
195
+ gearModelName: string;
196
+ gearTypeName: string;
197
+ gearStatusName: string;
198
+ displayName: string;
199
+ customMakeModel: string;
200
+ imageNameLarge: any;
201
+ imageNameMedium: any;
202
+ imageNameSmall: any;
203
+ dateBegin: string;
204
+ dateEnd: any;
205
+ maximumMeters: number;
206
+ notified: boolean;
207
+ createDate: string;
208
+ updateDate: string;
209
+ }
210
+ export interface IOauth1Consumer {
211
+ key: string;
212
+ secret: string;
213
+ }
214
+ export interface IOauth1 {
215
+ token: IOauth1Token;
216
+ oauth: OAuth;
217
+ }
218
+ export interface IGarminTokens {
219
+ oauth1: IOauth1Token;
220
+ oauth2: IOauth2Token;
221
+ }
222
+ export interface IOauth1Token {
223
+ oauth_token: string;
224
+ oauth_token_secret: string;
225
+ }
226
+ export interface IOauth2Token {
227
+ scope: string;
228
+ jti: string;
229
+ access_token: string;
230
+ token_type: string;
231
+ refresh_token: string;
232
+ expires_in: number;
233
+ refresh_token_expires_in: number;
234
+ expires_at: number;
235
+ refresh_token_expires_at: number;
236
+ last_update_date: string;
237
+ expires_date: string;
238
+ }
239
+ export interface IUserSettings {
240
+ id: number;
241
+ userData: IUserData;
242
+ userSleep: {
243
+ sleepTime: number;
244
+ defaultSleepTime: boolean;
245
+ wakeTime: number;
246
+ defaultWakeTime: boolean;
247
+ };
248
+ connectDate: unknown;
249
+ sourceType: unknown;
250
+ userSleepWindows: IUserSleepWindows[];
251
+ }
252
+ export interface IUserData {
253
+ gender: unknown;
254
+ weight: unknown;
255
+ height: unknown;
256
+ timeFormat: string;
257
+ birthDate: unknown;
258
+ measurementSystem: string;
259
+ activityLevel: unknown;
260
+ handedness: string;
261
+ powerFormat: {
262
+ formatId: number;
263
+ formatKey: string;
264
+ minFraction: number;
265
+ maxFraction: number;
266
+ groupingUsed: boolean;
267
+ displayFormat: unknown;
268
+ };
269
+ heartRateFormat: {
270
+ formatId: number;
271
+ formatKey: string;
272
+ minFraction: number;
273
+ maxFraction: number;
274
+ groupingUsed: boolean;
275
+ displayFormat: unknown;
276
+ };
277
+ firstDayOfWeek: {
278
+ dayId: number;
279
+ dayName: string;
280
+ sortOrder: number;
281
+ isPossibleFirstDay: boolean;
282
+ };
283
+ vo2MaxRunning: unknown;
284
+ vo2MaxCycling: unknown;
285
+ lactateThresholdSpeed: unknown;
286
+ lactateThresholdHeartRate: unknown;
287
+ diveNumber: unknown;
288
+ intensityMinutesCalcMethod: string;
289
+ moderateIntensityMinutesHrZone: number;
290
+ vigorousIntensityMinutesHrZone: number;
291
+ hydrationMeasurementUnit: string;
292
+ hydrationContainers: unknown[];
293
+ hydrationAutoGoalEnabled: boolean;
294
+ firstbeatMaxStressScore: unknown;
295
+ firstbeatCyclingLtTimestamp: unknown;
296
+ firstbeatRunningLtTimestamp: unknown;
297
+ thresholdHeartRateAutoDetected: unknown;
298
+ ftpAutoDetected: unknown;
299
+ trainingStatusPausedDate: unknown;
300
+ weatherLocation: {
301
+ useFixedLocation: unknown;
302
+ latitude: unknown;
303
+ longitude: unknown;
304
+ locationName: unknown;
305
+ isoCountryCode: unknown;
306
+ postalCode: unknown;
307
+ };
308
+ golfDistanceUnit: string;
309
+ golfElevationUnit: unknown;
310
+ golfSpeedUnit: unknown;
311
+ externalBottomTime: unknown;
312
+ }
313
+ export interface IUserSleepWindows {
314
+ sleepWindowFrequency: string;
315
+ startSleepTimeSecondsFromMidnight: number;
316
+ endSleepTimeSecondsFromMidnight: number;
317
+ }
318
+ export interface ICountActivities {
319
+ countOfActivities: number;
320
+ date: string;
321
+ stats: {
322
+ all: Record<string, any>;
323
+ };
324
+ }
325
+ export interface IWorkout {
326
+ workoutId?: number;
327
+ ownerId?: number;
328
+ workoutName: string;
329
+ description?: string;
330
+ updateDate: Date;
331
+ createdDate: Date;
332
+ sportType: ISportType;
333
+ trainingPlanId: null;
334
+ author: IAuthor;
335
+ estimatedDurationInSecs: number;
336
+ estimatedDistanceInMeters: null;
337
+ estimateType: null;
338
+ estimatedDistanceUnit: IUnit;
339
+ poolLength: number;
340
+ poolLengthUnit: IUnit;
341
+ workoutProvider: string;
342
+ workoutSourceId: string;
343
+ consumer: null;
344
+ atpPlanId: null;
345
+ workoutNameI18nKey: null;
346
+ descriptionI18nKey: null;
347
+ shared: boolean;
348
+ estimated: boolean;
349
+ }
350
+ export interface IWorkoutDetail extends IWorkout {
351
+ workoutSegments: IWorkoutSegment[];
352
+ }
353
+ export interface IAuthor {
354
+ userProfilePk: null;
355
+ displayName: null;
356
+ fullName: null;
357
+ profileImgNameLarge: null;
358
+ profileImgNameMedium: null;
359
+ profileImgNameSmall: null;
360
+ userPro: boolean;
361
+ vivokidUser: boolean;
362
+ }
363
+ export interface IUnit {
364
+ unitId: null;
365
+ unitKey: null;
366
+ factor: null;
367
+ }
368
+ export interface ISportType {
369
+ sportTypeId: number;
370
+ sportTypeKey: string;
371
+ displayOrder?: number;
372
+ }
373
+ export interface IWorkoutSegment {
374
+ segmentOrder: number;
375
+ sportType: ISportType;
376
+ workoutSteps: IWorkoutStep[];
377
+ }
378
+ export interface IWorkoutStep {
379
+ type: string;
380
+ stepId: number;
381
+ stepOrder: number;
382
+ stepType: IStepType;
383
+ childStepId: null;
384
+ description: null;
385
+ endCondition: IEndCondition;
386
+ endConditionValue: number | null;
387
+ preferredEndConditionUnit: IUnit | null;
388
+ endConditionCompare: null;
389
+ targetType: ITargetType;
390
+ targetValueOne: null;
391
+ targetValueTwo: null;
392
+ targetValueUnit: null;
393
+ zoneNumber: null;
394
+ secondaryTargetType: null;
395
+ secondaryTargetValueOne: null;
396
+ secondaryTargetValueTwo: null;
397
+ secondaryTargetValueUnit: null;
398
+ secondaryZoneNumber: null;
399
+ endConditionZone: null;
400
+ strokeType: IStrokeType;
401
+ equipmentType: IEquipmentType;
402
+ category: null;
403
+ exerciseName: null;
404
+ workoutProvider: null;
405
+ providerExerciseSourceId: null;
406
+ weightValue: null;
407
+ weightUnit: null;
408
+ }
409
+ export interface IEndCondition {
410
+ conditionTypeId: number;
411
+ conditionTypeKey: string;
412
+ displayOrder: number;
413
+ displayable: boolean;
414
+ }
415
+ export interface IEquipmentType {
416
+ equipmentTypeId: number;
417
+ equipmentTypeKey: null;
418
+ displayOrder: number;
419
+ }
420
+ export interface IStepType {
421
+ stepTypeId: number;
422
+ stepTypeKey: string;
423
+ displayOrder: number;
424
+ }
425
+ export interface IStrokeType {
426
+ strokeTypeId: number;
427
+ strokeTypeKey: null;
428
+ displayOrder: number;
429
+ }
430
+ export interface ITargetType {
431
+ workoutTargetTypeId: number;
432
+ workoutTargetTypeKey: string;
433
+ displayOrder: number;
434
+ }
435
+ export interface IDailyStepsType {
436
+ calendarDate: string;
437
+ stepGoal: number;
438
+ totalDistance: number;
439
+ totalSteps: number;
440
+ }
441
+ export * from './activity';
442
+ export * from './gear';
443
+ export * from './gpx';
444
+ export * from './sleep';
445
+ export * from './workout';