@sunsteel/contracts 0.26.0 → 0.28.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
@@ -25,6 +25,9 @@ __export(index_exports, {
25
25
  FOLLOW_SUGGESTIONS_DEFAULT_LIMIT: () => FOLLOW_SUGGESTIONS_DEFAULT_LIMIT,
26
26
  FOLLOW_SUGGESTIONS_MAX_LIMIT: () => FOLLOW_SUGGESTIONS_MAX_LIMIT,
27
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,
28
31
  MOVEMENT_PATTERNS: () => MOVEMENT_PATTERNS,
29
32
  MUSCLE_GROUPS: () => MUSCLE_GROUPS,
30
33
  PREFERRED_TRAINING_STYLE_VALUES: () => PREFERRED_TRAINING_STYLE_VALUES,
@@ -223,6 +226,17 @@ var EXERCISE_EQUIPMENT = [
223
226
  "bodyweight"
224
227
  ];
225
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
+
226
240
  // src/workout.ts
227
241
  var SESSION_SHARE_FIELDS = [
228
242
  "duration",
@@ -257,6 +271,9 @@ var PROGRESS_TIMELINE_EVENT_TYPES = [
257
271
  FOLLOW_SUGGESTIONS_DEFAULT_LIMIT,
258
272
  FOLLOW_SUGGESTIONS_MAX_LIMIT,
259
273
  FOLLOW_SUGGESTION_REASONS,
274
+ MEASURABLE_GOALS_MAX,
275
+ MEASURABLE_GOAL_DIRECTIONS,
276
+ MEASURABLE_GOAL_TYPES,
260
277
  MOVEMENT_PATTERNS,
261
278
  MUSCLE_GROUPS,
262
279
  PREFERRED_TRAINING_STYLE_VALUES,
package/dist/index.d.cts CHANGED
@@ -50,6 +50,12 @@ interface WorkoutSession {
50
50
  notes?: string | null;
51
51
  lastActivityAt?: IsoDateString | null;
52
52
  setLogs?: SetLog[];
53
+ /**
54
+ * LIVE-11: slots performed with a different exercise in this session. The
55
+ * routine day (snapshot) keeps the original prescription; set logs for a
56
+ * substituted slot carry the substitute's `exerciseId`.
57
+ */
58
+ exerciseSubstitutions?: SessionExerciseSubstitution[];
53
59
  reused?: boolean;
54
60
  routine?: {
55
61
  id: string;
@@ -154,6 +160,38 @@ interface UpsertSetLogRequest {
154
160
  rpe?: number;
155
161
  isCompleted?: boolean;
156
162
  }
163
+ /**
164
+ * LIVE-11: an exercise performed in place of one routine slot for a single
165
+ * session. The substitute's muscles are captured when the swap is made, so
166
+ * later catalog changes cannot rewrite what the session trained.
167
+ */
168
+ interface SessionExerciseSubstitution {
169
+ /** The replaced slot, as in `routineDay.exercises[].id`. */
170
+ routineExerciseId: string;
171
+ exercise: {
172
+ id: string;
173
+ name: string;
174
+ primaryMuscles: MuscleGroup[];
175
+ secondaryMuscles: MuscleGroup[];
176
+ };
177
+ substitutedAt: IsoDateString;
178
+ }
179
+ /** Body of PUT /workouts/sessions/:id/exercises/:routineExerciseId/substitution. */
180
+ interface SubstituteSessionExerciseRequest {
181
+ exerciseId: string;
182
+ /** Also use this exercise in the routine from the next session on. */
183
+ applyToRoutine?: boolean;
184
+ }
185
+ /**
186
+ * Stable successful response of the substitution PUT and DELETE. A swap is
187
+ * refused once the slot has a completed set; incomplete drafts for the slot
188
+ * are cleared because their values belonged to the other exercise.
189
+ */
190
+ interface SubstituteSessionExerciseResponse {
191
+ session: WorkoutSession;
192
+ /** True only when `applyToRoutine` was asked for and the routine still has the slot. */
193
+ routineUpdated: boolean;
194
+ }
157
195
  type PersonalRecordKind = 'WEIGHT' | 'REPS' | 'VOLUME' | 'ESTIMATED_1RM';
158
196
  /** A record frontier crossed by the set mutation that produced this response. */
159
197
  interface EarnedPersonalRecord {
@@ -837,6 +875,52 @@ interface Exercise {
837
875
  updatedAt: IsoDateString;
838
876
  }
839
877
 
878
+ declare const MEASURABLE_GOAL_TYPES: readonly ["WEEKLY_SESSIONS", "WEEKLY_VOLUME", "STREAK_DAYS", "EXERCISE_ESTIMATED_1RM", "BODY_WEIGHT"];
879
+ type MeasurableGoalType = (typeof MEASURABLE_GOAL_TYPES)[number];
880
+ declare const MEASURABLE_GOAL_DIRECTIONS: readonly ["AT_LEAST", "AT_MOST"];
881
+ type MeasurableGoalDirection = (typeof MEASURABLE_GOAL_DIRECTIONS)[number];
882
+ declare const MEASURABLE_GOALS_MAX = 8;
883
+ interface MeasurableGoalExercise {
884
+ id: string;
885
+ name: string;
886
+ }
887
+ /** A private target stored in canonical units (kg where applicable). */
888
+ interface MeasurableGoal {
889
+ id: string;
890
+ type: MeasurableGoalType;
891
+ targetValue: number;
892
+ direction: MeasurableGoalDirection;
893
+ exercise?: MeasurableGoalExercise | null;
894
+ createdAt: IsoDateString;
895
+ updatedAt: IsoDateString;
896
+ }
897
+ interface MeasurableGoalInput {
898
+ id?: string;
899
+ type: MeasurableGoalType;
900
+ targetValue: number;
901
+ /** Only BODY_WEIGHT may use AT_MOST; every other goal is AT_LEAST. */
902
+ direction?: MeasurableGoalDirection;
903
+ /** Required only for EXERCISE_ESTIMATED_1RM. */
904
+ exerciseId?: string;
905
+ }
906
+ interface ReplaceMeasurableGoalsRequest {
907
+ goals: MeasurableGoalInput[];
908
+ }
909
+ interface PersonalGoalProgress extends MeasurableGoal {
910
+ currentValue: number | null;
911
+ remainingValue: number | null;
912
+ progressPercent: number | null;
913
+ achieved: boolean | null;
914
+ /** Monday-based local week for WEEKLY_SESSIONS and WEEKLY_VOLUME. */
915
+ periodStart?: string;
916
+ }
917
+ /** Stable successful response of GET /workouts/progress/goals. */
918
+ interface PersonalGoalsResponse {
919
+ timeZone: string;
920
+ asOf: IsoDateString;
921
+ goals: PersonalGoalProgress[];
922
+ }
923
+
840
924
  interface RoutineSet {
841
925
  setNumber: number;
842
926
  repType: RepType;
@@ -901,4 +985,4 @@ interface CreateRoutineRequest {
901
985
  }
902
986
  type UpdateRoutineRequest = Partial<CreateRoutineRequest>;
903
987
 
904
- 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, MOVEMENT_PATTERNS, MUSCLE_GROUPS, 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 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 };
988
+ 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 SessionExerciseSubstitution, type SessionRecapRecord, type SessionShare, type SessionShareField, type SessionShareListResponse, type SetAccountTimeZoneRequest, type SetLog, type Sex, type SharedSessionOwner, type SharedSessionRecap, type StartWorkoutRequest, type StartWorkoutResponse, 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 };
package/dist/index.d.ts CHANGED
@@ -50,6 +50,12 @@ interface WorkoutSession {
50
50
  notes?: string | null;
51
51
  lastActivityAt?: IsoDateString | null;
52
52
  setLogs?: SetLog[];
53
+ /**
54
+ * LIVE-11: slots performed with a different exercise in this session. The
55
+ * routine day (snapshot) keeps the original prescription; set logs for a
56
+ * substituted slot carry the substitute's `exerciseId`.
57
+ */
58
+ exerciseSubstitutions?: SessionExerciseSubstitution[];
53
59
  reused?: boolean;
54
60
  routine?: {
55
61
  id: string;
@@ -154,6 +160,38 @@ interface UpsertSetLogRequest {
154
160
  rpe?: number;
155
161
  isCompleted?: boolean;
156
162
  }
163
+ /**
164
+ * LIVE-11: an exercise performed in place of one routine slot for a single
165
+ * session. The substitute's muscles are captured when the swap is made, so
166
+ * later catalog changes cannot rewrite what the session trained.
167
+ */
168
+ interface SessionExerciseSubstitution {
169
+ /** The replaced slot, as in `routineDay.exercises[].id`. */
170
+ routineExerciseId: string;
171
+ exercise: {
172
+ id: string;
173
+ name: string;
174
+ primaryMuscles: MuscleGroup[];
175
+ secondaryMuscles: MuscleGroup[];
176
+ };
177
+ substitutedAt: IsoDateString;
178
+ }
179
+ /** Body of PUT /workouts/sessions/:id/exercises/:routineExerciseId/substitution. */
180
+ interface SubstituteSessionExerciseRequest {
181
+ exerciseId: string;
182
+ /** Also use this exercise in the routine from the next session on. */
183
+ applyToRoutine?: boolean;
184
+ }
185
+ /**
186
+ * Stable successful response of the substitution PUT and DELETE. A swap is
187
+ * refused once the slot has a completed set; incomplete drafts for the slot
188
+ * are cleared because their values belonged to the other exercise.
189
+ */
190
+ interface SubstituteSessionExerciseResponse {
191
+ session: WorkoutSession;
192
+ /** True only when `applyToRoutine` was asked for and the routine still has the slot. */
193
+ routineUpdated: boolean;
194
+ }
157
195
  type PersonalRecordKind = 'WEIGHT' | 'REPS' | 'VOLUME' | 'ESTIMATED_1RM';
158
196
  /** A record frontier crossed by the set mutation that produced this response. */
159
197
  interface EarnedPersonalRecord {
@@ -837,6 +875,52 @@ interface Exercise {
837
875
  updatedAt: IsoDateString;
838
876
  }
839
877
 
878
+ declare const MEASURABLE_GOAL_TYPES: readonly ["WEEKLY_SESSIONS", "WEEKLY_VOLUME", "STREAK_DAYS", "EXERCISE_ESTIMATED_1RM", "BODY_WEIGHT"];
879
+ type MeasurableGoalType = (typeof MEASURABLE_GOAL_TYPES)[number];
880
+ declare const MEASURABLE_GOAL_DIRECTIONS: readonly ["AT_LEAST", "AT_MOST"];
881
+ type MeasurableGoalDirection = (typeof MEASURABLE_GOAL_DIRECTIONS)[number];
882
+ declare const MEASURABLE_GOALS_MAX = 8;
883
+ interface MeasurableGoalExercise {
884
+ id: string;
885
+ name: string;
886
+ }
887
+ /** A private target stored in canonical units (kg where applicable). */
888
+ interface MeasurableGoal {
889
+ id: string;
890
+ type: MeasurableGoalType;
891
+ targetValue: number;
892
+ direction: MeasurableGoalDirection;
893
+ exercise?: MeasurableGoalExercise | null;
894
+ createdAt: IsoDateString;
895
+ updatedAt: IsoDateString;
896
+ }
897
+ interface MeasurableGoalInput {
898
+ id?: string;
899
+ type: MeasurableGoalType;
900
+ targetValue: number;
901
+ /** Only BODY_WEIGHT may use AT_MOST; every other goal is AT_LEAST. */
902
+ direction?: MeasurableGoalDirection;
903
+ /** Required only for EXERCISE_ESTIMATED_1RM. */
904
+ exerciseId?: string;
905
+ }
906
+ interface ReplaceMeasurableGoalsRequest {
907
+ goals: MeasurableGoalInput[];
908
+ }
909
+ interface PersonalGoalProgress extends MeasurableGoal {
910
+ currentValue: number | null;
911
+ remainingValue: number | null;
912
+ progressPercent: number | null;
913
+ achieved: boolean | null;
914
+ /** Monday-based local week for WEEKLY_SESSIONS and WEEKLY_VOLUME. */
915
+ periodStart?: string;
916
+ }
917
+ /** Stable successful response of GET /workouts/progress/goals. */
918
+ interface PersonalGoalsResponse {
919
+ timeZone: string;
920
+ asOf: IsoDateString;
921
+ goals: PersonalGoalProgress[];
922
+ }
923
+
840
924
  interface RoutineSet {
841
925
  setNumber: number;
842
926
  repType: RepType;
@@ -901,4 +985,4 @@ interface CreateRoutineRequest {
901
985
  }
902
986
  type UpdateRoutineRequest = Partial<CreateRoutineRequest>;
903
987
 
904
- 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, MOVEMENT_PATTERNS, MUSCLE_GROUPS, 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 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 };
988
+ 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 SessionExerciseSubstitution, type SessionRecapRecord, type SessionShare, type SessionShareField, type SessionShareListResponse, type SetAccountTimeZoneRequest, type SetLog, type Sex, type SharedSessionOwner, type SharedSessionRecap, type StartWorkoutRequest, type StartWorkoutResponse, 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 };
package/dist/index.js CHANGED
@@ -164,6 +164,17 @@ var EXERCISE_EQUIPMENT = [
164
164
  "bodyweight"
165
165
  ];
166
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
+
167
178
  // src/workout.ts
168
179
  var SESSION_SHARE_FIELDS = [
169
180
  "duration",
@@ -197,6 +208,9 @@ export {
197
208
  FOLLOW_SUGGESTIONS_DEFAULT_LIMIT,
198
209
  FOLLOW_SUGGESTIONS_MAX_LIMIT,
199
210
  FOLLOW_SUGGESTION_REASONS,
211
+ MEASURABLE_GOALS_MAX,
212
+ MEASURABLE_GOAL_DIRECTIONS,
213
+ MEASURABLE_GOAL_TYPES,
200
214
  MOVEMENT_PATTERNS,
201
215
  MUSCLE_GROUPS,
202
216
  PREFERRED_TRAINING_STYLE_VALUES,
package/package.json CHANGED
@@ -1,40 +1,40 @@
1
- {
2
- "name": "@sunsteel/contracts",
3
- "version": "0.26.0",
4
- "repository": {
5
- "type": "git",
6
- "url": "git+https://github.com/ezee969/sunsteel-contracts.git"
7
- },
8
- "private": false,
9
- "engines": {
10
- "node": ">=20.11"
11
- },
12
- "type": "module",
13
- "sideEffects": false,
14
- "main": "./dist/index.cjs",
15
- "module": "./dist/index.js",
16
- "types": "./dist/index.d.ts",
17
- "exports": {
18
- ".": {
19
- "types": "./dist/index.d.ts",
20
- "import": "./dist/index.js",
21
- "require": "./dist/index.cjs"
22
- }
23
- },
24
- "files": [
25
- "dist"
26
- ],
27
- "scripts": {
28
- "build": "tsup src/index.ts --format esm,cjs --dts --clean",
29
- "dev": "tsup src/index.ts --format esm,cjs --dts --watch",
30
- "typecheck": "tsc --noEmit",
31
- "lint": "npm run typecheck",
32
- "verify": "npm run typecheck && npm run build",
33
- "verify:security": "npm audit",
34
- "prepublishOnly": "npm run build"
35
- },
36
- "devDependencies": {
37
- "tsup": "^8.3.5",
38
- "typescript": "^5.7.3"
39
- }
40
- }
1
+ {
2
+ "name": "@sunsteel/contracts",
3
+ "version": "0.28.0",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "git+https://github.com/ezee969/sunsteel-contracts.git"
7
+ },
8
+ "private": false,
9
+ "engines": {
10
+ "node": ">=20.11"
11
+ },
12
+ "type": "module",
13
+ "sideEffects": false,
14
+ "main": "./dist/index.cjs",
15
+ "module": "./dist/index.js",
16
+ "types": "./dist/index.d.ts",
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/index.d.ts",
20
+ "import": "./dist/index.js",
21
+ "require": "./dist/index.cjs"
22
+ }
23
+ },
24
+ "files": [
25
+ "dist"
26
+ ],
27
+ "scripts": {
28
+ "build": "tsup src/index.ts --format esm,cjs --dts --clean",
29
+ "dev": "tsup src/index.ts --format esm,cjs --dts --watch",
30
+ "typecheck": "tsc --noEmit",
31
+ "lint": "npm run typecheck",
32
+ "verify": "npm run typecheck && npm run build",
33
+ "verify:security": "npm audit",
34
+ "prepublishOnly": "npm run build"
35
+ },
36
+ "devDependencies": {
37
+ "tsup": "^8.3.5",
38
+ "typescript": "^5.7.3"
39
+ }
40
+ }