hevy-shared 1.0.583 → 1.0.585
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/built/index.d.ts +9 -0
- package/built/index.js +4 -2
- package/built/notifications.d.ts +24 -5
- package/package.json +1 -1
package/built/index.d.ts
CHANGED
|
@@ -739,6 +739,7 @@ export interface WorkoutComment {
|
|
|
739
739
|
like_count: number;
|
|
740
740
|
is_liked_by_user: boolean;
|
|
741
741
|
parent_comment_id?: number;
|
|
742
|
+
replying_to_comment_id?: number;
|
|
742
743
|
}
|
|
743
744
|
export interface WorkoutImage {
|
|
744
745
|
type: 'image';
|
|
@@ -1635,3 +1636,11 @@ export interface GoogleCoachWebSignInRequest {
|
|
|
1635
1636
|
code: string;
|
|
1636
1637
|
invite_short_id?: string;
|
|
1637
1638
|
}
|
|
1639
|
+
export interface UserPushNotificationSettings {
|
|
1640
|
+
comment_replies: boolean;
|
|
1641
|
+
comment_likes: boolean;
|
|
1642
|
+
}
|
|
1643
|
+
export interface UserPushNotificationSettingsUpdate {
|
|
1644
|
+
comment_replies?: boolean;
|
|
1645
|
+
comment_likes?: boolean;
|
|
1646
|
+
}
|
package/built/index.js
CHANGED
|
@@ -229,8 +229,10 @@ const isWorkoutBiometrics = (x) => {
|
|
|
229
229
|
return false;
|
|
230
230
|
const maybeCalories = x.total_calories;
|
|
231
231
|
const maybeHeartRateSamples = x.heart_rate_samples;
|
|
232
|
-
const caloriesAreValid =
|
|
233
|
-
|
|
232
|
+
const caloriesAreValid = maybeCalories === undefined ||
|
|
233
|
+
(typeof maybeCalories === 'number' && maybeCalories >= 0);
|
|
234
|
+
const heartSamplesAreValid = maybeHeartRateSamples === undefined ||
|
|
235
|
+
(0, exports.isHeartRateSamples)(maybeHeartRateSamples);
|
|
234
236
|
return caloriesAreValid && heartSamplesAreValid;
|
|
235
237
|
};
|
|
236
238
|
exports.isWorkoutBiometrics = isWorkoutBiometrics;
|
package/built/notifications.d.ts
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { ClientsCoachData, Program } from '.';
|
|
9
9
|
import { HevyChatUpdateMobilePushData } from './chat';
|
|
10
|
-
export type Notification = WorkoutCompleteNotification | WorkoutMentionNotification | WorkoutCommentNotification | WorkoutCommentReplyNotification |
|
|
11
|
-
export type NotificationType = 'workout-complete' | 'workout-mention' | 'workout-comment' | 'workout-comment-reply' | 'workout-comment-
|
|
10
|
+
export type Notification = WorkoutCompleteNotification | WorkoutMentionNotification | WorkoutCommentNotification | WorkoutCommentMentionNotification | WorkoutCommentReplyNotification | WorkoutCommentDiscussionNotification | WorkoutLikeNotification | WorkoutCommentLikeNotification | FollowNotification | FollowRequestNotification | AcceptFollowRequestNotification | CoachClientInviteNotification | ContactOnHevyNotification;
|
|
11
|
+
export type NotificationType = 'workout-complete' | 'workout-mention' | 'workout-comment' | 'workout-comment-mention' | 'workout-comment-reply' | 'workout-comment-reply-v2' | 'workout-like' | 'workout-comment-like' | 'follow' | 'follow-request' | 'accept-follow-request' | 'coach-client-invite' | 'contact-on-hevy';
|
|
12
12
|
export interface BaseNotification {
|
|
13
13
|
id: number;
|
|
14
14
|
type: NotificationType;
|
|
@@ -48,13 +48,13 @@ export interface WorkoutCommentNotification extends BaseNotification {
|
|
|
48
48
|
export interface WorkoutCommentMobilePushData extends BaseMobilePushData {
|
|
49
49
|
type: 'workout-comment';
|
|
50
50
|
}
|
|
51
|
-
export interface
|
|
51
|
+
export interface WorkoutCommentDiscussionNotification extends BaseNotification {
|
|
52
52
|
type: 'workout-comment-reply';
|
|
53
53
|
workout_id: string;
|
|
54
54
|
workout_title: string;
|
|
55
55
|
comment: string;
|
|
56
56
|
}
|
|
57
|
-
export interface
|
|
57
|
+
export interface WorkoutCommentDiscussionMobilePushData extends BaseMobilePushData {
|
|
58
58
|
type: 'workout-comment-reply';
|
|
59
59
|
}
|
|
60
60
|
export interface WorkoutCommentMentionNotification extends BaseNotification {
|
|
@@ -66,6 +66,15 @@ export interface WorkoutCommentMentionNotification extends BaseNotification {
|
|
|
66
66
|
export interface WorkoutCommentMentionMobilePushData extends BaseMobilePushData {
|
|
67
67
|
type: 'workout-comment-mention';
|
|
68
68
|
}
|
|
69
|
+
export interface WorkoutCommentReplyNotification extends BaseNotification {
|
|
70
|
+
type: 'workout-comment-reply-v2';
|
|
71
|
+
workout_id: string;
|
|
72
|
+
workout_title: string;
|
|
73
|
+
comment: string;
|
|
74
|
+
}
|
|
75
|
+
export interface WorkoutCommentReplyMobilePushData extends BaseMobilePushData {
|
|
76
|
+
type: 'workout-comment-reply-v2';
|
|
77
|
+
}
|
|
69
78
|
export interface WorkoutLikeNotification extends BaseNotification {
|
|
70
79
|
type: 'workout-like';
|
|
71
80
|
workout_id: string;
|
|
@@ -74,6 +83,16 @@ export interface WorkoutLikeNotification extends BaseNotification {
|
|
|
74
83
|
export interface WorkoutLikeMobilePushData extends BaseMobilePushData {
|
|
75
84
|
type: 'workout-like';
|
|
76
85
|
}
|
|
86
|
+
export interface WorkoutCommentLikeNotification extends BaseNotification {
|
|
87
|
+
type: 'workout-comment-like';
|
|
88
|
+
workout_id: string;
|
|
89
|
+
workout_title: string;
|
|
90
|
+
comment_id: number;
|
|
91
|
+
comment: string;
|
|
92
|
+
}
|
|
93
|
+
export interface WorkoutCommentLikeMobilePushData extends BaseMobilePushData {
|
|
94
|
+
type: 'workout-comment-like';
|
|
95
|
+
}
|
|
77
96
|
export interface FollowNotification extends BaseNotification {
|
|
78
97
|
type: 'follow';
|
|
79
98
|
}
|
|
@@ -173,4 +192,4 @@ export interface MonthlyReportMobilePushData extends BaseMobilePushData {
|
|
|
173
192
|
type: 'monthly-report';
|
|
174
193
|
deeplink: string;
|
|
175
194
|
}
|
|
176
|
-
export type MobilePushData = ChatUpdateMobilePushData | SyncCustomExercisesAndCoachCustomizationsMobilePushData | SyncRoutineFoldersMobilePushData | SyncRoutinesMobilePushData | ProStatusChangedPushMobilePushData | HevyProSubscriptionRenewedMobilePushData | CoachProgramChangedMobilePushData | CoachDataChangedMobilePushData | ContactOnHevyMobilePushData | CoachClientInviteMobilePushData | AcceptFollowRequestMobilePushData | FollowRequestMobilePushData | FollowMobilePushData | WorkoutLikeMobilePushData | WorkoutCommentMentionMobilePushData | WorkoutCommentReplyMobilePushData | WorkoutCommentMobilePushData | WorkoutMentionMobilePushData | WorkoutCompleteMobilePushData | CoachProgramFinishesNextWeekMobilePushData | CoachProgramStartsTodayMobilePushData | CoachLoggedYourWorkoutMobilePushData | CoachLoggedYourMeasurementsMobilePushData | MonthlyReportMobilePushData;
|
|
195
|
+
export type MobilePushData = ChatUpdateMobilePushData | SyncCustomExercisesAndCoachCustomizationsMobilePushData | SyncRoutineFoldersMobilePushData | SyncRoutinesMobilePushData | ProStatusChangedPushMobilePushData | HevyProSubscriptionRenewedMobilePushData | CoachProgramChangedMobilePushData | CoachDataChangedMobilePushData | ContactOnHevyMobilePushData | CoachClientInviteMobilePushData | AcceptFollowRequestMobilePushData | FollowRequestMobilePushData | FollowMobilePushData | WorkoutLikeMobilePushData | WorkoutCommentLikeMobilePushData | WorkoutCommentMentionMobilePushData | WorkoutCommentDiscussionMobilePushData | WorkoutCommentReplyMobilePushData | WorkoutCommentMobilePushData | WorkoutMentionMobilePushData | WorkoutCompleteMobilePushData | CoachProgramFinishesNextWeekMobilePushData | CoachProgramStartsTodayMobilePushData | CoachLoggedYourWorkoutMobilePushData | CoachLoggedYourMeasurementsMobilePushData | MonthlyReportMobilePushData;
|