@sunsteel/contracts 0.51.0 → 0.52.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 +17 -0
- package/dist/index.d.cts +84 -1
- package/dist/index.d.ts +84 -1
- package/dist/index.js +12 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -80,6 +80,11 @@ __export(index_exports, {
|
|
|
80
80
|
REST_ALERT_REFUSALS: () => REST_ALERT_REFUSALS,
|
|
81
81
|
ROUTINE_DAYS_MAX: () => ROUTINE_DAYS_MAX,
|
|
82
82
|
ROUTINE_DAY_NAME_MAX: () => ROUTINE_DAY_NAME_MAX,
|
|
83
|
+
ROUTINE_DISCOVERY_DEFAULT_LIMIT: () => ROUTINE_DISCOVERY_DEFAULT_LIMIT,
|
|
84
|
+
ROUTINE_DISCOVERY_MAX_LIMIT: () => ROUTINE_DISCOVERY_MAX_LIMIT,
|
|
85
|
+
ROUTINE_DISCOVERY_SCAN_LIMIT: () => ROUTINE_DISCOVERY_SCAN_LIMIT,
|
|
86
|
+
ROUTINE_DURATION_BANDS: () => ROUTINE_DURATION_BANDS,
|
|
87
|
+
ROUTINE_DURATION_BAND_MAX_MINUTES: () => ROUTINE_DURATION_BAND_MAX_MINUTES,
|
|
83
88
|
ROUTINE_SCHEDULE_MODES: () => ROUTINE_SCHEDULE_MODES,
|
|
84
89
|
ROUTINE_SHARE_MAX_ACTIVE_LINKS: () => ROUTINE_SHARE_MAX_ACTIVE_LINKS,
|
|
85
90
|
ROUTINE_VERSIONS_MAX: () => ROUTINE_VERSIONS_MAX,
|
|
@@ -459,6 +464,13 @@ var CLONE_ROUTINE_REFUSALS = {
|
|
|
459
464
|
UNKNOWN_EXERCISE: "UNKNOWN_EXERCISE"
|
|
460
465
|
};
|
|
461
466
|
|
|
467
|
+
// src/routine-discovery.ts
|
|
468
|
+
var ROUTINE_DURATION_BANDS = ["SHORT", "MEDIUM", "LONG"];
|
|
469
|
+
var ROUTINE_DURATION_BAND_MAX_MINUTES = { SHORT: 45, MEDIUM: 75 };
|
|
470
|
+
var ROUTINE_DISCOVERY_DEFAULT_LIMIT = 20;
|
|
471
|
+
var ROUTINE_DISCOVERY_MAX_LIMIT = 50;
|
|
472
|
+
var ROUTINE_DISCOVERY_SCAN_LIMIT = 500;
|
|
473
|
+
|
|
462
474
|
// src/schedule.ts
|
|
463
475
|
var SCHEDULE_OVERRIDE_KINDS = ["MOVE", "SKIP"];
|
|
464
476
|
var SCHEDULE_MOVE_MAX_DAYS = 6;
|
|
@@ -609,6 +621,11 @@ var STREAK_MAX_GAP_DAYS = 3;
|
|
|
609
621
|
REST_ALERT_REFUSALS,
|
|
610
622
|
ROUTINE_DAYS_MAX,
|
|
611
623
|
ROUTINE_DAY_NAME_MAX,
|
|
624
|
+
ROUTINE_DISCOVERY_DEFAULT_LIMIT,
|
|
625
|
+
ROUTINE_DISCOVERY_MAX_LIMIT,
|
|
626
|
+
ROUTINE_DISCOVERY_SCAN_LIMIT,
|
|
627
|
+
ROUTINE_DURATION_BANDS,
|
|
628
|
+
ROUTINE_DURATION_BAND_MAX_MINUTES,
|
|
612
629
|
ROUTINE_SCHEDULE_MODES,
|
|
613
630
|
ROUTINE_SHARE_MAX_ACTIVE_LINKS,
|
|
614
631
|
ROUTINE_VERSIONS_MAX,
|
package/dist/index.d.cts
CHANGED
|
@@ -974,6 +974,13 @@ interface Routine {
|
|
|
974
974
|
* this viewer is allowed to know about its source.
|
|
975
975
|
*/
|
|
976
976
|
lineage?: RoutineLineage | null;
|
|
977
|
+
/**
|
|
978
|
+
* ROUT-07: owner-declared, both optional. They are claims about the
|
|
979
|
+
* programme that only its author can make, which is why they are stored
|
|
980
|
+
* here rather than derived from the author's `PROF-05` training identity.
|
|
981
|
+
*/
|
|
982
|
+
goal?: TrainingGoal | null;
|
|
983
|
+
experienceLevel?: TrainingExperienceLevel | null;
|
|
977
984
|
days: RoutineDay[];
|
|
978
985
|
createdAt: IsoDateString;
|
|
979
986
|
updatedAt: IsoDateString;
|
|
@@ -981,6 +988,9 @@ interface Routine {
|
|
|
981
988
|
interface CreateRoutineRequest {
|
|
982
989
|
name: string;
|
|
983
990
|
description?: string;
|
|
991
|
+
/** ROUT-07; omitted means undeclared, which is not the same as a default. */
|
|
992
|
+
goal?: TrainingGoal | null;
|
|
993
|
+
experienceLevel?: TrainingExperienceLevel | null;
|
|
984
994
|
isPeriodized: boolean;
|
|
985
995
|
/** Defaults to WEEKLY. Changing it on update requires `days`. */
|
|
986
996
|
scheduleMode?: RoutineScheduleMode;
|
|
@@ -1555,6 +1565,79 @@ interface PersonalGoalsResponse {
|
|
|
1555
1565
|
goals: PersonalGoalProgress[];
|
|
1556
1566
|
}
|
|
1557
1567
|
|
|
1568
|
+
/** Owner-declared, both optional. Undeclared is not a default, it is unknown. */
|
|
1569
|
+
interface RoutineClassification {
|
|
1570
|
+
goal?: TrainingGoal | null;
|
|
1571
|
+
experienceLevel?: TrainingExperienceLevel | null;
|
|
1572
|
+
}
|
|
1573
|
+
/**
|
|
1574
|
+
* Derived from the routine's own exercises and the `EXER-09` catalog, never
|
|
1575
|
+
* stored: a stored facet drifts from the routine the moment an edit misses
|
|
1576
|
+
* its recompute.
|
|
1577
|
+
*/
|
|
1578
|
+
interface RoutineFacets {
|
|
1579
|
+
dayCount: number;
|
|
1580
|
+
exerciseCount: number;
|
|
1581
|
+
/** Muscles any day trains, primary or secondary, deduplicated. */
|
|
1582
|
+
muscles: MuscleGroup[];
|
|
1583
|
+
/** Everything the routine needs, from the catalog's closed vocabulary. */
|
|
1584
|
+
equipment: ExerciseEquipment[];
|
|
1585
|
+
/**
|
|
1586
|
+
* The longest day's estimate in minutes, by `ROUT-10`'s rule. It is an
|
|
1587
|
+
* estimate from set counts, reps and rest, and every surface that shows it
|
|
1588
|
+
* says so rather than presenting it as a measured time.
|
|
1589
|
+
*/
|
|
1590
|
+
longestDayMinutes: number;
|
|
1591
|
+
}
|
|
1592
|
+
/** One routine in a discovery result. It carries no training, as `ROUT-04`. */
|
|
1593
|
+
interface DiscoverableRoutine extends RoutineClassification, RoutineFacets {
|
|
1594
|
+
routineId: string;
|
|
1595
|
+
name: string;
|
|
1596
|
+
description: string | null;
|
|
1597
|
+
scheduleMode: RoutineScheduleMode;
|
|
1598
|
+
author: SharedRoutineOwner;
|
|
1599
|
+
updatedAt: IsoDateString;
|
|
1600
|
+
}
|
|
1601
|
+
/** Duration buckets, so a filter is a choice rather than a number entry. */
|
|
1602
|
+
declare const ROUTINE_DURATION_BANDS: readonly ["SHORT", "MEDIUM", "LONG"];
|
|
1603
|
+
type RoutineDurationBand = (typeof ROUTINE_DURATION_BANDS)[number];
|
|
1604
|
+
/** Upper bound of each band in minutes; `LONG` is anything above `MEDIUM`. */
|
|
1605
|
+
declare const ROUTINE_DURATION_BAND_MAX_MINUTES: Record<Exclude<RoutineDurationBand, 'LONG'>, number>;
|
|
1606
|
+
/** GET /routines/discover */
|
|
1607
|
+
interface RoutineDiscoveryQuery {
|
|
1608
|
+
/** Matches the routine name or description, case-insensitively. */
|
|
1609
|
+
q?: string;
|
|
1610
|
+
goal?: TrainingGoal;
|
|
1611
|
+
experienceLevel?: TrainingExperienceLevel;
|
|
1612
|
+
/** Exact number of training days a week. */
|
|
1613
|
+
days?: number;
|
|
1614
|
+
/** The routine must train this muscle, primary or secondary. */
|
|
1615
|
+
muscle?: MuscleGroup;
|
|
1616
|
+
/** The routine must need nothing outside what the viewer selects. */
|
|
1617
|
+
equipment?: ExerciseEquipment[];
|
|
1618
|
+
duration?: RoutineDurationBand;
|
|
1619
|
+
limit?: number;
|
|
1620
|
+
/** Opaque; from the previous page's `nextCursor`. */
|
|
1621
|
+
cursor?: string;
|
|
1622
|
+
}
|
|
1623
|
+
declare const ROUTINE_DISCOVERY_DEFAULT_LIMIT = 20;
|
|
1624
|
+
declare const ROUTINE_DISCOVERY_MAX_LIMIT = 50;
|
|
1625
|
+
/**
|
|
1626
|
+
* How many readable routines one request will consider before filtering.
|
|
1627
|
+
* The scan is bounded on purpose, and the response says when it ran out
|
|
1628
|
+
* rather than quietly returning a partial answer as a complete one.
|
|
1629
|
+
*/
|
|
1630
|
+
declare const ROUTINE_DISCOVERY_SCAN_LIMIT = 500;
|
|
1631
|
+
interface RoutineDiscoveryResponse {
|
|
1632
|
+
routines: DiscoverableRoutine[];
|
|
1633
|
+
nextCursor?: string;
|
|
1634
|
+
/**
|
|
1635
|
+
* True when the scan limit was reached, so results may be incomplete. The
|
|
1636
|
+
* UI says so; it never presents a truncated page as everything there is.
|
|
1637
|
+
*/
|
|
1638
|
+
scanTruncated: boolean;
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1558
1641
|
/** A local calendar date, YYYY-MM-DD. */
|
|
1559
1642
|
type CalendarDate = string;
|
|
1560
1643
|
/**
|
|
@@ -1879,4 +1962,4 @@ interface PlannedReminder {
|
|
|
1879
1962
|
routineNames: string[];
|
|
1880
1963
|
}
|
|
1881
1964
|
|
|
1882
|
-
export { ACHIEVEMENT_CATEGORIES, ACHIEVEMENT_DEFINITIONS, type AchievementCategory, type AchievementCategoryProgress, type AchievementDefinition, type AchievementNotification, type AchievementUnlockedEventPayload, type AchievementsResponse, type AppNotification, BLOCKED_MEMBERS_MAX, type BlockedMember, type BlockedMembersResponse, type Brand, CLONE_ROUTINE_REFUSALS, COMEBACK_MIN_INACTIVE_DAYS, COMEBACK_RECOGNITION_LIMIT, COMEBACK_REQUIRED_ACTIVE_DAYS, COMEBACK_SESSION_LOOKBACK, COMEBACK_WINDOW_DAYS, type CalendarDate, type CloneRoutineRefusal, type CloneRoutineRequest, type ComebackRecognition, type ComebackRecognitionSummary, type CreateReportRequest, type CreateReportResponse, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateRoutineVersionRequest, type CreateSessionShareRequest, type DeletePushSubscriptionRequest, 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 FeaturedProfileRoutineItem, 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, MINUTES_IN_DAY, MOVEMENT_PATTERNS, MUSCLE_GROUPS, type MarkNotificationsReadRequest, type MarkNotificationsReadResponse, type MeasurableGoal, type MeasurableGoalDirection, type MeasurableGoalExercise, type MeasurableGoalInput, type MeasurableGoalType, type MemberModerationState, type MemberRoutinesResponse, 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_CATEGORIES, NOTIFICATION_KINDS, type NewFollowerNotification, type NotificationCategory, type NotificationKind, type NotificationPreferences, type NotificationPreferencesResponse, 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, PUSH_PAYLOAD_KINDS, PUSH_SUBSCRIPTIONS_MAX, type PaginatedResponse, type PersonalGoalProgress, type PersonalGoalsResponse, type PersonalRecordEntry, type PersonalRecordKind, type PlannedReminder, 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 PublicProfileAchievements, type PublicTrainingSummary, type PublicUserProfile, type PushPayload, type PushPayloadKind, type PushSubscriptionKeys, type PushSubscriptionSummary, type PushSubscriptionsResponse, type QuietHours, RELATIONSHIP_LIST_DEFAULT_LIMIT, RELATIONSHIP_LIST_KINDS, RELATIONSHIP_LIST_MAX_LIMIT, RENAISSANCE_RANK_DEFINITIONS, REPORTS_PER_DAY_MAX, REPORT_DETAILS_MAX_LENGTH, REPORT_REASONS, REPORT_SUBJECT_KINDS, REP_TYPES, RESERVED_USERNAMES, REST_ALERT_MAX_LEAD_SECONDS, REST_ALERT_MIN_LEAD_SECONDS, REST_ALERT_REFUSALS, ROUTINE_DAYS_MAX, ROUTINE_DAY_NAME_MAX, ROUTINE_SCHEDULE_MODES, ROUTINE_SHARE_MAX_ACTIVE_LINKS, ROUTINE_VERSIONS_MAX, ROUTINE_VERSION_KINDS, ROUTINE_VERSION_NAME_MAX, ROUTINE_VISIBILITY_VALUES, type RecentActivityEntry, type RegisterPushSubscriptionRequest, type RelationshipListKind, type RelationshipListQuery, type RelationshipListResponse, type RelationshipMember, type RenaissanceRankDefinition, type RenaissanceRankProgress, type RepType, type ReplaceFeaturedProfileItemsRequest, type ReplaceMeasurableGoalsRequest, type ReplaceTrainingLocationsRequest, type ReportReason, type ReportSubjectKind, type RestAlertPushPayload, type RestAlertRefusal, type RestoreRoutineVersionResponse, type Routine, type RoutineDay, type RoutineDayId, type RoutineExercise, type RoutineId, type RoutineLineage, type RoutineScheduleMode, type RoutineSet, type RoutineShare, type RoutineShareListResponse, type RoutineVersion, type RoutineVersionDay, type RoutineVersionExercise, type RoutineVersionKind, type RoutineVersionSetup, type RoutineVersionsResponse, type RoutineVisibility, 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, SHARED_ROUTINE_SOURCES, STARRED_EXERCISES_MAX, STREAK_MAX_GAP_DAYS, type ScheduleOverride, type ScheduleOverrideKind, type ScheduleOverridesQuery, type ScheduleOverridesResponse, type ScheduleRestAlertRequest, type ScheduleRestAlertResponse, 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 SharedRoutine, type SharedRoutineOwner, type SharedRoutineSource, type SharedRoutineSummary, type SharedSessionOwner, type SharedSessionRecap, type SkipOccurrenceRequest, type StarredExercise, type StarredExercisesResponse, type StartWorkoutRequest, type StartWorkoutResponse, type StreakAtRiskPushPayload, 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, type TrainingReminderPreference, type TrainingReminderPushPayload, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, USERNAME_PATTERN_SOURCE, type UpdateNotificationPreferencesRequest, type UpdateProfileDiscoveryRequest, type UpdateProfilePrivacyRequest, type UpdateProfileRequest, type UpdateRoutineRequest, type UpdateRoutineVisibilityRequest, 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, isWithinQuietHours, routineDayLabel };
|
|
1965
|
+
export { ACHIEVEMENT_CATEGORIES, ACHIEVEMENT_DEFINITIONS, type AchievementCategory, type AchievementCategoryProgress, type AchievementDefinition, type AchievementNotification, type AchievementUnlockedEventPayload, type AchievementsResponse, type AppNotification, BLOCKED_MEMBERS_MAX, type BlockedMember, type BlockedMembersResponse, type Brand, CLONE_ROUTINE_REFUSALS, COMEBACK_MIN_INACTIVE_DAYS, COMEBACK_RECOGNITION_LIMIT, COMEBACK_REQUIRED_ACTIVE_DAYS, COMEBACK_SESSION_LOOKBACK, COMEBACK_WINDOW_DAYS, type CalendarDate, type CloneRoutineRefusal, type CloneRoutineRequest, type ComebackRecognition, type ComebackRecognitionSummary, type CreateReportRequest, type CreateReportResponse, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateRoutineVersionRequest, type CreateSessionShareRequest, type DeletePushSubscriptionRequest, type DiscoverableRoutine, 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 FeaturedProfileRoutineItem, 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, MINUTES_IN_DAY, MOVEMENT_PATTERNS, MUSCLE_GROUPS, type MarkNotificationsReadRequest, type MarkNotificationsReadResponse, type MeasurableGoal, type MeasurableGoalDirection, type MeasurableGoalExercise, type MeasurableGoalInput, type MeasurableGoalType, type MemberModerationState, type MemberRoutinesResponse, 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_CATEGORIES, NOTIFICATION_KINDS, type NewFollowerNotification, type NotificationCategory, type NotificationKind, type NotificationPreferences, type NotificationPreferencesResponse, 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, PUSH_PAYLOAD_KINDS, PUSH_SUBSCRIPTIONS_MAX, type PaginatedResponse, type PersonalGoalProgress, type PersonalGoalsResponse, type PersonalRecordEntry, type PersonalRecordKind, type PlannedReminder, 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 PublicProfileAchievements, type PublicTrainingSummary, type PublicUserProfile, type PushPayload, type PushPayloadKind, type PushSubscriptionKeys, type PushSubscriptionSummary, type PushSubscriptionsResponse, type QuietHours, RELATIONSHIP_LIST_DEFAULT_LIMIT, RELATIONSHIP_LIST_KINDS, RELATIONSHIP_LIST_MAX_LIMIT, RENAISSANCE_RANK_DEFINITIONS, REPORTS_PER_DAY_MAX, REPORT_DETAILS_MAX_LENGTH, REPORT_REASONS, REPORT_SUBJECT_KINDS, REP_TYPES, RESERVED_USERNAMES, REST_ALERT_MAX_LEAD_SECONDS, REST_ALERT_MIN_LEAD_SECONDS, REST_ALERT_REFUSALS, ROUTINE_DAYS_MAX, ROUTINE_DAY_NAME_MAX, ROUTINE_DISCOVERY_DEFAULT_LIMIT, ROUTINE_DISCOVERY_MAX_LIMIT, ROUTINE_DISCOVERY_SCAN_LIMIT, ROUTINE_DURATION_BANDS, ROUTINE_DURATION_BAND_MAX_MINUTES, ROUTINE_SCHEDULE_MODES, ROUTINE_SHARE_MAX_ACTIVE_LINKS, ROUTINE_VERSIONS_MAX, ROUTINE_VERSION_KINDS, ROUTINE_VERSION_NAME_MAX, ROUTINE_VISIBILITY_VALUES, type RecentActivityEntry, type RegisterPushSubscriptionRequest, type RelationshipListKind, type RelationshipListQuery, type RelationshipListResponse, type RelationshipMember, type RenaissanceRankDefinition, type RenaissanceRankProgress, type RepType, type ReplaceFeaturedProfileItemsRequest, type ReplaceMeasurableGoalsRequest, type ReplaceTrainingLocationsRequest, type ReportReason, type ReportSubjectKind, type RestAlertPushPayload, type RestAlertRefusal, type RestoreRoutineVersionResponse, type Routine, type RoutineClassification, type RoutineDay, type RoutineDayId, type RoutineDiscoveryQuery, type RoutineDiscoveryResponse, type RoutineDurationBand, type RoutineExercise, type RoutineFacets, type RoutineId, type RoutineLineage, type RoutineScheduleMode, type RoutineSet, type RoutineShare, type RoutineShareListResponse, type RoutineVersion, type RoutineVersionDay, type RoutineVersionExercise, type RoutineVersionKind, type RoutineVersionSetup, type RoutineVersionsResponse, type RoutineVisibility, 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, SHARED_ROUTINE_SOURCES, STARRED_EXERCISES_MAX, STREAK_MAX_GAP_DAYS, type ScheduleOverride, type ScheduleOverrideKind, type ScheduleOverridesQuery, type ScheduleOverridesResponse, type ScheduleRestAlertRequest, type ScheduleRestAlertResponse, 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 SharedRoutine, type SharedRoutineOwner, type SharedRoutineSource, type SharedRoutineSummary, type SharedSessionOwner, type SharedSessionRecap, type SkipOccurrenceRequest, type StarredExercise, type StarredExercisesResponse, type StartWorkoutRequest, type StartWorkoutResponse, type StreakAtRiskPushPayload, 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, type TrainingReminderPreference, type TrainingReminderPushPayload, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, USERNAME_PATTERN_SOURCE, type UpdateNotificationPreferencesRequest, type UpdateProfileDiscoveryRequest, type UpdateProfilePrivacyRequest, type UpdateProfileRequest, type UpdateRoutineRequest, type UpdateRoutineVisibilityRequest, 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, isWithinQuietHours, routineDayLabel };
|
package/dist/index.d.ts
CHANGED
|
@@ -974,6 +974,13 @@ interface Routine {
|
|
|
974
974
|
* this viewer is allowed to know about its source.
|
|
975
975
|
*/
|
|
976
976
|
lineage?: RoutineLineage | null;
|
|
977
|
+
/**
|
|
978
|
+
* ROUT-07: owner-declared, both optional. They are claims about the
|
|
979
|
+
* programme that only its author can make, which is why they are stored
|
|
980
|
+
* here rather than derived from the author's `PROF-05` training identity.
|
|
981
|
+
*/
|
|
982
|
+
goal?: TrainingGoal | null;
|
|
983
|
+
experienceLevel?: TrainingExperienceLevel | null;
|
|
977
984
|
days: RoutineDay[];
|
|
978
985
|
createdAt: IsoDateString;
|
|
979
986
|
updatedAt: IsoDateString;
|
|
@@ -981,6 +988,9 @@ interface Routine {
|
|
|
981
988
|
interface CreateRoutineRequest {
|
|
982
989
|
name: string;
|
|
983
990
|
description?: string;
|
|
991
|
+
/** ROUT-07; omitted means undeclared, which is not the same as a default. */
|
|
992
|
+
goal?: TrainingGoal | null;
|
|
993
|
+
experienceLevel?: TrainingExperienceLevel | null;
|
|
984
994
|
isPeriodized: boolean;
|
|
985
995
|
/** Defaults to WEEKLY. Changing it on update requires `days`. */
|
|
986
996
|
scheduleMode?: RoutineScheduleMode;
|
|
@@ -1555,6 +1565,79 @@ interface PersonalGoalsResponse {
|
|
|
1555
1565
|
goals: PersonalGoalProgress[];
|
|
1556
1566
|
}
|
|
1557
1567
|
|
|
1568
|
+
/** Owner-declared, both optional. Undeclared is not a default, it is unknown. */
|
|
1569
|
+
interface RoutineClassification {
|
|
1570
|
+
goal?: TrainingGoal | null;
|
|
1571
|
+
experienceLevel?: TrainingExperienceLevel | null;
|
|
1572
|
+
}
|
|
1573
|
+
/**
|
|
1574
|
+
* Derived from the routine's own exercises and the `EXER-09` catalog, never
|
|
1575
|
+
* stored: a stored facet drifts from the routine the moment an edit misses
|
|
1576
|
+
* its recompute.
|
|
1577
|
+
*/
|
|
1578
|
+
interface RoutineFacets {
|
|
1579
|
+
dayCount: number;
|
|
1580
|
+
exerciseCount: number;
|
|
1581
|
+
/** Muscles any day trains, primary or secondary, deduplicated. */
|
|
1582
|
+
muscles: MuscleGroup[];
|
|
1583
|
+
/** Everything the routine needs, from the catalog's closed vocabulary. */
|
|
1584
|
+
equipment: ExerciseEquipment[];
|
|
1585
|
+
/**
|
|
1586
|
+
* The longest day's estimate in minutes, by `ROUT-10`'s rule. It is an
|
|
1587
|
+
* estimate from set counts, reps and rest, and every surface that shows it
|
|
1588
|
+
* says so rather than presenting it as a measured time.
|
|
1589
|
+
*/
|
|
1590
|
+
longestDayMinutes: number;
|
|
1591
|
+
}
|
|
1592
|
+
/** One routine in a discovery result. It carries no training, as `ROUT-04`. */
|
|
1593
|
+
interface DiscoverableRoutine extends RoutineClassification, RoutineFacets {
|
|
1594
|
+
routineId: string;
|
|
1595
|
+
name: string;
|
|
1596
|
+
description: string | null;
|
|
1597
|
+
scheduleMode: RoutineScheduleMode;
|
|
1598
|
+
author: SharedRoutineOwner;
|
|
1599
|
+
updatedAt: IsoDateString;
|
|
1600
|
+
}
|
|
1601
|
+
/** Duration buckets, so a filter is a choice rather than a number entry. */
|
|
1602
|
+
declare const ROUTINE_DURATION_BANDS: readonly ["SHORT", "MEDIUM", "LONG"];
|
|
1603
|
+
type RoutineDurationBand = (typeof ROUTINE_DURATION_BANDS)[number];
|
|
1604
|
+
/** Upper bound of each band in minutes; `LONG` is anything above `MEDIUM`. */
|
|
1605
|
+
declare const ROUTINE_DURATION_BAND_MAX_MINUTES: Record<Exclude<RoutineDurationBand, 'LONG'>, number>;
|
|
1606
|
+
/** GET /routines/discover */
|
|
1607
|
+
interface RoutineDiscoveryQuery {
|
|
1608
|
+
/** Matches the routine name or description, case-insensitively. */
|
|
1609
|
+
q?: string;
|
|
1610
|
+
goal?: TrainingGoal;
|
|
1611
|
+
experienceLevel?: TrainingExperienceLevel;
|
|
1612
|
+
/** Exact number of training days a week. */
|
|
1613
|
+
days?: number;
|
|
1614
|
+
/** The routine must train this muscle, primary or secondary. */
|
|
1615
|
+
muscle?: MuscleGroup;
|
|
1616
|
+
/** The routine must need nothing outside what the viewer selects. */
|
|
1617
|
+
equipment?: ExerciseEquipment[];
|
|
1618
|
+
duration?: RoutineDurationBand;
|
|
1619
|
+
limit?: number;
|
|
1620
|
+
/** Opaque; from the previous page's `nextCursor`. */
|
|
1621
|
+
cursor?: string;
|
|
1622
|
+
}
|
|
1623
|
+
declare const ROUTINE_DISCOVERY_DEFAULT_LIMIT = 20;
|
|
1624
|
+
declare const ROUTINE_DISCOVERY_MAX_LIMIT = 50;
|
|
1625
|
+
/**
|
|
1626
|
+
* How many readable routines one request will consider before filtering.
|
|
1627
|
+
* The scan is bounded on purpose, and the response says when it ran out
|
|
1628
|
+
* rather than quietly returning a partial answer as a complete one.
|
|
1629
|
+
*/
|
|
1630
|
+
declare const ROUTINE_DISCOVERY_SCAN_LIMIT = 500;
|
|
1631
|
+
interface RoutineDiscoveryResponse {
|
|
1632
|
+
routines: DiscoverableRoutine[];
|
|
1633
|
+
nextCursor?: string;
|
|
1634
|
+
/**
|
|
1635
|
+
* True when the scan limit was reached, so results may be incomplete. The
|
|
1636
|
+
* UI says so; it never presents a truncated page as everything there is.
|
|
1637
|
+
*/
|
|
1638
|
+
scanTruncated: boolean;
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1558
1641
|
/** A local calendar date, YYYY-MM-DD. */
|
|
1559
1642
|
type CalendarDate = string;
|
|
1560
1643
|
/**
|
|
@@ -1879,4 +1962,4 @@ interface PlannedReminder {
|
|
|
1879
1962
|
routineNames: string[];
|
|
1880
1963
|
}
|
|
1881
1964
|
|
|
1882
|
-
export { ACHIEVEMENT_CATEGORIES, ACHIEVEMENT_DEFINITIONS, type AchievementCategory, type AchievementCategoryProgress, type AchievementDefinition, type AchievementNotification, type AchievementUnlockedEventPayload, type AchievementsResponse, type AppNotification, BLOCKED_MEMBERS_MAX, type BlockedMember, type BlockedMembersResponse, type Brand, CLONE_ROUTINE_REFUSALS, COMEBACK_MIN_INACTIVE_DAYS, COMEBACK_RECOGNITION_LIMIT, COMEBACK_REQUIRED_ACTIVE_DAYS, COMEBACK_SESSION_LOOKBACK, COMEBACK_WINDOW_DAYS, type CalendarDate, type CloneRoutineRefusal, type CloneRoutineRequest, type ComebackRecognition, type ComebackRecognitionSummary, type CreateReportRequest, type CreateReportResponse, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateRoutineVersionRequest, type CreateSessionShareRequest, type DeletePushSubscriptionRequest, 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 FeaturedProfileRoutineItem, 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, MINUTES_IN_DAY, MOVEMENT_PATTERNS, MUSCLE_GROUPS, type MarkNotificationsReadRequest, type MarkNotificationsReadResponse, type MeasurableGoal, type MeasurableGoalDirection, type MeasurableGoalExercise, type MeasurableGoalInput, type MeasurableGoalType, type MemberModerationState, type MemberRoutinesResponse, 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_CATEGORIES, NOTIFICATION_KINDS, type NewFollowerNotification, type NotificationCategory, type NotificationKind, type NotificationPreferences, type NotificationPreferencesResponse, 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, PUSH_PAYLOAD_KINDS, PUSH_SUBSCRIPTIONS_MAX, type PaginatedResponse, type PersonalGoalProgress, type PersonalGoalsResponse, type PersonalRecordEntry, type PersonalRecordKind, type PlannedReminder, 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 PublicProfileAchievements, type PublicTrainingSummary, type PublicUserProfile, type PushPayload, type PushPayloadKind, type PushSubscriptionKeys, type PushSubscriptionSummary, type PushSubscriptionsResponse, type QuietHours, RELATIONSHIP_LIST_DEFAULT_LIMIT, RELATIONSHIP_LIST_KINDS, RELATIONSHIP_LIST_MAX_LIMIT, RENAISSANCE_RANK_DEFINITIONS, REPORTS_PER_DAY_MAX, REPORT_DETAILS_MAX_LENGTH, REPORT_REASONS, REPORT_SUBJECT_KINDS, REP_TYPES, RESERVED_USERNAMES, REST_ALERT_MAX_LEAD_SECONDS, REST_ALERT_MIN_LEAD_SECONDS, REST_ALERT_REFUSALS, ROUTINE_DAYS_MAX, ROUTINE_DAY_NAME_MAX, ROUTINE_SCHEDULE_MODES, ROUTINE_SHARE_MAX_ACTIVE_LINKS, ROUTINE_VERSIONS_MAX, ROUTINE_VERSION_KINDS, ROUTINE_VERSION_NAME_MAX, ROUTINE_VISIBILITY_VALUES, type RecentActivityEntry, type RegisterPushSubscriptionRequest, type RelationshipListKind, type RelationshipListQuery, type RelationshipListResponse, type RelationshipMember, type RenaissanceRankDefinition, type RenaissanceRankProgress, type RepType, type ReplaceFeaturedProfileItemsRequest, type ReplaceMeasurableGoalsRequest, type ReplaceTrainingLocationsRequest, type ReportReason, type ReportSubjectKind, type RestAlertPushPayload, type RestAlertRefusal, type RestoreRoutineVersionResponse, type Routine, type RoutineDay, type RoutineDayId, type RoutineExercise, type RoutineId, type RoutineLineage, type RoutineScheduleMode, type RoutineSet, type RoutineShare, type RoutineShareListResponse, type RoutineVersion, type RoutineVersionDay, type RoutineVersionExercise, type RoutineVersionKind, type RoutineVersionSetup, type RoutineVersionsResponse, type RoutineVisibility, 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, SHARED_ROUTINE_SOURCES, STARRED_EXERCISES_MAX, STREAK_MAX_GAP_DAYS, type ScheduleOverride, type ScheduleOverrideKind, type ScheduleOverridesQuery, type ScheduleOverridesResponse, type ScheduleRestAlertRequest, type ScheduleRestAlertResponse, 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 SharedRoutine, type SharedRoutineOwner, type SharedRoutineSource, type SharedRoutineSummary, type SharedSessionOwner, type SharedSessionRecap, type SkipOccurrenceRequest, type StarredExercise, type StarredExercisesResponse, type StartWorkoutRequest, type StartWorkoutResponse, type StreakAtRiskPushPayload, 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, type TrainingReminderPreference, type TrainingReminderPushPayload, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, USERNAME_PATTERN_SOURCE, type UpdateNotificationPreferencesRequest, type UpdateProfileDiscoveryRequest, type UpdateProfilePrivacyRequest, type UpdateProfileRequest, type UpdateRoutineRequest, type UpdateRoutineVisibilityRequest, 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, isWithinQuietHours, routineDayLabel };
|
|
1965
|
+
export { ACHIEVEMENT_CATEGORIES, ACHIEVEMENT_DEFINITIONS, type AchievementCategory, type AchievementCategoryProgress, type AchievementDefinition, type AchievementNotification, type AchievementUnlockedEventPayload, type AchievementsResponse, type AppNotification, BLOCKED_MEMBERS_MAX, type BlockedMember, type BlockedMembersResponse, type Brand, CLONE_ROUTINE_REFUSALS, COMEBACK_MIN_INACTIVE_DAYS, COMEBACK_RECOGNITION_LIMIT, COMEBACK_REQUIRED_ACTIVE_DAYS, COMEBACK_SESSION_LOOKBACK, COMEBACK_WINDOW_DAYS, type CalendarDate, type CloneRoutineRefusal, type CloneRoutineRequest, type ComebackRecognition, type ComebackRecognitionSummary, type CreateReportRequest, type CreateReportResponse, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateRoutineVersionRequest, type CreateSessionShareRequest, type DeletePushSubscriptionRequest, type DiscoverableRoutine, 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 FeaturedProfileRoutineItem, 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, MINUTES_IN_DAY, MOVEMENT_PATTERNS, MUSCLE_GROUPS, type MarkNotificationsReadRequest, type MarkNotificationsReadResponse, type MeasurableGoal, type MeasurableGoalDirection, type MeasurableGoalExercise, type MeasurableGoalInput, type MeasurableGoalType, type MemberModerationState, type MemberRoutinesResponse, 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_CATEGORIES, NOTIFICATION_KINDS, type NewFollowerNotification, type NotificationCategory, type NotificationKind, type NotificationPreferences, type NotificationPreferencesResponse, 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, PUSH_PAYLOAD_KINDS, PUSH_SUBSCRIPTIONS_MAX, type PaginatedResponse, type PersonalGoalProgress, type PersonalGoalsResponse, type PersonalRecordEntry, type PersonalRecordKind, type PlannedReminder, 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 PublicProfileAchievements, type PublicTrainingSummary, type PublicUserProfile, type PushPayload, type PushPayloadKind, type PushSubscriptionKeys, type PushSubscriptionSummary, type PushSubscriptionsResponse, type QuietHours, RELATIONSHIP_LIST_DEFAULT_LIMIT, RELATIONSHIP_LIST_KINDS, RELATIONSHIP_LIST_MAX_LIMIT, RENAISSANCE_RANK_DEFINITIONS, REPORTS_PER_DAY_MAX, REPORT_DETAILS_MAX_LENGTH, REPORT_REASONS, REPORT_SUBJECT_KINDS, REP_TYPES, RESERVED_USERNAMES, REST_ALERT_MAX_LEAD_SECONDS, REST_ALERT_MIN_LEAD_SECONDS, REST_ALERT_REFUSALS, ROUTINE_DAYS_MAX, ROUTINE_DAY_NAME_MAX, ROUTINE_DISCOVERY_DEFAULT_LIMIT, ROUTINE_DISCOVERY_MAX_LIMIT, ROUTINE_DISCOVERY_SCAN_LIMIT, ROUTINE_DURATION_BANDS, ROUTINE_DURATION_BAND_MAX_MINUTES, ROUTINE_SCHEDULE_MODES, ROUTINE_SHARE_MAX_ACTIVE_LINKS, ROUTINE_VERSIONS_MAX, ROUTINE_VERSION_KINDS, ROUTINE_VERSION_NAME_MAX, ROUTINE_VISIBILITY_VALUES, type RecentActivityEntry, type RegisterPushSubscriptionRequest, type RelationshipListKind, type RelationshipListQuery, type RelationshipListResponse, type RelationshipMember, type RenaissanceRankDefinition, type RenaissanceRankProgress, type RepType, type ReplaceFeaturedProfileItemsRequest, type ReplaceMeasurableGoalsRequest, type ReplaceTrainingLocationsRequest, type ReportReason, type ReportSubjectKind, type RestAlertPushPayload, type RestAlertRefusal, type RestoreRoutineVersionResponse, type Routine, type RoutineClassification, type RoutineDay, type RoutineDayId, type RoutineDiscoveryQuery, type RoutineDiscoveryResponse, type RoutineDurationBand, type RoutineExercise, type RoutineFacets, type RoutineId, type RoutineLineage, type RoutineScheduleMode, type RoutineSet, type RoutineShare, type RoutineShareListResponse, type RoutineVersion, type RoutineVersionDay, type RoutineVersionExercise, type RoutineVersionKind, type RoutineVersionSetup, type RoutineVersionsResponse, type RoutineVisibility, 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, SHARED_ROUTINE_SOURCES, STARRED_EXERCISES_MAX, STREAK_MAX_GAP_DAYS, type ScheduleOverride, type ScheduleOverrideKind, type ScheduleOverridesQuery, type ScheduleOverridesResponse, type ScheduleRestAlertRequest, type ScheduleRestAlertResponse, 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 SharedRoutine, type SharedRoutineOwner, type SharedRoutineSource, type SharedRoutineSummary, type SharedSessionOwner, type SharedSessionRecap, type SkipOccurrenceRequest, type StarredExercise, type StarredExercisesResponse, type StartWorkoutRequest, type StartWorkoutResponse, type StreakAtRiskPushPayload, 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, type TrainingReminderPreference, type TrainingReminderPushPayload, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, USERNAME_PATTERN_SOURCE, type UpdateNotificationPreferencesRequest, type UpdateProfileDiscoveryRequest, type UpdateProfilePrivacyRequest, type UpdateProfileRequest, type UpdateRoutineRequest, type UpdateRoutineVisibilityRequest, 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, isWithinQuietHours, routineDayLabel };
|
package/dist/index.js
CHANGED
|
@@ -346,6 +346,13 @@ var CLONE_ROUTINE_REFUSALS = {
|
|
|
346
346
|
UNKNOWN_EXERCISE: "UNKNOWN_EXERCISE"
|
|
347
347
|
};
|
|
348
348
|
|
|
349
|
+
// src/routine-discovery.ts
|
|
350
|
+
var ROUTINE_DURATION_BANDS = ["SHORT", "MEDIUM", "LONG"];
|
|
351
|
+
var ROUTINE_DURATION_BAND_MAX_MINUTES = { SHORT: 45, MEDIUM: 75 };
|
|
352
|
+
var ROUTINE_DISCOVERY_DEFAULT_LIMIT = 20;
|
|
353
|
+
var ROUTINE_DISCOVERY_MAX_LIMIT = 50;
|
|
354
|
+
var ROUTINE_DISCOVERY_SCAN_LIMIT = 500;
|
|
355
|
+
|
|
349
356
|
// src/schedule.ts
|
|
350
357
|
var SCHEDULE_OVERRIDE_KINDS = ["MOVE", "SKIP"];
|
|
351
358
|
var SCHEDULE_MOVE_MAX_DAYS = 6;
|
|
@@ -495,6 +502,11 @@ export {
|
|
|
495
502
|
REST_ALERT_REFUSALS,
|
|
496
503
|
ROUTINE_DAYS_MAX,
|
|
497
504
|
ROUTINE_DAY_NAME_MAX,
|
|
505
|
+
ROUTINE_DISCOVERY_DEFAULT_LIMIT,
|
|
506
|
+
ROUTINE_DISCOVERY_MAX_LIMIT,
|
|
507
|
+
ROUTINE_DISCOVERY_SCAN_LIMIT,
|
|
508
|
+
ROUTINE_DURATION_BANDS,
|
|
509
|
+
ROUTINE_DURATION_BAND_MAX_MINUTES,
|
|
498
510
|
ROUTINE_SCHEDULE_MODES,
|
|
499
511
|
ROUTINE_SHARE_MAX_ACTIVE_LINKS,
|
|
500
512
|
ROUTINE_VERSIONS_MAX,
|