@sunsteel/contracts 0.42.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 +31 -0
- package/dist/index.d.cts +238 -136
- package/dist/index.d.ts +238 -136
- package/dist/index.js +24 -0
- package/package.json +1 -1
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,
|
|
@@ -37,6 +40,10 @@ __export(index_exports, {
|
|
|
37
40
|
MEASURABLE_GOAL_TYPES: () => MEASURABLE_GOAL_TYPES,
|
|
38
41
|
MOVEMENT_PATTERNS: () => MOVEMENT_PATTERNS,
|
|
39
42
|
MUSCLE_GROUPS: () => MUSCLE_GROUPS,
|
|
43
|
+
NOTIFICATIONS_LIST_LIMIT: () => NOTIFICATIONS_LIST_LIMIT,
|
|
44
|
+
NOTIFICATIONS_LOOKBACK_DAYS: () => NOTIFICATIONS_LOOKBACK_DAYS,
|
|
45
|
+
NOTIFICATIONS_RETENTION_DAYS: () => NOTIFICATIONS_RETENTION_DAYS,
|
|
46
|
+
NOTIFICATION_KINDS: () => NOTIFICATION_KINDS,
|
|
40
47
|
PLATEAU_MIN_DAYS_SINCE_BEST: () => PLATEAU_MIN_DAYS_SINCE_BEST,
|
|
41
48
|
PLATEAU_MIN_SESSIONS: () => PLATEAU_MIN_SESSIONS,
|
|
42
49
|
PLATEAU_MIN_SESSIONS_MAX: () => PLATEAU_MIN_SESSIONS_MAX,
|
|
@@ -196,6 +203,13 @@ var PREFERRED_TRAINING_STYLE_VALUES = [
|
|
|
196
203
|
"BODY_PART_SPLIT",
|
|
197
204
|
"CIRCUIT"
|
|
198
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;
|
|
199
213
|
var RELATIONSHIP_LIST_KINDS = [
|
|
200
214
|
"followers",
|
|
201
215
|
"following",
|
|
@@ -438,6 +452,16 @@ var PLATEAU_MIN_DAYS_SINCE_BEST = 21;
|
|
|
438
452
|
var PLATEAU_RECENT_DAYS = 21;
|
|
439
453
|
var PLATEAU_MIN_SESSIONS_MIN = 3;
|
|
440
454
|
var PLATEAU_MIN_SESSIONS_MAX = 8;
|
|
455
|
+
|
|
456
|
+
// src/notifications.ts
|
|
457
|
+
var NOTIFICATION_KINDS = [
|
|
458
|
+
"ACHIEVEMENT",
|
|
459
|
+
"SESSION_PROGRESS",
|
|
460
|
+
"NEW_FOLLOWER"
|
|
461
|
+
];
|
|
462
|
+
var NOTIFICATIONS_LOOKBACK_DAYS = 30;
|
|
463
|
+
var NOTIFICATIONS_RETENTION_DAYS = 90;
|
|
464
|
+
var NOTIFICATIONS_LIST_LIMIT = 50;
|
|
441
465
|
// Annotate the CommonJS export names for ESM import in node:
|
|
442
466
|
0 && (module.exports = {
|
|
443
467
|
ACHIEVEMENT_CATEGORIES,
|
|
@@ -449,6 +473,9 @@ var PLATEAU_MIN_SESSIONS_MAX = 8;
|
|
|
449
473
|
COMEBACK_WINDOW_DAYS,
|
|
450
474
|
EXERCISE_EQUIPMENT,
|
|
451
475
|
EXERCISE_MECHANICS,
|
|
476
|
+
FEATURED_PROFILE_ITEMS_MAX,
|
|
477
|
+
FEATURED_PROFILE_ITEM_KINDS,
|
|
478
|
+
FEATURED_PROFILE_REFERENCE_MAX_LENGTH,
|
|
452
479
|
FOLLOW_SUGGESTIONS_DEFAULT_LIMIT,
|
|
453
480
|
FOLLOW_SUGGESTIONS_MAX_LIMIT,
|
|
454
481
|
FOLLOW_SUGGESTION_REASONS,
|
|
@@ -457,6 +484,10 @@ var PLATEAU_MIN_SESSIONS_MAX = 8;
|
|
|
457
484
|
MEASURABLE_GOAL_TYPES,
|
|
458
485
|
MOVEMENT_PATTERNS,
|
|
459
486
|
MUSCLE_GROUPS,
|
|
487
|
+
NOTIFICATIONS_LIST_LIMIT,
|
|
488
|
+
NOTIFICATIONS_LOOKBACK_DAYS,
|
|
489
|
+
NOTIFICATIONS_RETENTION_DAYS,
|
|
490
|
+
NOTIFICATION_KINDS,
|
|
460
491
|
PLATEAU_MIN_DAYS_SINCE_BEST,
|
|
461
492
|
PLATEAU_MIN_SESSIONS,
|
|
462
493
|
PLATEAU_MIN_SESSIONS_MAX,
|
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
|
|
@@ -1376,4 +1411,71 @@ interface SkipOccurrenceRequest {
|
|
|
1376
1411
|
date: CalendarDate;
|
|
1377
1412
|
}
|
|
1378
1413
|
|
|
1379
|
-
|
|
1414
|
+
/**
|
|
1415
|
+
* What a stored notification announces. Each one is gathered from a record
|
|
1416
|
+
* that already exists: an achievement earned live (never one recognized from
|
|
1417
|
+
* history), a finished session that set records or changed loads, and a new
|
|
1418
|
+
* follower.
|
|
1419
|
+
*/
|
|
1420
|
+
declare const NOTIFICATION_KINDS: readonly ["ACHIEVEMENT", "SESSION_PROGRESS", "NEW_FOLLOWER"];
|
|
1421
|
+
type NotificationKind = (typeof NOTIFICATION_KINDS)[number];
|
|
1422
|
+
/** Sources older than this many days are never gathered. */
|
|
1423
|
+
declare const NOTIFICATIONS_LOOKBACK_DAYS = 30;
|
|
1424
|
+
/** Notifications are kept this many days, then removed. */
|
|
1425
|
+
declare const NOTIFICATIONS_RETENTION_DAYS = 90;
|
|
1426
|
+
/** The list returns at most this many, newest first. */
|
|
1427
|
+
declare const NOTIFICATIONS_LIST_LIMIT = 50;
|
|
1428
|
+
interface NotificationBase {
|
|
1429
|
+
id: string;
|
|
1430
|
+
/** When the announced thing happened, not when it was gathered. */
|
|
1431
|
+
createdAt: IsoDateString;
|
|
1432
|
+
readAt: IsoDateString | null;
|
|
1433
|
+
}
|
|
1434
|
+
interface AchievementNotification extends NotificationBase {
|
|
1435
|
+
kind: 'ACHIEVEMENT';
|
|
1436
|
+
achievement: {
|
|
1437
|
+
id: string;
|
|
1438
|
+
title: string;
|
|
1439
|
+
description: string;
|
|
1440
|
+
};
|
|
1441
|
+
}
|
|
1442
|
+
interface SessionProgressNotification extends NotificationBase {
|
|
1443
|
+
kind: 'SESSION_PROGRESS';
|
|
1444
|
+
session: {
|
|
1445
|
+
id: string;
|
|
1446
|
+
routineName: string;
|
|
1447
|
+
dayName: string | null;
|
|
1448
|
+
/** Exercises with a new personal record in the session. */
|
|
1449
|
+
recordCount: number;
|
|
1450
|
+
/** Exercises whose next prescription the session changed. */
|
|
1451
|
+
progressionCount: number;
|
|
1452
|
+
};
|
|
1453
|
+
}
|
|
1454
|
+
interface NewFollowerNotification extends NotificationBase {
|
|
1455
|
+
kind: 'NEW_FOLLOWER';
|
|
1456
|
+
actor: {
|
|
1457
|
+
id: string;
|
|
1458
|
+
username: string;
|
|
1459
|
+
name: string;
|
|
1460
|
+
lastName: string | null;
|
|
1461
|
+
avatarUrl: string | null;
|
|
1462
|
+
/** Whether the recipient follows them back now. */
|
|
1463
|
+
isFollowedByMe: boolean;
|
|
1464
|
+
};
|
|
1465
|
+
}
|
|
1466
|
+
/** Named to stay clear of the DOM's `Notification`. */
|
|
1467
|
+
type AppNotification = AchievementNotification | SessionProgressNotification | NewFollowerNotification;
|
|
1468
|
+
/** GET /notifications */
|
|
1469
|
+
interface NotificationsResponse {
|
|
1470
|
+
notifications: AppNotification[];
|
|
1471
|
+
unreadCount: number;
|
|
1472
|
+
}
|
|
1473
|
+
/** POST /notifications/read. Without ids, every notification is marked read. */
|
|
1474
|
+
interface MarkNotificationsReadRequest {
|
|
1475
|
+
ids?: string[];
|
|
1476
|
+
}
|
|
1477
|
+
interface MarkNotificationsReadResponse {
|
|
1478
|
+
unreadCount: number;
|
|
1479
|
+
}
|
|
1480
|
+
|
|
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
|
|
@@ -1376,4 +1411,71 @@ interface SkipOccurrenceRequest {
|
|
|
1376
1411
|
date: CalendarDate;
|
|
1377
1412
|
}
|
|
1378
1413
|
|
|
1379
|
-
|
|
1414
|
+
/**
|
|
1415
|
+
* What a stored notification announces. Each one is gathered from a record
|
|
1416
|
+
* that already exists: an achievement earned live (never one recognized from
|
|
1417
|
+
* history), a finished session that set records or changed loads, and a new
|
|
1418
|
+
* follower.
|
|
1419
|
+
*/
|
|
1420
|
+
declare const NOTIFICATION_KINDS: readonly ["ACHIEVEMENT", "SESSION_PROGRESS", "NEW_FOLLOWER"];
|
|
1421
|
+
type NotificationKind = (typeof NOTIFICATION_KINDS)[number];
|
|
1422
|
+
/** Sources older than this many days are never gathered. */
|
|
1423
|
+
declare const NOTIFICATIONS_LOOKBACK_DAYS = 30;
|
|
1424
|
+
/** Notifications are kept this many days, then removed. */
|
|
1425
|
+
declare const NOTIFICATIONS_RETENTION_DAYS = 90;
|
|
1426
|
+
/** The list returns at most this many, newest first. */
|
|
1427
|
+
declare const NOTIFICATIONS_LIST_LIMIT = 50;
|
|
1428
|
+
interface NotificationBase {
|
|
1429
|
+
id: string;
|
|
1430
|
+
/** When the announced thing happened, not when it was gathered. */
|
|
1431
|
+
createdAt: IsoDateString;
|
|
1432
|
+
readAt: IsoDateString | null;
|
|
1433
|
+
}
|
|
1434
|
+
interface AchievementNotification extends NotificationBase {
|
|
1435
|
+
kind: 'ACHIEVEMENT';
|
|
1436
|
+
achievement: {
|
|
1437
|
+
id: string;
|
|
1438
|
+
title: string;
|
|
1439
|
+
description: string;
|
|
1440
|
+
};
|
|
1441
|
+
}
|
|
1442
|
+
interface SessionProgressNotification extends NotificationBase {
|
|
1443
|
+
kind: 'SESSION_PROGRESS';
|
|
1444
|
+
session: {
|
|
1445
|
+
id: string;
|
|
1446
|
+
routineName: string;
|
|
1447
|
+
dayName: string | null;
|
|
1448
|
+
/** Exercises with a new personal record in the session. */
|
|
1449
|
+
recordCount: number;
|
|
1450
|
+
/** Exercises whose next prescription the session changed. */
|
|
1451
|
+
progressionCount: number;
|
|
1452
|
+
};
|
|
1453
|
+
}
|
|
1454
|
+
interface NewFollowerNotification extends NotificationBase {
|
|
1455
|
+
kind: 'NEW_FOLLOWER';
|
|
1456
|
+
actor: {
|
|
1457
|
+
id: string;
|
|
1458
|
+
username: string;
|
|
1459
|
+
name: string;
|
|
1460
|
+
lastName: string | null;
|
|
1461
|
+
avatarUrl: string | null;
|
|
1462
|
+
/** Whether the recipient follows them back now. */
|
|
1463
|
+
isFollowedByMe: boolean;
|
|
1464
|
+
};
|
|
1465
|
+
}
|
|
1466
|
+
/** Named to stay clear of the DOM's `Notification`. */
|
|
1467
|
+
type AppNotification = AchievementNotification | SessionProgressNotification | NewFollowerNotification;
|
|
1468
|
+
/** GET /notifications */
|
|
1469
|
+
interface NotificationsResponse {
|
|
1470
|
+
notifications: AppNotification[];
|
|
1471
|
+
unreadCount: number;
|
|
1472
|
+
}
|
|
1473
|
+
/** POST /notifications/read. Without ids, every notification is marked read. */
|
|
1474
|
+
interface MarkNotificationsReadRequest {
|
|
1475
|
+
ids?: string[];
|
|
1476
|
+
}
|
|
1477
|
+
interface MarkNotificationsReadResponse {
|
|
1478
|
+
unreadCount: number;
|
|
1479
|
+
}
|
|
1480
|
+
|
|
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",
|
|
@@ -350,6 +357,16 @@ var PLATEAU_MIN_DAYS_SINCE_BEST = 21;
|
|
|
350
357
|
var PLATEAU_RECENT_DAYS = 21;
|
|
351
358
|
var PLATEAU_MIN_SESSIONS_MIN = 3;
|
|
352
359
|
var PLATEAU_MIN_SESSIONS_MAX = 8;
|
|
360
|
+
|
|
361
|
+
// src/notifications.ts
|
|
362
|
+
var NOTIFICATION_KINDS = [
|
|
363
|
+
"ACHIEVEMENT",
|
|
364
|
+
"SESSION_PROGRESS",
|
|
365
|
+
"NEW_FOLLOWER"
|
|
366
|
+
];
|
|
367
|
+
var NOTIFICATIONS_LOOKBACK_DAYS = 30;
|
|
368
|
+
var NOTIFICATIONS_RETENTION_DAYS = 90;
|
|
369
|
+
var NOTIFICATIONS_LIST_LIMIT = 50;
|
|
353
370
|
export {
|
|
354
371
|
ACHIEVEMENT_CATEGORIES,
|
|
355
372
|
ACHIEVEMENT_DEFINITIONS,
|
|
@@ -360,6 +377,9 @@ export {
|
|
|
360
377
|
COMEBACK_WINDOW_DAYS,
|
|
361
378
|
EXERCISE_EQUIPMENT,
|
|
362
379
|
EXERCISE_MECHANICS,
|
|
380
|
+
FEATURED_PROFILE_ITEMS_MAX,
|
|
381
|
+
FEATURED_PROFILE_ITEM_KINDS,
|
|
382
|
+
FEATURED_PROFILE_REFERENCE_MAX_LENGTH,
|
|
363
383
|
FOLLOW_SUGGESTIONS_DEFAULT_LIMIT,
|
|
364
384
|
FOLLOW_SUGGESTIONS_MAX_LIMIT,
|
|
365
385
|
FOLLOW_SUGGESTION_REASONS,
|
|
@@ -368,6 +388,10 @@ export {
|
|
|
368
388
|
MEASURABLE_GOAL_TYPES,
|
|
369
389
|
MOVEMENT_PATTERNS,
|
|
370
390
|
MUSCLE_GROUPS,
|
|
391
|
+
NOTIFICATIONS_LIST_LIMIT,
|
|
392
|
+
NOTIFICATIONS_LOOKBACK_DAYS,
|
|
393
|
+
NOTIFICATIONS_RETENTION_DAYS,
|
|
394
|
+
NOTIFICATION_KINDS,
|
|
371
395
|
PLATEAU_MIN_DAYS_SINCE_BEST,
|
|
372
396
|
PLATEAU_MIN_SESSIONS,
|
|
373
397
|
PLATEAU_MIN_SESSIONS_MAX,
|