@sunsteel/contracts 0.25.0 → 0.27.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
@@ -20,9 +20,15 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
+ EXERCISE_EQUIPMENT: () => EXERCISE_EQUIPMENT,
24
+ EXERCISE_MECHANICS: () => EXERCISE_MECHANICS,
23
25
  FOLLOW_SUGGESTIONS_DEFAULT_LIMIT: () => FOLLOW_SUGGESTIONS_DEFAULT_LIMIT,
24
26
  FOLLOW_SUGGESTIONS_MAX_LIMIT: () => FOLLOW_SUGGESTIONS_MAX_LIMIT,
25
27
  FOLLOW_SUGGESTION_REASONS: () => FOLLOW_SUGGESTION_REASONS,
28
+ MEASURABLE_GOALS_MAX: () => MEASURABLE_GOALS_MAX,
29
+ MEASURABLE_GOAL_DIRECTIONS: () => MEASURABLE_GOAL_DIRECTIONS,
30
+ MEASURABLE_GOAL_TYPES: () => MEASURABLE_GOAL_TYPES,
31
+ MOVEMENT_PATTERNS: () => MOVEMENT_PATTERNS,
26
32
  MUSCLE_GROUPS: () => MUSCLE_GROUPS,
27
33
  PREFERRED_TRAINING_STYLE_VALUES: () => PREFERRED_TRAINING_STYLE_VALUES,
28
34
  PROFILE_BIO_MAX_LENGTH: () => PROFILE_BIO_MAX_LENGTH,
@@ -178,6 +184,59 @@ var FOLLOW_SUGGESTION_REASONS = [
178
184
  "FOLLOWED_BY_PEOPLE_YOU_FOLLOW"
179
185
  ];
180
186
 
187
+ // src/exercise.ts
188
+ var MOVEMENT_PATTERNS = [
189
+ "HORIZONTAL_PUSH",
190
+ "VERTICAL_PUSH",
191
+ "HORIZONTAL_PULL",
192
+ "VERTICAL_PULL",
193
+ "SQUAT",
194
+ "HINGE",
195
+ "LUNGE",
196
+ "CHEST_FLY",
197
+ "SHOULDER_ABDUCTION",
198
+ "SHOULDER_FLEXION",
199
+ "SHOULDER_HORIZONTAL_ABDUCTION",
200
+ "SHOULDER_EXTENSION",
201
+ "SCAPULAR_ELEVATION",
202
+ "ELBOW_FLEXION",
203
+ "ELBOW_EXTENSION",
204
+ "KNEE_EXTENSION",
205
+ "KNEE_FLEXION",
206
+ "HIP_EXTENSION",
207
+ "PLANTAR_FLEXION",
208
+ "CORE_FLEXION",
209
+ "CORE_ROTATION",
210
+ "CORE_STABILITY"
211
+ ];
212
+ var EXERCISE_MECHANICS = ["COMPOUND", "ISOLATION"];
213
+ var EXERCISE_EQUIPMENT = [
214
+ "barbell",
215
+ "ez-bar",
216
+ "dumbbell",
217
+ "cable",
218
+ "machine",
219
+ "smith-machine",
220
+ "bench",
221
+ "incline-bench",
222
+ "preacher-bench",
223
+ "rack",
224
+ "pull-up-bar",
225
+ "dip-station",
226
+ "bodyweight"
227
+ ];
228
+
229
+ // src/goals.ts
230
+ var MEASURABLE_GOAL_TYPES = [
231
+ "WEEKLY_SESSIONS",
232
+ "WEEKLY_VOLUME",
233
+ "STREAK_DAYS",
234
+ "EXERCISE_ESTIMATED_1RM",
235
+ "BODY_WEIGHT"
236
+ ];
237
+ var MEASURABLE_GOAL_DIRECTIONS = ["AT_LEAST", "AT_MOST"];
238
+ var MEASURABLE_GOALS_MAX = 8;
239
+
181
240
  // src/workout.ts
