@sunsteel/contracts 0.59.0 → 0.61.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 +21 -0
- package/dist/index.d.cts +182 -1
- package/dist/index.d.ts +182 -1
- package/dist/index.js +17 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -20,6 +20,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
+
ACCOUNT_EXPORT_FORMAT: () => ACCOUNT_EXPORT_FORMAT,
|
|
24
|
+
ACCOUNT_EXPORT_VERSION: () => ACCOUNT_EXPORT_VERSION,
|
|
23
25
|
ACHIEVEMENT_CATEGORIES: () => ACHIEVEMENT_CATEGORIES,
|
|
24
26
|
ACHIEVEMENT_DEFINITIONS: () => ACHIEVEMENT_DEFINITIONS,
|
|
25
27
|
ACTIVITY_CAPS: () => ACTIVITY_CAPS,
|
|
@@ -140,7 +142,9 @@ __export(index_exports, {
|
|
|
140
142
|
USERNAME_PATTERN_SOURCE: () => USERNAME_PATTERN_SOURCE,
|
|
141
143
|
WEIGHT_UNITS: () => WEIGHT_UNITS,
|
|
142
144
|
WORKOUT_SESSION_STATUSES: () => WORKOUT_SESSION_STATUSES,
|
|
145
|
+
accountExportFileName: () => accountExportFileName,
|
|
143
146
|
isWithinQuietHours: () => isWithinQuietHours,
|
|
147
|
+
matchesDeletionConfirmation: () => matchesDeletionConfirmation,
|
|
144
148
|
routineDayLabel: () => routineDayLabel
|
|
145
149
|
});
|
|
146
150
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -682,8 +686,23 @@ var TRAINING_PARTNER_ENCOURAGEMENT_KINDS = [
|
|
|
682
686
|
];
|
|
683
687
|
var TRAINING_PARTNER_ENCOURAGEMENTS_PER_24_HOURS_MAX = 4;
|
|
684
688
|
var TRAINING_PARTNERSHIP_STATUSES = ["PENDING", "ACTIVE"];
|
|
689
|
+
|
|
690
|
+
// src/account-deletion.ts
|
|
691
|
+
function matchesDeletionConfirmation(typed, username) {
|
|
692
|
+
const normalized = typed.trim().replace(/^@/, "").toLowerCase();
|
|
693
|
+
return normalized.length > 0 && normalized === username.toLowerCase();
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
// src/account-export.ts
|
|
697
|
+
var ACCOUNT_EXPORT_FORMAT = "sunnsteel-account-export";
|
|
698
|
+
var ACCOUNT_EXPORT_VERSION = 1;
|
|
699
|
+
function accountExportFileName(username, exportedAt) {
|
|
700
|
+
return `sunnsteel-${username}-${exportedAt.slice(0, 10)}.json`;
|
|
701
|
+
}
|
|
685
702
|
// Annotate the CommonJS export names for ESM import in node:
|
|
686
703
|
0 && (module.exports = {
|
|
704
|
+
ACCOUNT_EXPORT_FORMAT,
|
|
705
|
+
ACCOUNT_EXPORT_VERSION,
|
|
687
706
|
ACHIEVEMENT_CATEGORIES,
|
|
688
707
|
ACHIEVEMENT_DEFINITIONS,
|
|
689
708
|
ACTIVITY_CAPS,
|
|
@@ -804,6 +823,8 @@ var TRAINING_PARTNERSHIP_STATUSES = ["PENDING", "ACTIVE"];
|
|
|
804
823
|
USERNAME_PATTERN_SOURCE,
|
|
805
824
|
WEIGHT_UNITS,
|
|
806
825
|
WORKOUT_SESSION_STATUSES,
|
|
826
|
+
accountExportFileName,
|
|
807
827
|
isWithinQuietHours,
|
|
828
|
+
matchesDeletionConfirmation,
|
|
808
829
|
routineDayLabel
|
|
809
830
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -2583,4 +2583,185 @@ interface PlannedReminder {
|
|
|
2583
2583
|
routineNames: string[];
|
|
2584
2584
|
}
|
|
2585
2585
|
|
|
2586
|
-
export { ACHIEVEMENT_CATEGORIES, ACHIEVEMENT_DEFINITIONS, ACTIVITY_CAPS, ACTIVITY_COMMENTS_PAGE_SIZE, ACTIVITY_COMMENTS_PER_DAY_MAX, ACTIVITY_COMMENT_MAX_LENGTH, ACTIVITY_DEFAULT_AUDIENCE, ACTIVITY_ENTRY_ID_MAX_LENGTH, ACTIVITY_FEED_FOLLOWED_MAX, ACTIVITY_PAGE_DEFAULT_LIMIT, ACTIVITY_PAGE_MAX_LIMIT, ACTIVITY_PREVIEW_AUDIENCES, ACTIVITY_REACTIONS, ACTIVITY_TYPES, ACTIVITY_TYPE_SECTIONS, type AchievementActivity, type AchievementCategory, type AchievementCategoryProgress, type AchievementDefinition, type AchievementNotification, type AchievementUnlockedEventPayload, type AchievementsResponse, type ActivityAudience, type ActivityCap, type ActivityComment, type ActivityCommentNotification, type ActivityCommentSummary, type ActivityCommentsQuery, type ActivityCommentsResponse, type ActivityEntry, type ActivityEntrySharing, type ActivityFeedResponse, type ActivityLink, type ActivityPage, type ActivityPageQuery, type ActivityPreviewAudience, type ActivityPreviewQuery, type ActivityReaction, type ActivityReactionSummary, type ActivitySection, type ActivitySharingSettings, type ActivityType, 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 ComebackActivity, type ComebackRecognition, type ComebackRecognitionSummary, type CreateActivityCommentRequest, type CreateActivityCommentResponse, type CreateReportRequest, type CreateReportResponse, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateRoutineVersionRequest, type CreateSessionShareRequest, type DeleteActivityCommentResponse, 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, MODERATION_ACTION_KINDS, MODERATION_HISTORY_PAGE_SIZE, MODERATION_NOTE_MAX_LENGTH, MODERATION_QUEUE_PAGE_SIZE, MOVEMENT_PATTERNS, MUSCLE_GROUPS, type MarkNotificationsReadRequest, type MarkNotificationsReadResponse, type MeasurableGoal, type MeasurableGoalDirection, type MeasurableGoalExercise, type MeasurableGoalInput, type MeasurableGoalType, type MemberActivityResponse, type MemberModerationState, type MemberRoutinesResponse, type ModerationActionKind, type ModerationActionRecord, type ModerationHistoryQuery, type ModerationHistoryResponse, type ModerationQueueQuery, type ModerationQueueResponse, type ModerationReport, type ModeratorState, 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, type OwnActivityEntry, type OwnActivityResponse, 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 PersonalRecordActivity, 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 ProgressionActivity, 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_STATUSES, 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_TRAINING_BLOCKS_MAX, ROUTINE_TRAINING_BLOCK_NAME_MAX, ROUTINE_TRAINING_BLOCK_REVISIONS_MAX, ROUTINE_TRAINING_BLOCK_SOURCE_KINDS, ROUTINE_TRAINING_BLOCK_STATES, 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 ReportStatus, type ReportSubjectKind, type ReportSubjectPreview, type RestAlertPushPayload, type RestAlertRefusal, type RestoreRoutineVersionResponse, type ReviewReportRequest, type ReviewReportResponse, 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 RoutineSharedActivity, type RoutineTrainingBlock, type RoutineTrainingBlockRevision, type RoutineTrainingBlockRevisionsResponse, type RoutineTrainingBlockSource, type RoutineTrainingBlockSourceKind, type RoutineTrainingBlockState, type RoutineTrainingBlocksResponse, 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 SendTrainingPartnerEncouragementRequest, type SendTrainingPartnerEncouragementResponse, type SessionComparisonExercise, type SessionComparisonQuery, type SessionComparisonResponse, type SessionComparisonRoutineDay, type SessionComparisonSession, type SessionComparisonSet, type SessionCompletedActivity, type SessionExerciseSubstitution, type SessionProgressNotification, type SessionRecapRecord, type SessionShare, type SessionShareField, type SessionShareListResponse, type SetAccountTimeZoneRequest, type SetActivityEntryAudienceRequest, type SetActivityEntryAudienceResponse, type SetActivityReactionRequest, type SetActivityReactionResponse, 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 StreakMilestoneActivity, 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, TRAINING_PARTNERSHIP_STATUSES, TRAINING_PARTNERS_MAX, TRAINING_PARTNER_ENCOURAGEMENTS_PER_24_HOURS_MAX, TRAINING_PARTNER_ENCOURAGEMENT_KINDS, TRAINING_PARTNER_PERMISSION_KEYS, TRAINING_PARTNER_REQUESTS_PER_DAY_MAX, type TrainingDiscipline, type TrainingEventType, type TrainingExperienceLevel, type TrainingGoal, type TrainingIdentity, type TrainingLocationPreference, type TrainingLocationPreferenceInput, type TrainingPartnerEncouragementKind, type TrainingPartnerEncouragementNotification, type TrainingPartnerPermissions, type TrainingPartnerScheduleDay, type TrainingPartnerScheduleResponse, type TrainingPartnership, type TrainingPartnershipStatus, type TrainingPartnershipsResponse, type TrainingReminderPreference, type TrainingReminderPushPayload, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, USERNAME_PATTERN_SOURCE, type UpdateActivitySharingRequest, type UpdateNotificationPreferencesRequest, type UpdateProfileDiscoveryRequest, type UpdateProfilePrivacyRequest, type UpdateProfileRequest, type UpdateRoutineRequest, type UpdateRoutineVisibilityRequest, type UpdateTrainingPartnerPermissionsRequest, type UpsertRoutineTrainingBlockRequest, 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 };
|
|
2586
|
+
/**
|
|
2587
|
+
* TRUST-01. Deleting an account is immediate and cannot be undone: the
|
|
2588
|
+
* member's data, their Supabase sign-in and any stored avatar go together.
|
|
2589
|
+
*
|
|
2590
|
+
* The owner confirms by typing their current username. It is a statement of
|
|
2591
|
+
* intent, not a credential -- the bearer token already proves who is asking,
|
|
2592
|
+
* and a Google account has no password to re-enter.
|
|
2593
|
+
*/
|
|
2594
|
+
interface DeleteAccountRequest {
|
|
2595
|
+
confirmUsername: string;
|
|
2596
|
+
}
|
|
2597
|
+
interface DeleteAccountResponse {
|
|
2598
|
+
deletedAt: IsoDateString;
|
|
2599
|
+
}
|
|
2600
|
+
/**
|
|
2601
|
+
* Whether what the owner typed confirms deleting the account with this
|
|
2602
|
+
* username. Usernames are lowercase public identifiers, so the comparison
|
|
2603
|
+
* ignores case, surrounding whitespace and a leading `@`, and nothing else.
|
|
2604
|
+
*/
|
|
2605
|
+
declare function matchesDeletionConfirmation(typed: string, username: string): boolean;
|
|
2606
|
+
|
|
2607
|
+
/**
|
|
2608
|
+
* EXPORT-01. Everything a member put into Sunnsteel, in one JSON document they
|
|
2609
|
+
* can keep, read or take elsewhere.
|
|
2610
|
+
*
|
|
2611
|
+
* Stability is the point. `format` and `formatVersion` identify the document;
|
|
2612
|
+
* a field is only ever added within a version, and anything that changes the
|
|
2613
|
+
* meaning of an existing field is a new version. Sections reuse the shapes the
|
|
2614
|
+
* app itself serves (`UserProfile`, `Routine`, `WorkoutSession`), so the file
|
|
2615
|
+
* says what the member saw.
|
|
2616
|
+
*
|
|
2617
|
+
* **Every weight is kilograms**, whatever unit the account displays -- that is
|
|
2618
|
+
* how Sunnsteel stores them. `account.weightUnit` is the display preference.
|
|
2619
|
+
*
|
|
2620
|
+
* Left out on purpose, and stated in `omitted`: other members' data (people
|
|
2621
|
+
* appear by username only, never email), credentials (share-link tokens,
|
|
2622
|
+
* push-device endpoints), and anything derived from what is exported
|
|
2623
|
+
* (analytics rollups, the notification feed).
|
|
2624
|
+
*/
|
|
2625
|
+
declare const ACCOUNT_EXPORT_FORMAT: "sunnsteel-account-export";
|
|
2626
|
+
declare const ACCOUNT_EXPORT_VERSION: 1;
|
|
2627
|
+
/** Another member, as the export names them: never by email. */
|
|
2628
|
+
interface AccountExportMember {
|
|
2629
|
+
username: string;
|
|
2630
|
+
name: string;
|
|
2631
|
+
}
|
|
2632
|
+
interface AccountExportRoutine {
|
|
2633
|
+
routine: Routine;
|
|
2634
|
+
versions: Array<{
|
|
2635
|
+
number: number;
|
|
2636
|
+
name: string | null;
|
|
2637
|
+
kind: string;
|
|
2638
|
+
createdAt: IsoDateString;
|
|
2639
|
+
setup: RoutineVersionSetup;
|
|
2640
|
+
}>;
|
|
2641
|
+
}
|
|
2642
|
+
interface AccountExportPersonalRecord {
|
|
2643
|
+
exerciseId: string;
|
|
2644
|
+
exerciseName: string;
|
|
2645
|
+
weightKg: number;
|
|
2646
|
+
reps: number;
|
|
2647
|
+
estimated1rmKg: number;
|
|
2648
|
+
achievedAt: IsoDateString;
|
|
2649
|
+
sessionId: string;
|
|
2650
|
+
}
|
|
2651
|
+
/**
|
|
2652
|
+
* The member's training history as recorded events: completed sessions,
|
|
2653
|
+
* records, load changes, achievements and streaks. `payload` is versioned by
|
|
2654
|
+
* `schemaVersion`.
|
|
2655
|
+
*/
|
|
2656
|
+
interface AccountExportTrainingEvent {
|
|
2657
|
+
type: string;
|
|
2658
|
+
occurredAt: IsoDateString;
|
|
2659
|
+
sessionId: string | null;
|
|
2660
|
+
schemaVersion: number;
|
|
2661
|
+
payload: unknown;
|
|
2662
|
+
}
|
|
2663
|
+
interface AccountExportGoal {
|
|
2664
|
+
type: string;
|
|
2665
|
+
direction: string;
|
|
2666
|
+
targetValue: number;
|
|
2667
|
+
exerciseId: string | null;
|
|
2668
|
+
createdAt: IsoDateString;
|
|
2669
|
+
}
|
|
2670
|
+
interface AccountExportTrainingLocation {
|
|
2671
|
+
name: string;
|
|
2672
|
+
isDefault: boolean;
|
|
2673
|
+
barWeightKg: number;
|
|
2674
|
+
availablePlatePairs: unknown;
|
|
2675
|
+
equipment: string[];
|
|
2676
|
+
}
|
|
2677
|
+
interface AccountExportScheduleOverride {
|
|
2678
|
+
routineId: string;
|
|
2679
|
+
date: string;
|
|
2680
|
+
kind: string;
|
|
2681
|
+
toDate: string | null;
|
|
2682
|
+
}
|
|
2683
|
+
interface AccountExportV1 {
|
|
2684
|
+
format: typeof ACCOUNT_EXPORT_FORMAT;
|
|
2685
|
+
formatVersion: typeof ACCOUNT_EXPORT_VERSION;
|
|
2686
|
+
exportedAt: IsoDateString;
|
|
2687
|
+
weightsAreKilograms: true;
|
|
2688
|
+
account: UserProfile;
|
|
2689
|
+
preferences: {
|
|
2690
|
+
notifications: {
|
|
2691
|
+
restAlert: boolean;
|
|
2692
|
+
trainingReminder: boolean;
|
|
2693
|
+
streakAtRisk: boolean;
|
|
2694
|
+
quietHours: {
|
|
2695
|
+
startMinute: number;
|
|
2696
|
+
endMinute: number;
|
|
2697
|
+
} | null;
|
|
2698
|
+
reminderMinuteOfDay: number | null;
|
|
2699
|
+
};
|
|
2700
|
+
timeZone: string | null;
|
|
2701
|
+
plateauMinSessions: number;
|
|
2702
|
+
activitySharingDefaults: Array<{
|
|
2703
|
+
type: string;
|
|
2704
|
+
audience: string;
|
|
2705
|
+
}>;
|
|
2706
|
+
activityEntryAudiences: Array<{
|
|
2707
|
+
entryKey: string;
|
|
2708
|
+
audience: string;
|
|
2709
|
+
}>;
|
|
2710
|
+
};
|
|
2711
|
+
routines: AccountExportRoutine[];
|
|
2712
|
+
workouts: WorkoutSession[];
|
|
2713
|
+
personalRecords: AccountExportPersonalRecord[];
|
|
2714
|
+
trainingEvents: AccountExportTrainingEvent[];
|
|
2715
|
+
goals: AccountExportGoal[];
|
|
2716
|
+
trainingLocations: AccountExportTrainingLocation[];
|
|
2717
|
+
scheduleOverrides: AccountExportScheduleOverride[];
|
|
2718
|
+
exercises: {
|
|
2719
|
+
starred: Array<{
|
|
2720
|
+
exerciseId: string;
|
|
2721
|
+
name: string;
|
|
2722
|
+
starredAt: IsoDateString;
|
|
2723
|
+
}>;
|
|
2724
|
+
};
|
|
2725
|
+
social: {
|
|
2726
|
+
following: Array<AccountExportMember & {
|
|
2727
|
+
since: IsoDateString;
|
|
2728
|
+
}>;
|
|
2729
|
+
followers: Array<AccountExportMember & {
|
|
2730
|
+
since: IsoDateString;
|
|
2731
|
+
}>;
|
|
2732
|
+
blocked: Array<AccountExportMember & {
|
|
2733
|
+
since: IsoDateString;
|
|
2734
|
+
}>;
|
|
2735
|
+
trainingPartners: Array<{
|
|
2736
|
+
member: AccountExportMember;
|
|
2737
|
+
status: string;
|
|
2738
|
+
requestedByMe: boolean;
|
|
2739
|
+
since: IsoDateString;
|
|
2740
|
+
}>;
|
|
2741
|
+
commentsWritten: Array<{
|
|
2742
|
+
onActivityOf: AccountExportMember;
|
|
2743
|
+
entryKey: string;
|
|
2744
|
+
body: string;
|
|
2745
|
+
createdAt: IsoDateString;
|
|
2746
|
+
}>;
|
|
2747
|
+
reactionsGiven: Array<{
|
|
2748
|
+
onActivityOf: AccountExportMember;
|
|
2749
|
+
entryKey: string;
|
|
2750
|
+
reaction: string;
|
|
2751
|
+
createdAt: IsoDateString;
|
|
2752
|
+
}>;
|
|
2753
|
+
reportsFiled: Array<{
|
|
2754
|
+
subjectKind: string;
|
|
2755
|
+
reason: string;
|
|
2756
|
+
details: string | null;
|
|
2757
|
+
status: string;
|
|
2758
|
+
createdAt: IsoDateString;
|
|
2759
|
+
}>;
|
|
2760
|
+
};
|
|
2761
|
+
/** What the file deliberately does not contain, and why. */
|
|
2762
|
+
omitted: string[];
|
|
2763
|
+
}
|
|
2764
|
+
/** The file name a download of the export is saved under. */
|
|
2765
|
+
declare function accountExportFileName(username: string, exportedAt: string): string;
|
|
2766
|
+
|
|
2767
|
+
export { ACCOUNT_EXPORT_FORMAT, ACCOUNT_EXPORT_VERSION, ACHIEVEMENT_CATEGORIES, ACHIEVEMENT_DEFINITIONS, ACTIVITY_CAPS, ACTIVITY_COMMENTS_PAGE_SIZE, ACTIVITY_COMMENTS_PER_DAY_MAX, ACTIVITY_COMMENT_MAX_LENGTH, ACTIVITY_DEFAULT_AUDIENCE, ACTIVITY_ENTRY_ID_MAX_LENGTH, ACTIVITY_FEED_FOLLOWED_MAX, ACTIVITY_PAGE_DEFAULT_LIMIT, ACTIVITY_PAGE_MAX_LIMIT, ACTIVITY_PREVIEW_AUDIENCES, ACTIVITY_REACTIONS, ACTIVITY_TYPES, ACTIVITY_TYPE_SECTIONS, type AccountExportGoal, type AccountExportMember, type AccountExportPersonalRecord, type AccountExportRoutine, type AccountExportScheduleOverride, type AccountExportTrainingEvent, type AccountExportTrainingLocation, type AccountExportV1, type AchievementActivity, type AchievementCategory, type AchievementCategoryProgress, type AchievementDefinition, type AchievementNotification, type AchievementUnlockedEventPayload, type AchievementsResponse, type ActivityAudience, type ActivityCap, type ActivityComment, type ActivityCommentNotification, type ActivityCommentSummary, type ActivityCommentsQuery, type ActivityCommentsResponse, type ActivityEntry, type ActivityEntrySharing, type ActivityFeedResponse, type ActivityLink, type ActivityPage, type ActivityPageQuery, type ActivityPreviewAudience, type ActivityPreviewQuery, type ActivityReaction, type ActivityReactionSummary, type ActivitySection, type ActivitySharingSettings, type ActivityType, 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 ComebackActivity, type ComebackRecognition, type ComebackRecognitionSummary, type CreateActivityCommentRequest, type CreateActivityCommentResponse, type CreateReportRequest, type CreateReportResponse, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateRoutineVersionRequest, type CreateSessionShareRequest, type DeleteAccountRequest, type DeleteAccountResponse, type DeleteActivityCommentResponse, 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, MODERATION_ACTION_KINDS, MODERATION_HISTORY_PAGE_SIZE, MODERATION_NOTE_MAX_LENGTH, MODERATION_QUEUE_PAGE_SIZE, MOVEMENT_PATTERNS, MUSCLE_GROUPS, type MarkNotificationsReadRequest, type MarkNotificationsReadResponse, type MeasurableGoal, type MeasurableGoalDirection, type MeasurableGoalExercise, type MeasurableGoalInput, type MeasurableGoalType, type MemberActivityResponse, type MemberModerationState, type MemberRoutinesResponse, type ModerationActionKind, type ModerationActionRecord, type ModerationHistoryQuery, type ModerationHistoryResponse, type ModerationQueueQuery, type ModerationQueueResponse, type ModerationReport, type ModeratorState, 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, type OwnActivityEntry, type OwnActivityResponse, 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 PersonalRecordActivity, 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 ProgressionActivity, 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_STATUSES, 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_TRAINING_BLOCKS_MAX, ROUTINE_TRAINING_BLOCK_NAME_MAX, ROUTINE_TRAINING_BLOCK_REVISIONS_MAX, ROUTINE_TRAINING_BLOCK_SOURCE_KINDS, ROUTINE_TRAINING_BLOCK_STATES, 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 ReportStatus, type ReportSubjectKind, type ReportSubjectPreview, type RestAlertPushPayload, type RestAlertRefusal, type RestoreRoutineVersionResponse, type ReviewReportRequest, type ReviewReportResponse, 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 RoutineSharedActivity, type RoutineTrainingBlock, type RoutineTrainingBlockRevision, type RoutineTrainingBlockRevisionsResponse, type RoutineTrainingBlockSource, type RoutineTrainingBlockSourceKind, type RoutineTrainingBlockState, type RoutineTrainingBlocksResponse, 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 SendTrainingPartnerEncouragementRequest, type SendTrainingPartnerEncouragementResponse, type SessionComparisonExercise, type SessionComparisonQuery, type SessionComparisonResponse, type SessionComparisonRoutineDay, type SessionComparisonSession, type SessionComparisonSet, type SessionCompletedActivity, type SessionExerciseSubstitution, type SessionProgressNotification, type SessionRecapRecord, type SessionShare, type SessionShareField, type SessionShareListResponse, type SetAccountTimeZoneRequest, type SetActivityEntryAudienceRequest, type SetActivityEntryAudienceResponse, type SetActivityReactionRequest, type SetActivityReactionResponse, 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 StreakMilestoneActivity, 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, TRAINING_PARTNERSHIP_STATUSES, TRAINING_PARTNERS_MAX, TRAINING_PARTNER_ENCOURAGEMENTS_PER_24_HOURS_MAX, TRAINING_PARTNER_ENCOURAGEMENT_KINDS, TRAINING_PARTNER_PERMISSION_KEYS, TRAINING_PARTNER_REQUESTS_PER_DAY_MAX, type TrainingDiscipline, type TrainingEventType, type TrainingExperienceLevel, type TrainingGoal, type TrainingIdentity, type TrainingLocationPreference, type TrainingLocationPreferenceInput, type TrainingPartnerEncouragementKind, type TrainingPartnerEncouragementNotification, type TrainingPartnerPermissions, type TrainingPartnerScheduleDay, type TrainingPartnerScheduleResponse, type TrainingPartnership, type TrainingPartnershipStatus, type TrainingPartnershipsResponse, type TrainingReminderPreference, type TrainingReminderPushPayload, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, USERNAME_PATTERN_SOURCE, type UpdateActivitySharingRequest, type UpdateNotificationPreferencesRequest, type UpdateProfileDiscoveryRequest, type UpdateProfilePrivacyRequest, type UpdateProfileRequest, type UpdateRoutineRequest, type UpdateRoutineVisibilityRequest, type UpdateTrainingPartnerPermissionsRequest, type UpsertRoutineTrainingBlockRequest, 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, accountExportFileName, isWithinQuietHours, matchesDeletionConfirmation, routineDayLabel };
|
package/dist/index.d.ts
CHANGED
|
@@ -2583,4 +2583,185 @@ interface PlannedReminder {
|
|
|
2583
2583
|
routineNames: string[];
|
|
2584
2584
|
}
|
|
2585
2585
|
|
|
2586
|
-
export { ACHIEVEMENT_CATEGORIES, ACHIEVEMENT_DEFINITIONS, ACTIVITY_CAPS, ACTIVITY_COMMENTS_PAGE_SIZE, ACTIVITY_COMMENTS_PER_DAY_MAX, ACTIVITY_COMMENT_MAX_LENGTH, ACTIVITY_DEFAULT_AUDIENCE, ACTIVITY_ENTRY_ID_MAX_LENGTH, ACTIVITY_FEED_FOLLOWED_MAX, ACTIVITY_PAGE_DEFAULT_LIMIT, ACTIVITY_PAGE_MAX_LIMIT, ACTIVITY_PREVIEW_AUDIENCES, ACTIVITY_REACTIONS, ACTIVITY_TYPES, ACTIVITY_TYPE_SECTIONS, type AchievementActivity, type AchievementCategory, type AchievementCategoryProgress, type AchievementDefinition, type AchievementNotification, type AchievementUnlockedEventPayload, type AchievementsResponse, type ActivityAudience, type ActivityCap, type ActivityComment, type ActivityCommentNotification, type ActivityCommentSummary, type ActivityCommentsQuery, type ActivityCommentsResponse, type ActivityEntry, type ActivityEntrySharing, type ActivityFeedResponse, type ActivityLink, type ActivityPage, type ActivityPageQuery, type ActivityPreviewAudience, type ActivityPreviewQuery, type ActivityReaction, type ActivityReactionSummary, type ActivitySection, type ActivitySharingSettings, type ActivityType, 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 ComebackActivity, type ComebackRecognition, type ComebackRecognitionSummary, type CreateActivityCommentRequest, type CreateActivityCommentResponse, type CreateReportRequest, type CreateReportResponse, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateRoutineVersionRequest, type CreateSessionShareRequest, type DeleteActivityCommentResponse, 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, MODERATION_ACTION_KINDS, MODERATION_HISTORY_PAGE_SIZE, MODERATION_NOTE_MAX_LENGTH, MODERATION_QUEUE_PAGE_SIZE, MOVEMENT_PATTERNS, MUSCLE_GROUPS, type MarkNotificationsReadRequest, type MarkNotificationsReadResponse, type MeasurableGoal, type MeasurableGoalDirection, type MeasurableGoalExercise, type MeasurableGoalInput, type MeasurableGoalType, type MemberActivityResponse, type MemberModerationState, type MemberRoutinesResponse, type ModerationActionKind, type ModerationActionRecord, type ModerationHistoryQuery, type ModerationHistoryResponse, type ModerationQueueQuery, type ModerationQueueResponse, type ModerationReport, type ModeratorState, 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, type OwnActivityEntry, type OwnActivityResponse, 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 PersonalRecordActivity, 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 ProgressionActivity, 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_STATUSES, 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_TRAINING_BLOCKS_MAX, ROUTINE_TRAINING_BLOCK_NAME_MAX, ROUTINE_TRAINING_BLOCK_REVISIONS_MAX, ROUTINE_TRAINING_BLOCK_SOURCE_KINDS, ROUTINE_TRAINING_BLOCK_STATES, 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 ReportStatus, type ReportSubjectKind, type ReportSubjectPreview, type RestAlertPushPayload, type RestAlertRefusal, type RestoreRoutineVersionResponse, type ReviewReportRequest, type ReviewReportResponse, 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 RoutineSharedActivity, type RoutineTrainingBlock, type RoutineTrainingBlockRevision, type RoutineTrainingBlockRevisionsResponse, type RoutineTrainingBlockSource, type RoutineTrainingBlockSourceKind, type RoutineTrainingBlockState, type RoutineTrainingBlocksResponse, 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 SendTrainingPartnerEncouragementRequest, type SendTrainingPartnerEncouragementResponse, type SessionComparisonExercise, type SessionComparisonQuery, type SessionComparisonResponse, type SessionComparisonRoutineDay, type SessionComparisonSession, type SessionComparisonSet, type SessionCompletedActivity, type SessionExerciseSubstitution, type SessionProgressNotification, type SessionRecapRecord, type SessionShare, type SessionShareField, type SessionShareListResponse, type SetAccountTimeZoneRequest, type SetActivityEntryAudienceRequest, type SetActivityEntryAudienceResponse, type SetActivityReactionRequest, type SetActivityReactionResponse, 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 StreakMilestoneActivity, 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, TRAINING_PARTNERSHIP_STATUSES, TRAINING_PARTNERS_MAX, TRAINING_PARTNER_ENCOURAGEMENTS_PER_24_HOURS_MAX, TRAINING_PARTNER_ENCOURAGEMENT_KINDS, TRAINING_PARTNER_PERMISSION_KEYS, TRAINING_PARTNER_REQUESTS_PER_DAY_MAX, type TrainingDiscipline, type TrainingEventType, type TrainingExperienceLevel, type TrainingGoal, type TrainingIdentity, type TrainingLocationPreference, type TrainingLocationPreferenceInput, type TrainingPartnerEncouragementKind, type TrainingPartnerEncouragementNotification, type TrainingPartnerPermissions, type TrainingPartnerScheduleDay, type TrainingPartnerScheduleResponse, type TrainingPartnership, type TrainingPartnershipStatus, type TrainingPartnershipsResponse, type TrainingReminderPreference, type TrainingReminderPushPayload, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, USERNAME_PATTERN_SOURCE, type UpdateActivitySharingRequest, type UpdateNotificationPreferencesRequest, type UpdateProfileDiscoveryRequest, type UpdateProfilePrivacyRequest, type UpdateProfileRequest, type UpdateRoutineRequest, type UpdateRoutineVisibilityRequest, type UpdateTrainingPartnerPermissionsRequest, type UpsertRoutineTrainingBlockRequest, 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 };
|
|
2586
|
+
/**
|
|
2587
|
+
* TRUST-01. Deleting an account is immediate and cannot be undone: the
|
|
2588
|
+
* member's data, their Supabase sign-in and any stored avatar go together.
|
|
2589
|
+
*
|
|
2590
|
+
* The owner confirms by typing their current username. It is a statement of
|
|
2591
|
+
* intent, not a credential -- the bearer token already proves who is asking,
|
|
2592
|
+
* and a Google account has no password to re-enter.
|
|
2593
|
+
*/
|
|
2594
|
+
interface DeleteAccountRequest {
|
|
2595
|
+
confirmUsername: string;
|
|
2596
|
+
}
|
|
2597
|
+
interface DeleteAccountResponse {
|
|
2598
|
+
deletedAt: IsoDateString;
|
|
2599
|
+
}
|
|
2600
|
+
/**
|
|
2601
|
+
* Whether what the owner typed confirms deleting the account with this
|
|
2602
|
+
* username. Usernames are lowercase public identifiers, so the comparison
|
|
2603
|
+
* ignores case, surrounding whitespace and a leading `@`, and nothing else.
|
|
2604
|
+
*/
|
|
2605
|
+
declare function matchesDeletionConfirmation(typed: string, username: string): boolean;
|
|
2606
|
+
|
|
2607
|
+
/**
|
|
2608
|
+
* EXPORT-01. Everything a member put into Sunnsteel, in one JSON document they
|
|
2609
|
+
* can keep, read or take elsewhere.
|
|
2610
|
+
*
|
|
2611
|
+
* Stability is the point. `format` and `formatVersion` identify the document;
|
|
2612
|
+
* a field is only ever added within a version, and anything that changes the
|
|
2613
|
+
* meaning of an existing field is a new version. Sections reuse the shapes the
|
|
2614
|
+
* app itself serves (`UserProfile`, `Routine`, `WorkoutSession`), so the file
|
|
2615
|
+
* says what the member saw.
|
|
2616
|
+
*
|
|
2617
|
+
* **Every weight is kilograms**, whatever unit the account displays -- that is
|
|
2618
|
+
* how Sunnsteel stores them. `account.weightUnit` is the display preference.
|
|
2619
|
+
*
|
|
2620
|
+
* Left out on purpose, and stated in `omitted`: other members' data (people
|
|
2621
|
+
* appear by username only, never email), credentials (share-link tokens,
|
|
2622
|
+
* push-device endpoints), and anything derived from what is exported
|
|
2623
|
+
* (analytics rollups, the notification feed).
|
|
2624
|
+
*/
|
|
2625
|
+
declare const ACCOUNT_EXPORT_FORMAT: "sunnsteel-account-export";
|
|
2626
|
+
declare const ACCOUNT_EXPORT_VERSION: 1;
|
|
2627
|
+
/** Another member, as the export names them: never by email. */
|
|
2628
|
+
interface AccountExportMember {
|
|
2629
|
+
username: string;
|
|
2630
|
+
name: string;
|
|
2631
|
+
}
|
|
2632
|
+
interface AccountExportRoutine {
|
|
2633
|
+
routine: Routine;
|
|
2634
|
+
versions: Array<{
|
|
2635
|
+
number: number;
|
|
2636
|
+
name: string | null;
|
|
2637
|
+
kind: string;
|
|
2638
|
+
createdAt: IsoDateString;
|
|
2639
|
+
setup: RoutineVersionSetup;
|
|
2640
|
+
}>;
|
|
2641
|
+
}
|
|
2642
|
+
interface AccountExportPersonalRecord {
|
|
2643
|
+
exerciseId: string;
|
|
2644
|
+
exerciseName: string;
|
|
2645
|
+
weightKg: number;
|
|
2646
|
+
reps: number;
|
|
2647
|
+
estimated1rmKg: number;
|
|
2648
|
+
achievedAt: IsoDateString;
|
|
2649
|
+
sessionId: string;
|
|
2650
|
+
}
|
|
2651
|
+
/**
|
|
2652
|
+
* The member's training history as recorded events: completed sessions,
|
|
2653
|
+
* records, load changes, achievements and streaks. `payload` is versioned by
|
|
2654
|
+
* `schemaVersion`.
|
|
2655
|
+
*/
|
|
2656
|
+
interface AccountExportTrainingEvent {
|
|
2657
|
+
type: string;
|
|
2658
|
+
occurredAt: IsoDateString;
|
|
2659
|
+
sessionId: string | null;
|
|
2660
|
+
schemaVersion: number;
|
|
2661
|
+
payload: unknown;
|
|
2662
|
+
}
|
|
2663
|
+
interface AccountExportGoal {
|
|
2664
|
+
type: string;
|
|
2665
|
+
direction: string;
|
|
2666
|
+
targetValue: number;
|
|
2667
|
+
exerciseId: string | null;
|
|
2668
|
+
createdAt: IsoDateString;
|
|
2669
|
+
}
|
|
2670
|
+
interface AccountExportTrainingLocation {
|
|
2671
|
+
name: string;
|
|
2672
|
+
isDefault: boolean;
|
|
2673
|
+
barWeightKg: number;
|
|
2674
|
+
availablePlatePairs: unknown;
|
|
2675
|
+
equipment: string[];
|
|
2676
|
+
}
|
|
2677
|
+
interface AccountExportScheduleOverride {
|
|
2678
|
+
routineId: string;
|
|
2679
|
+
date: string;
|
|
2680
|
+
kind: string;
|
|
2681
|
+
toDate: string | null;
|
|
2682
|
+
}
|
|
2683
|
+
interface AccountExportV1 {
|
|
2684
|
+
format: typeof ACCOUNT_EXPORT_FORMAT;
|
|
2685
|
+
formatVersion: typeof ACCOUNT_EXPORT_VERSION;
|
|
2686
|
+
exportedAt: IsoDateString;
|
|
2687
|
+
weightsAreKilograms: true;
|
|
2688
|
+
account: UserProfile;
|
|
2689
|
+
preferences: {
|
|
2690
|
+
notifications: {
|
|
2691
|
+
restAlert: boolean;
|
|
2692
|
+
trainingReminder: boolean;
|
|
2693
|
+
streakAtRisk: boolean;
|
|
2694
|
+
quietHours: {
|
|
2695
|
+
startMinute: number;
|
|
2696
|
+
endMinute: number;
|
|
2697
|
+
} | null;
|
|
2698
|
+
reminderMinuteOfDay: number | null;
|
|
2699
|
+
};
|
|
2700
|
+
timeZone: string | null;
|
|
2701
|
+
plateauMinSessions: number;
|
|
2702
|
+
activitySharingDefaults: Array<{
|
|
2703
|
+
type: string;
|
|
2704
|
+
audience: string;
|
|
2705
|
+
}>;
|
|
2706
|
+
activityEntryAudiences: Array<{
|
|
2707
|
+
entryKey: string;
|
|
2708
|
+
audience: string;
|
|
2709
|
+
}>;
|
|
2710
|
+
};
|
|
2711
|
+
routines: AccountExportRoutine[];
|
|
2712
|
+
workouts: WorkoutSession[];
|
|
2713
|
+
personalRecords: AccountExportPersonalRecord[];
|
|
2714
|
+
trainingEvents: AccountExportTrainingEvent[];
|
|
2715
|
+
goals: AccountExportGoal[];
|
|
2716
|
+
trainingLocations: AccountExportTrainingLocation[];
|
|
2717
|
+
scheduleOverrides: AccountExportScheduleOverride[];
|
|
2718
|
+
exercises: {
|
|
2719
|
+
starred: Array<{
|
|
2720
|
+
exerciseId: string;
|
|
2721
|
+
name: string;
|
|
2722
|
+
starredAt: IsoDateString;
|
|
2723
|
+
}>;
|
|
2724
|
+
};
|
|
2725
|
+
social: {
|
|
2726
|
+
following: Array<AccountExportMember & {
|
|
2727
|
+
since: IsoDateString;
|
|
2728
|
+
}>;
|
|
2729
|
+
followers: Array<AccountExportMember & {
|
|
2730
|
+
since: IsoDateString;
|
|
2731
|
+
}>;
|
|
2732
|
+
blocked: Array<AccountExportMember & {
|
|
2733
|
+
since: IsoDateString;
|
|
2734
|
+
}>;
|
|
2735
|
+
trainingPartners: Array<{
|
|
2736
|
+
member: AccountExportMember;
|
|
2737
|
+
status: string;
|
|
2738
|
+
requestedByMe: boolean;
|
|
2739
|
+
since: IsoDateString;
|
|
2740
|
+
}>;
|
|
2741
|
+
commentsWritten: Array<{
|
|
2742
|
+
onActivityOf: AccountExportMember;
|
|
2743
|
+
entryKey: string;
|
|
2744
|
+
body: string;
|
|
2745
|
+
createdAt: IsoDateString;
|
|
2746
|
+
}>;
|
|
2747
|
+
reactionsGiven: Array<{
|
|
2748
|
+
onActivityOf: AccountExportMember;
|
|
2749
|
+
entryKey: string;
|
|
2750
|
+
reaction: string;
|
|
2751
|
+
createdAt: IsoDateString;
|
|
2752
|
+
}>;
|
|
2753
|
+
reportsFiled: Array<{
|
|
2754
|
+
subjectKind: string;
|
|
2755
|
+
reason: string;
|
|
2756
|
+
details: string | null;
|
|
2757
|
+
status: string;
|
|
2758
|
+
createdAt: IsoDateString;
|
|
2759
|
+
}>;
|
|
2760
|
+
};
|
|
2761
|
+
/** What the file deliberately does not contain, and why. */
|
|
2762
|
+
omitted: string[];
|
|
2763
|
+
}
|
|
2764
|
+
/** The file name a download of the export is saved under. */
|
|
2765
|
+
declare function accountExportFileName(username: string, exportedAt: string): string;
|
|
2766
|
+
|
|
2767
|
+
export { ACCOUNT_EXPORT_FORMAT, ACCOUNT_EXPORT_VERSION, ACHIEVEMENT_CATEGORIES, ACHIEVEMENT_DEFINITIONS, ACTIVITY_CAPS, ACTIVITY_COMMENTS_PAGE_SIZE, ACTIVITY_COMMENTS_PER_DAY_MAX, ACTIVITY_COMMENT_MAX_LENGTH, ACTIVITY_DEFAULT_AUDIENCE, ACTIVITY_ENTRY_ID_MAX_LENGTH, ACTIVITY_FEED_FOLLOWED_MAX, ACTIVITY_PAGE_DEFAULT_LIMIT, ACTIVITY_PAGE_MAX_LIMIT, ACTIVITY_PREVIEW_AUDIENCES, ACTIVITY_REACTIONS, ACTIVITY_TYPES, ACTIVITY_TYPE_SECTIONS, type AccountExportGoal, type AccountExportMember, type AccountExportPersonalRecord, type AccountExportRoutine, type AccountExportScheduleOverride, type AccountExportTrainingEvent, type AccountExportTrainingLocation, type AccountExportV1, type AchievementActivity, type AchievementCategory, type AchievementCategoryProgress, type AchievementDefinition, type AchievementNotification, type AchievementUnlockedEventPayload, type AchievementsResponse, type ActivityAudience, type ActivityCap, type ActivityComment, type ActivityCommentNotification, type ActivityCommentSummary, type ActivityCommentsQuery, type ActivityCommentsResponse, type ActivityEntry, type ActivityEntrySharing, type ActivityFeedResponse, type ActivityLink, type ActivityPage, type ActivityPageQuery, type ActivityPreviewAudience, type ActivityPreviewQuery, type ActivityReaction, type ActivityReactionSummary, type ActivitySection, type ActivitySharingSettings, type ActivityType, 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 ComebackActivity, type ComebackRecognition, type ComebackRecognitionSummary, type CreateActivityCommentRequest, type CreateActivityCommentResponse, type CreateReportRequest, type CreateReportResponse, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateRoutineVersionRequest, type CreateSessionShareRequest, type DeleteAccountRequest, type DeleteAccountResponse, type DeleteActivityCommentResponse, 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, MODERATION_ACTION_KINDS, MODERATION_HISTORY_PAGE_SIZE, MODERATION_NOTE_MAX_LENGTH, MODERATION_QUEUE_PAGE_SIZE, MOVEMENT_PATTERNS, MUSCLE_GROUPS, type MarkNotificationsReadRequest, type MarkNotificationsReadResponse, type MeasurableGoal, type MeasurableGoalDirection, type MeasurableGoalExercise, type MeasurableGoalInput, type MeasurableGoalType, type MemberActivityResponse, type MemberModerationState, type MemberRoutinesResponse, type ModerationActionKind, type ModerationActionRecord, type ModerationHistoryQuery, type ModerationHistoryResponse, type ModerationQueueQuery, type ModerationQueueResponse, type ModerationReport, type ModeratorState, 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, type OwnActivityEntry, type OwnActivityResponse, 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 PersonalRecordActivity, 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 ProgressionActivity, 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_STATUSES, 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_TRAINING_BLOCKS_MAX, ROUTINE_TRAINING_BLOCK_NAME_MAX, ROUTINE_TRAINING_BLOCK_REVISIONS_MAX, ROUTINE_TRAINING_BLOCK_SOURCE_KINDS, ROUTINE_TRAINING_BLOCK_STATES, 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 ReportStatus, type ReportSubjectKind, type ReportSubjectPreview, type RestAlertPushPayload, type RestAlertRefusal, type RestoreRoutineVersionResponse, type ReviewReportRequest, type ReviewReportResponse, 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 RoutineSharedActivity, type RoutineTrainingBlock, type RoutineTrainingBlockRevision, type RoutineTrainingBlockRevisionsResponse, type RoutineTrainingBlockSource, type RoutineTrainingBlockSourceKind, type RoutineTrainingBlockState, type RoutineTrainingBlocksResponse, 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 SendTrainingPartnerEncouragementRequest, type SendTrainingPartnerEncouragementResponse, type SessionComparisonExercise, type SessionComparisonQuery, type SessionComparisonResponse, type SessionComparisonRoutineDay, type SessionComparisonSession, type SessionComparisonSet, type SessionCompletedActivity, type SessionExerciseSubstitution, type SessionProgressNotification, type SessionRecapRecord, type SessionShare, type SessionShareField, type SessionShareListResponse, type SetAccountTimeZoneRequest, type SetActivityEntryAudienceRequest, type SetActivityEntryAudienceResponse, type SetActivityReactionRequest, type SetActivityReactionResponse, 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 StreakMilestoneActivity, 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, TRAINING_PARTNERSHIP_STATUSES, TRAINING_PARTNERS_MAX, TRAINING_PARTNER_ENCOURAGEMENTS_PER_24_HOURS_MAX, TRAINING_PARTNER_ENCOURAGEMENT_KINDS, TRAINING_PARTNER_PERMISSION_KEYS, TRAINING_PARTNER_REQUESTS_PER_DAY_MAX, type TrainingDiscipline, type TrainingEventType, type TrainingExperienceLevel, type TrainingGoal, type TrainingIdentity, type TrainingLocationPreference, type TrainingLocationPreferenceInput, type TrainingPartnerEncouragementKind, type TrainingPartnerEncouragementNotification, type TrainingPartnerPermissions, type TrainingPartnerScheduleDay, type TrainingPartnerScheduleResponse, type TrainingPartnership, type TrainingPartnershipStatus, type TrainingPartnershipsResponse, type TrainingReminderPreference, type TrainingReminderPushPayload, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, USERNAME_PATTERN_SOURCE, type UpdateActivitySharingRequest, type UpdateNotificationPreferencesRequest, type UpdateProfileDiscoveryRequest, type UpdateProfilePrivacyRequest, type UpdateProfileRequest, type UpdateRoutineRequest, type UpdateRoutineVisibilityRequest, type UpdateTrainingPartnerPermissionsRequest, type UpsertRoutineTrainingBlockRequest, 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, accountExportFileName, isWithinQuietHours, matchesDeletionConfirmation, routineDayLabel };
|
package/dist/index.js
CHANGED
|
@@ -535,7 +535,22 @@ var TRAINING_PARTNER_ENCOURAGEMENT_KINDS = [
|
|
|
535
535
|
];
|
|
536
536
|
var TRAINING_PARTNER_ENCOURAGEMENTS_PER_24_HOURS_MAX = 4;
|
|
537
537
|
var TRAINING_PARTNERSHIP_STATUSES = ["PENDING", "ACTIVE"];
|
|
538
|
+
|
|
539
|
+
// src/account-deletion.ts
|
|
540
|
+
function matchesDeletionConfirmation(typed, username) {
|
|
541
|
+
const normalized = typed.trim().replace(/^@/, "").toLowerCase();
|
|
542
|
+
return normalized.length > 0 && normalized === username.toLowerCase();
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
// src/account-export.ts
|
|
546
|
+
var ACCOUNT_EXPORT_FORMAT = "sunnsteel-account-export";
|
|
547
|
+
var ACCOUNT_EXPORT_VERSION = 1;
|
|
548
|
+
function accountExportFileName(username, exportedAt) {
|
|
549
|
+
return `sunnsteel-${username}-${exportedAt.slice(0, 10)}.json`;
|
|
550
|
+
}
|
|
538
551
|
export {
|
|
552
|
+
ACCOUNT_EXPORT_FORMAT,
|
|
553
|
+
ACCOUNT_EXPORT_VERSION,
|
|
539
554
|
ACHIEVEMENT_CATEGORIES,
|
|
540
555
|
ACHIEVEMENT_DEFINITIONS,
|
|
541
556
|
ACTIVITY_CAPS,
|
|
@@ -656,6 +671,8 @@ export {
|
|
|
656
671
|
USERNAME_PATTERN_SOURCE,
|
|
657
672
|
WEIGHT_UNITS,
|
|
658
673
|
WORKOUT_SESSION_STATUSES,
|
|
674
|
+
accountExportFileName,
|
|
659
675
|
isWithinQuietHours,
|
|
676
|
+
matchesDeletionConfirmation,
|
|
660
677
|
routineDayLabel
|
|
661
678
|
};
|