@gooin/garmin-connect 1.6.9 → 1.6.11

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 (64) hide show
  1. package/dist/common/HttpClient.d.ts +38 -37
  2. package/dist/common/HttpClient.js +360 -332
  3. package/dist/common/HttpClient.js.map +1 -1
  4. package/dist/garmin/GarminConnect.d.ts +73 -84
  5. package/dist/garmin/GarminConnect.js +467 -470
  6. package/dist/garmin/GarminConnect.js.map +1 -1
  7. package/dist/garmin/UrlClass.d.ts +43 -43
  8. package/dist/garmin/UrlClass.js +124 -124
  9. package/dist/garmin/common/DateUtils.d.ts +6 -6
  10. package/dist/garmin/common/DateUtils.js +37 -37
  11. package/dist/garmin/common/HydrationUtils.d.ts +2 -2
  12. package/dist/garmin/common/HydrationUtils.js +15 -15
  13. package/dist/garmin/common/WeightUtils.d.ts +1 -1
  14. package/dist/garmin/common/WeightUtils.js +8 -8
  15. package/dist/garmin/types/activity.d.ts +408 -408
  16. package/dist/garmin/types/activity.js +26 -26
  17. package/dist/garmin/types/course.d.ts +146 -146
  18. package/dist/garmin/types/course.js +2 -2
  19. package/dist/garmin/types/golf.d.ts +67 -67
  20. package/dist/garmin/types/golf.js +2 -2
  21. package/dist/garmin/types/heartrate.d.ts +22 -22
  22. package/dist/garmin/types/heartrate.js +1 -1
  23. package/dist/garmin/types/hydration.d.ts +28 -28
  24. package/dist/garmin/types/hydration.js +1 -1
  25. package/dist/garmin/types/index.d.ts +558 -541
  26. package/dist/garmin/types/index.js +35 -16
  27. package/dist/garmin/types/index.js.map +1 -1
  28. package/dist/garmin/types/sleep.d.ts +120 -120
  29. package/dist/garmin/types/sleep.js +2 -2
  30. package/dist/garmin/types/weight.d.ts +42 -42
  31. package/dist/garmin/types/weight.js +2 -2
  32. package/dist/garmin/workouts/Running.d.ts +16 -16
  33. package/dist/garmin/workouts/Running.js +46 -46
  34. package/dist/garmin/workouts/templates/RunningTemplate.d.ts +68 -68
  35. package/dist/garmin/workouts/templates/RunningTemplate.js +77 -77
  36. package/dist/index.d.ts +1 -1
  37. package/dist/index.js +8 -8
  38. package/dist/utils.d.ts +3 -3
  39. package/dist/utils.js +36 -36
  40. package/package.json +3 -2
  41. package/dist/common/CFClient.d.ts +0 -22
  42. package/dist/common/CFClient.js +0 -137
  43. package/dist/common/CFClient.js.map +0 -1
  44. package/dist/common/DateUtils.d.ts +0 -1
  45. package/dist/common/DateUtils.js +0 -11
  46. package/dist/common/DateUtils.js.map +0 -1
  47. package/dist/garmin/GarminConnect copy.d.ts +0 -76
  48. package/dist/garmin/GarminConnect copy.js +0 -397
  49. package/dist/garmin/GarminConnect copy.js.map +0 -1
  50. package/dist/garmin/GarminConnect_new.d.ts +0 -76
  51. package/dist/garmin/GarminConnect_new.js +0 -397
  52. package/dist/garmin/GarminConnect_new.js.map +0 -1
  53. package/dist/garmin/GarminConnect_old.d.ts +0 -75
  54. package/dist/garmin/GarminConnect_old.js +0 -386
  55. package/dist/garmin/GarminConnect_old.js.map +0 -1
  56. package/dist/garmin/Urls copy.d.ts +0 -66
  57. package/dist/garmin/Urls copy.js +0 -109
  58. package/dist/garmin/Urls copy.js.map +0 -1
  59. package/dist/garmin/Urls.d.ts +0 -64
  60. package/dist/garmin/Urls.js +0 -104
  61. package/dist/garmin/Urls.js.map +0 -1
  62. package/dist/garmin/types.d.ts +0 -927
  63. package/dist/garmin/types.js +0 -17
  64. package/dist/garmin/types.js.map +0 -1