182
241
  var SESSION_SHARE_FIELDS = [
183
242
  "duration",
@@ -207,9 +266,15 @@ var PROGRESS_TIMELINE_EVENT_TYPES = [
207
266
  ];
208
267
  // Annotate the CommonJS export names for ESM import in node:
209
268
  0 && (module.exports = {
269
+ EXERCISE_EQUIPMENT,
270
+ EXERCISE_MECHANICS,
210
271
  FOLLOW_SUGGESTIONS_DEFAULT_LIMIT,
211
272
  FOLLOW_SUGGESTIONS_MAX_LIMIT,
212
273
  FOLLOW_SUGGESTION_REASONS,
274
+ MEASURABLE_GOALS_MAX,
275
+ MEASURABLE_GOAL_DIRECTIONS,
276
+ MEASURABLE_GOAL_TYPES,
277
+ MOVEMENT_PATTERNS,
213
278
  MUSCLE_GROUPS,
214
279
  PREFERRED_TRAINING_STYLE_VALUES,
215
280
  PROFILE_BIO_MAX_LENGTH,
package/dist/index.d.cts CHANGED
@@ -799,16 +799,90 @@ interface SupabaseMigrationResponse {
799
799
  email: string;
800
800
  }
801
801
 
802
+ /**
803
+ * How an exercise moves (EXER-09). Compound patterns first, then the
804
+ * single-joint actions the catalog uses. Alternatives start from this plus
805
+ * primary muscles; `substitutionGroup` is the narrower, near-identical set.
806
+ */
807
+ declare const MOVEMENT_PATTERNS: readonly ["HORIZONTAL_PUSH", "VERTICAL_PUSH", "HORIZONTAL_PULL", "VERTICAL_PULL", "SQUAT", "HINGE", "LUNGE", "CHEST_FLY", "SHOULDER_ABDUCTION", "SHOULDER_FLEXION", "SHOULDER_HORIZONTAL_ABDUCTION", "SHOULDER_EXTENSION", "SCAPULAR_ELEVATION", "ELBOW_FLEXION", "ELBOW_EXTENSION", "KNEE_EXTENSION", "KNEE_FLEXION", "HIP_EXTENSION", "PLANTAR_FLEXION", "CORE_FLEXION", "CORE_ROTATION", "CORE_STABILITY"];
808
+ type MovementPattern = (typeof MOVEMENT_PATTERNS)[number];
809
+ declare const EXERCISE_MECHANICS: readonly ["COMPOUND", "ISOLATION"];
810
+ type ExerciseMechanic = (typeof EXERCISE_MECHANICS)[number];
811
+ /**
812
+ * Closed, lowercase vocabulary for what an exercise needs. Lowercase so it can
813
+ * be compared with the free-text equipment users list on a training location
814
+ * (PREF-01), which is normalized to lowercase.
815
+ */
816
+ declare const EXERCISE_EQUIPMENT: readonly ["barbell", "ez-bar", "dumbbell", "cable", "machine", "smith-machine", "bench", "incline-bench", "preacher-bench", "rack", "pull-up-bar", "dip-station", "bodyweight"];
817
+ type ExerciseEquipment = (typeof EXERCISE_EQUIPMENT)[number];
802
818
  interface Exercise {
803
819
  id: string;
804
820
  name: string;
805
821
  primaryMuscles: MuscleGroup[];
806
822
  secondaryMuscles: MuscleGroup[];
823
+ /** The primary implement, kept for existing displays. */
807
824
  equipment: string;
825
+ /** Null only for entries without catalog metadata (e.g. future custom exercises). */
826
+ movementPattern: MovementPattern | null;
827
+ mechanic: ExerciseMechanic | null;
828
+ /** Everything needed to perform the exercise, from `EXERCISE_EQUIPMENT`. */
829
+ equipmentRequired: ExerciseEquipment[];
830
+ /** Near-identical exercises share a group and can replace each other. */
831
+ substitutionGroup: string | null;
832
+ /** Ordered cues; empty until the content work in EXER-03 lands. */
833
+ instructions: string[];
834
+ /** Demonstration asset; null until EXER-04 supplies licensed media. */
835
+ mediaUrl: string | null;
808
836
  createdAt: IsoDateString;
809
837
  updatedAt: IsoDateString;
810
838
  }
811
839
 
840
+ declare const MEASURABLE_GOAL_TYPES: readonly ["WEEKLY_SESSIONS", "WEEKLY_VOLUME", "STREAK_DAYS", "EXERCISE_ESTIMATED_1RM", "BODY_WEIGHT"];
841
+ type MeasurableGoalType = (typeof MEASURABLE_GOAL_TYPES)[number];
842
+ declare const MEASURABLE_GOAL_DIRECTIONS: readonly ["AT_LEAST", "AT_MOST"];
843
+ type MeasurableGoalDirection = (typeof MEASURABLE_GOAL_DIRECTIONS)[number];
844
+ declare const MEASURABLE_GOALS_MAX = 8;
845
+ interface MeasurableGoalExercise {
846
+ id: string;
847
+ name: string;
848
+ }
849
+ /** A private target stored in canonical units (kg where applicable). */
850
+ interface MeasurableGoal {
851
+ id: string;
852
+ type: MeasurableGoalType;
853
+ targetValue: number;
854
+ direction: MeasurableGoalDirection;
855
+ exercise?: MeasurableGoalExercise | null;
856
+ createdAt: IsoDateString;
857
+ updatedAt: IsoDateString;
858
+ }
859
+ interface MeasurableGoalInput {
860
+ id?: string;
861
+ type: MeasurableGoalType;
862
+ targetValue: number;
863
+ /** Only BODY_WEIGHT may use AT_MOST; every other goal is AT_LEAST. */
864
+ direction?: MeasurableGoalDirection;
865
+ /** Required only for EXERCISE_ESTIMATED_1RM. */
866
+ exerciseId?: string;
867
+ }
868
+ interface ReplaceMeasurableGoalsRequest {
869
+ goals: MeasurableGoalInput[];
870
+ }
871
+ interface PersonalGoalProgress extends MeasurableGoal {
872
+ currentValue: number | null;
873
+ remainingValue: number | null;
874
+ progressPercent: number | null;
875
+ achieved: boolean | null;
876
+ /** Monday-based local week for WEEKLY_SESSIONS and WEEKLY_VOLUME. */
877
+ periodStart?: string;
878
+ }
879
+ /** Stable successful response of GET /workouts/progress/goals. */
880
+ interface PersonalGoalsResponse {
881
+ timeZone: string;
882
+ asOf: IsoDateString;
883
+ goals: PersonalGoalProgress[];
884
+ }
885
+
812
886
  interface RoutineSet {
813
887
  setNumber: number;
814
888
  repType: RepType;
@@ -873,4 +947,4 @@ interface CreateRoutineRequest {
873
947
  }
874
948
  type UpdateRoutineRequest = Partial<CreateRoutineRequest>;
875
949
 
876
- export { type Brand, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateSessionShareRequest, type EarnedPersonalRecord, type Exercise, type ExerciseId, type ExercisePerformanceHistoryQuery, type ExercisePerformanceHistoryResponse, type ExercisePerformancePrescription, type ExercisePerformancePrescriptionSet, type ExercisePerformanceSession, type ExercisePerformanceSet, type ExercisePerformanceSummary, 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, MUSCLE_GROUPS, type MuscleGroup, type MuscleGroupHeatmapQuery, type MuscleGroupHeatmapResponse, type MuscleGroupHeatmapValue, type MuscleGroupHeatmapWeek, type MuscleVolumeTrendSeries, 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 PersonalRecordEntry, type PersonalRecordKind, type PlatePairInventory, 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, REP_TYPES, RESERVED_USERNAMES, type RecentActivityEntry, type RelationshipListKind, type RelationshipListQuery, type RelationshipListResponse, type RelationshipMember, type RepType, type ReplaceTrainingLocationsRequest, type Routine, type RoutineDay, type RoutineDayId, type RoutineExercise, type RoutineId, type RoutineSet, SESSION_SHARE_DEFAULT_FIELDS, SESSION_SHARE_FIELDS, SESSION_SHARE_MAX_ACTIVE_LINKS, SEXES, type SessionComparisonExercise, type SessionComparisonQuery, type SessionComparisonResponse, type SessionComparisonRoutineDay, type SessionComparisonSession, type SessionComparisonSet, type SessionRecapRecord, type SessionShare, type SessionShareField, type SessionShareListResponse, type SetAccountTimeZoneRequest, type SetLog, type Sex, type SharedSessionOwner, type SharedSessionRecap, type StartWorkoutRequest, type StartWorkoutResponse, 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 };
950
+ export { type Brand, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateSessionShareRequest, EXERCISE_EQUIPMENT, EXERCISE_MECHANICS, 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 ExerciseStrengthSummary, type ExerciseStrengthTrendPoint, type ExerciseStrengthTrendQuery, type ExerciseStrengthTrendResponse, FOLLOW_SUGGESTIONS_DEFAULT_LIMIT, FOLLOW_SUGGESTIONS_MAX_LIMIT, FOLLOW_SUGGESTION_REASONS, type FinishStatus, type FinishWorkoutRequest, type FinishWorkoutResponse, type FollowSuggestion, type FollowSuggestionReason, type FollowSuggestionsResponse, type IsoDateString, type ListSessionsParams, MEASURABLE_GOALS_MAX, MEASURABLE_GOAL_DIRECTIONS, MEASURABLE_GOAL_TYPES, MOVEMENT_PATTERNS, MUSCLE_GROUPS, type MeasurableGoal, type MeasurableGoalDirection, type MeasurableGoalExercise, type MeasurableGoalInput, type MeasurableGoalType, type MovementPattern, type MuscleGroup, type MuscleGroupHeatmapQuery, type MuscleGroupHeatmapResponse, type MuscleGroupHeatmapValue, type MuscleGroupHeatmapWeek, type MuscleVolumeTrendSeries, 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 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, REP_TYPES, RESERVED_USERNAMES, type RecentActivityEntry, type RelationshipListKind, type RelationshipListQuery, type RelationshipListResponse, type RelationshipMember, type RepType, type ReplaceMeasurableGoalsRequest, type ReplaceTrainingLocationsRequest, type Routine, type RoutineDay, type RoutineDayId, type RoutineExercise, type RoutineId, type RoutineSet, SESSION_SHARE_DEFAULT_FIELDS, SESSION_SHARE_FIELDS, SESSION_SHARE_MAX_ACTIVE_LINKS, SEXES, type SessionComparisonExercise, type SessionComparisonQuery, type SessionComparisonResponse, type SessionComparisonRoutineDay, type SessionComparisonSession, type SessionComparisonSet, type SessionRecapRecord, type SessionShare, type SessionShareField, type SessionShareListResponse, type SetAccountTimeZoneRequest, type SetLog, type Sex, type SharedSessionOwner, type SharedSessionRecap, type StartWorkoutRequest, type StartWorkoutResponse, 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 };
package/dist/index.d.ts CHANGED
@@ -799,16 +799,90 @@ interface SupabaseMigrationResponse {
799
799
  email: string;
800
800
  }
801
801
 
802
+ /**
803
+ * How an exercise moves (EXER-09). Compound patterns first, then the
804
+ * single-joint actions the catalog uses. Alternatives start from this plus
805
+ * primary muscles; `substitutionGroup` is the narrower, near-identical set.
806
+ */
807
+ declare const MOVEMENT_PATTERNS: readonly ["HORIZONTAL_PUSH", "VERTICAL_PUSH", "HORIZONTAL_PULL", "VERTICAL_PULL", "SQUAT", "HINGE", "LUNGE", "CHEST_FLY", "SHOULDER_ABDUCTION", "SHOULDER_FLEXION", "SHOULDER_HORIZONTAL_ABDUCTION", "SHOULDER_EXTENSION", "SCAPULAR_ELEVATION", "ELBOW_FLEXION", "ELBOW_EXTENSION", "KNEE_EXTENSION", "KNEE_FLEXION", "HIP_EXTENSION", "PLANTAR_FLEXION", "CORE_FLEXION", "CORE_ROTATION", "CORE_STABILITY"];
808
+ type MovementPattern = (typeof MOVEMENT_PATTERNS)[number];
809
+ declare const EXERCISE_MECHANICS: readonly ["COMPOUND", "ISOLATION"];
810
+ type ExerciseMechanic = (typeof EXERCISE_MECHANICS)[number];
811
+ /**
812
+ * Closed, lowercase vocabulary for what an exercise needs. Lowercase so it can
813
+ * be compared with the free-text equipment users list on a training location
814
+ * (PREF-01), which is normalized to lowercase.
815
+ */
816
+ declare const EXERCISE_EQUIPMENT: readonly ["barbell", "ez-bar", "dumbbell", "cable", "machine", "smith-machine", "bench", "incline-bench", "preacher-bench", "rack", "pull-up-bar", "dip-station", "bodyweight"];
817
+ type ExerciseEquipment = (typeof EXERCISE_EQUIPMENT)[number];
802
818
  interface Exercise {
803
819
  id: string;
804
820
  name: string;
805
821
  primaryMuscles: MuscleGroup[];
806
822
  secondaryMuscles: MuscleGroup[];
823
+ /** The primary implement, kept for existing displays. */
807
824
  equipment: string;
825
+ /** Null only for entries without catalog metadata (e.g. future custom exercises). */
826
+ movementPattern: MovementPattern | null;
827
+ mechanic: ExerciseMechanic | null;
828
+ /** Everything needed to perform the exercise, from `EXERCISE_EQUIPMENT`. */
829
+ equipmentRequired: ExerciseEquipment[];
830
+ /** Near-identical exercises share a group and can replace each other. */
831
+ substitutionGroup: string | null;
832
+ /** Ordered cues; empty until the content work in EXER-03 lands. */
833
+ instructions: string[];
834
+ /** Demonstration asset; null until EXER-04 supplies licensed media. */
835
+ mediaUrl: string | null;
808
836
  createdAt: IsoDateString;
809
837
  updatedAt: IsoDateString;
810
838
  }
811
839
 
840
+ declare const MEASURABLE_GOAL_TYPES: readonly ["WEEKLY_SESSIONS", "WEEKLY_VOLUME", "STREAK_DAYS", "EXERCISE_ESTIMATED_1RM", "BODY_WEIGHT"];
841
+ type MeasurableGoalType = (typeof MEASURABLE_GOAL_TYPES)[number];
842
+ declare const MEASURABLE_GOAL_DIRECTIONS: readonly ["AT_LEAST", "AT_MOST"];
843
+ type MeasurableGoalDirection = (typeof MEASURABLE_GOAL_DIRECTIONS)[number];
844
+ declare const MEASURABLE_GOALS_MAX = 8;
845
+ interface MeasurableGoalExercise {
846
+ id: string;
847
+ name: string;
848
+ }
849
+ /** A private target stored in canonical units (kg where applicable). */
850
+ interface MeasurableGoal {
851
+ id: string;
852
+ type: MeasurableGoalType;
853
+ targetValue: number;
854
+ direction: MeasurableGoalDirection;
855
+ exercise?: MeasurableGoalExercise | null;
856
+ createdAt: IsoDateString;
857
+ updatedAt: IsoDateString;
858
+ }
859
+ interface MeasurableGoalInput {
860
+ id?: string;
861
+ type: MeasurableGoalType;
862
+ targetValue: number;
863
+ /** Only BODY_WEIGHT may use AT_MOST; every other goal is AT_LEAST. */
864
+ direction?: MeasurableGoalDirection;
865
+ /** Required only for EXERCISE_ESTIMATED_1RM. */
866
+ exerciseId?: string;
867
+ }
868
+ interface ReplaceMeasurableGoalsRequest {
869
+ goals: MeasurableGoalInput[];
870
+ }
871
+ interface PersonalGoalProgress extends MeasurableGoal {
872
+ currentValue: number | null;
873
+ remainingValue: number | null;
874
+ progressPercent: number | null;
875
+ achieved: boolean | null;
876
+ /** Monday-based local week for WEEKLY_SESSIONS and WEEKLY_VOLUME. */
877
+ periodStart?: string;
878
+ }
879
+ /** Stable successful response of GET /workouts/progress/goals. */
880
+ interface PersonalGoalsResponse {
881
+ timeZone: string;
882
+ asOf: IsoDateString;
883
+ goals: PersonalGoalProgress[];
884
+ }
885
+
812
886
  interface RoutineSet {
813
887
  setNumber: number;
814
888
  repType: RepType;
@@ -873,4 +947,4 @@ interface CreateRoutineRequest {
873
947
  }
874
948
  type UpdateRoutineRequest = Partial<CreateRoutineRequest>;
875
949
 
876
- export { type Brand, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateSessionShareRequest, type EarnedPersonalRecord, type Exercise, type ExerciseId, type ExercisePerformanceHistoryQuery, type ExercisePerformanceHistoryResponse, type ExercisePerformancePrescription, type ExercisePerformancePrescriptionSet, type ExercisePerformanceSession, type ExercisePerformanceSet, type ExercisePerformanceSummary, 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, MUSCLE_GROUPS, type MuscleGroup, type MuscleGroupHeatmapQuery, type MuscleGroupHeatmapResponse, type MuscleGroupHeatmapValue, type MuscleGroupHeatmapWeek, type MuscleVolumeTrendSeries, 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 PersonalRecordEntry, type PersonalRecordKind, type PlatePairInventory, 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, REP_TYPES, RESERVED_USERNAMES, type RecentActivityEntry, type RelationshipListKind, type RelationshipListQuery, type RelationshipListResponse, type RelationshipMember, type RepType, type ReplaceTrainingLocationsRequest, type Routine, type RoutineDay, type RoutineDayId, type RoutineExercise, type RoutineId, type RoutineSet, SESSION_SHARE_DEFAULT_FIELDS, SESSION_SHARE_FIELDS, SESSION_SHARE_MAX_ACTIVE_LINKS, SEXES, type SessionComparisonExercise, type SessionComparisonQuery, type SessionComparisonResponse, type SessionComparisonRoutineDay, type SessionComparisonSession, type SessionComparisonSet, type SessionRecapRecord, type SessionShare, type SessionShareField, type SessionShareListResponse, type SetAccountTimeZoneRequest, type SetLog, type Sex, type SharedSessionOwner, type SharedSessionRecap, type StartWorkoutRequest, type StartWorkoutResponse, 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 };
950
+ export { type Brand, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateSessionShareRequest, EXERCISE_EQUIPMENT, EXERCISE_MECHANICS, 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 ExerciseStrengthSummary, type ExerciseStrengthTrendPoint, type ExerciseStrengthTrendQuery, type ExerciseStrengthTrendResponse, FOLLOW_SUGGESTIONS_DEFAULT_LIMIT, FOLLOW_SUGGESTIONS_MAX_LIMIT, FOLLOW_SUGGESTION_REASONS, type FinishStatus, type FinishWorkoutRequest, type FinishWorkoutResponse, type FollowSuggestion, type FollowSuggestionReason, type FollowSuggestionsResponse, type IsoDateString, type ListSessionsParams, MEASURABLE_GOALS_MAX, MEASURABLE_GOAL_DIRECTIONS, MEASURABLE_GOAL_TYPES, MOVEMENT_PATTERNS, MUSCLE_GROUPS, type MeasurableGoal, type MeasurableGoalDirection, type MeasurableGoalExercise, type MeasurableGoalInput, type MeasurableGoalType, type MovementPattern, type MuscleGroup, type MuscleGroupHeatmapQuery, type MuscleGroupHeatmapResponse, type MuscleGroupHeatmapValue, type MuscleGroupHeatmapWeek, type MuscleVolumeTrendSeries, 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 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, REP_TYPES, RESERVED_USERNAMES, type RecentActivityEntry, type RelationshipListKind, type RelationshipListQuery, type RelationshipListResponse, type RelationshipMember, type RepType, type ReplaceMeasurableGoalsRequest, type ReplaceTrainingLocationsRequest, type Routine, type RoutineDay, type RoutineDayId, type RoutineExercise, type RoutineId, type RoutineSet, SESSION_SHARE_DEFAULT_FIELDS, SESSION_SHARE_FIELDS, SESSION_SHARE_MAX_ACTIVE_LINKS, SEXES, type SessionComparisonExercise, type SessionComparisonQuery, type SessionComparisonResponse, type SessionComparisonRoutineDay, type SessionComparisonSession, type SessionComparisonSet, type SessionRecapRecord, type SessionShare, type SessionShareField, type SessionShareListResponse, type SetAccountTimeZoneRequest, type SetLog, type Sex, type SharedSessionOwner, type SharedSessionRecap, type StartWorkoutRequest, type StartWorkoutResponse, 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 };
package/dist/index.js CHANGED
@@ -122,6 +122,59 @@ var FOLLOW_SUGGESTION_REASONS = [
122
122
  "FOLLOWED_BY_PEOPLE_YOU_FOLLOW"
123
123
  ];
124
124
 
125
+ // src/exercise.ts
126
+ var MOVEMENT_PATTERNS = [
127
+ "HORIZONTAL_PUSH",
128
+ "VERTICAL_PUSH",
129
+ "HORIZONTAL_PULL",
130
+ "VERTICAL_PULL",
131
+ "SQUAT",
132
+ "HINGE",
133
+ "LUNGE",
134
+ "CHEST_FLY",
135
+ "SHOULDER_ABDUCTION",
136
+ "SHOULDER_FLEXION",
137
+ "SHOULDER_HORIZONTAL_ABDUCTION",
138
+ "SHOULDER_EXTENSION",
139
+ "SCAPULAR_ELEVATION",
140
+ "ELBOW_FLEXION",
141
+ "ELBOW_EXTENSION",
142
+ "KNEE_EXTENSION",
143
+ "KNEE_FLEXION",
144
+ "HIP_EXTENSION",
145
+ "PLANTAR_FLEXION",
146
+ "CORE_FLEXION",
147
+ "CORE_ROTATION",
148
+ "CORE_STABILITY"
149
+ ];
150
+ var EXERCISE_MECHANICS = ["COMPOUND", "ISOLATION"];
151
+ var EXERCISE_EQUIPMENT = [
152
+ "barbell",
153
+ "ez-bar",
154
+ "dumbbell",
155
+ "cable",
156
+ "machine",
157
+ "smith-machine",
158
+ "bench",
159
+ "incline-bench",
160
+ "preacher-bench",
161
+ "rack",
162
+ "pull-up-bar",
163
+ "dip-station",
164
+ "bodyweight"
165
+ ];
166
+
167
+ // src/goals.ts
168
+ var MEASURABLE_GOAL_TYPES = [
169
+ "WEEKLY_SESSIONS",
170
+ "WEEKLY_VOLUME",
171
+ "STREAK_DAYS",
172
+ "EXERCISE_ESTIMATED_1RM",
173
+ "BODY_WEIGHT"
174
+ ];
175
+ var MEASURABLE_GOAL_DIRECTIONS = ["AT_LEAST", "AT_MOST"];
176
+ var MEASURABLE_GOALS_MAX = 8;
177
+
125
178
  // src/workout.ts
126
179
  var SESSION_SHARE_FIELDS = [
127
180
  "duration",
@@ -150,9 +203,15 @@ var PROGRESS_TIMELINE_EVENT_TYPES = [
150
203
  "PROGRESSION_CHANGED"
151
204
  ];
152
205
  export {
206
+ EXERCISE_EQUIPMENT,
207
+ EXERCISE_MECHANICS,
153
208
  FOLLOW_SUGGESTIONS_DEFAULT_LIMIT,
154
209
  FOLLOW_SUGGESTIONS_MAX_LIMIT,
155
210
  FOLLOW_SUGGESTION_REASONS,
211
+ MEASURABLE_GOALS_MAX,
212
+ MEASURABLE_GOAL_DIRECTIONS,
213
+ MEASURABLE_GOAL_TYPES,
214
+ MOVEMENT_PATTERNS,
156
215
  MUSCLE_GROUPS,
157
216
  PREFERRED_TRAINING_STYLE_VALUES,
158
217
  PROFILE_BIO_MAX_LENGTH,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunsteel/contracts",
3
- "version": "0.25.0",
3
+ "version": "0.27.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ezee969/sunsteel-contracts.git"