@sunsteel/contracts 0.43.0 → 0.44.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
@@ -29,6 +29,9 @@ __export(index_exports, {
29
29
  COMEBACK_WINDOW_DAYS: () => COMEBACK_WINDOW_DAYS,
30
30
  EXERCISE_EQUIPMENT: () => EXERCISE_EQUIPMENT,
31
31
  EXERCISE_MECHANICS: () => EXERCISE_MECHANICS,
32
+ FEATURED_PROFILE_ITEMS_MAX: () => FEATURED_PROFILE_ITEMS_MAX,
33
+ FEATURED_PROFILE_ITEM_KINDS: () => FEATURED_PROFILE_ITEM_KINDS,
34
+ FEATURED_PROFILE_REFERENCE_MAX_LENGTH: () => FEATURED_PROFILE_REFERENCE_MAX_LENGTH,
32
35
  FOLLOW_SUGGESTIONS_DEFAULT_LIMIT: () => FOLLOW_SUGGESTIONS_DEFAULT_LIMIT,
33
36
  FOLLOW_SUGGESTIONS_MAX_LIMIT: () => FOLLOW_SUGGESTIONS_MAX_LIMIT,
34
37
  FOLLOW_SUGGESTION_REASONS: () => FOLLOW_SUGGESTION_REASONS,
@@ -200,6 +203,13 @@ var PREFERRED_TRAINING_STYLE_VALUES = [
200
203
  "BODY_PART_SPLIT",
201
204
  "CIRCUIT"
202
205
  ];
206
+ var FEATURED_PROFILE_ITEM_KINDS = [
207
+ "RECORD",
208
+ "ACHIEVEMENT",
209
+ "RANK"
210
+ ];
211
+ var FEATURED_PROFILE_ITEMS_MAX = 6;
212
+ var FEATURED_PROFILE_REFERENCE_MAX_LENGTH = 100;
203
213
  var RELATIONSHIP_LIST_KINDS = [
204
214
  "followers",
205
215
  "following",
@@ -463,6 +473,9 @@ var NOTIFICATIONS_LIST_LIMIT = 50;
463
473
  COMEBACK_WINDOW_DAYS,
464
474
  EXERCISE_EQUIPMENT,
465
475
  EXERCISE_MECHANICS,
476
+ FEATURED_PROFILE_ITEMS_MAX,
477
+ FEATURED_PROFILE_ITEM_KINDS,
478
+ FEATURED_PROFILE_REFERENCE_MAX_LENGTH,
466
479
  FOLLOW_SUGGESTIONS_DEFAULT_LIMIT,
467
480
  FOLLOW_SUGGESTIONS_MAX_LIMIT,
468
481
  FOLLOW_SUGGESTION_REASONS,
package/dist/index.d.cts CHANGED
@@ -677,6 +677,141 @@ interface PlateausResponse {
677
677
  plateaus: ExercisePlateau[];
678
678
  }
679
679
 
680
+ declare const ACHIEVEMENT_CATEGORIES: readonly ["SESSIONS", "SETS", "VOLUME_KG", "RECORDS", "STREAK_DAYS"];
681
+ type AchievementCategory = (typeof ACHIEVEMENT_CATEGORIES)[number];
682
+ interface AchievementDefinition {
683
+ id: string;
684
+ category: AchievementCategory;
685
+ threshold: number;
686
+ title: string;
687
+ description: string;
688
+ }
689
+ /** Stable milestone catalog shared by the writer and every presentation. */
690
+ declare const ACHIEVEMENT_DEFINITIONS: readonly AchievementDefinition[];
691
+ interface AchievementUnlockedEventPayload extends AchievementDefinition {
692
+ schemaVersion: 1;
693
+ backfilled: boolean;
694
+ }
695
+ interface StreakMilestoneEventPayload {
696
+ schemaVersion: 1;
697
+ achievementId: string;
698
+ streakDays: number;
699
+ backfilled: boolean;
700
+ }
701
+ interface EarnedAchievement extends AchievementDefinition {
702
+ eventId: string;
703
+ unlockedAt: IsoDateString;
704
+ sourceSessionId: string | null;
705
+ /** True when existing verified history was recognized after ACH-01 shipped. */
706
+ backfilled: boolean;
707
+ }
708
+ interface RenaissanceRankDefinition {
709
+ id: 'INITIATE' | 'APPRENTICE' | 'ARTISAN' | 'MAESTRO' | 'VIRTUOSO' | 'LAUREATE';
710
+ title: string;
711
+ description: string;
712
+ minimumSessions: number;
713
+ minimumActiveWeeks: number;
714
+ }
715
+ /**
716
+ * Stable rank ladder. Both requirements are intentionally based on attendance:
717
+ * completed sessions reward participation, while distinct active weeks reward
718
+ * consistency without encouraging consecutive-day training.
719
+ */
720
+ declare const RENAISSANCE_RANK_DEFINITIONS: readonly [{
721
+ readonly id: "INITIATE";
722
+ readonly title: "Initiate";
723
+ readonly description: "Your place in the training ledger begins here.";
724
+ readonly minimumSessions: 0;
725
+ readonly minimumActiveWeeks: 0;
726
+ }, {
727
+ readonly id: "APPRENTICE";
728
+ readonly title: "Apprentice";
729
+ readonly description: "Learning the craft through regular practice.";
730
+ readonly minimumSessions: 5;
731
+ readonly minimumActiveWeeks: 3;
732
+ }, {
733
+ readonly id: "ARTISAN";
734
+ readonly title: "Artisan";
735
+ readonly description: "Building a dependable training practice.";
736
+ readonly minimumSessions: 15;
737
+ readonly minimumActiveWeeks: 8;
738
+ }, {
739
+ readonly id: "MAESTRO";
740
+ readonly title: "Maestro";
741
+ readonly description: "Sustaining purposeful work across many weeks.";
742
+ readonly minimumSessions: 30;
743
+ readonly minimumActiveWeeks: 16;
744
+ }, {
745
+ readonly id: "VIRTUOSO";
746
+ readonly title: "Virtuoso";
747
+ readonly description: "Showing enduring discipline through repeated seasons.";
748
+ readonly minimumSessions: 60;
749
+ readonly minimumActiveWeeks: 32;
750
+ }, {
751
+ readonly id: "LAUREATE";
752
+ readonly title: "Laureate";
753
+ readonly description: "A lasting training practice recorded in the ledger.";
754
+ readonly minimumSessions: 100;
755
+ readonly minimumActiveWeeks: 52;
756
+ }];
757
+ interface RenaissanceRankProgress {
758
+ currentRank: RenaissanceRankDefinition;
759
+ nextRank: RenaissanceRankDefinition | null;
760
+ completedSessions: number;
761
+ activeWeeks: number;
762
+ sessionsRemaining: number;
763
+ activeWeeksRemaining: number;
764
+ }
765
+ /**
766
+ * Current verified total and the next fixed catalog milestone for one category.
767
+ * A null next milestone means the category's finite catalog is complete.
768
+ */
769
+ interface AchievementCategoryProgress {
770
+ category: AchievementCategory;
771
+ currentValue: number;
772
+ nextMilestone: AchievementDefinition | null;
773
+ remaining: number;
774
+ }
775
+ /**
776
+ * ACH-05 recognises a return only after the athlete has rebuilt a small,
777
+ * recovery-compatible pattern. The break is counted as full local calendar
778
+ * days without a completed session; repeated sessions on one date count once.
779
+ */
780
+ declare const COMEBACK_MIN_INACTIVE_DAYS = 14;
781
+ declare const COMEBACK_REQUIRED_ACTIVE_DAYS = 3;
782
+ declare const COMEBACK_WINDOW_DAYS = 14;
783
+ declare const COMEBACK_SESSION_LOOKBACK = 500;
784
+ declare const COMEBACK_RECOGNITION_LIMIT = 20;
785
+ interface ComebackRecognition {
786
+ id: string;
787
+ inactiveDays: number;
788
+ returnedAt: IsoDateString;
789
+ recognizedAt: IsoDateString;
790
+ sourceSessionId: string;
791
+ activeDays: number;
792
+ /** Inclusive local-calendar span from the return through recognition. */
793
+ windowDays: number;
794
+ }
795
+ interface ComebackRecognitionSummary {
796
+ minimumInactiveDays: number;
797
+ requiredActiveDays: number;
798
+ windowDays: number;
799
+ /** Most recent first, capped by COMEBACK_RECOGNITION_LIMIT. */
800
+ recognitions: ComebackRecognition[];
801
+ /** True when older completed-session events fell outside the bounded scan. */
802
+ historyTruncated: boolean;
803
+ }
804
+ /** Stable successful response of GET /achievements. */
805
+ interface AchievementsResponse {
806
+ analyticsReady: boolean;
807
+ earnedCount: number;
808
+ availableCount: number;
809
+ achievements: EarnedAchievement[];
810
+ rank: RenaissanceRankProgress | null;
811
+ milestoneProgress: AchievementCategoryProgress[];
812
+ comeback: ComebackRecognitionSummary | null;
813
+ }
814
+
680
815
  declare const USERNAME_MIN_LENGTH = 3;
681
816
  declare const USERNAME_MAX_LENGTH = 30;
682
817
  declare const USERNAME_PATTERN_SOURCE = "^[a-z0-9][a-z0-9_-]{1,28}[a-z0-9]$";
@@ -744,6 +879,40 @@ interface PublicBodyMetrics {
744
879
  weightKg?: number | null;
745
880
  heightCm?: number | null;
746
881
  }
882
+ declare const FEATURED_PROFILE_ITEM_KINDS: readonly ["RECORD", "ACHIEVEMENT", "RANK"];
883
+ type FeaturedProfileItemKind = (typeof FEATURED_PROFILE_ITEM_KINDS)[number];
884
+ declare const FEATURED_PROFILE_ITEMS_MAX = 6;
885
+ declare const FEATURED_PROFILE_REFERENCE_MAX_LENGTH = 100;
886
+ /** Owner-supplied selection. Array order becomes the public display order. */
887
+ interface FeaturedProfileSelectionInput {
888
+ kind: FeaturedProfileItemKind;
889
+ referenceId: string;
890
+ }
891
+ /** Stored selection returned to its owner, ordered by `position`. */
892
+ interface FeaturedProfileSelection extends FeaturedProfileSelectionInput {
893
+ position: number;
894
+ }
895
+ interface FeaturedProfileSelectionsResponse {
896
+ items: FeaturedProfileSelection[];
897
+ }
898
+ interface ReplaceFeaturedProfileItemsRequest {
899
+ items: FeaturedProfileSelectionInput[];
900
+ }
901
+ type FeaturedProfileItemBase = FeaturedProfileSelection;
902
+ interface FeaturedProfileRecordItem extends FeaturedProfileItemBase {
903
+ kind: 'RECORD';
904
+ record: PersonalRecordEntry;
905
+ }
906
+ interface FeaturedProfileAchievementItem extends FeaturedProfileItemBase {
907
+ kind: 'ACHIEVEMENT';
908
+ achievement: EarnedAchievement;
909
+ }
910
+ interface FeaturedProfileRankItem extends FeaturedProfileItemBase {
911
+ kind: 'RANK';
912
+ rank: RenaissanceRankDefinition;
913
+ }
914
+ /** Privacy-filtered, currently valid selections in owner-defined order. */
915
+ type FeaturedProfileItem = FeaturedProfileRecordItem | FeaturedProfileAchievementItem | FeaturedProfileRankItem;
747
916
  interface UserProfile {
748
917
  timeZone?: string | null;
749
918
  id: string;
@@ -784,6 +953,7 @@ interface PublicUserProfile {
784
953
  viewerAccess: ProfileViewerAccess;
785
954
  trainingSummary?: PublicTrainingSummary;
786
955
  personalRecords?: PersonalRecordEntry[];
956
+ featuredItems: FeaturedProfileItem[];
787
957
  bodyMetrics?: PublicBodyMetrics;
788
958
  }
789
959
  interface UpdateProfileRequest {
@@ -1002,141 +1172,6 @@ interface PersonalGoalsResponse {
1002
1172
  goals: PersonalGoalProgress[];
1003
1173
  }
1004
1174
 
1005
- declare const ACHIEVEMENT_CATEGORIES: readonly ["SESSIONS", "SETS", "VOLUME_KG", "RECORDS", "STREAK_DAYS"];
1006
- type AchievementCategory = (typeof ACHIEVEMENT_CATEGORIES)[number];
1007
- interface AchievementDefinition {
1008
- id: string;
1009
- category: AchievementCategory;
1010
- threshold: number;
1011
- title: string;
1012
- description: string;
1013
- }
1014
- /** Stable milestone catalog shared by the writer and every presentation. */
1015
- declare const ACHIEVEMENT_DEFINITIONS: readonly AchievementDefinition[];
1016
- interface AchievementUnlockedEventPayload extends AchievementDefinition {
1017
- schemaVersion: 1;
1018
- backfilled: boolean;
1019
- }
1020
- interface StreakMilestoneEventPayload {
1021
- schemaVersion: 1;
1022
- achievementId: string;
1023
- streakDays: number;
1024
- backfilled: boolean;
1025
- }
1026
- interface EarnedAchievement extends AchievementDefinition {
1027
- eventId: string;
1028
- unlockedAt: IsoDateString;
1029
- sourceSessionId: string | null;
1030
- /** True when existing verified history was recognized after ACH-01 shipped. */
1031
- backfilled: boolean;
1032
- }
1033
- interface RenaissanceRankDefinition {
1034
- id: 'INITIATE' | 'APPRENTICE' | 'ARTISAN' | 'MAESTRO' | 'VIRTUOSO' | 'LAUREATE';
1035
- title: string;
1036
- description: string;
1037
- minimumSessions: number;
1038
- minimumActiveWeeks: number;
1039
- }
1040
- /**
1041
- * Stable rank ladder. Both requirements are intentionally based on attendance:
1042
- * completed sessions reward participation, while distinct active weeks reward
1043
- * consistency without encouraging consecutive-day training.
1044
- */
1045
- declare const RENAISSANCE_RANK_DEFINITIONS: readonly [{
1046
- readonly id: "INITIATE";
1047
- readonly title: "Initiate";
1048
- readonly description: "Your place in the training ledger begins here.";
1049
- readonly minimumSessions: 0;
1050
- readonly minimumActiveWeeks: 0;
1051
- }, {
1052
- readonly id: "APPRENTICE";
1053
- readonly title: "Apprentice";
1054
- readonly description: "Learning the craft through regular practice.";
1055
- readonly minimumSessions: 5;
1056
- readonly minimumActiveWeeks: 3;
1057
- }, {
1058
- readonly id: "ARTISAN";
1059
- readonly title: "Artisan";
1060
- readonly description: "Building a dependable training practice.";
1061
- readonly minimumSessions: 15;
1062
- readonly minimumActiveWeeks: 8;
1063
- }, {
1064
- readonly id: "MAESTRO";
1065
- readonly title: "Maestro";
1066
- readonly description: "Sustaining purposeful work across many weeks.";
1067
- readonly minimumSessions: 30;
1068
- readonly minimumActiveWeeks: 16;
1069
- }, {
1070
- readonly id: "VIRTUOSO";
1071
- readonly title: "Virtuoso";
1072
- readonly description: "Showing enduring discipline through repeated seasons.";
1073
- readonly minimumSessions: 60;
1074
- readonly minimumActiveWeeks: 32;
1075
- }, {
1076
- readonly id: "LAUREATE";
1077
- readonly title: "Laureate";
1078
- readonly description: "A lasting training practice recorded in the ledger.";
1079
- readonly minimumSessions: 100;
1080
- readonly minimumActiveWeeks: 52;
1081
- }];
1082
- interface RenaissanceRankProgress {
1083
- currentRank: RenaissanceRankDefinition;
1084
- nextRank: RenaissanceRankDefinition | null;
1085
- completedSessions: number;
1086
- activeWeeks: number;
1087
- sessionsRemaining: number;
1088
- activeWeeksRemaining: number;
1089
- }
1090
- /**
1091
- * Current verified total and the next fixed catalog milestone for one category.
1092
- * A null next milestone means the category's finite catalog is complete.
1093
- */
1094
- interface AchievementCategoryProgress {
1095
- category: AchievementCategory;
1096
- currentValue: number;
1097
- nextMilestone: AchievementDefinition | null;
1098
- remaining: number;
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
- }
1129
- /** Stable successful response of GET /achievements. */
1130
- interface AchievementsResponse {
1131
- analyticsReady: boolean;
1132
- earnedCount: number;
1133
- availableCount: number;
1134
- achievements: EarnedAchievement[];
1135
- rank: RenaissanceRankProgress | null;
1136
- milestoneProgress: AchievementCategoryProgress[];
1137
- comeback: ComebackRecognitionSummary | null;
1138
- }
1139
-
1140
1175
  /**
1141
1176
  * ROUT-11: a WEEKLY routine ties each day to a weekday; a ROTATION routine
1142
1177
  * runs its days in `order`, each after the last completed one, whatever the
@@ -1443,4 +1478,4 @@ interface MarkNotificationsReadResponse {
1443
1478
  unreadCount: number;
1444
1479
  }
1445
1480
 
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 };
1481
+ 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, FEATURED_PROFILE_ITEMS_MAX, FEATURED_PROFILE_ITEM_KINDS, FEATURED_PROFILE_REFERENCE_MAX_LENGTH, FOLLOW_SUGGESTIONS_DEFAULT_LIMIT, FOLLOW_SUGGESTIONS_MAX_LIMIT, FOLLOW_SUGGESTION_REASONS, type FeaturedProfileAchievementItem, type FeaturedProfileItem, type FeaturedProfileItemKind, type FeaturedProfileRankItem, type FeaturedProfileRecordItem, type FeaturedProfileSelection, type FeaturedProfileSelectionInput, type FeaturedProfileSelectionsResponse, 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 ReplaceFeaturedProfileItemsRequest, 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
@@ -677,6 +677,141 @@ interface PlateausResponse {
677
677
  plateaus: ExercisePlateau[];
678
678
  }
679
679
 
680
+ declare const ACHIEVEMENT_CATEGORIES: readonly ["SESSIONS", "SETS", "VOLUME_KG", "RECORDS", "STREAK_DAYS"];
681
+ type AchievementCategory = (typeof ACHIEVEMENT_CATEGORIES)[number];
682
+ interface AchievementDefinition {
683
+ id: string;
684
+ category: AchievementCategory;
685
+ threshold: number;
686
+ title: string;
687
+ description: string;
688
+ }
689
+ /** Stable milestone catalog shared by the writer and every presentation. */
690
+ declare const ACHIEVEMENT_DEFINITIONS: readonly AchievementDefinition[];
691
+ interface AchievementUnlockedEventPayload extends AchievementDefinition {
692
+ schemaVersion: 1;
693
+ backfilled: boolean;
694
+ }
695
+ interface StreakMilestoneEventPayload {
696
+ schemaVersion: 1;
697
+ achievementId: string;
698
+ streakDays: number;
699
+ backfilled: boolean;
700
+ }
701
+ interface EarnedAchievement extends AchievementDefinition {
702
+ eventId: string;
703
+ unlockedAt: IsoDateString;
704
+ sourceSessionId: string | null;
705
+ /** True when existing verified history was recognized after ACH-01 shipped. */
706
+ backfilled: boolean;
707
+ }
708
+ interface RenaissanceRankDefinition {
709
+ id: 'INITIATE' | 'APPRENTICE' | 'ARTISAN' | 'MAESTRO' | 'VIRTUOSO' | 'LAUREATE';
710
+ title: string;
711
+ description: string;
712
+ minimumSessions: number;
713
+ minimumActiveWeeks: number;
714
+ }
715
+ /**
716
+ * Stable rank ladder. Both requirements are intentionally based on attendance:
717
+ * completed sessions reward participation, while distinct active weeks reward
718
+ * consistency without encouraging consecutive-day training.
719
+ */
720
+ declare const RENAISSANCE_RANK_DEFINITIONS: readonly [{
721
+ readonly id: "INITIATE";
722
+ readonly title: "Initiate";
723
+ readonly description: "Your place in the training ledger begins here.";
724
+ readonly minimumSessions: 0;
725
+ readonly minimumActiveWeeks: 0;
726
+ }, {
727
+ readonly id: "APPRENTICE";
728
+ readonly title: "Apprentice";
729
+ readonly description: "Learning the craft through regular practice.";
730
+ readonly minimumSessions: 5;
731
+ readonly minimumActiveWeeks: 3;
732
+ }, {
733
+ readonly id: "ARTISAN";
734
+ readonly title: "Artisan";
735
+ readonly description: "Building a dependable training practice.";
736
+ readonly minimumSessions: 15;
737
+ readonly minimumActiveWeeks: 8;
738
+ }, {
739
+ readonly id: "MAESTRO";
740
+ readonly title: "Maestro";
741
+ readonly description: "Sustaining purposeful work across many weeks.";
742
+ readonly minimumSessions: 30;
743
+ readonly minimumActiveWeeks: 16;
744
+ }, {
745
+ readonly id: "VIRTUOSO";
746
+ readonly title: "Virtuoso";
747
+ readonly description: "Showing enduring discipline through repeated seasons.";
748
+ readonly minimumSessions: 60;
749
+ readonly minimumActiveWeeks: 32;
750
+ }, {
751
+ readonly id: "LAUREATE";
752
+ readonly title: "Laureate";
753
+ readonly description: "A lasting training practice recorded in the ledger.";
754
+ readonly minimumSessions: 100;
755
+ readonly minimumActiveWeeks: 52;
756
+ }];
757
+ interface RenaissanceRankProgress {
758
+ currentRank: RenaissanceRankDefinition;
759
+ nextRank: RenaissanceRankDefinition | null;
760
+ completedSessions: number;
761
+ activeWeeks: number;
762
+ sessionsRemaining: number;
763
+ activeWeeksRemaining: number;
764
+ }
765
+ /**
766
+ * Current verified total and the next fixed catalog milestone for one category.
767
+ * A null next milestone means the category's finite catalog is complete.
768
+ */
769
+ interface AchievementCategoryProgress {
770
+ category: AchievementCategory;
771
+ currentValue: number;
772
+ nextMilestone: AchievementDefinition | null;
773
+ remaining: number;
774
+ }
775
+ /**
776
+ * ACH-05 recognises a return only after the athlete has rebuilt a small,
777
+ * recovery-compatible pattern. The break is counted as full local calendar
778
+ * days without a completed session; repeated sessions on one date count once.
779
+ */
780
+ declare const COMEBACK_MIN_INACTIVE_DAYS = 14;
781
+ declare const COMEBACK_REQUIRED_ACTIVE_DAYS = 3;
782
+ declare const COMEBACK_WINDOW_DAYS = 14;
783
+ declare const COMEBACK_SESSION_LOOKBACK = 500;
784
+ declare const COMEBACK_RECOGNITION_LIMIT = 20;
785
+ interface ComebackRecognition {
786
+ id: string;
787
+ inactiveDays: number;
788
+ returnedAt: IsoDateString;
789
+ recognizedAt: IsoDateString;
790
+ sourceSessionId: string;
791
+ activeDays: number;
792
+ /** Inclusive local-calendar span from the return through recognition. */
793
+ windowDays: number;
794
+ }
795
+ interface ComebackRecognitionSummary {
796
+ minimumInactiveDays: number;
797
+ requiredActiveDays: number;
798
+ windowDays: number;
799
+ /** Most recent first, capped by COMEBACK_RECOGNITION_LIMIT. */
800
+ recognitions: ComebackRecognition[];
801
+ /** True when older completed-session events fell outside the bounded scan. */
802
+ historyTruncated: boolean;
803
+ }
804
+ /** Stable successful response of GET /achievements. */
805
+ interface AchievementsResponse {
806
+ analyticsReady: boolean;
807
+ earnedCount: number;
808
+ availableCount: number;
809
+ achievements: EarnedAchievement[];
810
+ rank: RenaissanceRankProgress | null;
811
+ milestoneProgress: AchievementCategoryProgress[];
812
+ comeback: ComebackRecognitionSummary | null;
813
+ }
814
+
680
815
  declare const USERNAME_MIN_LENGTH = 3;
681
816
  declare const USERNAME_MAX_LENGTH = 30;
682
817
  declare const USERNAME_PATTERN_SOURCE = "^[a-z0-9][a-z0-9_-]{1,28}[a-z0-9]$";
@@ -744,6 +879,40 @@ interface PublicBodyMetrics {
744
879
  weightKg?: number | null;
745
880
  heightCm?: number | null;
746
881
  }
882
+ declare const FEATURED_PROFILE_ITEM_KINDS: readonly ["RECORD", "ACHIEVEMENT", "RANK"];
883
+ type FeaturedProfileItemKind = (typeof FEATURED_PROFILE_ITEM_KINDS)[number];
884
+ declare const FEATURED_PROFILE_ITEMS_MAX = 6;
885
+ declare const FEATURED_PROFILE_REFERENCE_MAX_LENGTH = 100;
886
+ /** Owner-supplied selection. Array order becomes the public display order. */
887
+ interface FeaturedProfileSelectionInput {
888
+ kind: FeaturedProfileItemKind;
889
+ referenceId: string;
890
+ }
891
+ /** Stored selection returned to its owner, ordered by `position`. */
892
+ interface FeaturedProfileSelection extends FeaturedProfileSelectionInput {
893
+ position: number;
894
+ }
895
+ interface FeaturedProfileSelectionsResponse {
896
+ items: FeaturedProfileSelection[];
897
+ }
898
+ interface ReplaceFeaturedProfileItemsRequest {
899
+ items: FeaturedProfileSelectionInput[];
900
+ }
901
+ type FeaturedProfileItemBase = FeaturedProfileSelection;
902
+ interface FeaturedProfileRecordItem extends FeaturedProfileItemBase {
903
+ kind: 'RECORD';
904
+ record: PersonalRecordEntry;
905
+ }
906
+ interface FeaturedProfileAchievementItem extends FeaturedProfileItemBase {
907
+ kind: 'ACHIEVEMENT';
908
+ achievement: EarnedAchievement;
909
+ }
910
+ interface FeaturedProfileRankItem extends FeaturedProfileItemBase {
911
+ kind: 'RANK';
912
+ rank: RenaissanceRankDefinition;
913
+ }
914
+ /** Privacy-filtered, currently valid selections in owner-defined order. */
915
+ type FeaturedProfileItem = FeaturedProfileRecordItem | FeaturedProfileAchievementItem | FeaturedProfileRankItem;
747
916
  interface UserProfile {
748
917
  timeZone?: string | null;
749
918
  id: string;
@@ -784,6 +953,7 @@ interface PublicUserProfile {
784
953
  viewerAccess: ProfileViewerAccess;
785
954
  trainingSummary?: PublicTrainingSummary;
786
955
  personalRecords?: PersonalRecordEntry[];
956
+ featuredItems: FeaturedProfileItem[];
787
957
  bodyMetrics?: PublicBodyMetrics;
788
958
  }
789
959
  interface UpdateProfileRequest {
@@ -1002,141 +1172,6 @@ interface PersonalGoalsResponse {
1002
1172
  goals: PersonalGoalProgress[];
1003
1173
  }
1004
1174
 
1005
- declare const ACHIEVEMENT_CATEGORIES: readonly ["SESSIONS", "SETS", "VOLUME_KG", "RECORDS", "STREAK_DAYS"];
1006
- type AchievementCategory = (typeof ACHIEVEMENT_CATEGORIES)[number];
1007
- interface AchievementDefinition {
1008
- id: string;
1009
- category: AchievementCategory;
1010
- threshold: number;
1011
- title: string;
1012
- description: string;
1013
- }
1014
- /** Stable milestone catalog shared by the writer and every presentation. */
1015
- declare const ACHIEVEMENT_DEFINITIONS: readonly AchievementDefinition[];
1016
- interface AchievementUnlockedEventPayload extends AchievementDefinition {
1017
- schemaVersion: 1;
1018
- backfilled: boolean;
1019
- }
1020
- interface StreakMilestoneEventPayload {
1021
- schemaVersion: 1;
1022
- achievementId: string;
1023
- streakDays: number;
1024
- backfilled: boolean;
1025
- }
1026
- interface EarnedAchievement extends AchievementDefinition {
1027
- eventId: string;
1028
- unlockedAt: IsoDateString;
1029
- sourceSessionId: string | null;
1030
- /** True when existing verified history was recognized after ACH-01 shipped. */
1031
- backfilled: boolean;
1032
- }
1033
- interface RenaissanceRankDefinition {
1034
- id: 'INITIATE' | 'APPRENTICE' | 'ARTISAN' | 'MAESTRO' | 'VIRTUOSO' | 'LAUREATE';
1035
- title: string;
1036
- description: string;
1037
- minimumSessions: number;
1038
- minimumActiveWeeks: number;
1039
- }
1040
- /**
1041
- * Stable rank ladder. Both requirements are intentionally based on attendance:
1042
- * completed sessions reward participation, while distinct active weeks reward
1043
- * consistency without encouraging consecutive-day training.
1044
- */
1045
- declare const RENAISSANCE_RANK_DEFINITIONS: readonly [{
1046
- readonly id: "INITIATE";
1047
- readonly title: "Initiate";
1048
- readonly description: "Your place in the training ledger begins here.";
1049
- readonly minimumSessions: 0;
1050
- readonly minimumActiveWeeks: 0;
1051
- }, {
1052
- readonly id: "APPRENTICE";
1053
- readonly title: "Apprentice";
1054
- readonly description: "Learning the craft through regular practice.";
1055
- readonly minimumSessions: 5;
1056
- readonly minimumActiveWeeks: 3;
1057
- }, {
1058
- readonly id: "ARTISAN";
1059
- readonly title: "Artisan";
1060
- readonly description: "Building a dependable training practice.";
1061
- readonly minimumSessions: 15;
1062
- readonly minimumActiveWeeks: 8;
1063
- }, {
1064
- readonly id: "MAESTRO";
1065
- readonly title: "Maestro";
1066
- readonly description: "Sustaining purposeful work across many weeks.";
1067
- readonly minimumSessions: 30;
1068
- readonly minimumActiveWeeks: 16;
1069
- }, {
1070
- readonly id: "VIRTUOSO";
1071
- readonly title: "Virtuoso";
1072
- readonly description: "Showing enduring discipline through repeated seasons.";
1073
- readonly minimumSessions: 60;
1074
- readonly minimumActiveWeeks: 32;
1075
- }, {
1076
- readonly id: "LAUREATE";
1077
- readonly title: "Laureate";
1078
- readonly description: "A lasting training practice recorded in the ledger.";
1079
- readonly minimumSessions: 100;
1080
- readonly minimumActiveWeeks: 52;
1081
- }];
1082
- interface RenaissanceRankProgress {
1083
- currentRank: RenaissanceRankDefinition;
1084
- nextRank: RenaissanceRankDefinition | null;
1085
- completedSessions: number;
1086
- activeWeeks: number;
1087
- sessionsRemaining: number;
1088
- activeWeeksRemaining: number;
1089
- }
1090
- /**
1091
- * Current verified total and the next fixed catalog milestone for one category.
1092
- * A null next milestone means the category's finite catalog is complete.
1093
- */
1094
- interface AchievementCategoryProgress {
1095
- category: AchievementCategory;
1096
- currentValue: number;
1097
- nextMilestone: AchievementDefinition | null;
1098
- remaining: number;
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
- }
1129
- /** Stable successful response of GET /achievements. */
1130
- interface AchievementsResponse {
1131
- analyticsReady: boolean;
1132
- earnedCount: number;
1133
- availableCount: number;
1134
- achievements: EarnedAchievement[];
1135
- rank: RenaissanceRankProgress | null;
1136
- milestoneProgress: AchievementCategoryProgress[];
1137
- comeback: ComebackRecognitionSummary | null;
1138
- }
1139
-
1140
1175
  /**
1141
1176
  * ROUT-11: a WEEKLY routine ties each day to a weekday; a ROTATION routine
1142
1177
  * runs its days in `order`, each after the last completed one, whatever the
@@ -1443,4 +1478,4 @@ interface MarkNotificationsReadResponse {
1443
1478
  unreadCount: number;
1444
1479
  }
1445
1480
 
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 };
1481
+ 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, FEATURED_PROFILE_ITEMS_MAX, FEATURED_PROFILE_ITEM_KINDS, FEATURED_PROFILE_REFERENCE_MAX_LENGTH, FOLLOW_SUGGESTIONS_DEFAULT_LIMIT, FOLLOW_SUGGESTIONS_MAX_LIMIT, FOLLOW_SUGGESTION_REASONS, type FeaturedProfileAchievementItem, type FeaturedProfileItem, type FeaturedProfileItemKind, type FeaturedProfileRankItem, type FeaturedProfileRecordItem, type FeaturedProfileSelection, type FeaturedProfileSelectionInput, type FeaturedProfileSelectionsResponse, 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 ReplaceFeaturedProfileItemsRequest, 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
@@ -108,6 +108,13 @@ var PREFERRED_TRAINING_STYLE_VALUES = [
108
108
  "BODY_PART_SPLIT",
109
109
  "CIRCUIT"
110
110
  ];
111
+ var FEATURED_PROFILE_ITEM_KINDS = [
112
+ "RECORD",
113
+ "ACHIEVEMENT",
114
+ "RANK"
115
+ ];
116
+ var FEATURED_PROFILE_ITEMS_MAX = 6;
117
+ var FEATURED_PROFILE_REFERENCE_MAX_LENGTH = 100;
111
118
  var RELATIONSHIP_LIST_KINDS = [
112
119
  "followers",
113
120
  "following",
@@ -370,6 +377,9 @@ export {
370
377
  COMEBACK_WINDOW_DAYS,
371
378
  EXERCISE_EQUIPMENT,
372
379
  EXERCISE_MECHANICS,
380
+ FEATURED_PROFILE_ITEMS_MAX,
381
+ FEATURED_PROFILE_ITEM_KINDS,
382
+ FEATURED_PROFILE_REFERENCE_MAX_LENGTH,
373
383
  FOLLOW_SUGGESTIONS_DEFAULT_LIMIT,
374
384
  FOLLOW_SUGGESTIONS_MAX_LIMIT,
375
385
  FOLLOW_SUGGESTION_REASONS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunsteel/contracts",
3
- "version": "0.43.0",
3
+ "version": "0.44.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ezee969/sunsteel-contracts.git"