@sunsteel/contracts 0.41.0 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -22,6 +22,11 @@ var index_exports = {};
22
22
  __export(index_exports, {
23
23
  ACHIEVEMENT_CATEGORIES: () => ACHIEVEMENT_CATEGORIES,
24
24
  ACHIEVEMENT_DEFINITIONS: () => ACHIEVEMENT_DEFINITIONS,
25
+ COMEBACK_MIN_INACTIVE_DAYS: () => COMEBACK_MIN_INACTIVE_DAYS,
26
+ COMEBACK_RECOGNITION_LIMIT: () => COMEBACK_RECOGNITION_LIMIT,
27
+ COMEBACK_REQUIRED_ACTIVE_DAYS: () => COMEBACK_REQUIRED_ACTIVE_DAYS,
28
+ COMEBACK_SESSION_LOOKBACK: () => COMEBACK_SESSION_LOOKBACK,
29
+ COMEBACK_WINDOW_DAYS: () => COMEBACK_WINDOW_DAYS,
25
30
  EXERCISE_EQUIPMENT: () => EXERCISE_EQUIPMENT,
26
31
  EXERCISE_MECHANICS: () => EXERCISE_MECHANICS,
27
32
  FOLLOW_SUGGESTIONS_DEFAULT_LIMIT: () => FOLLOW_SUGGESTIONS_DEFAULT_LIMIT,
@@ -32,6 +37,10 @@ __export(index_exports, {
32
37
  MEASURABLE_GOAL_TYPES: () => MEASURABLE_GOAL_TYPES,
33
38
  MOVEMENT_PATTERNS: () => MOVEMENT_PATTERNS,
34
39
  MUSCLE_GROUPS: () => MUSCLE_GROUPS,
40
+ NOTIFICATIONS_LIST_LIMIT: () => NOTIFICATIONS_LIST_LIMIT,
41
+ NOTIFICATIONS_LOOKBACK_DAYS: () => NOTIFICATIONS_LOOKBACK_DAYS,
42
+ NOTIFICATIONS_RETENTION_DAYS: () => NOTIFICATIONS_RETENTION_DAYS,
43
+ NOTIFICATION_KINDS: () => NOTIFICATION_KINDS,
35
44
  PLATEAU_MIN_DAYS_SINCE_BEST: () => PLATEAU_MIN_DAYS_SINCE_BEST,
36
45
  PLATEAU_MIN_SESSIONS: () => PLATEAU_MIN_SESSIONS,
37
46
  PLATEAU_MIN_SESSIONS_MAX: () => PLATEAU_MIN_SESSIONS_MAX,
@@ -358,6 +367,11 @@ var RENAISSANCE_RANK_DEFINITIONS = [
358
367
  minimumActiveWeeks: 52
359
368
  }
360
369
  ];
370
+ var COMEBACK_MIN_INACTIVE_DAYS = 14;
371
+ var COMEBACK_REQUIRED_ACTIVE_DAYS = 3;
372
+ var COMEBACK_WINDOW_DAYS = 14;
373
+ var COMEBACK_SESSION_LOOKBACK = 500;
374
+ var COMEBACK_RECOGNITION_LIMIT = 20;
361
375
 
362
376
  // src/routine.ts
363
377
  var ROUTINE_SCHEDULE_MODES = ["WEEKLY", "ROTATION"];
@@ -428,10 +442,25 @@ var PLATEAU_MIN_DAYS_SINCE_BEST = 21;
428
442
  var PLATEAU_RECENT_DAYS = 21;
429
443
  var PLATEAU_MIN_SESSIONS_MIN = 3;
430
444
  var PLATEAU_MIN_SESSIONS_MAX = 8;
445
+
446
+ // src/notifications.ts
447
+ var NOTIFICATION_KINDS = [
448
+ "ACHIEVEMENT",
449
+ "SESSION_PROGRESS",
450
+ "NEW_FOLLOWER"
451
+ ];
452
+ var NOTIFICATIONS_LOOKBACK_DAYS = 30;
453
+ var NOTIFICATIONS_RETENTION_DAYS = 90;
454
+ var NOTIFICATIONS_LIST_LIMIT = 50;
431
455
  // Annotate the CommonJS export names for ESM import in node:
432
456
  0 && (module.exports = {
433
457
  ACHIEVEMENT_CATEGORIES,
434
458
  ACHIEVEMENT_DEFINITIONS,
459
+ COMEBACK_MIN_INACTIVE_DAYS,
460
+ COMEBACK_RECOGNITION_LIMIT,
461
+ COMEBACK_REQUIRED_ACTIVE_DAYS,
462
+ COMEBACK_SESSION_LOOKBACK,
463
+ COMEBACK_WINDOW_DAYS,
435
464
  EXERCISE_EQUIPMENT,
436
465
  EXERCISE_MECHANICS,
437
466
  FOLLOW_SUGGESTIONS_DEFAULT_LIMIT,
@@ -442,6 +471,10 @@ var PLATEAU_MIN_SESSIONS_MAX = 8;
442
471
  MEASURABLE_GOAL_TYPES,
443
472
  MOVEMENT_PATTERNS,
444
473
  MUSCLE_GROUPS,
474
+ NOTIFICATIONS_LIST_LIMIT,
475
+ NOTIFICATIONS_LOOKBACK_DAYS,
476
+ NOTIFICATIONS_RETENTION_DAYS,
477
+ NOTIFICATION_KINDS,
445
478
  PLATEAU_MIN_DAYS_SINCE_BEST,
446
479
  PLATEAU_MIN_SESSIONS,
447
480
  PLATEAU_MIN_SESSIONS_MAX,
package/dist/index.d.cts CHANGED
@@ -1097,6 +1097,35 @@ interface AchievementCategoryProgress {
1097
1097
  nextMilestone: AchievementDefinition | null;
1098
1098
  remaining: number;
1099
1099
  }
1100
+ /**
1101
+ * ACH-05 recognises a return only after the athlete has rebuilt a small,
1102
+ * recovery-compatible pattern. The break is counted as full local calendar
1103
+ * days without a completed session; repeated sessions on one date count once.
1104
+ */
1105
+ declare const COMEBACK_MIN_INACTIVE_DAYS = 14;
1106
+ declare const COMEBACK_REQUIRED_ACTIVE_DAYS = 3;
1107
+ declare const COMEBACK_WINDOW_DAYS = 14;
1108
+ declare const COMEBACK_SESSION_LOOKBACK = 500;
1109
+ declare const COMEBACK_RECOGNITION_LIMIT = 20;
1110
+ interface ComebackRecognition {
1111
+ id: string;
1112
+ inactiveDays: number;
1113
+ returnedAt: IsoDateString;
1114
+ recognizedAt: IsoDateString;
1115
+ sourceSessionId: string;
1116
+ activeDays: number;
1117
+ /** Inclusive local-calendar span from the return through recognition. */
1118
+ windowDays: number;
1119
+ }
1120
+ interface ComebackRecognitionSummary {
1121
+ minimumInactiveDays: number;
1122
+ requiredActiveDays: number;
1123
+ windowDays: number;
1124
+ /** Most recent first, capped by COMEBACK_RECOGNITION_LIMIT. */
1125
+ recognitions: ComebackRecognition[];
1126
+ /** True when older completed-session events fell outside the bounded scan. */
1127
+ historyTruncated: boolean;
1128
+ }
1100
1129
  /** Stable successful response of GET /achievements. */
1101
1130
  interface AchievementsResponse {
1102
1131
  analyticsReady: boolean;
@@ -1105,6 +1134,7 @@ interface AchievementsResponse {
1105
1134
  achievements: EarnedAchievement[];
1106
1135
  rank: RenaissanceRankProgress | null;
1107
1136
  milestoneProgress: AchievementCategoryProgress[];
1137
+ comeback: ComebackRecognitionSummary | null;
1108
1138
  }
1109
1139
 
1110
1140
  /**
@@ -1346,4 +1376,71 @@ interface SkipOccurrenceRequest {
1346
1376
  date: CalendarDate;
1347
1377
  }
1348
1378
 
1349
- export { ACHIEVEMENT_CATEGORIES, ACHIEVEMENT_DEFINITIONS, type AchievementCategory, type AchievementCategoryProgress, type AchievementDefinition, type AchievementUnlockedEventPayload, type AchievementsResponse, type Brand, type CalendarDate, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateRoutineVersionRequest, type CreateSessionShareRequest, EXERCISE_EQUIPMENT, EXERCISE_MECHANICS, type EarnedAchievement, type EarnedPersonalRecord, type Exercise, type ExerciseEquipment, type ExerciseId, type ExerciseMechanic, type ExercisePerformanceHistoryQuery, type ExercisePerformanceHistoryResponse, type ExercisePerformancePrescription, type ExercisePerformancePrescriptionSet, type ExercisePerformanceSession, type ExercisePerformanceSet, type ExercisePerformanceSummary, type ExercisePlateau, type ExerciseStrengthSummary, type ExerciseStrengthTrendPoint, type ExerciseStrengthTrendQuery, type ExerciseStrengthTrendResponse, FOLLOW_SUGGESTIONS_DEFAULT_LIMIT, FOLLOW_SUGGESTIONS_MAX_LIMIT, FOLLOW_SUGGESTION_REASONS, type FinishStatus, type FinishWorkoutRequest, type FinishWorkoutResponse, type FollowSuggestion, type FollowSuggestionReason, type FollowSuggestionsResponse, type IsoDateString, type ListSessionsParams, MEASURABLE_GOALS_MAX, MEASURABLE_GOAL_DIRECTIONS, MEASURABLE_GOAL_TYPES, MOVEMENT_PATTERNS, MUSCLE_GROUPS, type MeasurableGoal, type MeasurableGoalDirection, type MeasurableGoalExercise, type MeasurableGoalInput, type MeasurableGoalType, type MoveOccurrenceRequest, type MovementPattern, type MuscleGroup, type MuscleGroupHeatmapQuery, type MuscleGroupHeatmapResponse, type MuscleGroupHeatmapValue, type MuscleGroupHeatmapWeek, type MuscleVolumeTrendSeries, PLATEAU_MIN_DAYS_SINCE_BEST, PLATEAU_MIN_SESSIONS, PLATEAU_MIN_SESSIONS_MAX, PLATEAU_MIN_SESSIONS_MIN, PLATEAU_RECENT_DAYS, PLATEAU_WINDOW_DAYS, PREFERRED_TRAINING_STYLE_VALUES, PROFILE_BIO_MAX_LENGTH, PROFILE_FAVORITE_EXERCISES_MAX, PROFILE_LOCATION_MAX_LENGTH, PROFILE_TRAINING_DISCIPLINES_MAX, PROFILE_TRAINING_GOALS_MAX, PROFILE_VISIBILITY_VALUES, PROGRESSION_SCHEMES, PROGRESS_TIMELINE_EVENT_TYPES, type PaginatedResponse, type PersonalGoalProgress, type PersonalGoalsResponse, type PersonalRecordEntry, type PersonalRecordKind, type PlatePairInventory, type PlateauPreferences, type PlateauSet, type PlateausResponse, type PreferredTrainingStyle, type PreviousPerformanceResponse, type PreviousSessionRecap, type PreviousSetPerformance, type ProfileDiscoverySettings, type ProfileFavoriteExercise, type ProfilePrivacySettings, type ProfileViewerAccess, type ProfileVisibility, type ProgressTimelineEventType, type ProgressTimelineItem, type ProgressTimelinePersonalRecordItem, type ProgressTimelineProgressionItem, type ProgressTimelineQuery, type ProgressTimelineRecordPerformance, type ProgressTimelineRecordReason, type ProgressTimelineResponse, type ProgressTimelineSessionContext, type ProgressionChange, type ProgressionRule, type ProgressionScheme, type ProgressionSetChange, type PublicBodyMetrics, type PublicTrainingSummary, type PublicUserProfile, RELATIONSHIP_LIST_DEFAULT_LIMIT, RELATIONSHIP_LIST_KINDS, RELATIONSHIP_LIST_MAX_LIMIT, RENAISSANCE_RANK_DEFINITIONS, REP_TYPES, RESERVED_USERNAMES, ROUTINE_DAYS_MAX, ROUTINE_DAY_NAME_MAX, ROUTINE_SCHEDULE_MODES, ROUTINE_VERSIONS_MAX, ROUTINE_VERSION_KINDS, ROUTINE_VERSION_NAME_MAX, type RecentActivityEntry, type RelationshipListKind, type RelationshipListQuery, type RelationshipListResponse, type RelationshipMember, type RenaissanceRankDefinition, type RenaissanceRankProgress, type RepType, type ReplaceMeasurableGoalsRequest, type ReplaceTrainingLocationsRequest, type RestoreRoutineVersionResponse, type Routine, type RoutineDay, type RoutineDayId, type RoutineExercise, type RoutineId, type RoutineScheduleMode, type RoutineSet, type RoutineVersion, type RoutineVersionDay, type RoutineVersionExercise, type RoutineVersionKind, type RoutineVersionSetup, type RoutineVersionsResponse, SCHEDULE_MOVE_MAX_DAYS, SCHEDULE_OVERRIDES_MAX_RANGE_DAYS, SCHEDULE_OVERRIDE_KINDS, SCHEDULE_SKIP_PAST_DAYS, SESSION_SHARE_DEFAULT_FIELDS, SESSION_SHARE_FIELDS, SESSION_SHARE_MAX_ACTIVE_LINKS, SEXES, STARRED_EXERCISES_MAX, type ScheduleOverride, type ScheduleOverrideKind, type ScheduleOverridesQuery, type ScheduleOverridesResponse, type SessionComparisonExercise, type SessionComparisonQuery, type SessionComparisonResponse, type SessionComparisonRoutineDay, type SessionComparisonSession, type SessionComparisonSet, type SessionExerciseSubstitution, type SessionRecapRecord, type SessionShare, type SessionShareField, type SessionShareListResponse, type SetAccountTimeZoneRequest, type SetLog, type Sex, type SharedSessionOwner, type SharedSessionRecap, type SkipOccurrenceRequest, type StarredExercise, type StarredExercisesResponse, type StartWorkoutRequest, type StartWorkoutResponse, type StreakMilestoneEventPayload, type SubstituteSessionExerciseRequest, type SubstituteSessionExerciseResponse, type SupabaseAuthResponse, type SupabaseAuthUser, type SupabaseMigrationResponse, TRAINING_DISCIPLINE_VALUES, TRAINING_EVENT_TYPES, TRAINING_EXPERIENCE_LEVEL_VALUES, TRAINING_GOAL_VALUES, type TrainingDiscipline, type TrainingEventType, type TrainingExperienceLevel, type TrainingGoal, type TrainingIdentity, type TrainingLocationPreference, type TrainingLocationPreferenceInput, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, USERNAME_PATTERN_SOURCE, type UpdateProfileDiscoveryRequest, type UpdateProfilePrivacyRequest, type UpdateProfileRequest, type UpdateRoutineRequest, type UpsertSetLogRequest, type UpsertSetLogResponse, type UserId, type UserProfile, type UserSearchResponse, type VolumeTrendPoint, type VolumeTrendQuery, type VolumeTrendResponse, type VolumeTrendSeries, WEIGHT_UNITS, WORKOUT_SESSION_STATUSES, type WeightUnit, type WorkoutAnalyticsStatus, type WorkoutProgressQuery, type WorkoutProgressResponse, type WorkoutSession, type WorkoutSessionId, type WorkoutSessionListResponse, type WorkoutSessionRecap, type WorkoutSessionSnapshotV1, type WorkoutSessionStatus, type WorkoutSessionSummary, type WorkoutStatsQuery, type WorkoutStatsResponse, routineDayLabel };
1379
+ /**
1380
+ * What a stored notification announces. Each one is gathered from a record
1381
+ * that already exists: an achievement earned live (never one recognized from
1382
+ * history), a finished session that set records or changed loads, and a new
1383
+ * follower.
1384
+ */
1385
+ declare const NOTIFICATION_KINDS: readonly ["ACHIEVEMENT", "SESSION_PROGRESS", "NEW_FOLLOWER"];
1386
+ type NotificationKind = (typeof NOTIFICATION_KINDS)[number];
1387
+ /** Sources older than this many days are never gathered. */
1388
+ declare const NOTIFICATIONS_LOOKBACK_DAYS = 30;
1389
+ /** Notifications are kept this many days, then removed. */
1390
+ declare const NOTIFICATIONS_RETENTION_DAYS = 90;
1391
+ /** The list returns at most this many, newest first. */
1392
+ declare const NOTIFICATIONS_LIST_LIMIT = 50;
1393
+ interface NotificationBase {
1394
+ id: string;
1395
+ /** When the announced thing happened, not when it was gathered. */
1396
+ createdAt: IsoDateString;
1397
+ readAt: IsoDateString | null;
1398
+ }
1399
+ interface AchievementNotification extends NotificationBase {
1400
+ kind: 'ACHIEVEMENT';
1401
+ achievement: {
1402
+ id: string;
1403
+ title: string;
1404
+ description: string;
1405
+ };
1406
+ }
1407
+ interface SessionProgressNotification extends NotificationBase {
1408
+ kind: 'SESSION_PROGRESS';
1409
+ session: {
1410
+ id: string;
1411
+ routineName: string;
1412
+ dayName: string | null;
1413
+ /** Exercises with a new personal record in the session. */
1414
+ recordCount: number;
1415
+ /** Exercises whose next prescription the session changed. */
1416
+ progressionCount: number;
1417
+ };
1418
+ }
1419
+ interface NewFollowerNotification extends NotificationBase {
1420
+ kind: 'NEW_FOLLOWER';
1421
+ actor: {
1422
+ id: string;
1423
+ username: string;
1424
+ name: string;
1425
+ lastName: string | null;
1426
+ avatarUrl: string | null;
1427
+ /** Whether the recipient follows them back now. */
1428
+ isFollowedByMe: boolean;
1429
+ };
1430
+ }
1431
+ /** Named to stay clear of the DOM's `Notification`. */
1432
+ type AppNotification = AchievementNotification | SessionProgressNotification | NewFollowerNotification;
1433
+ /** GET /notifications */
1434
+ interface NotificationsResponse {
1435
+ notifications: AppNotification[];
1436
+ unreadCount: number;
1437
+ }
1438
+ /** POST /notifications/read. Without ids, every notification is marked read. */
1439
+ interface MarkNotificationsReadRequest {
1440
+ ids?: string[];
1441
+ }
1442
+ interface MarkNotificationsReadResponse {
1443
+ unreadCount: number;
1444
+ }
1445
+
1446
+ export { ACHIEVEMENT_CATEGORIES, ACHIEVEMENT_DEFINITIONS, type AchievementCategory, type AchievementCategoryProgress, type AchievementDefinition, type AchievementNotification, type AchievementUnlockedEventPayload, type AchievementsResponse, type AppNotification, type Brand, COMEBACK_MIN_INACTIVE_DAYS, COMEBACK_RECOGNITION_LIMIT, COMEBACK_REQUIRED_ACTIVE_DAYS, COMEBACK_SESSION_LOOKBACK, COMEBACK_WINDOW_DAYS, type CalendarDate, type ComebackRecognition, type ComebackRecognitionSummary, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateRoutineVersionRequest, type CreateSessionShareRequest, EXERCISE_EQUIPMENT, EXERCISE_MECHANICS, type EarnedAchievement, type EarnedPersonalRecord, type Exercise, type ExerciseEquipment, type ExerciseId, type ExerciseMechanic, type ExercisePerformanceHistoryQuery, type ExercisePerformanceHistoryResponse, type ExercisePerformancePrescription, type ExercisePerformancePrescriptionSet, type ExercisePerformanceSession, type ExercisePerformanceSet, type ExercisePerformanceSummary, type ExercisePlateau, type ExerciseStrengthSummary, type ExerciseStrengthTrendPoint, type ExerciseStrengthTrendQuery, type ExerciseStrengthTrendResponse, FOLLOW_SUGGESTIONS_DEFAULT_LIMIT, FOLLOW_SUGGESTIONS_MAX_LIMIT, FOLLOW_SUGGESTION_REASONS, type FinishStatus, type FinishWorkoutRequest, type FinishWorkoutResponse, type FollowSuggestion, type FollowSuggestionReason, type FollowSuggestionsResponse, type IsoDateString, type ListSessionsParams, MEASURABLE_GOALS_MAX, MEASURABLE_GOAL_DIRECTIONS, MEASURABLE_GOAL_TYPES, MOVEMENT_PATTERNS, MUSCLE_GROUPS, type MarkNotificationsReadRequest, type MarkNotificationsReadResponse, type MeasurableGoal, type MeasurableGoalDirection, type MeasurableGoalExercise, type MeasurableGoalInput, type MeasurableGoalType, type MoveOccurrenceRequest, type MovementPattern, type MuscleGroup, type MuscleGroupHeatmapQuery, type MuscleGroupHeatmapResponse, type MuscleGroupHeatmapValue, type MuscleGroupHeatmapWeek, type MuscleVolumeTrendSeries, NOTIFICATIONS_LIST_LIMIT, NOTIFICATIONS_LOOKBACK_DAYS, NOTIFICATIONS_RETENTION_DAYS, NOTIFICATION_KINDS, type NewFollowerNotification, type NotificationKind, type NotificationsResponse, PLATEAU_MIN_DAYS_SINCE_BEST, PLATEAU_MIN_SESSIONS, PLATEAU_MIN_SESSIONS_MAX, PLATEAU_MIN_SESSIONS_MIN, PLATEAU_RECENT_DAYS, PLATEAU_WINDOW_DAYS, PREFERRED_TRAINING_STYLE_VALUES, PROFILE_BIO_MAX_LENGTH, PROFILE_FAVORITE_EXERCISES_MAX, PROFILE_LOCATION_MAX_LENGTH, PROFILE_TRAINING_DISCIPLINES_MAX, PROFILE_TRAINING_GOALS_MAX, PROFILE_VISIBILITY_VALUES, PROGRESSION_SCHEMES, PROGRESS_TIMELINE_EVENT_TYPES, type PaginatedResponse, type PersonalGoalProgress, type PersonalGoalsResponse, type PersonalRecordEntry, type PersonalRecordKind, type PlatePairInventory, type PlateauPreferences, type PlateauSet, type PlateausResponse, type PreferredTrainingStyle, type PreviousPerformanceResponse, type PreviousSessionRecap, type PreviousSetPerformance, type ProfileDiscoverySettings, type ProfileFavoriteExercise, type ProfilePrivacySettings, type ProfileViewerAccess, type ProfileVisibility, type ProgressTimelineEventType, type ProgressTimelineItem, type ProgressTimelinePersonalRecordItem, type ProgressTimelineProgressionItem, type ProgressTimelineQuery, type ProgressTimelineRecordPerformance, type ProgressTimelineRecordReason, type ProgressTimelineResponse, type ProgressTimelineSessionContext, type ProgressionChange, type ProgressionRule, type ProgressionScheme, type ProgressionSetChange, type PublicBodyMetrics, type PublicTrainingSummary, type PublicUserProfile, RELATIONSHIP_LIST_DEFAULT_LIMIT, RELATIONSHIP_LIST_KINDS, RELATIONSHIP_LIST_MAX_LIMIT, RENAISSANCE_RANK_DEFINITIONS, REP_TYPES, RESERVED_USERNAMES, ROUTINE_DAYS_MAX, ROUTINE_DAY_NAME_MAX, ROUTINE_SCHEDULE_MODES, ROUTINE_VERSIONS_MAX, ROUTINE_VERSION_KINDS, ROUTINE_VERSION_NAME_MAX, type RecentActivityEntry, type RelationshipListKind, type RelationshipListQuery, type RelationshipListResponse, type RelationshipMember, type RenaissanceRankDefinition, type RenaissanceRankProgress, type RepType, type ReplaceMeasurableGoalsRequest, type ReplaceTrainingLocationsRequest, type RestoreRoutineVersionResponse, type Routine, type RoutineDay, type RoutineDayId, type RoutineExercise, type RoutineId, type RoutineScheduleMode, type RoutineSet, type RoutineVersion, type RoutineVersionDay, type RoutineVersionExercise, type RoutineVersionKind, type RoutineVersionSetup, type RoutineVersionsResponse, SCHEDULE_MOVE_MAX_DAYS, SCHEDULE_OVERRIDES_MAX_RANGE_DAYS, SCHEDULE_OVERRIDE_KINDS, SCHEDULE_SKIP_PAST_DAYS, SESSION_SHARE_DEFAULT_FIELDS, SESSION_SHARE_FIELDS, SESSION_SHARE_MAX_ACTIVE_LINKS, SEXES, STARRED_EXERCISES_MAX, type ScheduleOverride, type ScheduleOverrideKind, type ScheduleOverridesQuery, type ScheduleOverridesResponse, type SessionComparisonExercise, type SessionComparisonQuery, type SessionComparisonResponse, type SessionComparisonRoutineDay, type SessionComparisonSession, type SessionComparisonSet, type SessionExerciseSubstitution, type SessionProgressNotification, type SessionRecapRecord, type SessionShare, type SessionShareField, type SessionShareListResponse, type SetAccountTimeZoneRequest, type SetLog, type Sex, type SharedSessionOwner, type SharedSessionRecap, type SkipOccurrenceRequest, type StarredExercise, type StarredExercisesResponse, type StartWorkoutRequest, type StartWorkoutResponse, type StreakMilestoneEventPayload, type SubstituteSessionExerciseRequest, type SubstituteSessionExerciseResponse, type SupabaseAuthResponse, type SupabaseAuthUser, type SupabaseMigrationResponse, TRAINING_DISCIPLINE_VALUES, TRAINING_EVENT_TYPES, TRAINING_EXPERIENCE_LEVEL_VALUES, TRAINING_GOAL_VALUES, type TrainingDiscipline, type TrainingEventType, type TrainingExperienceLevel, type TrainingGoal, type TrainingIdentity, type TrainingLocationPreference, type TrainingLocationPreferenceInput, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, USERNAME_PATTERN_SOURCE, type UpdateProfileDiscoveryRequest, type UpdateProfilePrivacyRequest, type UpdateProfileRequest, type UpdateRoutineRequest, type UpsertSetLogRequest, type UpsertSetLogResponse, type UserId, type UserProfile, type UserSearchResponse, type VolumeTrendPoint, type VolumeTrendQuery, type VolumeTrendResponse, type VolumeTrendSeries, WEIGHT_UNITS, WORKOUT_SESSION_STATUSES, type WeightUnit, type WorkoutAnalyticsStatus, type WorkoutProgressQuery, type WorkoutProgressResponse, type WorkoutSession, type WorkoutSessionId, type WorkoutSessionListResponse, type WorkoutSessionRecap, type WorkoutSessionSnapshotV1, type WorkoutSessionStatus, type WorkoutSessionSummary, type WorkoutStatsQuery, type WorkoutStatsResponse, routineDayLabel };
package/dist/index.d.ts CHANGED
@@ -1097,6 +1097,35 @@ interface AchievementCategoryProgress {
1097
1097
  nextMilestone: AchievementDefinition | null;
1098
1098
  remaining: number;
1099
1099
  }
1100
+ /**
1101
+ * ACH-05 recognises a return only after the athlete has rebuilt a small,
1102
+ * recovery-compatible pattern. The break is counted as full local calendar
1103
+ * days without a completed session; repeated sessions on one date count once.
1104
+ */
1105
+ declare const COMEBACK_MIN_INACTIVE_DAYS = 14;
1106
+ declare const COMEBACK_REQUIRED_ACTIVE_DAYS = 3;
1107
+ declare const COMEBACK_WINDOW_DAYS = 14;
1108
+ declare const COMEBACK_SESSION_LOOKBACK = 500;
1109
+ declare const COMEBACK_RECOGNITION_LIMIT = 20;
1110
+ interface ComebackRecognition {
1111
+ id: string;
1112
+ inactiveDays: number;
1113
+ returnedAt: IsoDateString;
1114
+ recognizedAt: IsoDateString;
1115
+ sourceSessionId: string;
1116
+ activeDays: number;
1117
+ /** Inclusive local-calendar span from the return through recognition. */
1118
+ windowDays: number;
1119
+ }
1120
+ interface ComebackRecognitionSummary {
1121
+ minimumInactiveDays: number;
1122
+ requiredActiveDays: number;
1123
+ windowDays: number;
1124
+ /** Most recent first, capped by COMEBACK_RECOGNITION_LIMIT. */
1125
+ recognitions: ComebackRecognition[];
1126
+ /** True when older completed-session events fell outside the bounded scan. */
1127
+ historyTruncated: boolean;
1128
+ }
1100
1129
  /** Stable successful response of GET /achievements. */
1101
1130
  interface AchievementsResponse {
1102
1131
  analyticsReady: boolean;
@@ -1105,6 +1134,7 @@ interface AchievementsResponse {
1105
1134
  achievements: EarnedAchievement[];
1106
1135
  rank: RenaissanceRankProgress | null;
1107
1136
  milestoneProgress: AchievementCategoryProgress[];
1137
+ comeback: ComebackRecognitionSummary | null;
1108
1138
  }
1109
1139
 
1110
1140
  /**
@@ -1346,4 +1376,71 @@ interface SkipOccurrenceRequest {
1346
1376
  date: CalendarDate;
1347
1377
  }
1348
1378
 
1349
- export { ACHIEVEMENT_CATEGORIES, ACHIEVEMENT_DEFINITIONS, type AchievementCategory, type AchievementCategoryProgress, type AchievementDefinition, type AchievementUnlockedEventPayload, type AchievementsResponse, type Brand, type CalendarDate, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateRoutineVersionRequest, type CreateSessionShareRequest, EXERCISE_EQUIPMENT, EXERCISE_MECHANICS, type EarnedAchievement, type EarnedPersonalRecord, type Exercise, type ExerciseEquipment, type ExerciseId, type ExerciseMechanic, type ExercisePerformanceHistoryQuery, type ExercisePerformanceHistoryResponse, type ExercisePerformancePrescription, type ExercisePerformancePrescriptionSet, type ExercisePerformanceSession, type ExercisePerformanceSet, type ExercisePerformanceSummary, type ExercisePlateau, type ExerciseStrengthSummary, type ExerciseStrengthTrendPoint, type ExerciseStrengthTrendQuery, type ExerciseStrengthTrendResponse, FOLLOW_SUGGESTIONS_DEFAULT_LIMIT, FOLLOW_SUGGESTIONS_MAX_LIMIT, FOLLOW_SUGGESTION_REASONS, type FinishStatus, type FinishWorkoutRequest, type FinishWorkoutResponse, type FollowSuggestion, type FollowSuggestionReason, type FollowSuggestionsResponse, type IsoDateString, type ListSessionsParams, MEASURABLE_GOALS_MAX, MEASURABLE_GOAL_DIRECTIONS, MEASURABLE_GOAL_TYPES, MOVEMENT_PATTERNS, MUSCLE_GROUPS, type MeasurableGoal, type MeasurableGoalDirection, type MeasurableGoalExercise, type MeasurableGoalInput, type MeasurableGoalType, type MoveOccurrenceRequest, type MovementPattern, type MuscleGroup, type MuscleGroupHeatmapQuery, type MuscleGroupHeatmapResponse, type MuscleGroupHeatmapValue, type MuscleGroupHeatmapWeek, type MuscleVolumeTrendSeries, PLATEAU_MIN_DAYS_SINCE_BEST, PLATEAU_MIN_SESSIONS, PLATEAU_MIN_SESSIONS_MAX, PLATEAU_MIN_SESSIONS_MIN, PLATEAU_RECENT_DAYS, PLATEAU_WINDOW_DAYS, PREFERRED_TRAINING_STYLE_VALUES, PROFILE_BIO_MAX_LENGTH, PROFILE_FAVORITE_EXERCISES_MAX, PROFILE_LOCATION_MAX_LENGTH, PROFILE_TRAINING_DISCIPLINES_MAX, PROFILE_TRAINING_GOALS_MAX, PROFILE_VISIBILITY_VALUES, PROGRESSION_SCHEMES, PROGRESS_TIMELINE_EVENT_TYPES, type PaginatedResponse, type PersonalGoalProgress, type PersonalGoalsResponse, type PersonalRecordEntry, type PersonalRecordKind, type PlatePairInventory, type PlateauPreferences, type PlateauSet, type PlateausResponse, type PreferredTrainingStyle, type PreviousPerformanceResponse, type PreviousSessionRecap, type PreviousSetPerformance, type ProfileDiscoverySettings, type ProfileFavoriteExercise, type ProfilePrivacySettings, type ProfileViewerAccess, type ProfileVisibility, type ProgressTimelineEventType, type ProgressTimelineItem, type ProgressTimelinePersonalRecordItem, type ProgressTimelineProgressionItem, type ProgressTimelineQuery, type ProgressTimelineRecordPerformance, type ProgressTimelineRecordReason, type ProgressTimelineResponse, type ProgressTimelineSessionContext, type ProgressionChange, type ProgressionRule, type ProgressionScheme, type ProgressionSetChange, type PublicBodyMetrics, type PublicTrainingSummary, type PublicUserProfile, RELATIONSHIP_LIST_DEFAULT_LIMIT, RELATIONSHIP_LIST_KINDS, RELATIONSHIP_LIST_MAX_LIMIT, RENAISSANCE_RANK_DEFINITIONS, REP_TYPES, RESERVED_USERNAMES, ROUTINE_DAYS_MAX, ROUTINE_DAY_NAME_MAX, ROUTINE_SCHEDULE_MODES, ROUTINE_VERSIONS_MAX, ROUTINE_VERSION_KINDS, ROUTINE_VERSION_NAME_MAX, type RecentActivityEntry, type RelationshipListKind, type RelationshipListQuery, type RelationshipListResponse, type RelationshipMember, type RenaissanceRankDefinition, type RenaissanceRankProgress, type RepType, type ReplaceMeasurableGoalsRequest, type ReplaceTrainingLocationsRequest, type RestoreRoutineVersionResponse, type Routine, type RoutineDay, type RoutineDayId, type RoutineExercise, type RoutineId, type RoutineScheduleMode, type RoutineSet, type RoutineVersion, type RoutineVersionDay, type RoutineVersionExercise, type RoutineVersionKind, type RoutineVersionSetup, type RoutineVersionsResponse, SCHEDULE_MOVE_MAX_DAYS, SCHEDULE_OVERRIDES_MAX_RANGE_DAYS, SCHEDULE_OVERRIDE_KINDS, SCHEDULE_SKIP_PAST_DAYS, SESSION_SHARE_DEFAULT_FIELDS, SESSION_SHARE_FIELDS, SESSION_SHARE_MAX_ACTIVE_LINKS, SEXES, STARRED_EXERCISES_MAX, type ScheduleOverride, type ScheduleOverrideKind, type ScheduleOverridesQuery, type ScheduleOverridesResponse, type SessionComparisonExercise, type SessionComparisonQuery, type SessionComparisonResponse, type SessionComparisonRoutineDay, type SessionComparisonSession, type SessionComparisonSet, type SessionExerciseSubstitution, type SessionRecapRecord, type SessionShare, type SessionShareField, type SessionShareListResponse, type SetAccountTimeZoneRequest, type SetLog, type Sex, type SharedSessionOwner, type SharedSessionRecap, type SkipOccurrenceRequest, type StarredExercise, type StarredExercisesResponse, type StartWorkoutRequest, type StartWorkoutResponse, type StreakMilestoneEventPayload, type SubstituteSessionExerciseRequest, type SubstituteSessionExerciseResponse, type SupabaseAuthResponse, type SupabaseAuthUser, type SupabaseMigrationResponse, TRAINING_DISCIPLINE_VALUES, TRAINING_EVENT_TYPES, TRAINING_EXPERIENCE_LEVEL_VALUES, TRAINING_GOAL_VALUES, type TrainingDiscipline, type TrainingEventType, type TrainingExperienceLevel, type TrainingGoal, type TrainingIdentity, type TrainingLocationPreference, type TrainingLocationPreferenceInput, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, USERNAME_PATTERN_SOURCE, type UpdateProfileDiscoveryRequest, type UpdateProfilePrivacyRequest, type UpdateProfileRequest, type UpdateRoutineRequest, type UpsertSetLogRequest, type UpsertSetLogResponse, type UserId, type UserProfile, type UserSearchResponse, type VolumeTrendPoint, type VolumeTrendQuery, type VolumeTrendResponse, type VolumeTrendSeries, WEIGHT_UNITS, WORKOUT_SESSION_STATUSES, type WeightUnit, type WorkoutAnalyticsStatus, type WorkoutProgressQuery, type WorkoutProgressResponse, type WorkoutSession, type WorkoutSessionId, type WorkoutSessionListResponse, type WorkoutSessionRecap, type WorkoutSessionSnapshotV1, type WorkoutSessionStatus, type WorkoutSessionSummary, type WorkoutStatsQuery, type WorkoutStatsResponse, routineDayLabel };
1379
+ /**
1380
+ * What a stored notification announces. Each one is gathered from a record
1381
+ * that already exists: an achievement earned live (never one recognized from
1382
+ * history), a finished session that set records or changed loads, and a new
1383
+ * follower.
1384
+ */
1385
+ declare const NOTIFICATION_KINDS: readonly ["ACHIEVEMENT", "SESSION_PROGRESS", "NEW_FOLLOWER"];
1386
+ type NotificationKind = (typeof NOTIFICATION_KINDS)[number];
1387
+ /** Sources older than this many days are never gathered. */
1388
+ declare const NOTIFICATIONS_LOOKBACK_DAYS = 30;
1389
+ /** Notifications are kept this many days, then removed. */
1390
+ declare const NOTIFICATIONS_RETENTION_DAYS = 90;
1391
+ /** The list returns at most this many, newest first. */
1392
+ declare const NOTIFICATIONS_LIST_LIMIT = 50;
1393
+ interface NotificationBase {
1394
+ id: string;
1395
+ /** When the announced thing happened, not when it was gathered. */
1396
+ createdAt: IsoDateString;
1397
+ readAt: IsoDateString | null;
1398
+ }
1399
+ interface AchievementNotification extends NotificationBase {
1400
+ kind: 'ACHIEVEMENT';
1401
+ achievement: {
1402
+ id: string;
1403
+ title: string;
1404
+ description: string;
1405
+ };
1406
+ }
1407
+ interface SessionProgressNotification extends NotificationBase {
1408
+ kind: 'SESSION_PROGRESS';
1409
+ session: {
1410
+ id: string;
1411
+ routineName: string;
1412
+ dayName: string | null;
1413
+ /** Exercises with a new personal record in the session. */
1414
+ recordCount: number;
1415
+ /** Exercises whose next prescription the session changed. */
1416
+ progressionCount: number;
1417
+ };
1418
+ }
1419
+ interface NewFollowerNotification extends NotificationBase {
1420
+ kind: 'NEW_FOLLOWER';
1421
+ actor: {
1422
+ id: string;
1423
+ username: string;
1424
+ name: string;
1425
+ lastName: string | null;
1426
+ avatarUrl: string | null;
1427
+ /** Whether the recipient follows them back now. */
1428
+ isFollowedByMe: boolean;
1429
+ };
1430
+ }
1431
+ /** Named to stay clear of the DOM's `Notification`. */
1432
+ type AppNotification = AchievementNotification | SessionProgressNotification | NewFollowerNotification;
1433
+ /** GET /notifications */
1434
+ interface NotificationsResponse {
1435
+ notifications: AppNotification[];
1436
+ unreadCount: number;
1437
+ }
1438
+ /** POST /notifications/read. Without ids, every notification is marked read. */
1439
+ interface MarkNotificationsReadRequest {
1440
+ ids?: string[];
1441
+ }
1442
+ interface MarkNotificationsReadResponse {
1443
+ unreadCount: number;
1444
+ }
1445
+
1446
+ export { ACHIEVEMENT_CATEGORIES, ACHIEVEMENT_DEFINITIONS, type AchievementCategory, type AchievementCategoryProgress, type AchievementDefinition, type AchievementNotification, type AchievementUnlockedEventPayload, type AchievementsResponse, type AppNotification, type Brand, COMEBACK_MIN_INACTIVE_DAYS, COMEBACK_RECOGNITION_LIMIT, COMEBACK_REQUIRED_ACTIVE_DAYS, COMEBACK_SESSION_LOOKBACK, COMEBACK_WINDOW_DAYS, type CalendarDate, type ComebackRecognition, type ComebackRecognitionSummary, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateRoutineVersionRequest, type CreateSessionShareRequest, EXERCISE_EQUIPMENT, EXERCISE_MECHANICS, type EarnedAchievement, type EarnedPersonalRecord, type Exercise, type ExerciseEquipment, type ExerciseId, type ExerciseMechanic, type ExercisePerformanceHistoryQuery, type ExercisePerformanceHistoryResponse, type ExercisePerformancePrescription, type ExercisePerformancePrescriptionSet, type ExercisePerformanceSession, type ExercisePerformanceSet, type ExercisePerformanceSummary, type ExercisePlateau, type ExerciseStrengthSummary, type ExerciseStrengthTrendPoint, type ExerciseStrengthTrendQuery, type ExerciseStrengthTrendResponse, FOLLOW_SUGGESTIONS_DEFAULT_LIMIT, FOLLOW_SUGGESTIONS_MAX_LIMIT, FOLLOW_SUGGESTION_REASONS, type FinishStatus, type FinishWorkoutRequest, type FinishWorkoutResponse, type FollowSuggestion, type FollowSuggestionReason, type FollowSuggestionsResponse, type IsoDateString, type ListSessionsParams, MEASURABLE_GOALS_MAX, MEASURABLE_GOAL_DIRECTIONS, MEASURABLE_GOAL_TYPES, MOVEMENT_PATTERNS, MUSCLE_GROUPS, type MarkNotificationsReadRequest, type MarkNotificationsReadResponse, type MeasurableGoal, type MeasurableGoalDirection, type MeasurableGoalExercise, type MeasurableGoalInput, type MeasurableGoalType, type MoveOccurrenceRequest, type MovementPattern, type MuscleGroup, type MuscleGroupHeatmapQuery, type MuscleGroupHeatmapResponse, type MuscleGroupHeatmapValue, type MuscleGroupHeatmapWeek, type MuscleVolumeTrendSeries, NOTIFICATIONS_LIST_LIMIT, NOTIFICATIONS_LOOKBACK_DAYS, NOTIFICATIONS_RETENTION_DAYS, NOTIFICATION_KINDS, type NewFollowerNotification, type NotificationKind, type NotificationsResponse, PLATEAU_MIN_DAYS_SINCE_BEST, PLATEAU_MIN_SESSIONS, PLATEAU_MIN_SESSIONS_MAX, PLATEAU_MIN_SESSIONS_MIN, PLATEAU_RECENT_DAYS, PLATEAU_WINDOW_DAYS, PREFERRED_TRAINING_STYLE_VALUES, PROFILE_BIO_MAX_LENGTH, PROFILE_FAVORITE_EXERCISES_MAX, PROFILE_LOCATION_MAX_LENGTH, PROFILE_TRAINING_DISCIPLINES_MAX, PROFILE_TRAINING_GOALS_MAX, PROFILE_VISIBILITY_VALUES, PROGRESSION_SCHEMES, PROGRESS_TIMELINE_EVENT_TYPES, type PaginatedResponse, type PersonalGoalProgress, type PersonalGoalsResponse, type PersonalRecordEntry, type PersonalRecordKind, type PlatePairInventory, type PlateauPreferences, type PlateauSet, type PlateausResponse, type PreferredTrainingStyle, type PreviousPerformanceResponse, type PreviousSessionRecap, type PreviousSetPerformance, type ProfileDiscoverySettings, type ProfileFavoriteExercise, type ProfilePrivacySettings, type ProfileViewerAccess, type ProfileVisibility, type ProgressTimelineEventType, type ProgressTimelineItem, type ProgressTimelinePersonalRecordItem, type ProgressTimelineProgressionItem, type ProgressTimelineQuery, type ProgressTimelineRecordPerformance, type ProgressTimelineRecordReason, type ProgressTimelineResponse, type ProgressTimelineSessionContext, type ProgressionChange, type ProgressionRule, type ProgressionScheme, type ProgressionSetChange, type PublicBodyMetrics, type PublicTrainingSummary, type PublicUserProfile, RELATIONSHIP_LIST_DEFAULT_LIMIT, RELATIONSHIP_LIST_KINDS, RELATIONSHIP_LIST_MAX_LIMIT, RENAISSANCE_RANK_DEFINITIONS, REP_TYPES, RESERVED_USERNAMES, ROUTINE_DAYS_MAX, ROUTINE_DAY_NAME_MAX, ROUTINE_SCHEDULE_MODES, ROUTINE_VERSIONS_MAX, ROUTINE_VERSION_KINDS, ROUTINE_VERSION_NAME_MAX, type RecentActivityEntry, type RelationshipListKind, type RelationshipListQuery, type RelationshipListResponse, type RelationshipMember, type RenaissanceRankDefinition, type RenaissanceRankProgress, type RepType, type ReplaceMeasurableGoalsRequest, type ReplaceTrainingLocationsRequest, type RestoreRoutineVersionResponse, type Routine, type RoutineDay, type RoutineDayId, type RoutineExercise, type RoutineId, type RoutineScheduleMode, type RoutineSet, type RoutineVersion, type RoutineVersionDay, type RoutineVersionExercise, type RoutineVersionKind, type RoutineVersionSetup, type RoutineVersionsResponse, SCHEDULE_MOVE_MAX_DAYS, SCHEDULE_OVERRIDES_MAX_RANGE_DAYS, SCHEDULE_OVERRIDE_KINDS, SCHEDULE_SKIP_PAST_DAYS, SESSION_SHARE_DEFAULT_FIELDS, SESSION_SHARE_FIELDS, SESSION_SHARE_MAX_ACTIVE_LINKS, SEXES, STARRED_EXERCISES_MAX, type ScheduleOverride, type ScheduleOverrideKind, type ScheduleOverridesQuery, type ScheduleOverridesResponse, type SessionComparisonExercise, type SessionComparisonQuery, type SessionComparisonResponse, type SessionComparisonRoutineDay, type SessionComparisonSession, type SessionComparisonSet, type SessionExerciseSubstitution, type SessionProgressNotification, type SessionRecapRecord, type SessionShare, type SessionShareField, type SessionShareListResponse, type SetAccountTimeZoneRequest, type SetLog, type Sex, type SharedSessionOwner, type SharedSessionRecap, type SkipOccurrenceRequest, type StarredExercise, type StarredExercisesResponse, type StartWorkoutRequest, type StartWorkoutResponse, type StreakMilestoneEventPayload, type SubstituteSessionExerciseRequest, type SubstituteSessionExerciseResponse, type SupabaseAuthResponse, type SupabaseAuthUser, type SupabaseMigrationResponse, TRAINING_DISCIPLINE_VALUES, TRAINING_EVENT_TYPES, TRAINING_EXPERIENCE_LEVEL_VALUES, TRAINING_GOAL_VALUES, type TrainingDiscipline, type TrainingEventType, type TrainingExperienceLevel, type TrainingGoal, type TrainingIdentity, type TrainingLocationPreference, type TrainingLocationPreferenceInput, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, USERNAME_PATTERN_SOURCE, type UpdateProfileDiscoveryRequest, type UpdateProfilePrivacyRequest, type UpdateProfileRequest, type UpdateRoutineRequest, type UpsertSetLogRequest, type UpsertSetLogResponse, type UserId, type UserProfile, type UserSearchResponse, type VolumeTrendPoint, type VolumeTrendQuery, type VolumeTrendResponse, type VolumeTrendSeries, WEIGHT_UNITS, WORKOUT_SESSION_STATUSES, type WeightUnit, type WorkoutAnalyticsStatus, type WorkoutProgressQuery, type WorkoutProgressResponse, type WorkoutSession, type WorkoutSessionId, type WorkoutSessionListResponse, type WorkoutSessionRecap, type WorkoutSessionSnapshotV1, type WorkoutSessionStatus, type WorkoutSessionSummary, type WorkoutStatsQuery, type WorkoutStatsResponse, routineDayLabel };
package/dist/index.js CHANGED
@@ -275,6 +275,11 @@ var RENAISSANCE_RANK_DEFINITIONS = [
275
275
  minimumActiveWeeks: 52
276
276
  }
277
277
  ];
278
+ var COMEBACK_MIN_INACTIVE_DAYS = 14;
279
+ var COMEBACK_REQUIRED_ACTIVE_DAYS = 3;
280
+ var COMEBACK_WINDOW_DAYS = 14;
281
+ var COMEBACK_SESSION_LOOKBACK = 500;
282
+ var COMEBACK_RECOGNITION_LIMIT = 20;
278
283
 
279
284
  // src/routine.ts
280
285
  var ROUTINE_SCHEDULE_MODES = ["WEEKLY", "ROTATION"];
@@ -345,9 +350,24 @@ var PLATEAU_MIN_DAYS_SINCE_BEST = 21;
345
350
  var PLATEAU_RECENT_DAYS = 21;
346
351
  var PLATEAU_MIN_SESSIONS_MIN = 3;
347
352
  var PLATEAU_MIN_SESSIONS_MAX = 8;
353
+
354
+ // src/notifications.ts
355
+ var NOTIFICATION_KINDS = [
356
+ "ACHIEVEMENT",
357
+ "SESSION_PROGRESS",
358
+ "NEW_FOLLOWER"
359
+ ];
360
+ var NOTIFICATIONS_LOOKBACK_DAYS = 30;
361
+ var NOTIFICATIONS_RETENTION_DAYS = 90;
362
+ var NOTIFICATIONS_LIST_LIMIT = 50;
348
363
  export {
349
364
  ACHIEVEMENT_CATEGORIES,
350
365
  ACHIEVEMENT_DEFINITIONS,
366
+ COMEBACK_MIN_INACTIVE_DAYS,
367
+ COMEBACK_RECOGNITION_LIMIT,
368
+ COMEBACK_REQUIRED_ACTIVE_DAYS,
369
+ COMEBACK_SESSION_LOOKBACK,
370
+ COMEBACK_WINDOW_DAYS,
351
371
  EXERCISE_EQUIPMENT,
352
372
  EXERCISE_MECHANICS,
353
373
  FOLLOW_SUGGESTIONS_DEFAULT_LIMIT,
@@ -358,6 +378,10 @@ export {
358
378
  MEASURABLE_GOAL_TYPES,
359
379
  MOVEMENT_PATTERNS,
360
380
  MUSCLE_GROUPS,
381
+ NOTIFICATIONS_LIST_LIMIT,
382
+ NOTIFICATIONS_LOOKBACK_DAYS,
383
+ NOTIFICATIONS_RETENTION_DAYS,
384
+ NOTIFICATION_KINDS,
361
385
  PLATEAU_MIN_DAYS_SINCE_BEST,
362
386
  PLATEAU_MIN_SESSIONS,
363
387
  PLATEAU_MIN_SESSIONS_MAX,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunsteel/contracts",
3
- "version": "0.41.0",
3
+ "version": "0.43.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ezee969/sunsteel-contracts.git"