@@ -1,541 +1,558 @@
1
- export type GCUserProfileId = number;
2
- export type GCUserHash = string;
3
- export type GCWorkoutId = string;
4
- export type GCCourseId = number;
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 IScheduleWorkout {
354
- workoutScheduleId: number;
355
- workout: IWorkoutDetail;
356
- calendarDate: string;
357
- createdDate: string;
358
- ownerId: number;
359
- newName: any;
360
- consumer: any;
361
- atpPlanTypeId: any;
362
- associatedActivityId: any;
363
- priority: any;
364
- associatedActivityDateTime: any;
365
- itp: boolean;
366
- race: boolean;
367
- protected: boolean;
368
- nameChanged: boolean;
369
- }
370
- export interface IAuthor {
371
- userProfilePk: null;
372
- displayName: null;
373
- fullName: null;
374
- profileImgNameLarge: null;
375
- profileImgNameMedium: null;
376
- profileImgNameSmall: null;
377
- userPro: boolean;
378
- vivokidUser: boolean;
379
- }
380
- export interface IUnit {
381
- unitId: null;
382
- unitKey: null;
383
- factor: null;
384
- }
385
- export interface ISportType {
386
- sportTypeId: number;
387
- sportTypeKey: string;
388
- displayOrder?: number;
389
- }
390
- export interface IWorkoutSegment {
391
- segmentOrder: number;
392
- sportType: ISportType;
393
- workoutSteps: IWorkoutStep[];
394
- }
395
- export interface IWorkoutStep {
396
- type: string;
397
- stepId: number;
398
- stepOrder: number;
399
- stepType: IStepType;
400
- childStepId: null;
401
- description: null;
402
- endCondition: IEndCondition;
403
- endConditionValue: number | null;
404
- preferredEndConditionUnit: IUnit | null;
405
- endConditionCompare: null;
406
- targetType: ITargetType;
407
- targetValueOne: null;
408
- targetValueTwo: null;
409
- targetValueUnit: null;
410
- zoneNumber: null;
411
- secondaryTargetType: null;
412
- secondaryTargetValueOne: null;
413
- secondaryTargetValueTwo: null;
414
- secondaryTargetValueUnit: null;
415
- secondaryZoneNumber: null;
416
- endConditionZone: null;
417
- strokeType: IStrokeType;
418
- equipmentType: IEquipmentType;
419
- category: null;
420
- exerciseName: null;
421
- workoutProvider: null;
422
- providerExerciseSourceId: null;
423
- weightValue: null;
424
- weightUnit: null;
425
- }
426
- export interface IEndCondition {
427
- conditionTypeId: number;
428
- conditionTypeKey: string;
429
- displayOrder: number;
430
- displayable: boolean;
431
- }
432
- export interface IEquipmentType {
433
- equipmentTypeId: number;
434
- equipmentTypeKey: null;
435
- displayOrder: number;
436
- }
437
- export interface IStepType {
438
- stepTypeId: number;
439
- stepTypeKey: string;
440
- displayOrder: number;
441
- }
442
- export interface IStrokeType {
443
- strokeTypeId: number;
444
- strokeTypeKey: null;
445
- displayOrder: number;
446
- }
447
- export interface ITargetType {
448
- workoutTargetTypeId: number;
449
- workoutTargetTypeKey: string;
450
- displayOrder: number;
451
- }
452
- export interface IDailyStepsType {
453
- calendarDate: string;
454
- stepGoal: number;
455
- totalDistance: number;
456
- totalSteps: number;
457
- }
458
- export interface ICalendar {
459
- startDayOfMonth: number;
460
- numOfDaysInMonth: number;
461
- numOfDaysInPrevMonth: number;
462
- month: number;
463
- year: number;
464
- calendarItems: ICalendarItem[];
465
- }
466
- export interface ICalendarItem {
467
- id?: number;
468
- groupId: any;
469
- trainingPlanId?: number;
470
- itemType: string;
471
- activityTypeId?: number;
472
- wellnessActivityUuid?: string;
473
- title?: string;
474
- date: string;
475
- duration?: number;
476
- distance?: number;
477
- calories?: number;
478
- floorsClimbed: any;
479
- avgRespirationRate?: number;
480
- unitOfPoolLength: any;
481
- weight?: number;
482
- difference?: number;
483
- courseId: any;
484
- courseName: any;
485
- sportTypeKey?: string;
486
- url: any;
487
- isStart: any;
488
- isRace?: boolean;
489
- recurrenceId: any;
490
- isParent?: boolean;
491
- parentId: any;
492
- userBadgeId: any;
493
- badgeCategoryTypeId: any;
494
- badgeCategoryTypeDesc: any;
495
- badgeAwardedDate: any;
496
- badgeViewed: any;
497
- hideBadge: any;
498
- startTimestampLocal?: string;
499
- eventTimeLocal?: EventTimeLocal;
500
- diveNumber: any;
501
- maxDepth: any;
502
- avgDepth: any;
503
- surfaceInterval: any;
504
- elapsedDuration?: number;
505
- lapCount?: number;
506
- bottomTime: any;
507
- atpPlanId: any;
508
- workoutId?: number;
509
- protectedWorkoutSchedule: boolean;
510
- activeSets?: number;
511
- strokes: any;
512
- noOfSplits?: number;
513
- maxGradeValue: any;
514
- totalAscent?: number;
515
- differenceStress: any;
516
- climbDuration?: number;
517
- maxSpeed?: number;
518
- averageHR?: number;
519
- activeSplitSummaryDuration?: number;
520
- maxSplitDistance?: number;
521
- maxSplitSpeed?: number;
522
- location?: string;
523
- shareableEventUuid?: string;
524
- splitSummaryMode: any;
525
- completionTarget?: CompletionTarget;
526
- shareableEvent: boolean;
527
- primaryEvent?: boolean;
528
- phasedTrainingPlan?: boolean;
529
- subscribed?: boolean;
530
- autoCalcCalories?: boolean;
531
- decoDive?: boolean;
532
- }
533
- export interface EventTimeLocal {
534
- startTimeHhMm: string;
535
- timeZoneId: string;
536
- }
537
- export interface CompletionTarget {
538
- value: number;
539
- unit: string;
540
- unitType: string;
541
- }
1
+ export type GCUserProfileId = number;
2
+ export type GCUserHash = string;
3
+ export type GCWorkoutId = string;
4
+ export type GCCourseId = number;
5
+ export type GCBadgeId = number;
6
+ export type GarminDomain = 'garmin.com' | 'garmin.cn';
7
+ export * from './activity';
8
+ export type GCConfig = GCCredentials & GCHttpClientConfig;
9
+ export type GCCredentials = {
10
+ username: string;
11
+ password: string;
12
+ };
13
+ export type GCHttpClientConfig = {
14
+ timeout?: number;
15
+ domain?: GarminDomain;
16
+ };
17
+ export type EventCallback<T> = (data: T) => void;
18
+ export interface Listeners {
19
+ [event: string]: EventCallback<any>[];
20
+ }
21
+ export declare enum Event {
22
+ sessionChange = "sessionChange"
23
+ }
24
+ export declare enum ExportFileType {
25
+ tcx = "tcx",
26
+ gpx = "gpx",
27
+ kml = "kml",
28
+ zip = "zip"
29
+ }
30
+ export declare enum UploadFileType {
31
+ tcx = "tcx",
32
+ gpx = "gpx",
33
+ fit = "fit"
34
+ }
35
+ export type ExportFileTypeValue = keyof typeof ExportFileType;
36
+ export type UploadFileTypeTypeValue = keyof typeof UploadFileType;
37
+ export interface IUserInfo {
38
+ userProfileId: GCUserProfileId;
39
+ username: string;
40
+ emailAddress: string;
41
+ locale: string;
42
+ measurementSystemKey: string;
43
+ timeFormatKey: string;
44
+ dateFormatKey: string;
45
+ numberFormatKey: string;
46
+ heartRateDisplayFormatKey: string;
47
+ powerDisplayFormatKey: string;
48
+ timeZoneGroupKey: string;
49
+ dayKey: unknown;
50
+ isPublicByDefault: boolean;
51
+ roles: string[];
52
+ displayName: GCUserHash;
53
+ tocAcceptedDate: string;
54
+ defaultActivityPrivacy: unknown;
55
+ customerId: string;
56
+ birthdate: unknown;
57
+ socialNetwork: string;
58
+ socialIcon: string;
59
+ systemUser: boolean;
60
+ systemMetricUser: boolean;
61
+ underAge: boolean;
62
+ }
63
+ export interface ISocialProfile {
64
+ id: number;
65
+ profileId: GCUserProfileId;
66
+ garminGUID: string;
67
+ displayName: GCUserHash;
68
+ fullName: string;
69
+ userName: string;
70
+ profileImageUuid: unknown;
71
+ profileImageUrlLarge: string;
72
+ profileImageUrlMedium: string;
73
+ profileImageUrlSmall: string;
74
+ location: string;
75
+ facebookUrl: unknown;
76
+ twitterUrl: unknown;
77
+ personalWebsite: unknown;
78
+ motivation: unknown;
79
+ bio: unknown;
80
+ primaryActivity: unknown;
81
+ favoriteActivityTypes: unknown[];
82
+ runningTrainingSpeed: number;
83
+ cyclingTrainingSpeed: number;
84
+ favoriteCyclingActivityTypes: unknown[];
85
+ cyclingClassification: unknown;
86
+ cyclingMaxAvgPower: number;
87
+ swimmingTrainingSpeed: number;
88
+ profileVisibility: string;
89
+ activityStartVisibility: string;
90
+ activityMapVisibility: string;
91
+ courseVisibility: string;
92
+ activityHeartRateVisibility: string;
93
+ activityPowerVisibility: string;
94
+ badgeVisibility: string;
95
+ showAge: boolean;
96
+ showWeight: boolean;
97
+ showHeight: boolean;
98
+ showWeightClass: boolean;
99
+ showAgeRange: boolean;
100
+ showGender: boolean;
101
+ showActivityClass: boolean;
102
+ showVO2Max: boolean;
103
+ showPersonalRecords: boolean;
104
+ showLast12Months: boolean;
105
+ showLifetimeTotals: boolean;
106
+ showUpcomingEvents: boolean;
107
+ showRecentFavorites: boolean;
108
+ showRecentDevice: boolean;
109
+ showRecentGear: boolean;
110
+ showBadges: boolean;
111
+ otherActivity: null;
112
+ otherPrimaryActivity: null;
113
+ otherMotivation: null;
114
+ userRoles: string[];
115
+ nameApproved: boolean;
116
+ userProfileFullName: string;
117
+ makeGolfScorecardsPrivate: boolean;
118
+ allowGolfLiveScoring: boolean;
119
+ allowGolfScoringByConnections: boolean;
120
+ userLevel: number;
121
+ userPoint: number;
122
+ levelUpdateDate: string;
123
+ levelIsViewed: boolean;
124
+ levelPointThreshold: number;
125
+ userPointOffset: number;
126
+ userPro: boolean;
127
+ }
128
+ export interface ISocialConnection {
129
+ userId: number;
130
+ displayName: GCUserHash;
131
+ fullName: string;
132
+ location: string;
133
+ profileImageUrlMedium: string;
134
+ profileImageUrlSmall: string;
135
+ userLevel: number;
136
+ connectionRequestId: number;
137
+ connectionRequestorId: number;
138
+ userConnectionStatus: number;
139
+ userRoles: string[];
140
+ profileVisibility: number;
141
+ deviceInvitations: unknown[];
142
+ nameApproved: boolean;
143
+ badgeVisibility: number;
144
+ userPro: boolean;
145
+ }
146
+ export interface ISocialConnections {
147
+ fullName: string;
148
+ userConnections: ISocialConnection[];
149
+ pagination: unknown;
150
+ }
151
+ export interface IBadgeSocialConnection {
152
+ userProfileId: GCUserProfileId;
153
+ fullName: string;
154
+ displayName: GCUserHash;
155
+ profileImageUrlMedium: string;
156
+ profileImageUrlSmall: string;
157
+ userLevel: number;
158
+ badgeEarnedDate: string;
159
+ }
160
+ export interface IBadgeRelated {
161
+ badgeId: GCBadgeId;
162
+ badgeKey: string;
163
+ badgeName: string;
164
+ badgeUuid: unknown;
165
+ badgeCategoryId: number;
166
+ badgeDifficultyId: number;
167
+ badgePoints: number;
168
+ badgeTypeIds: number[];
169
+ earnedByMe: boolean;
170
+ }
171
+ export interface IBadge {
172
+ badgeId: GCBadgeId;
173
+ badgeKey: string;
174
+ badgeName: string;
175
+ badgeUuid: unknown;
176
+ badgeCategoryId: number;
177
+ badgeDifficultyId: number;
178
+ badgePoints: number;
179
+ badgeTypeIds: number[];
180
+ badgeSeriesId: unknown;
181
+ badgeStartDate: string;
182
+ badgeEndDate: unknown;
183
+ userProfileId: number;
184
+ fullName: string;
185
+ displayName: string;
186
+ badgeEarnedDate: string;
187
+ badgeEarnedNumber: number;
188
+ badgeLimitCount: unknown;
189
+ badgeIsViewed: boolean;
190
+ badgeProgressValue: number;
191
+ badgeTargetValue: unknown;
192
+ badgeUnitId: unknown;
193
+ badgeAssocTypeId: number;
194
+ badgeAssocDataId: unknown;
195
+ badgeAssocDataName: unknown;
196
+ earnedByMe: boolean;
197
+ currentPlayerType: unknown;
198
+ userJoined: unknown;
199
+ badgeChallengeStatusId: unknown;
200
+ badgePromotionCodeType: unknown;
201
+ promotionCodeStatus: unknown;
202
+ createDate: string;
203
+ relatedBadges: IBadgeRelated[] | null;
204
+ connectionNumber: number;
205
+ connections: IBadgeSocialConnection[] | null;
206
+ }
207
+ export interface Gear {
208
+ gearPk: number;
209
+ uuid: string;
210
+ userProfilePk: number;
211
+ gearMakeName: string;
212
+ gearModelName: string;
213
+ gearTypeName: string;
214
+ gearStatusName: string;
215
+ displayName: string;
216
+ customMakeModel: string;
217
+ imageNameLarge: any;
218
+ imageNameMedium: any;
219
+ imageNameSmall: any;
220
+ dateBegin: string;
221
+ dateEnd: any;
222
+ maximumMeters: number;
223
+ notified: boolean;
224
+ createDate: string;
225
+ updateDate: string;
226
+ }
227
+ export interface IOauth1Consumer {
228
+ key: string;
229
+ secret: string;
230
+ }
231
+ export interface IOauth1 {
232
+ token: IOauth1Token;
233
+ oauth: OAuth;
234
+ }
235
+ export interface IGarminTokens {
236
+ oauth1: IOauth1Token;
237
+ oauth2: IOauth2Token;
238
+ }
239
+ export interface IOauth1Token {
240
+ oauth_token: string;
241
+ oauth_token_secret: string;
242
+ }
243
+ export interface IOauth2Token {
244
+ scope: string;
245
+ jti: string;
246
+ access_token: string;
247
+ token_type: string;
248
+ refresh_token: string;
249
+ expires_in: number;
250
+ refresh_token_expires_in: number;
251
+ expires_at: number;
252
+ refresh_token_expires_at: number;
253
+ last_update_date: string;
254
+ expires_date: string;
255
+ }
256
+ export interface IUserSettings {
257
+ id: number;
258
+ userData: IUserData;
259
+ userSleep: {
260
+ sleepTime: number;
261
+ defaultSleepTime: boolean;
262
+ wakeTime: number;
263
+ defaultWakeTime: boolean;
264
+ };
265
+ connectDate: unknown;
266
+ sourceType: unknown;
267
+ userSleepWindows: IUserSleepWindows[];
268
+ }
269
+ export interface IUserData {
270
+ gender: unknown;
271
+ weight: unknown;
272
+ height: unknown;
273
+ timeFormat: string;
274
+ birthDate: unknown;
275
+ measurementSystem: string;
276
+ activityLevel: unknown;
277
+ handedness: string;
278
+ powerFormat: {
279
+ formatId: number;
280
+ formatKey: string;
281
+ minFraction: number;
282
+ maxFraction: number;
283
+ groupingUsed: boolean;
284
+ displayFormat: unknown;
285
+ };
286
+ heartRateFormat: {
287
+ formatId: number;
288
+ formatKey: string;
289
+ minFraction: number;
290
+ maxFraction: number;
291
+ groupingUsed: boolean;
292
+ displayFormat: unknown;
293
+ };
294
+ firstDayOfWeek: {
295
+ dayId: number;
296
+ dayName: string;
297
+ sortOrder: number;
298
+ isPossibleFirstDay: boolean;
299
+ };
300
+ vo2MaxRunning: unknown;
301
+ vo2MaxCycling: unknown;
302
+ lactateThresholdSpeed: unknown;
303
+ lactateThresholdHeartRate: unknown;
304
+ diveNumber: unknown;
305
+ intensityMinutesCalcMethod: string;
306
+ moderateIntensityMinutesHrZone: number;
307
+ vigorousIntensityMinutesHrZone: number;
308
+ hydrationMeasurementUnit: string;
309
+ hydrationContainers: unknown[];
310
+ hydrationAutoGoalEnabled: boolean;
311
+ firstbeatMaxStressScore: unknown;
312
+ firstbeatCyclingLtTimestamp: unknown;
313
+ firstbeatRunningLtTimestamp: unknown;
314
+ thresholdHeartRateAutoDetected: unknown;
315
+ ftpAutoDetected: unknown;
316
+ trainingStatusPausedDate: unknown;
317
+ weatherLocation: {
318
+ useFixedLocation: unknown;
319
+ latitude: unknown;
320
+ longitude: unknown;
321
+ locationName: unknown;
322
+ isoCountryCode: unknown;
323
+ postalCode: unknown;
324
+ };
325
+ golfDistanceUnit: string;
326
+ golfElevationUnit: unknown;
327
+ golfSpeedUnit: unknown;
328
+ externalBottomTime: unknown;
329
+ }
330
+ export interface IUserSleepWindows {
331
+ sleepWindowFrequency: string;
332
+ startSleepTimeSecondsFromMidnight: number;
333
+ endSleepTimeSecondsFromMidnight: number;
334
+ }
335
+ export interface ICountActivities {
336
+ countOfActivities: number;
337
+ date: string;
338
+ stats: {
339
+ all: Record<string, any>;
340
+ };
341
+ }
342
+ export interface IWorkout {
343
+ workoutId?: number;
344
+ ownerId?: number;
345
+ workoutName: string;
346
+ description?: string;
347
+ updateDate: Date;
348
+ createdDate: Date;
349
+ sportType: ISportType;
350
+ trainingPlanId: null;
351
+ author: IAuthor;
352
+ estimatedDurationInSecs: number;
353
+ estimatedDistanceInMeters: null;
354
+ estimateType: null;
355
+ estimatedDistanceUnit: IUnit;
356
+ poolLength: number;
357
+ poolLengthUnit: IUnit;
358
+ workoutProvider: string;
359
+ workoutSourceId: string;
360
+ consumer: null;
361
+ atpPlanId: null;
362
+ workoutNameI18nKey: null;
363
+ descriptionI18nKey: null;
364
+ shared: boolean;
365
+ estimated: boolean;
366
+ }
367
+ export interface IWorkoutDetail extends IWorkout {
368
+ workoutSegments: IWorkoutSegment[];
369
+ }
370
+ export interface IScheduleWorkout {
371
+ workoutScheduleId: number;
372
+ workout: IWorkoutDetail;
373
+ calendarDate: string;
374
+ createdDate: string;
375
+ ownerId: number;
376
+ newName: any;
377
+ consumer: any;
378
+ atpPlanTypeId: any;
379
+ associatedActivityId: any;
380
+ priority: any;
381
+ associatedActivityDateTime: any;
382
+ itp: boolean;
383
+ race: boolean;
384
+ protected: boolean;
385
+ nameChanged: boolean;
386
+ }
387
+ export interface IAuthor {
388
+ userProfilePk: null;
389
+ displayName: null;
390
+ fullName: null;
391
+ profileImgNameLarge: null;
392
+ profileImgNameMedium: null;
393
+ profileImgNameSmall: null;
394
+ userPro: boolean;
395
+ vivokidUser: boolean;
396
+ }
397
+ export interface IUnit {
398
+ unitId: null;
399
+ unitKey: null;
400
+ factor: null;
401
+ }
402
+ export interface ISportType {
403
+ sportTypeId: number;
404
+ sportTypeKey: string;
405
+ displayOrder?: number;
406
+ }
407
+ export interface IWorkoutSegment {
408
+ segmentOrder: number;
409
+ sportType: ISportType;
410
+ workoutSteps: IWorkoutStep[];
411
+ }
412
+ export interface IWorkoutStep {
413
+ type: string;
414
+ stepId: number;
415
+ stepOrder: number;
416
+ stepType: IStepType;
417
+ childStepId: null;
418
+ description: null;
419
+ endCondition: IEndCondition;
420
+ endConditionValue: number | null;
421
+ preferredEndConditionUnit: IUnit | null;
422
+ endConditionCompare: null;
423
+ targetType: ITargetType;
424
+ targetValueOne: null;
425
+ targetValueTwo: null;
426
+ targetValueUnit: null;
427
+ zoneNumber: null;
428
+ secondaryTargetType: null;
429
+ secondaryTargetValueOne: null;
430
+ secondaryTargetValueTwo: null;
431
+ secondaryTargetValueUnit: null;
432
+ secondaryZoneNumber: null;
433
+ endConditionZone: null;
434
+ strokeType: IStrokeType;
435
+ equipmentType: IEquipmentType;
436
+ category: null;
437
+ exerciseName: null;
438
+ workoutProvider: null;
439
+ providerExerciseSourceId: null;
440
+ weightValue: null;
441
+ weightUnit: null;
442
+ }
443
+ export interface IEndCondition {
444
+ conditionTypeId: number;
445
+ conditionTypeKey: string;
446
+ displayOrder: number;
447
+ displayable: boolean;
448
+ }
449
+ export interface IEquipmentType {
450
+ equipmentTypeId: number;
451
+ equipmentTypeKey: null;
452
+ displayOrder: number;
453
+ }
454
+ export interface IStepType {
455
+ stepTypeId: number;
456
+ stepTypeKey: string;
457
+ displayOrder: number;
458
+ }
459
+ export interface IStrokeType {
460
+ strokeTypeId: number;
461
+ strokeTypeKey: null;
462
+ displayOrder: number;
463
+ }
464
+ export interface ITargetType {
465
+ workoutTargetTypeId: number;
466
+ workoutTargetTypeKey: string;
467
+ displayOrder: number;
468
+ }
469
+ export interface IDailyStepsType {
470
+ calendarDate: string;
471
+ stepGoal: number;
472
+ totalDistance: number;
473
+ totalSteps: number;
474
+ }
475
+ export interface ICalendar {
476
+ startDayOfMonth: number;
477
+ numOfDaysInMonth: number;
478
+ numOfDaysInPrevMonth: number;
479
+ month: number;
480
+ year: number;
481
+ calendarItems: ICalendarItem[];
482
+ }
483
+ export interface ICalendarItem {
484
+ id?: number;
485
+ groupId: any;
486
+ trainingPlanId?: number;
487
+ itemType: string;
488
+ activityTypeId?: number;
489
+ wellnessActivityUuid?: string;
490
+ title?: string;
491
+ date: string;
492
+ duration?: number;
493
+ distance?: number;
494
+ calories?: number;
495
+ floorsClimbed: any;
496
+ avgRespirationRate?: number;
497
+ unitOfPoolLength: any;
498
+ weight?: number;
499
+ difference?: number;
500
+ courseId: any;
501
+ courseName: any;
502
+ sportTypeKey?: string;
503
+ url: any;
504
+ isStart: any;
505
+ isRace?: boolean;
506
+ recurrenceId: any;
507
+ isParent?: boolean;
508
+ parentId: any;
509
+ userBadgeId: any;
510
+ badgeCategoryTypeId: any;
511
+ badgeCategoryTypeDesc: any;
512
+ badgeAwardedDate: any;
513
+ badgeViewed: any;
514
+ hideBadge: any;
515
+ startTimestampLocal?: string;
516
+ eventTimeLocal?: EventTimeLocal;
517
+ diveNumber: any;
518
+ maxDepth: any;
519
+ avgDepth: any;
520
+ surfaceInterval: any;
521
+ elapsedDuration?: number;
522
+ lapCount?: number;
523
+ bottomTime: any;
524
+ atpPlanId: any;
525
+ workoutId?: number;
526
+ protectedWorkoutSchedule: boolean;
527
+ activeSets?: number;
528
+ strokes: any;
529
+ noOfSplits?: number;
530
+ maxGradeValue: any;
531
+ totalAscent?: number;
532
+ differenceStress: any;
533
+ climbDuration?: number;
534
+ maxSpeed?: number;
535
+ averageHR?: number;
536
+ activeSplitSummaryDuration?: number;
537
+ maxSplitDistance?: number;
538
+ maxSplitSpeed?: number;
539
+ location?: string;
540
+ shareableEventUuid?: string;
541
+ splitSummaryMode: any;
542
+ completionTarget?: CompletionTarget;
543
+ shareableEvent: boolean;
544
+ primaryEvent?: boolean;
545
+ phasedTrainingPlan?: boolean;
546
+ subscribed?: boolean;
547
+ autoCalcCalories?: boolean;
548
+ decoDive?: boolean;
549
+ }
550
+ export interface EventTimeLocal {
551
+ startTimeHhMm: string;
552
+ timeZoneId: string;
553
+ }
554
+ export interface CompletionTarget {
555
+ value: number;
556
+ unit: string;
557
+ unitType: string;
558
+ }