@sunsteel/contracts 0.100.0 → 0.102.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -63,6 +63,7 @@ __export(index_exports, {
63
63
  DEFAULT_DASHBOARD_LAYOUT: () => DEFAULT_DASHBOARD_LAYOUT,
64
64
  DEFAULT_LOCALE: () => DEFAULT_LOCALE,
65
65
  DEFAULT_MESSAGE_PERMISSION: () => DEFAULT_MESSAGE_PERMISSION,
66
+ DEFAULT_PLAN: () => DEFAULT_PLAN,
66
67
  DEFAULT_WEEK_STARTS_ON: () => DEFAULT_WEEK_STARTS_ON,
67
68
  DELOAD_DEFAULT_DAYS: () => DELOAD_DEFAULT_DAYS,
68
69
  DELOAD_DEFAULT_LOAD_REDUCTION: () => DELOAD_DEFAULT_LOAD_REDUCTION,
@@ -76,6 +77,7 @@ __export(index_exports, {
76
77
  DELOAD_SUGGESTION_MIN_MARKED_TODAY: () => DELOAD_SUGGESTION_MIN_MARKED_TODAY,
77
78
  DELOAD_SUGGESTION_ROUTINE_DAYS: () => DELOAD_SUGGESTION_ROUTINE_DAYS,
78
79
  DELOAD_SUGGESTION_SIGNALS: () => DELOAD_SUGGESTION_SIGNALS,
80
+ ENTITLEMENT_SOURCES: () => ENTITLEMENT_SOURCES,
79
81
  EXERCISE_EQUIPMENT: () => EXERCISE_EQUIPMENT,
80
82
  EXERCISE_GROUP_KIND_LABELS: () => EXERCISE_GROUP_KIND_LABELS,
81
83
  EXERCISE_GROUP_MAX: () => EXERCISE_GROUP_MAX,
@@ -83,6 +85,8 @@ __export(index_exports, {
83
85
  FEATURED_PROFILE_ITEMS_MAX: () => FEATURED_PROFILE_ITEMS_MAX,
84
86
  FEATURED_PROFILE_ITEM_KINDS: () => FEATURED_PROFILE_ITEM_KINDS,
85
87
  FEATURED_PROFILE_REFERENCE_MAX_LENGTH: () => FEATURED_PROFILE_REFERENCE_MAX_LENGTH,
88
+ FEATURE_KEYS: () => FEATURE_KEYS,
89
+ FINISH_PAUSE_MINUTES: () => FINISH_PAUSE_MINUTES,
86
90
  FOLLOW_SUGGESTIONS_DEFAULT_LIMIT: () => FOLLOW_SUGGESTIONS_DEFAULT_LIMIT,
87
91
  FOLLOW_SUGGESTIONS_MAX_LIMIT: () => FOLLOW_SUGGESTIONS_MAX_LIMIT,
88
92
  FOLLOW_SUGGESTION_REASONS: () => FOLLOW_SUGGESTION_REASONS,
@@ -147,6 +151,9 @@ __export(index_exports, {
147
151
  ONBOARDING_STEP_ID_PATTERN_SOURCE: () => ONBOARDING_STEP_ID_PATTERN_SOURCE,
148
152
  ONBOARDING_VERSION_MAX: () => ONBOARDING_VERSION_MAX,
149
153
  OTHER_WARM_UP_STEPS: () => OTHER_WARM_UP_STEPS,
154
+ PLANS: () => PLANS,
155
+ PLAN_IDS: () => PLAN_IDS,
156
+ PLAN_LIMIT_KEYS: () => PLAN_LIMIT_KEYS,
150
157
  PLATEAU_MIN_DAYS_SINCE_BEST: () => PLATEAU_MIN_DAYS_SINCE_BEST,
151
158
  PLATEAU_MIN_SESSIONS: () => PLATEAU_MIN_SESSIONS,
152
159
  PLATEAU_MIN_SESSIONS_MAX: () => PLATEAU_MIN_SESSIONS_MAX,
@@ -259,6 +266,7 @@ __export(index_exports, {
259
266
  USERNAME_PATTERN_SOURCE: () => USERNAME_PATTERN_SOURCE,
260
267
  WEEK_STARTS: () => WEEK_STARTS,
261
268
  WEIGHT_UNITS: () => WEIGHT_UNITS,
269
+ WORKOUT_END_CLOCK_SLACK_SECONDS: () => WORKOUT_END_CLOCK_SLACK_SECONDS,
262
270
  WORKOUT_SESSION_ORIGINS: () => WORKOUT_SESSION_ORIGINS,
263
271
  WORKOUT_SESSION_STATUSES: () => WORKOUT_SESSION_STATUSES,
264
272
  accountExportFileName: () => accountExportFileName,
@@ -276,19 +284,24 @@ __export(index_exports, {
276
284
  cmToFeetInches: () => cmToFeetInches,
277
285
  cmToInches: () => cmToInches,
278
286
  continueLinearPeriodization: () => continueLinearPeriodization,
287
+ correctedEndTime: () => correctedEndTime,
279
288
  countsAsWork: () => countsAsWork,
280
289
  countsForProgression: () => countsForProgression,
281
290
  customExerciseProblem: () => customExerciseProblem,
282
291
  defaultWarmUpEquipment: () => defaultWarmUpEquipment,
283
292
  deloadLengthDays: () => deloadLengthDays,
293
+ earliestWorkoutEnd: () => earliestWorkoutEnd,
284
294
  exerciseGroupLabel: () => exerciseGroupLabel,
285
295
  exerciseGroupPosition: () => exerciseGroupPosition,
286
296
  exerciseGroups: () => exerciseGroups,
287
297
  exerciseNameKey: () => exerciseNameKey,
288
298
  feetInchesToCm: () => feetInchesToCm,
299
+ finishEndTime: () => finishEndTime,
300
+ finishNeedsEndTime: () => finishNeedsEndTime,
289
301
  followWorkingLoad: () => followWorkingLoad,
290
302
  goalSuggestionKey: () => goalSuggestionKey,
291
303
  hasOversizedGroup: () => hasOversizedGroup,
304
+ higherPlan: () => higherPlan,
292
305
  inchesToCm: () => inchesToCm,
293
306
  isApiErrorCode: () => isApiErrorCode,
294
307
  isAppLocale: () => isAppLocale,
@@ -296,9 +309,13 @@ __export(index_exports, {
296
309
  isBodyMeasurementDate: () => isBodyMeasurementDate,
297
310
  isDashboardSectionId: () => isDashboardSectionId,
298
311
  isDefaultDashboardLayout: () => isDefaultDashboardLayout,
312
+ isEntitlementSource: () => isEntitlementSource,
313
+ isFeatureKey: () => isFeatureKey,
299
314
  isGoalSuggestionKey: () => isGoalSuggestionKey,
315
+ isGrantActive: () => isGrantActive,
300
316
  isMessagePermission: () => isMessagePermission,
301
317
  isOnboardingStepId: () => isOnboardingStepId,
318
+ isPlanId: () => isPlanId,
302
319
  isRealtimeTopic: () => isRealtimeTopic,
303
320
  isSetKind: () => isSetKind,
304
321
  isWeekStartsOn: () => isWeekStartsOn,
@@ -328,6 +345,8 @@ __export(index_exports, {
328
345
  normalizeMessageBody: () => normalizeMessageBody,
329
346
  normalizeSearchQuery: () => normalizeSearchQuery,
330
347
  parseRealtimeEvent: () => parseRealtimeEvent,
348
+ planFromGrants: () => planFromGrants,
349
+ planIncludes: () => planIncludes,
331
350
  primaryEquipment: () => primaryEquipment,
332
351
  requiredToFinish: () => requiredToFinish,
333
352
  resolveActiveTrainingBlock: () => resolveActiveTrainingBlock,
@@ -481,6 +500,96 @@ var FOLLOW_SUGGESTION_REASONS = [
481
500
  "FOLLOWED_BY_PEOPLE_YOU_FOLLOW"
482
501
  ];
483
502
 
503
+ // src/billing.ts
504
+ var PLAN_IDS = ["FREE", "PRO"];
505
+ var DEFAULT_PLAN = "FREE";
506
+ function isPlanId(value) {
507
+ return typeof value === "string" && PLAN_IDS.includes(value);
508
+ }
509
+ var ENTITLEMENT_SOURCES = ["SUBSCRIPTION", "PROMO", "ADMIN"];
510
+ function isEntitlementSource(value) {
511
+ return typeof value === "string" && ENTITLEMENT_SOURCES.includes(value);
512
+ }
513
+ var FEATURE_KEYS = [
514
+ /** PROG-01: strength-trend ranges beyond 90 days. */
515
+ "STRENGTH_TRENDS_LONG_RANGES",
516
+ /** PROG-11, PROG-06: block and session comparison. */
517
+ "TRAINING_COMPARISON",
518
+ /** PROG-10, INTEL-02: training signals and the deload suggestion. */
519
+ "TRAINING_SIGNALS",
520
+ /** PROG-03, PROG-04: the muscle heatmap and volume trends past 4 weeks. */
521
+ "MUSCLE_HISTORY_LONG",
522
+ /** ROUT-09, ROUT-15: dated training blocks. */
523
+ "TRAINING_BLOCKS",
524
+ /** ROUT-16: planned deloads. */
525
+ "PLANNED_DELOADS",
526
+ /** ROUT-17 to ROUT-20: 8-week blocks. */
527
+ "EIGHT_WEEK_BLOCKS",
528
+ /** ACH-06: goal suggestions. */
529
+ "GOAL_SUGGESTIONS",
530
+ /** PROG-12: every body measurement beyond weight. */
531
+ "BODY_MEASUREMENTS",
532
+ /** DASH-05: dashboard customization. */
533
+ "DASHBOARD_CUSTOMIZATION",
534
+ /** INTEL-03: natural-language routine drafts. */
535
+ "ROUTINE_DRAFTS",
536
+ /** INTEL-04: the training review assistant. */
537
+ "TRAINING_REVIEW"
538
+ ];
539
+ function isFeatureKey(value) {
540
+ return typeof value === "string" && FEATURE_KEYS.includes(value);
541
+ }
542
+ var PLAN_LIMIT_KEYS = [
543
+ /** ROUT-08: saved versions per routine. */
544
+ "ROUTINE_VERSIONS",
545
+ /** PROG-08: measurable goals. */
546
+ "GOALS",
547
+ /** PREF-01: training locations. */
548
+ "TRAINING_LOCATIONS",
549
+ /** PROG-03, PROG-04: weeks of muscle history. */
550
+ "MUSCLE_HISTORY_WEEKS"
551
+ ];
552
+ var PLANS = {
553
+ FREE: {
554
+ id: "FREE",
555
+ features: [],
556
+ limits: {
557
+ ROUTINE_VERSIONS: 3,
558
+ GOALS: 3,
559
+ TRAINING_LOCATIONS: 1,
560
+ MUSCLE_HISTORY_WEEKS: 4
561
+ }
562
+ },
563
+ PRO: {
564
+ id: "PRO",
565
+ features: FEATURE_KEYS,
566
+ limits: {
567
+ ROUTINE_VERSIONS: 20,
568
+ GOALS: 8,
569
+ TRAINING_LOCATIONS: null,
570
+ MUSCLE_HISTORY_WEEKS: 12
571
+ }
572
+ }
573
+ };
574
+ function planIncludes(plan, feature) {
575
+ return PLANS[plan].features.includes(feature);
576
+ }
577
+ function higherPlan(a, b) {
578
+ return PLAN_IDS.indexOf(a) >= PLAN_IDS.indexOf(b) ? a : b;
579
+ }
580
+ function time(value) {
581
+ return value instanceof Date ? value.getTime() : Date.parse(value);
582
+ }
583
+ function isGrantActive(grant, now = /* @__PURE__ */ new Date()) {
584
+ const at = now.getTime();
585
+ if (grant.revokedAt !== null) return false;
586
+ if (time(grant.startsAt) > at) return false;
587
+ return grant.expiresAt === null || time(grant.expiresAt) > at;
588
+ }
589
+ function planFromGrants(grants, now = /* @__PURE__ */ new Date()) {
590
+ return grants.filter((grant) => isGrantActive(grant, now)).reduce((plan, grant) => higherPlan(plan, grant.planId), DEFAULT_PLAN);
591
+ }
592
+
484
593
  // src/dashboard-layout.ts
485
594
  var DASHBOARD_SECTION_IDS = [
486
595
  "this-week",
@@ -1197,10 +1306,10 @@ var DAY_MS = 24 * 60 * 60 * 1e3;
1197
1306
  var DATE = /^\d{4}-\d{2}-\d{2}$/;
1198
1307
  function dayNumber(date) {
1199
1308
  if (!DATE.test(date)) return null;
1200
- const time = Date.parse(`${date}T00:00:00Z`);
1201
- if (!Number.isFinite(time)) return null;
1202
- if (new Date(time).toISOString().slice(0, 10) !== date) return null;
1203
- return Math.round(time / DAY_MS);
1309
+ const time2 = Date.parse(`${date}T00:00:00Z`);
1310
+ if (!Number.isFinite(time2)) return null;
1311
+ if (new Date(time2).toISOString().slice(0, 10) !== date) return null;
1312
+ return Math.round(time2 / DAY_MS);
1204
1313
  }
1205
1314
  function addCalendarDays(date, days) {
1206
1315
  const day = dayNumber(date);
@@ -1681,8 +1790,8 @@ function applyDeload(setup, options) {
1681
1790
  return lighter ? { ...setup, days } : null;
1682
1791
  }
1683
1792
  function deloadLengthDays(startDate, endDate) {
1684
- const ms = (date) => Date.parse(`${date}T00:00:00Z`);
1685
- return Math.round((ms(endDate) - ms(startDate)) / 864e5) + 1;
1793
+ const ms2 = (date) => Date.parse(`${date}T00:00:00Z`);
1794
+ return Math.round((ms2(endDate) - ms2(startDate)) / 864e5) + 1;
1686
1795
  }
1687
1796
 
1688
1797
  // src/deload-suggestions.ts
@@ -1779,6 +1888,37 @@ var SESSION_SHARE_DEFAULT_FIELDS = [
1779
1888
  ];
1780
1889
  var SESSION_SHARE_MAX_ACTIVE_LINKS = 10;
1781
1890
 
1891
+ // src/workout-end-time.ts
1892
+ var FINISH_PAUSE_MINUTES = 30;
1893
+ var WORKOUT_END_CLOCK_SLACK_SECONDS = 120;
1894
+ var ms = (value) => new Date(value).getTime();
1895
+ function earliestWorkoutEnd(input) {
1896
+ const skip = input.movesWithEnd ? ms(input.movesWithEnd) : null;
1897
+ let earliest = ms(input.startedAt);
1898
+ for (const value of input.completedAts) {
1899
+ if (!value) continue;
1900
+ const at = ms(value);
1901
+ if (Number.isFinite(at) && at !== skip && at > earliest) earliest = at;
1902
+ }
1903
+ return new Date(earliest);
1904
+ }
1905
+ function finishEndTime(requested, earliest, now = /* @__PURE__ */ new Date()) {
1906
+ if (requested == null) return now;
1907
+ const at = ms(requested);
1908
+ if (!Number.isFinite(at) || at < earliest.getTime()) return null;
1909
+ if (at > now.getTime() + WORKOUT_END_CLOCK_SLACK_SECONDS * 1e3) return null;
1910
+ return new Date(Math.min(at, now.getTime()));
1911
+ }
1912
+ function correctedEndTime(requested, earliest, endedAt) {
1913
+ const at = ms(requested);
1914
+ if (!Number.isFinite(at)) return null;
1915
+ if (at < earliest.getTime() || at > ms(endedAt)) return null;
1916
+ return new Date(at);
1917
+ }
1918
+ function finishNeedsEndTime(lastActivityAt, now = /* @__PURE__ */ new Date()) {
1919
+ return now.getTime() - ms(lastActivityAt) >= FINISH_PAUSE_MINUTES * 60 * 1e3;
1920
+ }
1921
+
1782
1922
  // src/session-corrections.ts
1783
1923
  var SESSION_CORRECTION_WINDOW_HOURS = 48;
1784
1924
  var SESSION_CORRECTIONS_MAX = 10;
@@ -2040,6 +2180,7 @@ var API_ERROR_MESSAGES = {
2040
2180
  SESSION_BLOCK_NOT_IN_FORCE: "That training block is not in force today; start a day of the routine",
2041
2181
  SESSION_FINISHED: "Cannot modify set logs for a finished session",
2042
2182
  SESSION_ALREADY_FINISHED: "Session already finished with a different status",
2183
+ WORKOUT_END_TIME_RANGE: "A workout ends after it started and after its last set, and not in the future",
2043
2184
  EXTRA_SETS_MAX: "An exercise can take at most {max} extra sets",
2044
2185
  EXTRA_SET_NOT_NEXT: "Extra sets are added after the last set",
2045
2186
  PRESCRIBED_SET_NOT_REMOVABLE: "A prescribed set cannot be removed",
@@ -2077,6 +2218,7 @@ var API_ERROR_MESSAGES = {
2077
2218
  CORRECTION_COMPLETED_NEEDS_REP: "A completed set needs at least one rep",
2078
2219
  CORRECTION_NOTHING_TO_CORRECT: "Nothing to correct: every set already reads that way",
2079
2220
  CORRECTION_KEEPS_ONE_SET: "A finished workout keeps at least one completed set",
2221
+ CORRECTION_END_TIME_RANGE: "A workout's end can only move earlier, and not before it started or before its last set",
2080
2222
  // ── Sharing a workout ──────────────────────────────────────────────────
2081
2223
  SESSION_SHARE_NOTHING_CHOSEN: "Choose at least one part of the recap to share",
2082
2224
  SESSION_SHARE_NOT_COMPLETED: "Only completed sessions can be shared",
@@ -2126,6 +2268,8 @@ var API_ERROR_MESSAGES = {
2126
2268
  MESSAGING_NOT_RESTRICTED: "This member's messaging is not restricted",
2127
2269
  // ── Message requests (MSG-02) ──────────────────────────────────────────
2128
2270
  REQUEST_PENDING: "You can send more once they accept your request.",
2271
+ // ── Plans (BILL-01) ────────────────────────────────────────────────────
2272
+ ENTITLEMENT_REQUIRED: "This is available in Pro",
2129
2273
  // ── Account and settings ───────────────────────────────────────────────
2130
2274
  ACCOUNT_CONFLICT: "Account conflict for this email",
2131
2275
  ACCOUNT_DELETE_CONFIRMATION: "Type your username exactly as it appears to confirm.",
@@ -2292,6 +2436,7 @@ function isMessagePermission(value) {
2292
2436
  DEFAULT_DASHBOARD_LAYOUT,
2293
2437
  DEFAULT_LOCALE,
2294
2438
  DEFAULT_MESSAGE_PERMISSION,
2439
+ DEFAULT_PLAN,
2295
2440
  DEFAULT_WEEK_STARTS_ON,
2296
2441
  DELOAD_DEFAULT_DAYS,
2297
2442
  DELOAD_DEFAULT_LOAD_REDUCTION,
@@ -2305,6 +2450,7 @@ function isMessagePermission(value) {
2305
2450
  DELOAD_SUGGESTION_MIN_MARKED_TODAY,
2306
2451
  DELOAD_SUGGESTION_ROUTINE_DAYS,
2307
2452
  DELOAD_SUGGESTION_SIGNALS,
2453
+ ENTITLEMENT_SOURCES,
2308
2454
  EXERCISE_EQUIPMENT,
2309
2455
  EXERCISE_GROUP_KIND_LABELS,
2310
2456
  EXERCISE_GROUP_MAX,
@@ -2312,6 +2458,8 @@ function isMessagePermission(value) {
2312
2458
  FEATURED_PROFILE_ITEMS_MAX,
2313
2459
  FEATURED_PROFILE_ITEM_KINDS,
2314
2460
  FEATURED_PROFILE_REFERENCE_MAX_LENGTH,
2461
+ FEATURE_KEYS,
2462
+ FINISH_PAUSE_MINUTES,
2315
2463
  FOLLOW_SUGGESTIONS_DEFAULT_LIMIT,
2316
2464
  FOLLOW_SUGGESTIONS_MAX_LIMIT,
2317
2465
  FOLLOW_SUGGESTION_REASONS,
@@ -2376,6 +2524,9 @@ function isMessagePermission(value) {
2376
2524
  ONBOARDING_STEP_ID_PATTERN_SOURCE,
2377
2525
  ONBOARDING_VERSION_MAX,
2378
2526
  OTHER_WARM_UP_STEPS,
2527
+ PLANS,
2528
+ PLAN_IDS,
2529
+ PLAN_LIMIT_KEYS,
2379
2530
  PLATEAU_MIN_DAYS_SINCE_BEST,
2380
2531
  PLATEAU_MIN_SESSIONS,
2381
2532
  PLATEAU_MIN_SESSIONS_MAX,
@@ -2488,6 +2639,7 @@ function isMessagePermission(value) {
2488
2639
  USERNAME_PATTERN_SOURCE,
2489
2640
  WEEK_STARTS,
2490
2641
  WEIGHT_UNITS,
2642
+ WORKOUT_END_CLOCK_SLACK_SECONDS,
2491
2643
  WORKOUT_SESSION_ORIGINS,
2492
2644
  WORKOUT_SESSION_STATUSES,
2493
2645
  accountExportFileName,
@@ -2505,19 +2657,24 @@ function isMessagePermission(value) {
2505
2657
  cmToFeetInches,
2506
2658
  cmToInches,
2507
2659
  continueLinearPeriodization,
2660
+ correctedEndTime,
2508
2661
  countsAsWork,
2509
2662
  countsForProgression,
2510
2663
  customExerciseProblem,
2511
2664
  defaultWarmUpEquipment,
2512
2665
  deloadLengthDays,
2666
+ earliestWorkoutEnd,
2513
2667
  exerciseGroupLabel,
2514
2668
  exerciseGroupPosition,
2515
2669
  exerciseGroups,
2516
2670
  exerciseNameKey,
2517
2671
  feetInchesToCm,
2672
+ finishEndTime,
2673
+ finishNeedsEndTime,
2518
2674
  followWorkingLoad,
2519
2675
  goalSuggestionKey,
2520
2676
  hasOversizedGroup,
2677
+ higherPlan,
2521
2678
  inchesToCm,
2522
2679
  isApiErrorCode,
2523
2680
  isAppLocale,
@@ -2525,9 +2682,13 @@ function isMessagePermission(value) {
2525
2682
  isBodyMeasurementDate,
2526
2683
  isDashboardSectionId,
2527
2684
  isDefaultDashboardLayout,
2685
+ isEntitlementSource,
2686
+ isFeatureKey,
2528
2687
  isGoalSuggestionKey,
2688
+ isGrantActive,
2529
2689
  isMessagePermission,
2530
2690
  isOnboardingStepId,
2691
+ isPlanId,
2531
2692
  isRealtimeTopic,
2532
2693
  isSetKind,
2533
2694
  isWeekStartsOn,
@@ -2557,6 +2718,8 @@ function isMessagePermission(value) {
2557
2718
  normalizeMessageBody,
2558
2719
  normalizeSearchQuery,
2559
2720
  parseRealtimeEvent,
2721
+ planFromGrants,
2722
+ planIncludes,
2560
2723
  primaryEquipment,
2561
2724
  requiredToFinish,
2562
2725
  resolveActiveTrainingBlock,
package/dist/index.d.cts CHANGED
@@ -1339,6 +1339,11 @@ type FinishStatus = Extract<WorkoutSessionStatus, 'COMPLETED' | 'ABORTED'>;
1339
1339
  interface FinishWorkoutRequest {
1340
1340
  status: FinishStatus;
1341
1341
  notes?: string;
1342
+ /**
1343
+ * LIVE-24: when the workout ended; now when absent. Bounded by
1344
+ * `earliestWorkoutEnd` and `finishEndTime`.
1345
+ */
1346
+ endedAt?: IsoDateString;
1342
1347
  }
1343
1348
  type ProgressionRule = 'ALL_SETS_REACHED_TARGET' | 'SET_REACHED_TARGET';
1344
1349
  interface ProgressionSetChange {
@@ -2346,6 +2351,92 @@ interface UpdateOnboardingRequest {
2346
2351
  }
2347
2352
  declare function isOnboardingStepId(value: unknown): value is string;
2348
2353
 
2354
+ /**
2355
+ * BILL-01: plans and entitlements. The server decides every entitlement; a
2356
+ * client reads the answer (`GET /billing/me`, `UserProfile.plan`) and never
2357
+ * works access out for itself. Nothing is gated by these yet: `BILL-02`
2358
+ * applies the Pro split, and no payment exists until `BILL-03`.
2359
+ */
2360
+ /** Every plan, lowest first. An account with no active grant is on FREE. */
2361
+ declare const PLAN_IDS: readonly ["FREE", "PRO"];
2362
+ type PlanId = (typeof PLAN_IDS)[number];
2363
+ declare const DEFAULT_PLAN: PlanId;
2364
+ declare function isPlanId(value: unknown): value is PlanId;
2365
+ /**
2366
+ * Where a grant came from. A subscription's grant follows the provider
2367
+ * (`BILL-04`); a promotion is a grant given to a group of members (the
2368
+ * founding-member grant of `BILL-02`); an admin grant is one given by hand.
2369
+ */
2370
+ declare const ENTITLEMENT_SOURCES: readonly ["SUBSCRIPTION", "PROMO", "ADMIN"];
2371
+ type EntitlementSource = (typeof ENTITLEMENT_SOURCES)[number];
2372
+ declare function isEntitlementSource(value: unknown): value is EntitlementSource;
2373
+ /**
2374
+ * The capabilities a plan may unlock, one per row of the Pro split. Keys are
2375
+ * permanent: a stored grant never names them, but clients and guards do, so
2376
+ * a key is never renamed or reused.
2377
+ */
2378
+ declare const FEATURE_KEYS: readonly ["STRENGTH_TRENDS_LONG_RANGES", "TRAINING_COMPARISON", "TRAINING_SIGNALS", "MUSCLE_HISTORY_LONG", "TRAINING_BLOCKS", "PLANNED_DELOADS", "EIGHT_WEEK_BLOCKS", "GOAL_SUGGESTIONS", "BODY_MEASUREMENTS", "DASHBOARD_CUSTOMIZATION", "ROUTINE_DRAFTS", "TRAINING_REVIEW"];
2379
+ type FeatureKey = (typeof FEATURE_KEYS)[number];
2380
+ declare function isFeatureKey(value: unknown): value is FeatureKey;
2381
+ /** The counted capabilities of the Pro split. */
2382
+ declare const PLAN_LIMIT_KEYS: readonly ["ROUTINE_VERSIONS", "GOALS", "TRAINING_LOCATIONS", "MUSCLE_HISTORY_WEEKS"];
2383
+ type PlanLimitKey = (typeof PLAN_LIMIT_KEYS)[number];
2384
+ /** A limit's number, or null where the plan adds none of its own. */
2385
+ type PlanLimits = Record<PlanLimitKey, number | null>;
2386
+ interface PlanDefinition {
2387
+ id: PlanId;
2388
+ features: readonly FeatureKey[];
2389
+ limits: PlanLimits;
2390
+ }
2391
+ /**
2392
+ * Each plan's capabilities, as the owner decided on 2026-10-14. A null limit
2393
+ * leaves the capability's own maximum in force (for example
2394
+ * `ROUTINE_VERSIONS_MAX`); a plan never raises a limit past it.
2395
+ */
2396
+ declare const PLANS: Record<PlanId, PlanDefinition>;
2397
+ /** Whether a plan unlocks a capability. */
2398
+ declare function planIncludes(plan: PlanId, feature: FeatureKey): boolean;
2399
+ /** The higher of two plans, by their order in `PLAN_IDS`. */
2400
+ declare function higherPlan(a: PlanId, b: PlanId): PlanId;
2401
+ /** What decides whether a grant is in force. */
2402
+ interface GrantWindow {
2403
+ planId: PlanId;
2404
+ startsAt: string | Date;
2405
+ /** Null for a grant that never expires. */
2406
+ expiresAt: string | Date | null;
2407
+ revokedAt: string | Date | null;
2408
+ }
2409
+ /**
2410
+ * A grant is in force from its start until its expiry, unless it was
2411
+ * revoked. The expiry is exclusive, so a grant ending at noon no longer
2412
+ * counts at noon.
2413
+ */
2414
+ declare function isGrantActive(grant: GrantWindow, now?: Date): boolean;
2415
+ /**
2416
+ * The plan an account is on: the highest plan among its grants in force, and
2417
+ * FREE without one. It is computed on every read, never stored, so a grant
2418
+ * that expires, is revoked or begins changes access at that moment.
2419
+ */
2420
+ declare function planFromGrants(grants: readonly GrantWindow[], now?: Date): PlanId;
2421
+ /** One grant as `GET /billing/me` states it. */
2422
+ interface EntitlementGrantSummary {
2423
+ id: string;
2424
+ planId: PlanId;
2425
+ source: EntitlementSource;
2426
+ startsAt: string;
2427
+ expiresAt: string | null;
2428
+ /** A free-text reason given with the grant ("Founding member"). */
2429
+ note: string | null;
2430
+ }
2431
+ /** `GET /billing/me`: the caller's plan and what it unlocks, decided now. */
2432
+ interface BillingStatus {
2433
+ plan: PlanId;
2434
+ features: FeatureKey[];
2435
+ limits: PlanLimits;
2436
+ /** The grants in force now, the one that lasts longest first. */
2437
+ grants: EntitlementGrantSummary[];
2438
+ }
2439
+
2349
2440
  /**
2350
2441
  * The weekday a week starts on, as `Date.getDay()` numbers it: 1 Monday, 0
2351
2442
  * Sunday. Monday is everyone's default, so nothing changes until a member
@@ -2811,6 +2902,11 @@ interface UserProfile {
2811
2902
  * it; a client treats a missing one as Monday (`DEFAULT_WEEK_STARTS_ON`).
2812
2903
  */
2813
2904
  weekStartsOn?: WeekStartsOn;
2905
+ /**
2906
+ * BILL-01: the plan the account is on now, decided by the server from its
2907
+ * grants. On the owner's own profile only; a missing one is FREE.
2908
+ */
2909
+ plan?: PlanId;
2814
2910
  /** ONBOARD-01: how far the account has come through onboarding. */
2815
2911
  onboarding?: OnboardingState;
2816
2912
  /** MSG-01: who may start a conversation with this member. */
@@ -3911,6 +4007,52 @@ interface DeleteActivityCommentResponse {
3911
4007
  summary: ActivityCommentSummary;
3912
4008
  }
3913
4009
 
4010
+ /**
4011
+ * LIVE-24. When a workout ended. Finishing used to stamp the moment Finish was
4012
+ * pressed, so a workout finished hours after its last set read as hours long.
4013
+ * Finish now takes the end time, and a finished workout's end time can be
4014
+ * moved earlier as a LIVE-17 correction. One rule bounds both, so the page
4015
+ * offers exactly what the server accepts.
4016
+ */
4017
+ /**
4018
+ * Finish asks when the workout ended once its last set was saved this long
4019
+ * ago; sooner than that it finishes at once, as it always has.
4020
+ */
4021
+ declare const FINISH_PAUSE_MINUTES = 30;
4022
+ /**
4023
+ * An end time this far ahead of the server's clock is taken as now: a phone's
4024
+ * clock running slightly fast must not refuse a finish.
4025
+ */
4026
+ declare const WORKOUT_END_CLOCK_SLACK_SECONDS = 120;
4027
+ type Instant = IsoDateString | Date;
4028
+ /**
4029
+ * The earliest a workout can end: its start, or its last completed set when
4030
+ * that is later. A set ticked by a correction was stamped with the end itself
4031
+ * (`movesWithEnd`), so it moves with the end rather than holding it back.
4032
+ */
4033
+ declare function earliestWorkoutEnd(input: {
4034
+ startedAt: Instant;
4035
+ completedAts: Array<Instant | null | undefined>;
4036
+ movesWithEnd?: Instant | null;
4037
+ }): Date;
4038
+ /**
4039
+ * The end a finish records: now when none is given, the given time when it
4040
+ * falls between the earliest end and now (a little past now reads as now),
4041
+ * and null when it falls outside them.
4042
+ */
4043
+ declare function finishEndTime(requested: Instant | null | undefined, earliest: Date, now?: Date): Date | null;
4044
+ /**
4045
+ * A corrected end only moves earlier: between the earliest end and the end
4046
+ * recorded. Null when it falls outside them.
4047
+ */
4048
+ declare function correctedEndTime(requested: Instant, earliest: Date, endedAt: Instant): Date | null;
4049
+ /**
4050
+ * Whether Finish should ask when the workout ended: the last saved activity
4051
+ * (the last set ticked, else the start) is at least `FINISH_PAUSE_MINUTES`
4052
+ * old.
4053
+ */
4054
+ declare function finishNeedsEndTime(lastActivityAt: Instant, now?: Date): boolean;
4055
+
3914
4056
  /**
3915
4057
  * LIVE-17. Correcting a finished workout: the owner fixes a mistyped weight,
3916
4058
  * reps or RPE, or a set left unticked, and everything the workout fed --
@@ -3954,11 +4096,19 @@ interface SessionSetCorrection {
3954
4096
  before: SetLogValues;
3955
4097
  after: SetLogValues;
3956
4098
  }
4099
+ /** LIVE-24: the workout's end time, as it was and as it became. */
4100
+ interface SessionEndTimeCorrection {
4101
+ before: IsoDateString;
4102
+ after: IsoDateString;
4103
+ }
3957
4104
  /** One saved correction. Never edited or deleted once written. */
3958
4105
  interface SessionCorrection {
3959
4106
  id: string;
3960
4107
  createdAt: IsoDateString;
4108
+ /** Empty when only the end time was corrected. */
3961
4109
  changes: SessionSetCorrection[];
4110
+ /** LIVE-24: set when the correction moved the end time; absent before it. */
4111
+ endedAt?: SessionEndTimeCorrection | null;
3962
4112
  }
3963
4113
  type SessionCorrectionClosedReason = "NOT_COMPLETED" | "NOT_LATEST" | "LATER_SESSION" | "WINDOW_PASSED" | "LIMIT_REACHED"
3964
4114
  /** LIVE-23: a workout logged later is removed and logged again instead. */
@@ -3987,6 +4137,12 @@ interface CorrectSessionSetRequest extends SetLogValues {
3987
4137
  */
3988
4138
  interface CorrectSessionRequest {
3989
4139
  sets: CorrectSessionSetRequest[];
4140
+ /**
4141
+ * LIVE-24: when the workout ended, only ever earlier than recorded and never
4142
+ * before its start or last set (`correctedEndTime`). Omitted, or equal to
4143
+ * the recorded end, it is left as it is.
4144
+ */
4145
+ endedAt?: IsoDateString;
3990
4146
  }
3991
4147
  interface CorrectSessionResponse {
3992
4148
  correction: SessionCorrection;
@@ -5054,6 +5210,7 @@ declare const API_ERROR_MESSAGES: {
5054
5210
  readonly SESSION_BLOCK_NOT_IN_FORCE: "That training block is not in force today; start a day of the routine";
5055
5211
  readonly SESSION_FINISHED: "Cannot modify set logs for a finished session";
5056
5212
  readonly SESSION_ALREADY_FINISHED: "Session already finished with a different status";
5213
+ readonly WORKOUT_END_TIME_RANGE: "A workout ends after it started and after its last set, and not in the future";
5057
5214
  readonly EXTRA_SETS_MAX: "An exercise can take at most {max} extra sets";
5058
5215
  readonly EXTRA_SET_NOT_NEXT: "Extra sets are added after the last set";
5059
5216
  readonly PRESCRIBED_SET_NOT_REMOVABLE: "A prescribed set cannot be removed";
@@ -5088,6 +5245,7 @@ declare const API_ERROR_MESSAGES: {
5088
5245
  readonly CORRECTION_COMPLETED_NEEDS_REP: "A completed set needs at least one rep";
5089
5246
  readonly CORRECTION_NOTHING_TO_CORRECT: "Nothing to correct: every set already reads that way";
5090
5247
  readonly CORRECTION_KEEPS_ONE_SET: "A finished workout keeps at least one completed set";
5248
+ readonly CORRECTION_END_TIME_RANGE: "A workout's end can only move earlier, and not before it started or before its last set";
5091
5249
  readonly SESSION_SHARE_NOTHING_CHOSEN: "Choose at least one part of the recap to share";
5092
5250
  readonly SESSION_SHARE_NOT_COMPLETED: "Only completed sessions can be shared";
5093
5251
  readonly SESSION_SHARE_LINKS_MAX: "A session can have at most {max} active share links";
@@ -5130,6 +5288,7 @@ declare const API_ERROR_MESSAGES: {
5130
5288
  readonly MESSAGING_ALREADY_RESTRICTED: "This member's messaging is already restricted";
5131
5289
  readonly MESSAGING_NOT_RESTRICTED: "This member's messaging is not restricted";
5132
5290
  readonly REQUEST_PENDING: "You can send more once they accept your request.";
5291
+ readonly ENTITLEMENT_REQUIRED: "This is available in Pro";
5133
5292
  readonly ACCOUNT_CONFLICT: "Account conflict for this email";
5134
5293
  readonly ACCOUNT_DELETE_CONFIRMATION: "Type your username exactly as it appears to confirm.";
5135
5294
  readonly ACCOUNT_DELETE_MODERATOR: "A moderator account cannot be deleted while it holds moderator access.";
@@ -5311,4 +5470,4 @@ declare function isRealtimeTopic(value: unknown): value is RealtimeTopic;
5311
5470
  /** The event in one `data:` payload, or null for anything else. */
5312
5471
  declare function parseRealtimeEvent(data: string): RealtimeEvent | null;
5313
5472
 
5314
- 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, API_ERROR_CODES, API_ERROR_MESSAGES, type AccountExportBodyMeasurement, 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 ApiErrorBody, type ApiErrorCode, type ApiErrorParams, type AppLocale, type AppNotification, BAR_CHOICES_KG, BAR_WARM_UP_STEPS, BLOCKED_MEMBERS_MAX, BODY_MEASUREMENT_FIELDS, BODY_MEASUREMENT_FIELD_KEYS, BODY_PROGRESS_RANGES, type BlockComparisonLift, type BlockComparisonLiftBest, type BlockComparisonPeriod, type BlockComparisonPeriodKind, type BlockedMember, type BlockedMembersResponse, type BodyFieldSummary, type BodyMeasurement, type BodyMeasurementField, type BodyMeasurementProblem, type BodyMeasurementValues, type BodyProgressRange, type BodyProgressResponse, type Brand, CLONE_ROUTINE_REFUSALS, CM_PER_INCH, COMEBACK_MIN_INACTIVE_DAYS, COMEBACK_RECOGNITION_LIMIT, COMEBACK_REQUIRED_ACTIVE_DAYS, COMEBACK_SESSION_LOOKBACK, COMEBACK_WINDOW_DAYS, CONVERSATIONS_PAGE_SIZE, CONVERSATION_BOXES, CUSTOM_EXERCISES_MAX, CUSTOM_EXERCISE_NAME_MAX, CUSTOM_EXERCISE_NOTE_MAX, CUSTOM_EXERCISE_PROBLEM_MESSAGES, CUSTOM_EXERCISE_REFUSALS, type CalendarDate, type CapturedMessage, type CloneRoutineRefusal, type CloneRoutineRequest, type ComebackActivity, type ComebackRecognition, type ComebackRecognitionSummary, type ContinueLinearBlockRequest, type ConversationBox, type ConversationMember, type ConversationMessage, type ConversationMessagesResponse, type ConversationRequest, type ConversationSummary, type ConversationsResponse, type CorrectSessionRequest, type CorrectSessionResponse, type CorrectSessionSetRequest, type CreateActivityCommentRequest, type CreateActivityCommentResponse, type CreateDeloadRequest, type CreateReportRequest, type CreateReportResponse, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateRoutineVersionRequest, type CreateSessionShareRequest, type CustomExerciseInput, type CustomExerciseProblem, type CustomExerciseRefusal, DASHBOARD_SECTION_IDS, DEFAULT_DASHBOARD_LAYOUT, DEFAULT_LOCALE, DEFAULT_MESSAGE_PERMISSION, DEFAULT_WEEK_STARTS_ON, DELOAD_DEFAULT_DAYS, DELOAD_DEFAULT_LOAD_REDUCTION, DELOAD_DEFAULT_SET_MODE, DELOAD_LOAD_REDUCTIONS, DELOAD_MAX_DAYS, DELOAD_NOT_LIGHTER, DELOAD_SET_MODES, DELOAD_SUGGESTION_COOLDOWN_DAYS, DELOAD_SUGGESTION_EARLIER_DAYS, DELOAD_SUGGESTION_MIN_MARKED_TODAY, DELOAD_SUGGESTION_ROUTINE_DAYS, DELOAD_SUGGESTION_SIGNALS, type DashboardLayout, type DashboardLayoutEntry, type DashboardSectionId, type DeclineSignal, type DecliningLift, type DecliningLiftSession, type DeleteAccountRequest, type DeleteAccountResponse, type DeleteActivityCommentResponse, type DeletePushSubscriptionRequest, type DeloadLoadReduction, type DeloadOptions, type DeloadSetMode, type DeloadSuggestion, type DeloadSuggestionEvidence, type DeloadSuggestionResponse, type DeloadSuggestionSignal, type DeloadSuggestionUnavailableReason, type DiscoverableRoutine, type DismissGoalSuggestionRequest, EXERCISE_EQUIPMENT, EXERCISE_GROUP_KIND_LABELS, EXERCISE_GROUP_MAX, EXERCISE_MECHANICS, type EarnedAchievement, type EarnedPersonalRecord, type EffortPeriod, type EffortSignal, type Exercise, type ExerciseEquipment, type ExerciseGroup, type ExerciseGroupKind, type ExerciseGroupPosition, 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, GOAL_SUGGESTIONS_MAX, GOAL_SUGGESTION_DISMISSALS_MAX, GOAL_SUGGESTION_LIFT_MIN_SESSIONS, GOAL_SUGGESTION_LIFT_WINDOW_DAYS, GOAL_SUGGESTION_MIN_ACTIVE_WEEKS, GOAL_SUGGESTION_STRENGTH_STEP, GOAL_SUGGESTION_TYPES, GOAL_SUGGESTION_VOLUME_WEEKS, type GoalSuggestion, type GoalSuggestionBasis, type GoalSuggestionType, type GoalSuggestionsResponse, INCHES_PER_FOOT, type IsoDateString, LENGTH_UNITS, LIMITED_SHORTFALL_KG, LOGGED_WORKOUTS_PER_ROUTINE_MAX, LOGGED_WORKOUT_DEFAULT_START_MINUTE, LOGGED_WORKOUT_LOOKBACK_DAYS, LOGGED_WORKOUT_MAX_DURATION_SEC, LOGGED_WORKOUT_MIN_DURATION_SEC, LP_BLOCK_STEPS, LP_ESTIMATE_MAX_REPS_TO_FAILURE, LP_ESTIMATE_MIN_SETS, LP_ESTIMATE_STEPS, LP_NEXT_BLOCK_KINDS, LP_PHASES, LP_PROGRESS_CAP, LP_PROGRESS_THRESHOLD, LP_RECOVERY, LP_REFERENCE_MAX_KG, LP_REST_SECONDS, LP_STEPS, LP_WORKING_SETS, type LengthUnit, type LinearBlockChange, type LinearBlockFinishedNotification, type LinearPeriodizationState, type ListSessionsParams, type LogPastWorkoutRequest, type LogPastWorkoutResponse, type LoggedBlockStep, type LoggedSetInput, type LpEstimate, type LpLoggedSet, type LpNextBlockKind, type LpPhase, type LpRecommendation, type LpSample, type LpSetPrescription, type LpSetTarget, type LpStep, type LpStoredSet, MAX_SETS_PER_EXERCISE, MEASURABLE_GOALS_MAX, MEASURABLE_GOAL_DIRECTIONS, MEASURABLE_GOAL_TYPES, MESSAGES_PAGE_SIZE, MESSAGES_PER_MINUTE_MAX, MESSAGE_ATTACHMENT_KINDS, MESSAGE_BODY_MAX, MESSAGE_PERMISSIONS, MESSAGE_PROGRESS_ID, MESSAGE_PUSH_DELAY_SECONDS, MESSAGE_REPORT_CONTEXT_BEFORE, MESSAGE_REQUEST_DECLINE_COOLDOWN_DAYS, MINUTES_IN_DAY, MODERATION_ACTION_KINDS, MODERATION_HISTORY_PAGE_SIZE, MODERATION_NOTE_MAX_LENGTH, MODERATION_QUEUE_PAGE_SIZE, MOVEMENT_PATTERNS, MUSCLE_GROUPS, type MarkConversationReadRequest, type MarkNotificationsReadRequest, type MarkNotificationsReadResponse, type MeasurableGoal, type MeasurableGoalDirection, type MeasurableGoalExercise, type MeasurableGoalInput, type MeasurableGoalType, type MemberActivityResponse, type MemberMessagingState, type MemberModerationState, type MemberRoutinesResponse, type MemberSearchPage, type MessageAchievementAttachment, type MessageAchievementSummary, type MessageAttachment, type MessageAttachmentKind, type MessageComebackAttachment, type MessageComebackSummary, type MessagePermission, type MessageProgressAttachment, type MessageProgressSummary, type MessagePushPayload, type MessageRecordAttachment, type MessageRecordSummary, type MessageRoutineAttachment, type MessageWorkoutAttachment, type MessageWorkoutSummary, 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, NEW_CONVERSATIONS_PER_DAY_MAX, NOTIFICATIONS_LIST_LIMIT, NOTIFICATIONS_LOOKBACK_DAYS, NOTIFICATIONS_PAGE_SIZE, NOTIFICATIONS_PAGE_SIZE_MAX, NOTIFICATIONS_RETENTION_DAYS, NOTIFICATION_CATEGORIES, NOTIFICATION_KINDS, type NewFollowerNotification, type NotificationCategory, type NotificationKind, type NotificationPreferences, type NotificationPreferencesResponse, type NotificationsQuery, type NotificationsResponse, ONBOARDING_STEPS_MAX, ONBOARDING_STEP_ID_PATTERN_SOURCE, ONBOARDING_VERSION_MAX, OTHER_WARM_UP_STEPS, type OnboardingState, 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, PLATE_SETS, 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 PlateLoadingItem, type PlateLoadingResult, type PlatePairInventory, type PlateSetChoice, 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, REALTIME_HEARTBEAT_MS, REALTIME_MAX_STREAMS_PER_MEMBER, REALTIME_MAX_STREAM_MS, REALTIME_STREAM_PATH, REALTIME_TOPICS, REALTIME_UNAVAILABLE_RETRY_SECONDS, RECENT_SEARCHES_MAX, RECENT_SEARCH_KINDS, 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 RealtimeEvent, type RealtimeTopic, type RecentActivityEntry, type RecentExercise, type RecentRoutine, type RecentSearchItem, type RecentSearchKind, type RecentSearchesResponse, type RecordRecentSearchRequest, type RegisterPushSubscriptionRequest, type RelationshipListKind, type RelationshipListQuery, type RelationshipListResponse, type RelationshipMember, type RemoveLoggedWorkoutResponse, type RenaissanceRankDefinition, type RenaissanceRankProgress, type RepTargetPeriod, type RepTargetSignal, type RepType, type ReplaceFeaturedProfileItemsRequest, type ReplaceMeasurableGoalsRequest, type ReplaceTrainingLocationsRequest, type ReportReason, type ReportStatus, type ReportSubjectKind, type ReportSubjectPreview, type ReportedMessageContext, type ResolvedRoutinePlan, 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 RoutinePlanSource, type RoutineScheduleMode, type RoutineSearchPage, type RoutineSet, type RoutineShare, type RoutineShareListResponse, type RoutineSharedActivity, type RoutineTemporaryOverride, type RoutineTemporaryOverridePlan, type RoutineTemporaryOverridesResponse, type RoutineTrainingBlock, type RoutineTrainingBlockPlan, 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, SEARCH_PAGE_SIZE, SEARCH_PAGE_SIZE_MAX, SEARCH_PREVIEW_LIMIT, SEARCH_QUERY_MAX_LENGTH, SEARCH_QUERY_MIN_LENGTH, SEARCH_SERVER_CATEGORIES, SESSION_CORRECTIONS_MAX, SESSION_CORRECTION_LIMITS, SESSION_CORRECTION_WINDOW_HOURS, SESSION_EXERCISE_NOTE_MAX_LENGTH, SESSION_NOTE_MAX_LENGTH, SESSION_SHARE_DEFAULT_FIELDS, SESSION_SHARE_FIELDS, SESSION_SHARE_MAX_ACTIVE_LINKS, SET_KINDS, SET_KIND_LABELS, SEXES, SHARED_ROUTINE_SOURCES, STARRED_EXERCISES_MAX, STREAK_MAX_GAP_DAYS, SUPPORTED_LOCALES, type ScheduleOverride, type ScheduleOverrideKind, type ScheduleOverridesQuery, type ScheduleOverridesResponse, type ScheduleRestAlertRequest, type ScheduleRestAlertResponse, type SearchPage, type SearchPageQuery, type SearchPreviewQuery, type SearchPreviewResponse, type SearchServerCategory, type SendMessageRequest, type SendMessageResponse, type SendTrainingPartnerEncouragementRequest, type SendTrainingPartnerEncouragementResponse, type SessionComparisonExercise, type SessionComparisonQuery, type SessionComparisonResponse, type SessionComparisonRoutineDay, type SessionComparisonSession, type SessionComparisonSet, type SessionCompletedActivity, type SessionCorrection, type SessionCorrectionClosedReason, type SessionCorrectionWindow, type SessionCorrectionsResponse, type SessionExerciseNote, type SessionExerciseSubstitution, type SessionProgressNotification, type SessionRecapExerciseNote, type SessionRecapRecord, type SessionSetCorrection, type SessionShare, type SessionShareField, type SessionShareListResponse, type SessionTemporaryOverride, type SessionTrainingBlock, type SetAccountTimeZoneRequest, type SetActivityEntryAudienceRequest, type SetActivityEntryAudienceResponse, type SetActivityReactionRequest, type SetActivityReactionResponse, type SetKind, type SetLog, type SetLogValues, type Sex, type SharedRoutine, type SharedRoutineOwner, type SharedRoutineSearchResult, type SharedRoutineSource, type SharedRoutineSummary, type SharedSessionOwner, type SharedSessionRecap, type SharedWorkout, type SharedWorkoutExercise, type SharedWorkoutSet, type SkipOccurrenceRequest, type StarredExercise, type StarredExercisesResponse, type StartConversationRequest, type StartWorkoutRequest, type StartWorkoutResponse, type StreakAtRiskPushPayload, type StreakMilestoneActivity, type StreakMilestoneEventPayload, type SubstituteSessionExerciseRequest, type SubstituteSessionExerciseResponse, type SupabaseAuthResponse, type SupabaseAuthUser, type SupabaseMigrationResponse, TEMPORARY_OVERRIDE_KINDS, TEMPORARY_OVERRIDE_SOURCE_KINDS, TRAINING_BLOCK_COMPARISON_MAX_DAYS, 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, TRAINING_SIGNAL_DECLINES_MAX, TRAINING_SIGNAL_DECLINE_SESSIONS, TRAINING_SIGNAL_MIN_DECLINE, TRAINING_SIGNAL_MIN_RPE_SETS, TRAINING_SIGNAL_MIN_SHORT_SETS, TRAINING_SIGNAL_MIN_TARGET_SETS, TRAINING_SIGNAL_PERIOD_DAYS, TRAINING_SIGNAL_RPE_RISE, TRAINING_SIGNAL_SHORT_LIFTS_MAX, TRAINING_SIGNAL_SHORT_POINTS_RISE, TRAINING_SIGNAL_WORKOUT_DROP, type TemporaryOverrideKind, type TemporaryOverrideSource, type TemporaryOverrideSourceKind, type TrainingBlockComparisonResponse, type TrainingDiscipline, type TrainingEventType, type TrainingExperienceLevel, type TrainingGoal, type TrainingIdentity, type TrainingLocationPreference, type TrainingLocationPreferenceInput, type TrainingPartnerAchievementNotification, type TrainingPartnerAchievementPushPayload, type TrainingPartnerEncouragementKind, type TrainingPartnerEncouragementNotification, type TrainingPartnerPermissions, type TrainingPartnerScheduleDay, type TrainingPartnerScheduleResponse, type TrainingPartnerSessionNotification, type TrainingPartnerSessionPushPayload, type TrainingPartnership, type TrainingPartnershipStatus, type TrainingPartnershipsResponse, type TrainingReminderPreference, type TrainingReminderPushPayload, type TrainingSignalPeriod, type TrainingSignalsResponse, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, USERNAME_PATTERN_SOURCE, type UnreadConversationsResponse, type UpdateActivitySharingRequest, type UpdateCustomExerciseRequest, type UpdateDashboardLayoutRequest, type UpdateLocaleRequest, type UpdateMessagePermissionRequest, type UpdateNotificationPreferencesRequest, type UpdateOnboardingRequest, type UpdateProfileDiscoveryRequest, type UpdateProfilePrivacyRequest, type UpdateProfileRequest, type UpdateRoutineRequest, type UpdateRoutineVisibilityRequest, type UpdateSessionNotesRequest, type UpdateSessionNotesResponse, type UpdateTrainingPartnerPermissionsRequest, type UpdateWeekStartRequest, type UpsertBodyMeasurementRequest, type UpsertRoutineTrainingBlockRequest, type UpsertSetLogRequest, type UpsertSetLogResponse, type UserId, type UserProfile, type UserSearchResponse, type VolumeTrendPoint, type VolumeTrendQuery, type VolumeTrendResponse, type VolumeTrendSeries, WEEK_STARTS, WEIGHT_UNITS, WORKOUT_SESSION_ORIGINS, WORKOUT_SESSION_STATUSES, type WarmUpEquipment, type WarmUpLoad, type WarmUpRamp, type WarmUpSet, type WarmUpStep, type WeekStartsOn, type WeightUnit, type WorkoutAnalyticsStatus, type WorkoutPeriod, type WorkoutProgressQuery, type WorkoutProgressResponse, type WorkoutSearchPage, type WorkoutSession, type WorkoutSessionId, type WorkoutSessionListResponse, type WorkoutSessionOrigin, type WorkoutSessionRecap, type WorkoutSessionSnapshotV1, type WorkoutSessionStatus, type WorkoutSessionSummary, type WorkoutSignal, type WorkoutStatsQuery, type WorkoutStatsResponse, accountExportFileName, addCalendarDays, advanceLinearPeriodization, apiError, apiErrorMessage, applyDeload, bodyMeasurementProblems, bodyProgressRangeStart, buildWarmUpRamp, calculatePlateLoading, canLinkToNext, canLogWorkoutOn, cmToFeetInches, cmToInches, continueLinearPeriodization, countsAsWork, countsForProgression, customExerciseProblem, defaultWarmUpEquipment, deloadLengthDays, exerciseGroupLabel, exerciseGroupPosition, exerciseGroups, exerciseNameKey, feetInchesToCm, followWorkingLoad, goalSuggestionKey, hasOversizedGroup, inchesToCm, isApiErrorCode, isAppLocale, isBarLoaded, isBodyMeasurementDate, isDashboardSectionId, isDefaultDashboardLayout, isGoalSuggestionKey, isMessagePermission, isOnboardingStepId, isRealtimeTopic, isSetKind, isWeekStartsOn, isWithinQuietHours, latestBodyWeight, leadWorkingWeight, linearPeriodizationProblem, loggedWorkoutDateRange, lpAtStep, lpEstimate, lpLoadKg, lpPrescription, lpRecommendation, lpRirMidpoint, lpSampleRir, lpSetEstimateKg, lpStep, lpStoredSets, lpWorkingSets, matchesDeletionConfirmation, messageBodyLength, messageNote, messageProgressId, normalizeDashboardLayout, normalizeExerciseLinks, normalizeExerciseName, normalizeMessageBody, normalizeSearchQuery, parseRealtimeEvent, primaryEquipment, requiredToFinish, resolveActiveTrainingBlock, resolveRoutinePlan, roundDownToIncrement, roundToIncrement, routineDayLabel, sameLpPosition, sessionCorrectionWindow, setKindOf, setLogValuesDiffer, startLinearPeriodization, summarizeBodyProgress, trainingBlockCovers, warmUpLoad, weekStartOf };
5473
+ 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, API_ERROR_CODES, API_ERROR_MESSAGES, type AccountExportBodyMeasurement, 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 ApiErrorBody, type ApiErrorCode, type ApiErrorParams, type AppLocale, type AppNotification, BAR_CHOICES_KG, BAR_WARM_UP_STEPS, BLOCKED_MEMBERS_MAX, BODY_MEASUREMENT_FIELDS, BODY_MEASUREMENT_FIELD_KEYS, BODY_PROGRESS_RANGES, type BillingStatus, type BlockComparisonLift, type BlockComparisonLiftBest, type BlockComparisonPeriod, type BlockComparisonPeriodKind, type BlockedMember, type BlockedMembersResponse, type BodyFieldSummary, type BodyMeasurement, type BodyMeasurementField, type BodyMeasurementProblem, type BodyMeasurementValues, type BodyProgressRange, type BodyProgressResponse, type Brand, CLONE_ROUTINE_REFUSALS, CM_PER_INCH, COMEBACK_MIN_INACTIVE_DAYS, COMEBACK_RECOGNITION_LIMIT, COMEBACK_REQUIRED_ACTIVE_DAYS, COMEBACK_SESSION_LOOKBACK, COMEBACK_WINDOW_DAYS, CONVERSATIONS_PAGE_SIZE, CONVERSATION_BOXES, CUSTOM_EXERCISES_MAX, CUSTOM_EXERCISE_NAME_MAX, CUSTOM_EXERCISE_NOTE_MAX, CUSTOM_EXERCISE_PROBLEM_MESSAGES, CUSTOM_EXERCISE_REFUSALS, type CalendarDate, type CapturedMessage, type CloneRoutineRefusal, type CloneRoutineRequest, type ComebackActivity, type ComebackRecognition, type ComebackRecognitionSummary, type ContinueLinearBlockRequest, type ConversationBox, type ConversationMember, type ConversationMessage, type ConversationMessagesResponse, type ConversationRequest, type ConversationSummary, type ConversationsResponse, type CorrectSessionRequest, type CorrectSessionResponse, type CorrectSessionSetRequest, type CreateActivityCommentRequest, type CreateActivityCommentResponse, type CreateDeloadRequest, type CreateReportRequest, type CreateReportResponse, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateRoutineVersionRequest, type CreateSessionShareRequest, type CustomExerciseInput, type CustomExerciseProblem, type CustomExerciseRefusal, DASHBOARD_SECTION_IDS, DEFAULT_DASHBOARD_LAYOUT, DEFAULT_LOCALE, DEFAULT_MESSAGE_PERMISSION, DEFAULT_PLAN, DEFAULT_WEEK_STARTS_ON, DELOAD_DEFAULT_DAYS, DELOAD_DEFAULT_LOAD_REDUCTION, DELOAD_DEFAULT_SET_MODE, DELOAD_LOAD_REDUCTIONS, DELOAD_MAX_DAYS, DELOAD_NOT_LIGHTER, DELOAD_SET_MODES, DELOAD_SUGGESTION_COOLDOWN_DAYS, DELOAD_SUGGESTION_EARLIER_DAYS, DELOAD_SUGGESTION_MIN_MARKED_TODAY, DELOAD_SUGGESTION_ROUTINE_DAYS, DELOAD_SUGGESTION_SIGNALS, type DashboardLayout, type DashboardLayoutEntry, type DashboardSectionId, type DeclineSignal, type DecliningLift, type DecliningLiftSession, type DeleteAccountRequest, type DeleteAccountResponse, type DeleteActivityCommentResponse, type DeletePushSubscriptionRequest, type DeloadLoadReduction, type DeloadOptions, type DeloadSetMode, type DeloadSuggestion, type DeloadSuggestionEvidence, type DeloadSuggestionResponse, type DeloadSuggestionSignal, type DeloadSuggestionUnavailableReason, type DiscoverableRoutine, type DismissGoalSuggestionRequest, ENTITLEMENT_SOURCES, EXERCISE_EQUIPMENT, EXERCISE_GROUP_KIND_LABELS, EXERCISE_GROUP_MAX, EXERCISE_MECHANICS, type EarnedAchievement, type EarnedPersonalRecord, type EffortPeriod, type EffortSignal, type EntitlementGrantSummary, type EntitlementSource, type Exercise, type ExerciseEquipment, type ExerciseGroup, type ExerciseGroupKind, type ExerciseGroupPosition, 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, FEATURE_KEYS, FINISH_PAUSE_MINUTES, FOLLOW_SUGGESTIONS_DEFAULT_LIMIT, FOLLOW_SUGGESTIONS_MAX_LIMIT, FOLLOW_SUGGESTION_REASONS, type FeatureKey, 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, GOAL_SUGGESTIONS_MAX, GOAL_SUGGESTION_DISMISSALS_MAX, GOAL_SUGGESTION_LIFT_MIN_SESSIONS, GOAL_SUGGESTION_LIFT_WINDOW_DAYS, GOAL_SUGGESTION_MIN_ACTIVE_WEEKS, GOAL_SUGGESTION_STRENGTH_STEP, GOAL_SUGGESTION_TYPES, GOAL_SUGGESTION_VOLUME_WEEKS, type GoalSuggestion, type GoalSuggestionBasis, type GoalSuggestionType, type GoalSuggestionsResponse, type GrantWindow, INCHES_PER_FOOT, type IsoDateString, LENGTH_UNITS, LIMITED_SHORTFALL_KG, LOGGED_WORKOUTS_PER_ROUTINE_MAX, LOGGED_WORKOUT_DEFAULT_START_MINUTE, LOGGED_WORKOUT_LOOKBACK_DAYS, LOGGED_WORKOUT_MAX_DURATION_SEC, LOGGED_WORKOUT_MIN_DURATION_SEC, LP_BLOCK_STEPS, LP_ESTIMATE_MAX_REPS_TO_FAILURE, LP_ESTIMATE_MIN_SETS, LP_ESTIMATE_STEPS, LP_NEXT_BLOCK_KINDS, LP_PHASES, LP_PROGRESS_CAP, LP_PROGRESS_THRESHOLD, LP_RECOVERY, LP_REFERENCE_MAX_KG, LP_REST_SECONDS, LP_STEPS, LP_WORKING_SETS, type LengthUnit, type LinearBlockChange, type LinearBlockFinishedNotification, type LinearPeriodizationState, type ListSessionsParams, type LogPastWorkoutRequest, type LogPastWorkoutResponse, type LoggedBlockStep, type LoggedSetInput, type LpEstimate, type LpLoggedSet, type LpNextBlockKind, type LpPhase, type LpRecommendation, type LpSample, type LpSetPrescription, type LpSetTarget, type LpStep, type LpStoredSet, MAX_SETS_PER_EXERCISE, MEASURABLE_GOALS_MAX, MEASURABLE_GOAL_DIRECTIONS, MEASURABLE_GOAL_TYPES, MESSAGES_PAGE_SIZE, MESSAGES_PER_MINUTE_MAX, MESSAGE_ATTACHMENT_KINDS, MESSAGE_BODY_MAX, MESSAGE_PERMISSIONS, MESSAGE_PROGRESS_ID, MESSAGE_PUSH_DELAY_SECONDS, MESSAGE_REPORT_CONTEXT_BEFORE, MESSAGE_REQUEST_DECLINE_COOLDOWN_DAYS, MINUTES_IN_DAY, MODERATION_ACTION_KINDS, MODERATION_HISTORY_PAGE_SIZE, MODERATION_NOTE_MAX_LENGTH, MODERATION_QUEUE_PAGE_SIZE, MOVEMENT_PATTERNS, MUSCLE_GROUPS, type MarkConversationReadRequest, type MarkNotificationsReadRequest, type MarkNotificationsReadResponse, type MeasurableGoal, type MeasurableGoalDirection, type MeasurableGoalExercise, type MeasurableGoalInput, type MeasurableGoalType, type MemberActivityResponse, type MemberMessagingState, type MemberModerationState, type MemberRoutinesResponse, type MemberSearchPage, type MessageAchievementAttachment, type MessageAchievementSummary, type MessageAttachment, type MessageAttachmentKind, type MessageComebackAttachment, type MessageComebackSummary, type MessagePermission, type MessageProgressAttachment, type MessageProgressSummary, type MessagePushPayload, type MessageRecordAttachment, type MessageRecordSummary, type MessageRoutineAttachment, type MessageWorkoutAttachment, type MessageWorkoutSummary, 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, NEW_CONVERSATIONS_PER_DAY_MAX, NOTIFICATIONS_LIST_LIMIT, NOTIFICATIONS_LOOKBACK_DAYS, NOTIFICATIONS_PAGE_SIZE, NOTIFICATIONS_PAGE_SIZE_MAX, NOTIFICATIONS_RETENTION_DAYS, NOTIFICATION_CATEGORIES, NOTIFICATION_KINDS, type NewFollowerNotification, type NotificationCategory, type NotificationKind, type NotificationPreferences, type NotificationPreferencesResponse, type NotificationsQuery, type NotificationsResponse, ONBOARDING_STEPS_MAX, ONBOARDING_STEP_ID_PATTERN_SOURCE, ONBOARDING_VERSION_MAX, OTHER_WARM_UP_STEPS, type OnboardingState, type OwnActivityEntry, type OwnActivityResponse, PLANS, PLAN_IDS, PLAN_LIMIT_KEYS, PLATEAU_MIN_DAYS_SINCE_BEST, PLATEAU_MIN_SESSIONS, PLATEAU_MIN_SESSIONS_MAX, PLATEAU_MIN_SESSIONS_MIN, PLATEAU_RECENT_DAYS, PLATEAU_WINDOW_DAYS, PLATE_SETS, 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 PlanDefinition, type PlanId, type PlanLimitKey, type PlanLimits, type PlannedReminder, type PlateLoadingItem, type PlateLoadingResult, type PlatePairInventory, type PlateSetChoice, 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, REALTIME_HEARTBEAT_MS, REALTIME_MAX_STREAMS_PER_MEMBER, REALTIME_MAX_STREAM_MS, REALTIME_STREAM_PATH, REALTIME_TOPICS, REALTIME_UNAVAILABLE_RETRY_SECONDS, RECENT_SEARCHES_MAX, RECENT_SEARCH_KINDS, 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 RealtimeEvent, type RealtimeTopic, type RecentActivityEntry, type RecentExercise, type RecentRoutine, type RecentSearchItem, type RecentSearchKind, type RecentSearchesResponse, type RecordRecentSearchRequest, type RegisterPushSubscriptionRequest, type RelationshipListKind, type RelationshipListQuery, type RelationshipListResponse, type RelationshipMember, type RemoveLoggedWorkoutResponse, type RenaissanceRankDefinition, type RenaissanceRankProgress, type RepTargetPeriod, type RepTargetSignal, type RepType, type ReplaceFeaturedProfileItemsRequest, type ReplaceMeasurableGoalsRequest, type ReplaceTrainingLocationsRequest, type ReportReason, type ReportStatus, type ReportSubjectKind, type ReportSubjectPreview, type ReportedMessageContext, type ResolvedRoutinePlan, 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 RoutinePlanSource, type RoutineScheduleMode, type RoutineSearchPage, type RoutineSet, type RoutineShare, type RoutineShareListResponse, type RoutineSharedActivity, type RoutineTemporaryOverride, type RoutineTemporaryOverridePlan, type RoutineTemporaryOverridesResponse, type RoutineTrainingBlock, type RoutineTrainingBlockPlan, 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, SEARCH_PAGE_SIZE, SEARCH_PAGE_SIZE_MAX, SEARCH_PREVIEW_LIMIT, SEARCH_QUERY_MAX_LENGTH, SEARCH_QUERY_MIN_LENGTH, SEARCH_SERVER_CATEGORIES, SESSION_CORRECTIONS_MAX, SESSION_CORRECTION_LIMITS, SESSION_CORRECTION_WINDOW_HOURS, SESSION_EXERCISE_NOTE_MAX_LENGTH, SESSION_NOTE_MAX_LENGTH, SESSION_SHARE_DEFAULT_FIELDS, SESSION_SHARE_FIELDS, SESSION_SHARE_MAX_ACTIVE_LINKS, SET_KINDS, SET_KIND_LABELS, SEXES, SHARED_ROUTINE_SOURCES, STARRED_EXERCISES_MAX, STREAK_MAX_GAP_DAYS, SUPPORTED_LOCALES, type ScheduleOverride, type ScheduleOverrideKind, type ScheduleOverridesQuery, type ScheduleOverridesResponse, type ScheduleRestAlertRequest, type ScheduleRestAlertResponse, type SearchPage, type SearchPageQuery, type SearchPreviewQuery, type SearchPreviewResponse, type SearchServerCategory, type SendMessageRequest, type SendMessageResponse, type SendTrainingPartnerEncouragementRequest, type SendTrainingPartnerEncouragementResponse, type SessionComparisonExercise, type SessionComparisonQuery, type SessionComparisonResponse, type SessionComparisonRoutineDay, type SessionComparisonSession, type SessionComparisonSet, type SessionCompletedActivity, type SessionCorrection, type SessionCorrectionClosedReason, type SessionCorrectionWindow, type SessionCorrectionsResponse, type SessionEndTimeCorrection, type SessionExerciseNote, type SessionExerciseSubstitution, type SessionProgressNotification, type SessionRecapExerciseNote, type SessionRecapRecord, type SessionSetCorrection, type SessionShare, type SessionShareField, type SessionShareListResponse, type SessionTemporaryOverride, type SessionTrainingBlock, type SetAccountTimeZoneRequest, type SetActivityEntryAudienceRequest, type SetActivityEntryAudienceResponse, type SetActivityReactionRequest, type SetActivityReactionResponse, type SetKind, type SetLog, type SetLogValues, type Sex, type SharedRoutine, type SharedRoutineOwner, type SharedRoutineSearchResult, type SharedRoutineSource, type SharedRoutineSummary, type SharedSessionOwner, type SharedSessionRecap, type SharedWorkout, type SharedWorkoutExercise, type SharedWorkoutSet, type SkipOccurrenceRequest, type StarredExercise, type StarredExercisesResponse, type StartConversationRequest, type StartWorkoutRequest, type StartWorkoutResponse, type StreakAtRiskPushPayload, type StreakMilestoneActivity, type StreakMilestoneEventPayload, type SubstituteSessionExerciseRequest, type SubstituteSessionExerciseResponse, type SupabaseAuthResponse, type SupabaseAuthUser, type SupabaseMigrationResponse, TEMPORARY_OVERRIDE_KINDS, TEMPORARY_OVERRIDE_SOURCE_KINDS, TRAINING_BLOCK_COMPARISON_MAX_DAYS, 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, TRAINING_SIGNAL_DECLINES_MAX, TRAINING_SIGNAL_DECLINE_SESSIONS, TRAINING_SIGNAL_MIN_DECLINE, TRAINING_SIGNAL_MIN_RPE_SETS, TRAINING_SIGNAL_MIN_SHORT_SETS, TRAINING_SIGNAL_MIN_TARGET_SETS, TRAINING_SIGNAL_PERIOD_DAYS, TRAINING_SIGNAL_RPE_RISE, TRAINING_SIGNAL_SHORT_LIFTS_MAX, TRAINING_SIGNAL_SHORT_POINTS_RISE, TRAINING_SIGNAL_WORKOUT_DROP, type TemporaryOverrideKind, type TemporaryOverrideSource, type TemporaryOverrideSourceKind, type TrainingBlockComparisonResponse, type TrainingDiscipline, type TrainingEventType, type TrainingExperienceLevel, type TrainingGoal, type TrainingIdentity, type TrainingLocationPreference, type TrainingLocationPreferenceInput, type TrainingPartnerAchievementNotification, type TrainingPartnerAchievementPushPayload, type TrainingPartnerEncouragementKind, type TrainingPartnerEncouragementNotification, type TrainingPartnerPermissions, type TrainingPartnerScheduleDay, type TrainingPartnerScheduleResponse, type TrainingPartnerSessionNotification, type TrainingPartnerSessionPushPayload, type TrainingPartnership, type TrainingPartnershipStatus, type TrainingPartnershipsResponse, type TrainingReminderPreference, type TrainingReminderPushPayload, type TrainingSignalPeriod, type TrainingSignalsResponse, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, USERNAME_PATTERN_SOURCE, type UnreadConversationsResponse, type UpdateActivitySharingRequest, type UpdateCustomExerciseRequest, type UpdateDashboardLayoutRequest, type UpdateLocaleRequest, type UpdateMessagePermissionRequest, type UpdateNotificationPreferencesRequest, type UpdateOnboardingRequest, type UpdateProfileDiscoveryRequest, type UpdateProfilePrivacyRequest, type UpdateProfileRequest, type UpdateRoutineRequest, type UpdateRoutineVisibilityRequest, type UpdateSessionNotesRequest, type UpdateSessionNotesResponse, type UpdateTrainingPartnerPermissionsRequest, type UpdateWeekStartRequest, type UpsertBodyMeasurementRequest, type UpsertRoutineTrainingBlockRequest, type UpsertSetLogRequest, type UpsertSetLogResponse, type UserId, type UserProfile, type UserSearchResponse, type VolumeTrendPoint, type VolumeTrendQuery, type VolumeTrendResponse, type VolumeTrendSeries, WEEK_STARTS, WEIGHT_UNITS, WORKOUT_END_CLOCK_SLACK_SECONDS, WORKOUT_SESSION_ORIGINS, WORKOUT_SESSION_STATUSES, type WarmUpEquipment, type WarmUpLoad, type WarmUpRamp, type WarmUpSet, type WarmUpStep, type WeekStartsOn, type WeightUnit, type WorkoutAnalyticsStatus, type WorkoutPeriod, type WorkoutProgressQuery, type WorkoutProgressResponse, type WorkoutSearchPage, type WorkoutSession, type WorkoutSessionId, type WorkoutSessionListResponse, type WorkoutSessionOrigin, type WorkoutSessionRecap, type WorkoutSessionSnapshotV1, type WorkoutSessionStatus, type WorkoutSessionSummary, type WorkoutSignal, type WorkoutStatsQuery, type WorkoutStatsResponse, accountExportFileName, addCalendarDays, advanceLinearPeriodization, apiError, apiErrorMessage, applyDeload, bodyMeasurementProblems, bodyProgressRangeStart, buildWarmUpRamp, calculatePlateLoading, canLinkToNext, canLogWorkoutOn, cmToFeetInches, cmToInches, continueLinearPeriodization, correctedEndTime, countsAsWork, countsForProgression, customExerciseProblem, defaultWarmUpEquipment, deloadLengthDays, earliestWorkoutEnd, exerciseGroupLabel, exerciseGroupPosition, exerciseGroups, exerciseNameKey, feetInchesToCm, finishEndTime, finishNeedsEndTime, followWorkingLoad, goalSuggestionKey, hasOversizedGroup, higherPlan, inchesToCm, isApiErrorCode, isAppLocale, isBarLoaded, isBodyMeasurementDate, isDashboardSectionId, isDefaultDashboardLayout, isEntitlementSource, isFeatureKey, isGoalSuggestionKey, isGrantActive, isMessagePermission, isOnboardingStepId, isPlanId, isRealtimeTopic, isSetKind, isWeekStartsOn, isWithinQuietHours, latestBodyWeight, leadWorkingWeight, linearPeriodizationProblem, loggedWorkoutDateRange, lpAtStep, lpEstimate, lpLoadKg, lpPrescription, lpRecommendation, lpRirMidpoint, lpSampleRir, lpSetEstimateKg, lpStep, lpStoredSets, lpWorkingSets, matchesDeletionConfirmation, messageBodyLength, messageNote, messageProgressId, normalizeDashboardLayout, normalizeExerciseLinks, normalizeExerciseName, normalizeMessageBody, normalizeSearchQuery, parseRealtimeEvent, planFromGrants, planIncludes, primaryEquipment, requiredToFinish, resolveActiveTrainingBlock, resolveRoutinePlan, roundDownToIncrement, roundToIncrement, routineDayLabel, sameLpPosition, sessionCorrectionWindow, setKindOf, setLogValuesDiffer, startLinearPeriodization, summarizeBodyProgress, trainingBlockCovers, warmUpLoad, weekStartOf };
package/dist/index.d.ts CHANGED
@@ -1339,6 +1339,11 @@ type FinishStatus = Extract<WorkoutSessionStatus, 'COMPLETED' | 'ABORTED'>;
1339
1339
  interface FinishWorkoutRequest {
1340
1340
  status: FinishStatus;
1341
1341
  notes?: string;
1342
+ /**
1343
+ * LIVE-24: when the workout ended; now when absent. Bounded by
1344
+ * `earliestWorkoutEnd` and `finishEndTime`.
1345
+ */
1346
+ endedAt?: IsoDateString;
1342
1347
  }
1343
1348
  type ProgressionRule = 'ALL_SETS_REACHED_TARGET' | 'SET_REACHED_TARGET';
1344
1349
  interface ProgressionSetChange {
@@ -2346,6 +2351,92 @@ interface UpdateOnboardingRequest {
2346
2351
  }
2347
2352
  declare function isOnboardingStepId(value: unknown): value is string;
2348
2353
 
2354
+ /**
2355
+ * BILL-01: plans and entitlements. The server decides every entitlement; a
2356
+ * client reads the answer (`GET /billing/me`, `UserProfile.plan`) and never
2357
+ * works access out for itself. Nothing is gated by these yet: `BILL-02`
2358
+ * applies the Pro split, and no payment exists until `BILL-03`.
2359
+ */
2360
+ /** Every plan, lowest first. An account with no active grant is on FREE. */
2361
+ declare const PLAN_IDS: readonly ["FREE", "PRO"];
2362
+ type PlanId = (typeof PLAN_IDS)[number];
2363
+ declare const DEFAULT_PLAN: PlanId;
2364
+ declare function isPlanId(value: unknown): value is PlanId;
2365
+ /**
2366
+ * Where a grant came from. A subscription's grant follows the provider
2367
+ * (`BILL-04`); a promotion is a grant given to a group of members (the
2368
+ * founding-member grant of `BILL-02`); an admin grant is one given by hand.
2369
+ */
2370
+ declare const ENTITLEMENT_SOURCES: readonly ["SUBSCRIPTION", "PROMO", "ADMIN"];
2371
+ type EntitlementSource = (typeof ENTITLEMENT_SOURCES)[number];
2372
+ declare function isEntitlementSource(value: unknown): value is EntitlementSource;
2373
+ /**
2374
+ * The capabilities a plan may unlock, one per row of the Pro split. Keys are
2375
+ * permanent: a stored grant never names them, but clients and guards do, so
2376
+ * a key is never renamed or reused.
2377
+ */
2378
+ declare const FEATURE_KEYS: readonly ["STRENGTH_TRENDS_LONG_RANGES", "TRAINING_COMPARISON", "TRAINING_SIGNALS", "MUSCLE_HISTORY_LONG", "TRAINING_BLOCKS", "PLANNED_DELOADS", "EIGHT_WEEK_BLOCKS", "GOAL_SUGGESTIONS", "BODY_MEASUREMENTS", "DASHBOARD_CUSTOMIZATION", "ROUTINE_DRAFTS", "TRAINING_REVIEW"];
2379
+ type FeatureKey = (typeof FEATURE_KEYS)[number];
2380
+ declare function isFeatureKey(value: unknown): value is FeatureKey;
2381
+ /** The counted capabilities of the Pro split. */
2382
+ declare const PLAN_LIMIT_KEYS: readonly ["ROUTINE_VERSIONS", "GOALS", "TRAINING_LOCATIONS", "MUSCLE_HISTORY_WEEKS"];
2383
+ type PlanLimitKey = (typeof PLAN_LIMIT_KEYS)[number];
2384
+ /** A limit's number, or null where the plan adds none of its own. */
2385
+ type PlanLimits = Record<PlanLimitKey, number | null>;
2386
+ interface PlanDefinition {
2387
+ id: PlanId;
2388
+ features: readonly FeatureKey[];
2389
+ limits: PlanLimits;
2390
+ }
2391
+ /**
2392
+ * Each plan's capabilities, as the owner decided on 2026-10-14. A null limit
2393
+ * leaves the capability's own maximum in force (for example
2394
+ * `ROUTINE_VERSIONS_MAX`); a plan never raises a limit past it.
2395
+ */
2396
+ declare const PLANS: Record<PlanId, PlanDefinition>;
2397
+ /** Whether a plan unlocks a capability. */
2398
+ declare function planIncludes(plan: PlanId, feature: FeatureKey): boolean;
2399
+ /** The higher of two plans, by their order in `PLAN_IDS`. */
2400
+ declare function higherPlan(a: PlanId, b: PlanId): PlanId;
2401
+ /** What decides whether a grant is in force. */
2402
+ interface GrantWindow {
2403
+ planId: PlanId;
2404
+ startsAt: string | Date;
2405
+ /** Null for a grant that never expires. */
2406
+ expiresAt: string | Date | null;
2407
+ revokedAt: string | Date | null;
2408
+ }
2409
+ /**
2410
+ * A grant is in force from its start until its expiry, unless it was
2411
+ * revoked. The expiry is exclusive, so a grant ending at noon no longer
2412
+ * counts at noon.
2413
+ */
2414
+ declare function isGrantActive(grant: GrantWindow, now?: Date): boolean;
2415
+ /**
2416
+ * The plan an account is on: the highest plan among its grants in force, and
2417
+ * FREE without one. It is computed on every read, never stored, so a grant
2418
+ * that expires, is revoked or begins changes access at that moment.
2419
+ */
2420
+ declare function planFromGrants(grants: readonly GrantWindow[], now?: Date): PlanId;
2421
+ /** One grant as `GET /billing/me` states it. */
2422
+ interface EntitlementGrantSummary {
2423
+ id: string;
2424
+ planId: PlanId;
2425
+ source: EntitlementSource;
2426
+ startsAt: string;
2427
+ expiresAt: string | null;
2428
+ /** A free-text reason given with the grant ("Founding member"). */
2429
+ note: string | null;
2430
+ }
2431
+ /** `GET /billing/me`: the caller's plan and what it unlocks, decided now. */
2432
+ interface BillingStatus {
2433
+ plan: PlanId;
2434
+ features: FeatureKey[];
2435
+ limits: PlanLimits;
2436
+ /** The grants in force now, the one that lasts longest first. */
2437
+ grants: EntitlementGrantSummary[];
2438
+ }
2439
+
2349
2440
  /**
2350
2441
  * The weekday a week starts on, as `Date.getDay()` numbers it: 1 Monday, 0
2351
2442
  * Sunday. Monday is everyone's default, so nothing changes until a member
@@ -2811,6 +2902,11 @@ interface UserProfile {
2811
2902
  * it; a client treats a missing one as Monday (`DEFAULT_WEEK_STARTS_ON`).
2812
2903
  */
2813
2904
  weekStartsOn?: WeekStartsOn;
2905
+ /**
2906
+ * BILL-01: the plan the account is on now, decided by the server from its
2907
+ * grants. On the owner's own profile only; a missing one is FREE.
2908
+ */
2909
+ plan?: PlanId;
2814
2910
  /** ONBOARD-01: how far the account has come through onboarding. */
2815
2911
  onboarding?: OnboardingState;
2816
2912
  /** MSG-01: who may start a conversation with this member. */
@@ -3911,6 +4007,52 @@ interface DeleteActivityCommentResponse {
3911
4007
  summary: ActivityCommentSummary;
3912
4008
  }
3913
4009
 
4010
+ /**
4011
+ * LIVE-24. When a workout ended. Finishing used to stamp the moment Finish was
4012
+ * pressed, so a workout finished hours after its last set read as hours long.
4013
+ * Finish now takes the end time, and a finished workout's end time can be
4014
+ * moved earlier as a LIVE-17 correction. One rule bounds both, so the page
4015
+ * offers exactly what the server accepts.
4016
+ */
4017
+ /**
4018
+ * Finish asks when the workout ended once its last set was saved this long
4019
+ * ago; sooner than that it finishes at once, as it always has.
4020
+ */
4021
+ declare const FINISH_PAUSE_MINUTES = 30;
4022
+ /**
4023
+ * An end time this far ahead of the server's clock is taken as now: a phone's
4024
+ * clock running slightly fast must not refuse a finish.
4025
+ */
4026
+ declare const WORKOUT_END_CLOCK_SLACK_SECONDS = 120;
4027
+ type Instant = IsoDateString | Date;
4028
+ /**
4029
+ * The earliest a workout can end: its start, or its last completed set when
4030
+ * that is later. A set ticked by a correction was stamped with the end itself
4031
+ * (`movesWithEnd`), so it moves with the end rather than holding it back.
4032
+ */
4033
+ declare function earliestWorkoutEnd(input: {
4034
+ startedAt: Instant;
4035
+ completedAts: Array<Instant | null | undefined>;
4036
+ movesWithEnd?: Instant | null;
4037
+ }): Date;
4038
+ /**
4039
+ * The end a finish records: now when none is given, the given time when it
4040
+ * falls between the earliest end and now (a little past now reads as now),
4041
+ * and null when it falls outside them.
4042
+ */
4043
+ declare function finishEndTime(requested: Instant | null | undefined, earliest: Date, now?: Date): Date | null;
4044
+ /**
4045
+ * A corrected end only moves earlier: between the earliest end and the end
4046
+ * recorded. Null when it falls outside them.
4047
+ */
4048
+ declare function correctedEndTime(requested: Instant, earliest: Date, endedAt: Instant): Date | null;
4049
+ /**
4050
+ * Whether Finish should ask when the workout ended: the last saved activity
4051
+ * (the last set ticked, else the start) is at least `FINISH_PAUSE_MINUTES`
4052
+ * old.
4053
+ */
4054
+ declare function finishNeedsEndTime(lastActivityAt: Instant, now?: Date): boolean;
4055
+
3914
4056
  /**
3915
4057
  * LIVE-17. Correcting a finished workout: the owner fixes a mistyped weight,
3916
4058
  * reps or RPE, or a set left unticked, and everything the workout fed --
@@ -3954,11 +4096,19 @@ interface SessionSetCorrection {
3954
4096
  before: SetLogValues;
3955
4097
  after: SetLogValues;
3956
4098
  }
4099
+ /** LIVE-24: the workout's end time, as it was and as it became. */
4100
+ interface SessionEndTimeCorrection {
4101
+ before: IsoDateString;
4102
+ after: IsoDateString;
4103
+ }
3957
4104
  /** One saved correction. Never edited or deleted once written. */
3958
4105
  interface SessionCorrection {
3959
4106
  id: string;
3960
4107
  createdAt: IsoDateString;
4108
+ /** Empty when only the end time was corrected. */
3961
4109
  changes: SessionSetCorrection[];
4110
+ /** LIVE-24: set when the correction moved the end time; absent before it. */
4111
+ endedAt?: SessionEndTimeCorrection | null;
3962
4112
  }
3963
4113
  type SessionCorrectionClosedReason = "NOT_COMPLETED" | "NOT_LATEST" | "LATER_SESSION" | "WINDOW_PASSED" | "LIMIT_REACHED"
3964
4114
  /** LIVE-23: a workout logged later is removed and logged again instead. */
@@ -3987,6 +4137,12 @@ interface CorrectSessionSetRequest extends SetLogValues {
3987
4137
  */
3988
4138
  interface CorrectSessionRequest {
3989
4139
  sets: CorrectSessionSetRequest[];
4140
+ /**
4141
+ * LIVE-24: when the workout ended, only ever earlier than recorded and never
4142
+ * before its start or last set (`correctedEndTime`). Omitted, or equal to
4143
+ * the recorded end, it is left as it is.
4144
+ */
4145
+ endedAt?: IsoDateString;
3990
4146
  }
3991
4147
  interface CorrectSessionResponse {
3992
4148
  correction: SessionCorrection;
@@ -5054,6 +5210,7 @@ declare const API_ERROR_MESSAGES: {
5054
5210
  readonly SESSION_BLOCK_NOT_IN_FORCE: "That training block is not in force today; start a day of the routine";
5055
5211
  readonly SESSION_FINISHED: "Cannot modify set logs for a finished session";
5056
5212
  readonly SESSION_ALREADY_FINISHED: "Session already finished with a different status";
5213
+ readonly WORKOUT_END_TIME_RANGE: "A workout ends after it started and after its last set, and not in the future";
5057
5214
  readonly EXTRA_SETS_MAX: "An exercise can take at most {max} extra sets";
5058
5215
  readonly EXTRA_SET_NOT_NEXT: "Extra sets are added after the last set";
5059
5216
  readonly PRESCRIBED_SET_NOT_REMOVABLE: "A prescribed set cannot be removed";
@@ -5088,6 +5245,7 @@ declare const API_ERROR_MESSAGES: {
5088
5245
  readonly CORRECTION_COMPLETED_NEEDS_REP: "A completed set needs at least one rep";
5089
5246
  readonly CORRECTION_NOTHING_TO_CORRECT: "Nothing to correct: every set already reads that way";
5090
5247
  readonly CORRECTION_KEEPS_ONE_SET: "A finished workout keeps at least one completed set";
5248
+ readonly CORRECTION_END_TIME_RANGE: "A workout's end can only move earlier, and not before it started or before its last set";
5091
5249
  readonly SESSION_SHARE_NOTHING_CHOSEN: "Choose at least one part of the recap to share";
5092
5250
  readonly SESSION_SHARE_NOT_COMPLETED: "Only completed sessions can be shared";
5093
5251
  readonly SESSION_SHARE_LINKS_MAX: "A session can have at most {max} active share links";
@@ -5130,6 +5288,7 @@ declare const API_ERROR_MESSAGES: {
5130
5288
  readonly MESSAGING_ALREADY_RESTRICTED: "This member's messaging is already restricted";
5131
5289
  readonly MESSAGING_NOT_RESTRICTED: "This member's messaging is not restricted";
5132
5290
  readonly REQUEST_PENDING: "You can send more once they accept your request.";
5291
+ readonly ENTITLEMENT_REQUIRED: "This is available in Pro";
5133
5292
  readonly ACCOUNT_CONFLICT: "Account conflict for this email";
5134
5293
  readonly ACCOUNT_DELETE_CONFIRMATION: "Type your username exactly as it appears to confirm.";
5135
5294
  readonly ACCOUNT_DELETE_MODERATOR: "A moderator account cannot be deleted while it holds moderator access.";
@@ -5311,4 +5470,4 @@ declare function isRealtimeTopic(value: unknown): value is RealtimeTopic;
5311
5470
  /** The event in one `data:` payload, or null for anything else. */
5312
5471
  declare function parseRealtimeEvent(data: string): RealtimeEvent | null;
5313
5472
 
5314
- 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, API_ERROR_CODES, API_ERROR_MESSAGES, type AccountExportBodyMeasurement, 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 ApiErrorBody, type ApiErrorCode, type ApiErrorParams, type AppLocale, type AppNotification, BAR_CHOICES_KG, BAR_WARM_UP_STEPS, BLOCKED_MEMBERS_MAX, BODY_MEASUREMENT_FIELDS, BODY_MEASUREMENT_FIELD_KEYS, BODY_PROGRESS_RANGES, type BlockComparisonLift, type BlockComparisonLiftBest, type BlockComparisonPeriod, type BlockComparisonPeriodKind, type BlockedMember, type BlockedMembersResponse, type BodyFieldSummary, type BodyMeasurement, type BodyMeasurementField, type BodyMeasurementProblem, type BodyMeasurementValues, type BodyProgressRange, type BodyProgressResponse, type Brand, CLONE_ROUTINE_REFUSALS, CM_PER_INCH, COMEBACK_MIN_INACTIVE_DAYS, COMEBACK_RECOGNITION_LIMIT, COMEBACK_REQUIRED_ACTIVE_DAYS, COMEBACK_SESSION_LOOKBACK, COMEBACK_WINDOW_DAYS, CONVERSATIONS_PAGE_SIZE, CONVERSATION_BOXES, CUSTOM_EXERCISES_MAX, CUSTOM_EXERCISE_NAME_MAX, CUSTOM_EXERCISE_NOTE_MAX, CUSTOM_EXERCISE_PROBLEM_MESSAGES, CUSTOM_EXERCISE_REFUSALS, type CalendarDate, type CapturedMessage, type CloneRoutineRefusal, type CloneRoutineRequest, type ComebackActivity, type ComebackRecognition, type ComebackRecognitionSummary, type ContinueLinearBlockRequest, type ConversationBox, type ConversationMember, type ConversationMessage, type ConversationMessagesResponse, type ConversationRequest, type ConversationSummary, type ConversationsResponse, type CorrectSessionRequest, type CorrectSessionResponse, type CorrectSessionSetRequest, type CreateActivityCommentRequest, type CreateActivityCommentResponse, type CreateDeloadRequest, type CreateReportRequest, type CreateReportResponse, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateRoutineVersionRequest, type CreateSessionShareRequest, type CustomExerciseInput, type CustomExerciseProblem, type CustomExerciseRefusal, DASHBOARD_SECTION_IDS, DEFAULT_DASHBOARD_LAYOUT, DEFAULT_LOCALE, DEFAULT_MESSAGE_PERMISSION, DEFAULT_WEEK_STARTS_ON, DELOAD_DEFAULT_DAYS, DELOAD_DEFAULT_LOAD_REDUCTION, DELOAD_DEFAULT_SET_MODE, DELOAD_LOAD_REDUCTIONS, DELOAD_MAX_DAYS, DELOAD_NOT_LIGHTER, DELOAD_SET_MODES, DELOAD_SUGGESTION_COOLDOWN_DAYS, DELOAD_SUGGESTION_EARLIER_DAYS, DELOAD_SUGGESTION_MIN_MARKED_TODAY, DELOAD_SUGGESTION_ROUTINE_DAYS, DELOAD_SUGGESTION_SIGNALS, type DashboardLayout, type DashboardLayoutEntry, type DashboardSectionId, type DeclineSignal, type DecliningLift, type DecliningLiftSession, type DeleteAccountRequest, type DeleteAccountResponse, type DeleteActivityCommentResponse, type DeletePushSubscriptionRequest, type DeloadLoadReduction, type DeloadOptions, type DeloadSetMode, type DeloadSuggestion, type DeloadSuggestionEvidence, type DeloadSuggestionResponse, type DeloadSuggestionSignal, type DeloadSuggestionUnavailableReason, type DiscoverableRoutine, type DismissGoalSuggestionRequest, EXERCISE_EQUIPMENT, EXERCISE_GROUP_KIND_LABELS, EXERCISE_GROUP_MAX, EXERCISE_MECHANICS, type EarnedAchievement, type EarnedPersonalRecord, type EffortPeriod, type EffortSignal, type Exercise, type ExerciseEquipment, type ExerciseGroup, type ExerciseGroupKind, type ExerciseGroupPosition, 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, GOAL_SUGGESTIONS_MAX, GOAL_SUGGESTION_DISMISSALS_MAX, GOAL_SUGGESTION_LIFT_MIN_SESSIONS, GOAL_SUGGESTION_LIFT_WINDOW_DAYS, GOAL_SUGGESTION_MIN_ACTIVE_WEEKS, GOAL_SUGGESTION_STRENGTH_STEP, GOAL_SUGGESTION_TYPES, GOAL_SUGGESTION_VOLUME_WEEKS, type GoalSuggestion, type GoalSuggestionBasis, type GoalSuggestionType, type GoalSuggestionsResponse, INCHES_PER_FOOT, type IsoDateString, LENGTH_UNITS, LIMITED_SHORTFALL_KG, LOGGED_WORKOUTS_PER_ROUTINE_MAX, LOGGED_WORKOUT_DEFAULT_START_MINUTE, LOGGED_WORKOUT_LOOKBACK_DAYS, LOGGED_WORKOUT_MAX_DURATION_SEC, LOGGED_WORKOUT_MIN_DURATION_SEC, LP_BLOCK_STEPS, LP_ESTIMATE_MAX_REPS_TO_FAILURE, LP_ESTIMATE_MIN_SETS, LP_ESTIMATE_STEPS, LP_NEXT_BLOCK_KINDS, LP_PHASES, LP_PROGRESS_CAP, LP_PROGRESS_THRESHOLD, LP_RECOVERY, LP_REFERENCE_MAX_KG, LP_REST_SECONDS, LP_STEPS, LP_WORKING_SETS, type LengthUnit, type LinearBlockChange, type LinearBlockFinishedNotification, type LinearPeriodizationState, type ListSessionsParams, type LogPastWorkoutRequest, type LogPastWorkoutResponse, type LoggedBlockStep, type LoggedSetInput, type LpEstimate, type LpLoggedSet, type LpNextBlockKind, type LpPhase, type LpRecommendation, type LpSample, type LpSetPrescription, type LpSetTarget, type LpStep, type LpStoredSet, MAX_SETS_PER_EXERCISE, MEASURABLE_GOALS_MAX, MEASURABLE_GOAL_DIRECTIONS, MEASURABLE_GOAL_TYPES, MESSAGES_PAGE_SIZE, MESSAGES_PER_MINUTE_MAX, MESSAGE_ATTACHMENT_KINDS, MESSAGE_BODY_MAX, MESSAGE_PERMISSIONS, MESSAGE_PROGRESS_ID, MESSAGE_PUSH_DELAY_SECONDS, MESSAGE_REPORT_CONTEXT_BEFORE, MESSAGE_REQUEST_DECLINE_COOLDOWN_DAYS, MINUTES_IN_DAY, MODERATION_ACTION_KINDS, MODERATION_HISTORY_PAGE_SIZE, MODERATION_NOTE_MAX_LENGTH, MODERATION_QUEUE_PAGE_SIZE, MOVEMENT_PATTERNS, MUSCLE_GROUPS, type MarkConversationReadRequest, type MarkNotificationsReadRequest, type MarkNotificationsReadResponse, type MeasurableGoal, type MeasurableGoalDirection, type MeasurableGoalExercise, type MeasurableGoalInput, type MeasurableGoalType, type MemberActivityResponse, type MemberMessagingState, type MemberModerationState, type MemberRoutinesResponse, type MemberSearchPage, type MessageAchievementAttachment, type MessageAchievementSummary, type MessageAttachment, type MessageAttachmentKind, type MessageComebackAttachment, type MessageComebackSummary, type MessagePermission, type MessageProgressAttachment, type MessageProgressSummary, type MessagePushPayload, type MessageRecordAttachment, type MessageRecordSummary, type MessageRoutineAttachment, type MessageWorkoutAttachment, type MessageWorkoutSummary, 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, NEW_CONVERSATIONS_PER_DAY_MAX, NOTIFICATIONS_LIST_LIMIT, NOTIFICATIONS_LOOKBACK_DAYS, NOTIFICATIONS_PAGE_SIZE, NOTIFICATIONS_PAGE_SIZE_MAX, NOTIFICATIONS_RETENTION_DAYS, NOTIFICATION_CATEGORIES, NOTIFICATION_KINDS, type NewFollowerNotification, type NotificationCategory, type NotificationKind, type NotificationPreferences, type NotificationPreferencesResponse, type NotificationsQuery, type NotificationsResponse, ONBOARDING_STEPS_MAX, ONBOARDING_STEP_ID_PATTERN_SOURCE, ONBOARDING_VERSION_MAX, OTHER_WARM_UP_STEPS, type OnboardingState, 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, PLATE_SETS, 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 PlateLoadingItem, type PlateLoadingResult, type PlatePairInventory, type PlateSetChoice, 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, REALTIME_HEARTBEAT_MS, REALTIME_MAX_STREAMS_PER_MEMBER, REALTIME_MAX_STREAM_MS, REALTIME_STREAM_PATH, REALTIME_TOPICS, REALTIME_UNAVAILABLE_RETRY_SECONDS, RECENT_SEARCHES_MAX, RECENT_SEARCH_KINDS, 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 RealtimeEvent, type RealtimeTopic, type RecentActivityEntry, type RecentExercise, type RecentRoutine, type RecentSearchItem, type RecentSearchKind, type RecentSearchesResponse, type RecordRecentSearchRequest, type RegisterPushSubscriptionRequest, type RelationshipListKind, type RelationshipListQuery, type RelationshipListResponse, type RelationshipMember, type RemoveLoggedWorkoutResponse, type RenaissanceRankDefinition, type RenaissanceRankProgress, type RepTargetPeriod, type RepTargetSignal, type RepType, type ReplaceFeaturedProfileItemsRequest, type ReplaceMeasurableGoalsRequest, type ReplaceTrainingLocationsRequest, type ReportReason, type ReportStatus, type ReportSubjectKind, type ReportSubjectPreview, type ReportedMessageContext, type ResolvedRoutinePlan, 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 RoutinePlanSource, type RoutineScheduleMode, type RoutineSearchPage, type RoutineSet, type RoutineShare, type RoutineShareListResponse, type RoutineSharedActivity, type RoutineTemporaryOverride, type RoutineTemporaryOverridePlan, type RoutineTemporaryOverridesResponse, type RoutineTrainingBlock, type RoutineTrainingBlockPlan, 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, SEARCH_PAGE_SIZE, SEARCH_PAGE_SIZE_MAX, SEARCH_PREVIEW_LIMIT, SEARCH_QUERY_MAX_LENGTH, SEARCH_QUERY_MIN_LENGTH, SEARCH_SERVER_CATEGORIES, SESSION_CORRECTIONS_MAX, SESSION_CORRECTION_LIMITS, SESSION_CORRECTION_WINDOW_HOURS, SESSION_EXERCISE_NOTE_MAX_LENGTH, SESSION_NOTE_MAX_LENGTH, SESSION_SHARE_DEFAULT_FIELDS, SESSION_SHARE_FIELDS, SESSION_SHARE_MAX_ACTIVE_LINKS, SET_KINDS, SET_KIND_LABELS, SEXES, SHARED_ROUTINE_SOURCES, STARRED_EXERCISES_MAX, STREAK_MAX_GAP_DAYS, SUPPORTED_LOCALES, type ScheduleOverride, type ScheduleOverrideKind, type ScheduleOverridesQuery, type ScheduleOverridesResponse, type ScheduleRestAlertRequest, type ScheduleRestAlertResponse, type SearchPage, type SearchPageQuery, type SearchPreviewQuery, type SearchPreviewResponse, type SearchServerCategory, type SendMessageRequest, type SendMessageResponse, type SendTrainingPartnerEncouragementRequest, type SendTrainingPartnerEncouragementResponse, type SessionComparisonExercise, type SessionComparisonQuery, type SessionComparisonResponse, type SessionComparisonRoutineDay, type SessionComparisonSession, type SessionComparisonSet, type SessionCompletedActivity, type SessionCorrection, type SessionCorrectionClosedReason, type SessionCorrectionWindow, type SessionCorrectionsResponse, type SessionExerciseNote, type SessionExerciseSubstitution, type SessionProgressNotification, type SessionRecapExerciseNote, type SessionRecapRecord, type SessionSetCorrection, type SessionShare, type SessionShareField, type SessionShareListResponse, type SessionTemporaryOverride, type SessionTrainingBlock, type SetAccountTimeZoneRequest, type SetActivityEntryAudienceRequest, type SetActivityEntryAudienceResponse, type SetActivityReactionRequest, type SetActivityReactionResponse, type SetKind, type SetLog, type SetLogValues, type Sex, type SharedRoutine, type SharedRoutineOwner, type SharedRoutineSearchResult, type SharedRoutineSource, type SharedRoutineSummary, type SharedSessionOwner, type SharedSessionRecap, type SharedWorkout, type SharedWorkoutExercise, type SharedWorkoutSet, type SkipOccurrenceRequest, type StarredExercise, type StarredExercisesResponse, type StartConversationRequest, type StartWorkoutRequest, type StartWorkoutResponse, type StreakAtRiskPushPayload, type StreakMilestoneActivity, type StreakMilestoneEventPayload, type SubstituteSessionExerciseRequest, type SubstituteSessionExerciseResponse, type SupabaseAuthResponse, type SupabaseAuthUser, type SupabaseMigrationResponse, TEMPORARY_OVERRIDE_KINDS, TEMPORARY_OVERRIDE_SOURCE_KINDS, TRAINING_BLOCK_COMPARISON_MAX_DAYS, 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, TRAINING_SIGNAL_DECLINES_MAX, TRAINING_SIGNAL_DECLINE_SESSIONS, TRAINING_SIGNAL_MIN_DECLINE, TRAINING_SIGNAL_MIN_RPE_SETS, TRAINING_SIGNAL_MIN_SHORT_SETS, TRAINING_SIGNAL_MIN_TARGET_SETS, TRAINING_SIGNAL_PERIOD_DAYS, TRAINING_SIGNAL_RPE_RISE, TRAINING_SIGNAL_SHORT_LIFTS_MAX, TRAINING_SIGNAL_SHORT_POINTS_RISE, TRAINING_SIGNAL_WORKOUT_DROP, type TemporaryOverrideKind, type TemporaryOverrideSource, type TemporaryOverrideSourceKind, type TrainingBlockComparisonResponse, type TrainingDiscipline, type TrainingEventType, type TrainingExperienceLevel, type TrainingGoal, type TrainingIdentity, type TrainingLocationPreference, type TrainingLocationPreferenceInput, type TrainingPartnerAchievementNotification, type TrainingPartnerAchievementPushPayload, type TrainingPartnerEncouragementKind, type TrainingPartnerEncouragementNotification, type TrainingPartnerPermissions, type TrainingPartnerScheduleDay, type TrainingPartnerScheduleResponse, type TrainingPartnerSessionNotification, type TrainingPartnerSessionPushPayload, type TrainingPartnership, type TrainingPartnershipStatus, type TrainingPartnershipsResponse, type TrainingReminderPreference, type TrainingReminderPushPayload, type TrainingSignalPeriod, type TrainingSignalsResponse, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, USERNAME_PATTERN_SOURCE, type UnreadConversationsResponse, type UpdateActivitySharingRequest, type UpdateCustomExerciseRequest, type UpdateDashboardLayoutRequest, type UpdateLocaleRequest, type UpdateMessagePermissionRequest, type UpdateNotificationPreferencesRequest, type UpdateOnboardingRequest, type UpdateProfileDiscoveryRequest, type UpdateProfilePrivacyRequest, type UpdateProfileRequest, type UpdateRoutineRequest, type UpdateRoutineVisibilityRequest, type UpdateSessionNotesRequest, type UpdateSessionNotesResponse, type UpdateTrainingPartnerPermissionsRequest, type UpdateWeekStartRequest, type UpsertBodyMeasurementRequest, type UpsertRoutineTrainingBlockRequest, type UpsertSetLogRequest, type UpsertSetLogResponse, type UserId, type UserProfile, type UserSearchResponse, type VolumeTrendPoint, type VolumeTrendQuery, type VolumeTrendResponse, type VolumeTrendSeries, WEEK_STARTS, WEIGHT_UNITS, WORKOUT_SESSION_ORIGINS, WORKOUT_SESSION_STATUSES, type WarmUpEquipment, type WarmUpLoad, type WarmUpRamp, type WarmUpSet, type WarmUpStep, type WeekStartsOn, type WeightUnit, type WorkoutAnalyticsStatus, type WorkoutPeriod, type WorkoutProgressQuery, type WorkoutProgressResponse, type WorkoutSearchPage, type WorkoutSession, type WorkoutSessionId, type WorkoutSessionListResponse, type WorkoutSessionOrigin, type WorkoutSessionRecap, type WorkoutSessionSnapshotV1, type WorkoutSessionStatus, type WorkoutSessionSummary, type WorkoutSignal, type WorkoutStatsQuery, type WorkoutStatsResponse, accountExportFileName, addCalendarDays, advanceLinearPeriodization, apiError, apiErrorMessage, applyDeload, bodyMeasurementProblems, bodyProgressRangeStart, buildWarmUpRamp, calculatePlateLoading, canLinkToNext, canLogWorkoutOn, cmToFeetInches, cmToInches, continueLinearPeriodization, countsAsWork, countsForProgression, customExerciseProblem, defaultWarmUpEquipment, deloadLengthDays, exerciseGroupLabel, exerciseGroupPosition, exerciseGroups, exerciseNameKey, feetInchesToCm, followWorkingLoad, goalSuggestionKey, hasOversizedGroup, inchesToCm, isApiErrorCode, isAppLocale, isBarLoaded, isBodyMeasurementDate, isDashboardSectionId, isDefaultDashboardLayout, isGoalSuggestionKey, isMessagePermission, isOnboardingStepId, isRealtimeTopic, isSetKind, isWeekStartsOn, isWithinQuietHours, latestBodyWeight, leadWorkingWeight, linearPeriodizationProblem, loggedWorkoutDateRange, lpAtStep, lpEstimate, lpLoadKg, lpPrescription, lpRecommendation, lpRirMidpoint, lpSampleRir, lpSetEstimateKg, lpStep, lpStoredSets, lpWorkingSets, matchesDeletionConfirmation, messageBodyLength, messageNote, messageProgressId, normalizeDashboardLayout, normalizeExerciseLinks, normalizeExerciseName, normalizeMessageBody, normalizeSearchQuery, parseRealtimeEvent, primaryEquipment, requiredToFinish, resolveActiveTrainingBlock, resolveRoutinePlan, roundDownToIncrement, roundToIncrement, routineDayLabel, sameLpPosition, sessionCorrectionWindow, setKindOf, setLogValuesDiffer, startLinearPeriodization, summarizeBodyProgress, trainingBlockCovers, warmUpLoad, weekStartOf };
5473
+ 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, API_ERROR_CODES, API_ERROR_MESSAGES, type AccountExportBodyMeasurement, 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 ApiErrorBody, type ApiErrorCode, type ApiErrorParams, type AppLocale, type AppNotification, BAR_CHOICES_KG, BAR_WARM_UP_STEPS, BLOCKED_MEMBERS_MAX, BODY_MEASUREMENT_FIELDS, BODY_MEASUREMENT_FIELD_KEYS, BODY_PROGRESS_RANGES, type BillingStatus, type BlockComparisonLift, type BlockComparisonLiftBest, type BlockComparisonPeriod, type BlockComparisonPeriodKind, type BlockedMember, type BlockedMembersResponse, type BodyFieldSummary, type BodyMeasurement, type BodyMeasurementField, type BodyMeasurementProblem, type BodyMeasurementValues, type BodyProgressRange, type BodyProgressResponse, type Brand, CLONE_ROUTINE_REFUSALS, CM_PER_INCH, COMEBACK_MIN_INACTIVE_DAYS, COMEBACK_RECOGNITION_LIMIT, COMEBACK_REQUIRED_ACTIVE_DAYS, COMEBACK_SESSION_LOOKBACK, COMEBACK_WINDOW_DAYS, CONVERSATIONS_PAGE_SIZE, CONVERSATION_BOXES, CUSTOM_EXERCISES_MAX, CUSTOM_EXERCISE_NAME_MAX, CUSTOM_EXERCISE_NOTE_MAX, CUSTOM_EXERCISE_PROBLEM_MESSAGES, CUSTOM_EXERCISE_REFUSALS, type CalendarDate, type CapturedMessage, type CloneRoutineRefusal, type CloneRoutineRequest, type ComebackActivity, type ComebackRecognition, type ComebackRecognitionSummary, type ContinueLinearBlockRequest, type ConversationBox, type ConversationMember, type ConversationMessage, type ConversationMessagesResponse, type ConversationRequest, type ConversationSummary, type ConversationsResponse, type CorrectSessionRequest, type CorrectSessionResponse, type CorrectSessionSetRequest, type CreateActivityCommentRequest, type CreateActivityCommentResponse, type CreateDeloadRequest, type CreateReportRequest, type CreateReportResponse, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateRoutineVersionRequest, type CreateSessionShareRequest, type CustomExerciseInput, type CustomExerciseProblem, type CustomExerciseRefusal, DASHBOARD_SECTION_IDS, DEFAULT_DASHBOARD_LAYOUT, DEFAULT_LOCALE, DEFAULT_MESSAGE_PERMISSION, DEFAULT_PLAN, DEFAULT_WEEK_STARTS_ON, DELOAD_DEFAULT_DAYS, DELOAD_DEFAULT_LOAD_REDUCTION, DELOAD_DEFAULT_SET_MODE, DELOAD_LOAD_REDUCTIONS, DELOAD_MAX_DAYS, DELOAD_NOT_LIGHTER, DELOAD_SET_MODES, DELOAD_SUGGESTION_COOLDOWN_DAYS, DELOAD_SUGGESTION_EARLIER_DAYS, DELOAD_SUGGESTION_MIN_MARKED_TODAY, DELOAD_SUGGESTION_ROUTINE_DAYS, DELOAD_SUGGESTION_SIGNALS, type DashboardLayout, type DashboardLayoutEntry, type DashboardSectionId, type DeclineSignal, type DecliningLift, type DecliningLiftSession, type DeleteAccountRequest, type DeleteAccountResponse, type DeleteActivityCommentResponse, type DeletePushSubscriptionRequest, type DeloadLoadReduction, type DeloadOptions, type DeloadSetMode, type DeloadSuggestion, type DeloadSuggestionEvidence, type DeloadSuggestionResponse, type DeloadSuggestionSignal, type DeloadSuggestionUnavailableReason, type DiscoverableRoutine, type DismissGoalSuggestionRequest, ENTITLEMENT_SOURCES, EXERCISE_EQUIPMENT, EXERCISE_GROUP_KIND_LABELS, EXERCISE_GROUP_MAX, EXERCISE_MECHANICS, type EarnedAchievement, type EarnedPersonalRecord, type EffortPeriod, type EffortSignal, type EntitlementGrantSummary, type EntitlementSource, type Exercise, type ExerciseEquipment, type ExerciseGroup, type ExerciseGroupKind, type ExerciseGroupPosition, 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, FEATURE_KEYS, FINISH_PAUSE_MINUTES, FOLLOW_SUGGESTIONS_DEFAULT_LIMIT, FOLLOW_SUGGESTIONS_MAX_LIMIT, FOLLOW_SUGGESTION_REASONS, type FeatureKey, 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, GOAL_SUGGESTIONS_MAX, GOAL_SUGGESTION_DISMISSALS_MAX, GOAL_SUGGESTION_LIFT_MIN_SESSIONS, GOAL_SUGGESTION_LIFT_WINDOW_DAYS, GOAL_SUGGESTION_MIN_ACTIVE_WEEKS, GOAL_SUGGESTION_STRENGTH_STEP, GOAL_SUGGESTION_TYPES, GOAL_SUGGESTION_VOLUME_WEEKS, type GoalSuggestion, type GoalSuggestionBasis, type GoalSuggestionType, type GoalSuggestionsResponse, type GrantWindow, INCHES_PER_FOOT, type IsoDateString, LENGTH_UNITS, LIMITED_SHORTFALL_KG, LOGGED_WORKOUTS_PER_ROUTINE_MAX, LOGGED_WORKOUT_DEFAULT_START_MINUTE, LOGGED_WORKOUT_LOOKBACK_DAYS, LOGGED_WORKOUT_MAX_DURATION_SEC, LOGGED_WORKOUT_MIN_DURATION_SEC, LP_BLOCK_STEPS, LP_ESTIMATE_MAX_REPS_TO_FAILURE, LP_ESTIMATE_MIN_SETS, LP_ESTIMATE_STEPS, LP_NEXT_BLOCK_KINDS, LP_PHASES, LP_PROGRESS_CAP, LP_PROGRESS_THRESHOLD, LP_RECOVERY, LP_REFERENCE_MAX_KG, LP_REST_SECONDS, LP_STEPS, LP_WORKING_SETS, type LengthUnit, type LinearBlockChange, type LinearBlockFinishedNotification, type LinearPeriodizationState, type ListSessionsParams, type LogPastWorkoutRequest, type LogPastWorkoutResponse, type LoggedBlockStep, type LoggedSetInput, type LpEstimate, type LpLoggedSet, type LpNextBlockKind, type LpPhase, type LpRecommendation, type LpSample, type LpSetPrescription, type LpSetTarget, type LpStep, type LpStoredSet, MAX_SETS_PER_EXERCISE, MEASURABLE_GOALS_MAX, MEASURABLE_GOAL_DIRECTIONS, MEASURABLE_GOAL_TYPES, MESSAGES_PAGE_SIZE, MESSAGES_PER_MINUTE_MAX, MESSAGE_ATTACHMENT_KINDS, MESSAGE_BODY_MAX, MESSAGE_PERMISSIONS, MESSAGE_PROGRESS_ID, MESSAGE_PUSH_DELAY_SECONDS, MESSAGE_REPORT_CONTEXT_BEFORE, MESSAGE_REQUEST_DECLINE_COOLDOWN_DAYS, MINUTES_IN_DAY, MODERATION_ACTION_KINDS, MODERATION_HISTORY_PAGE_SIZE, MODERATION_NOTE_MAX_LENGTH, MODERATION_QUEUE_PAGE_SIZE, MOVEMENT_PATTERNS, MUSCLE_GROUPS, type MarkConversationReadRequest, type MarkNotificationsReadRequest, type MarkNotificationsReadResponse, type MeasurableGoal, type MeasurableGoalDirection, type MeasurableGoalExercise, type MeasurableGoalInput, type MeasurableGoalType, type MemberActivityResponse, type MemberMessagingState, type MemberModerationState, type MemberRoutinesResponse, type MemberSearchPage, type MessageAchievementAttachment, type MessageAchievementSummary, type MessageAttachment, type MessageAttachmentKind, type MessageComebackAttachment, type MessageComebackSummary, type MessagePermission, type MessageProgressAttachment, type MessageProgressSummary, type MessagePushPayload, type MessageRecordAttachment, type MessageRecordSummary, type MessageRoutineAttachment, type MessageWorkoutAttachment, type MessageWorkoutSummary, 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, NEW_CONVERSATIONS_PER_DAY_MAX, NOTIFICATIONS_LIST_LIMIT, NOTIFICATIONS_LOOKBACK_DAYS, NOTIFICATIONS_PAGE_SIZE, NOTIFICATIONS_PAGE_SIZE_MAX, NOTIFICATIONS_RETENTION_DAYS, NOTIFICATION_CATEGORIES, NOTIFICATION_KINDS, type NewFollowerNotification, type NotificationCategory, type NotificationKind, type NotificationPreferences, type NotificationPreferencesResponse, type NotificationsQuery, type NotificationsResponse, ONBOARDING_STEPS_MAX, ONBOARDING_STEP_ID_PATTERN_SOURCE, ONBOARDING_VERSION_MAX, OTHER_WARM_UP_STEPS, type OnboardingState, type OwnActivityEntry, type OwnActivityResponse, PLANS, PLAN_IDS, PLAN_LIMIT_KEYS, PLATEAU_MIN_DAYS_SINCE_BEST, PLATEAU_MIN_SESSIONS, PLATEAU_MIN_SESSIONS_MAX, PLATEAU_MIN_SESSIONS_MIN, PLATEAU_RECENT_DAYS, PLATEAU_WINDOW_DAYS, PLATE_SETS, 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 PlanDefinition, type PlanId, type PlanLimitKey, type PlanLimits, type PlannedReminder, type PlateLoadingItem, type PlateLoadingResult, type PlatePairInventory, type PlateSetChoice, 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, REALTIME_HEARTBEAT_MS, REALTIME_MAX_STREAMS_PER_MEMBER, REALTIME_MAX_STREAM_MS, REALTIME_STREAM_PATH, REALTIME_TOPICS, REALTIME_UNAVAILABLE_RETRY_SECONDS, RECENT_SEARCHES_MAX, RECENT_SEARCH_KINDS, 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 RealtimeEvent, type RealtimeTopic, type RecentActivityEntry, type RecentExercise, type RecentRoutine, type RecentSearchItem, type RecentSearchKind, type RecentSearchesResponse, type RecordRecentSearchRequest, type RegisterPushSubscriptionRequest, type RelationshipListKind, type RelationshipListQuery, type RelationshipListResponse, type RelationshipMember, type RemoveLoggedWorkoutResponse, type RenaissanceRankDefinition, type RenaissanceRankProgress, type RepTargetPeriod, type RepTargetSignal, type RepType, type ReplaceFeaturedProfileItemsRequest, type ReplaceMeasurableGoalsRequest, type ReplaceTrainingLocationsRequest, type ReportReason, type ReportStatus, type ReportSubjectKind, type ReportSubjectPreview, type ReportedMessageContext, type ResolvedRoutinePlan, 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 RoutinePlanSource, type RoutineScheduleMode, type RoutineSearchPage, type RoutineSet, type RoutineShare, type RoutineShareListResponse, type RoutineSharedActivity, type RoutineTemporaryOverride, type RoutineTemporaryOverridePlan, type RoutineTemporaryOverridesResponse, type RoutineTrainingBlock, type RoutineTrainingBlockPlan, 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, SEARCH_PAGE_SIZE, SEARCH_PAGE_SIZE_MAX, SEARCH_PREVIEW_LIMIT, SEARCH_QUERY_MAX_LENGTH, SEARCH_QUERY_MIN_LENGTH, SEARCH_SERVER_CATEGORIES, SESSION_CORRECTIONS_MAX, SESSION_CORRECTION_LIMITS, SESSION_CORRECTION_WINDOW_HOURS, SESSION_EXERCISE_NOTE_MAX_LENGTH, SESSION_NOTE_MAX_LENGTH, SESSION_SHARE_DEFAULT_FIELDS, SESSION_SHARE_FIELDS, SESSION_SHARE_MAX_ACTIVE_LINKS, SET_KINDS, SET_KIND_LABELS, SEXES, SHARED_ROUTINE_SOURCES, STARRED_EXERCISES_MAX, STREAK_MAX_GAP_DAYS, SUPPORTED_LOCALES, type ScheduleOverride, type ScheduleOverrideKind, type ScheduleOverridesQuery, type ScheduleOverridesResponse, type ScheduleRestAlertRequest, type ScheduleRestAlertResponse, type SearchPage, type SearchPageQuery, type SearchPreviewQuery, type SearchPreviewResponse, type SearchServerCategory, type SendMessageRequest, type SendMessageResponse, type SendTrainingPartnerEncouragementRequest, type SendTrainingPartnerEncouragementResponse, type SessionComparisonExercise, type SessionComparisonQuery, type SessionComparisonResponse, type SessionComparisonRoutineDay, type SessionComparisonSession, type SessionComparisonSet, type SessionCompletedActivity, type SessionCorrection, type SessionCorrectionClosedReason, type SessionCorrectionWindow, type SessionCorrectionsResponse, type SessionEndTimeCorrection, type SessionExerciseNote, type SessionExerciseSubstitution, type SessionProgressNotification, type SessionRecapExerciseNote, type SessionRecapRecord, type SessionSetCorrection, type SessionShare, type SessionShareField, type SessionShareListResponse, type SessionTemporaryOverride, type SessionTrainingBlock, type SetAccountTimeZoneRequest, type SetActivityEntryAudienceRequest, type SetActivityEntryAudienceResponse, type SetActivityReactionRequest, type SetActivityReactionResponse, type SetKind, type SetLog, type SetLogValues, type Sex, type SharedRoutine, type SharedRoutineOwner, type SharedRoutineSearchResult, type SharedRoutineSource, type SharedRoutineSummary, type SharedSessionOwner, type SharedSessionRecap, type SharedWorkout, type SharedWorkoutExercise, type SharedWorkoutSet, type SkipOccurrenceRequest, type StarredExercise, type StarredExercisesResponse, type StartConversationRequest, type StartWorkoutRequest, type StartWorkoutResponse, type StreakAtRiskPushPayload, type StreakMilestoneActivity, type StreakMilestoneEventPayload, type SubstituteSessionExerciseRequest, type SubstituteSessionExerciseResponse, type SupabaseAuthResponse, type SupabaseAuthUser, type SupabaseMigrationResponse, TEMPORARY_OVERRIDE_KINDS, TEMPORARY_OVERRIDE_SOURCE_KINDS, TRAINING_BLOCK_COMPARISON_MAX_DAYS, 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, TRAINING_SIGNAL_DECLINES_MAX, TRAINING_SIGNAL_DECLINE_SESSIONS, TRAINING_SIGNAL_MIN_DECLINE, TRAINING_SIGNAL_MIN_RPE_SETS, TRAINING_SIGNAL_MIN_SHORT_SETS, TRAINING_SIGNAL_MIN_TARGET_SETS, TRAINING_SIGNAL_PERIOD_DAYS, TRAINING_SIGNAL_RPE_RISE, TRAINING_SIGNAL_SHORT_LIFTS_MAX, TRAINING_SIGNAL_SHORT_POINTS_RISE, TRAINING_SIGNAL_WORKOUT_DROP, type TemporaryOverrideKind, type TemporaryOverrideSource, type TemporaryOverrideSourceKind, type TrainingBlockComparisonResponse, type TrainingDiscipline, type TrainingEventType, type TrainingExperienceLevel, type TrainingGoal, type TrainingIdentity, type TrainingLocationPreference, type TrainingLocationPreferenceInput, type TrainingPartnerAchievementNotification, type TrainingPartnerAchievementPushPayload, type TrainingPartnerEncouragementKind, type TrainingPartnerEncouragementNotification, type TrainingPartnerPermissions, type TrainingPartnerScheduleDay, type TrainingPartnerScheduleResponse, type TrainingPartnerSessionNotification, type TrainingPartnerSessionPushPayload, type TrainingPartnership, type TrainingPartnershipStatus, type TrainingPartnershipsResponse, type TrainingReminderPreference, type TrainingReminderPushPayload, type TrainingSignalPeriod, type TrainingSignalsResponse, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, USERNAME_PATTERN_SOURCE, type UnreadConversationsResponse, type UpdateActivitySharingRequest, type UpdateCustomExerciseRequest, type UpdateDashboardLayoutRequest, type UpdateLocaleRequest, type UpdateMessagePermissionRequest, type UpdateNotificationPreferencesRequest, type UpdateOnboardingRequest, type UpdateProfileDiscoveryRequest, type UpdateProfilePrivacyRequest, type UpdateProfileRequest, type UpdateRoutineRequest, type UpdateRoutineVisibilityRequest, type UpdateSessionNotesRequest, type UpdateSessionNotesResponse, type UpdateTrainingPartnerPermissionsRequest, type UpdateWeekStartRequest, type UpsertBodyMeasurementRequest, type UpsertRoutineTrainingBlockRequest, type UpsertSetLogRequest, type UpsertSetLogResponse, type UserId, type UserProfile, type UserSearchResponse, type VolumeTrendPoint, type VolumeTrendQuery, type VolumeTrendResponse, type VolumeTrendSeries, WEEK_STARTS, WEIGHT_UNITS, WORKOUT_END_CLOCK_SLACK_SECONDS, WORKOUT_SESSION_ORIGINS, WORKOUT_SESSION_STATUSES, type WarmUpEquipment, type WarmUpLoad, type WarmUpRamp, type WarmUpSet, type WarmUpStep, type WeekStartsOn, type WeightUnit, type WorkoutAnalyticsStatus, type WorkoutPeriod, type WorkoutProgressQuery, type WorkoutProgressResponse, type WorkoutSearchPage, type WorkoutSession, type WorkoutSessionId, type WorkoutSessionListResponse, type WorkoutSessionOrigin, type WorkoutSessionRecap, type WorkoutSessionSnapshotV1, type WorkoutSessionStatus, type WorkoutSessionSummary, type WorkoutSignal, type WorkoutStatsQuery, type WorkoutStatsResponse, accountExportFileName, addCalendarDays, advanceLinearPeriodization, apiError, apiErrorMessage, applyDeload, bodyMeasurementProblems, bodyProgressRangeStart, buildWarmUpRamp, calculatePlateLoading, canLinkToNext, canLogWorkoutOn, cmToFeetInches, cmToInches, continueLinearPeriodization, correctedEndTime, countsAsWork, countsForProgression, customExerciseProblem, defaultWarmUpEquipment, deloadLengthDays, earliestWorkoutEnd, exerciseGroupLabel, exerciseGroupPosition, exerciseGroups, exerciseNameKey, feetInchesToCm, finishEndTime, finishNeedsEndTime, followWorkingLoad, goalSuggestionKey, hasOversizedGroup, higherPlan, inchesToCm, isApiErrorCode, isAppLocale, isBarLoaded, isBodyMeasurementDate, isDashboardSectionId, isDefaultDashboardLayout, isEntitlementSource, isFeatureKey, isGoalSuggestionKey, isGrantActive, isMessagePermission, isOnboardingStepId, isPlanId, isRealtimeTopic, isSetKind, isWeekStartsOn, isWithinQuietHours, latestBodyWeight, leadWorkingWeight, linearPeriodizationProblem, loggedWorkoutDateRange, lpAtStep, lpEstimate, lpLoadKg, lpPrescription, lpRecommendation, lpRirMidpoint, lpSampleRir, lpSetEstimateKg, lpStep, lpStoredSets, lpWorkingSets, matchesDeletionConfirmation, messageBodyLength, messageNote, messageProgressId, normalizeDashboardLayout, normalizeExerciseLinks, normalizeExerciseName, normalizeMessageBody, normalizeSearchQuery, parseRealtimeEvent, planFromGrants, planIncludes, primaryEquipment, requiredToFinish, resolveActiveTrainingBlock, resolveRoutinePlan, roundDownToIncrement, roundToIncrement, routineDayLabel, sameLpPosition, sessionCorrectionWindow, setKindOf, setLogValuesDiffer, startLinearPeriodization, summarizeBodyProgress, trainingBlockCovers, warmUpLoad, weekStartOf };
package/dist/index.js CHANGED
@@ -132,6 +132,96 @@ var FOLLOW_SUGGESTION_REASONS = [
132
132
  "FOLLOWED_BY_PEOPLE_YOU_FOLLOW"
133
133
  ];
134
134
 
135
+ // src/billing.ts
136
+ var PLAN_IDS = ["FREE", "PRO"];
137
+ var DEFAULT_PLAN = "FREE";
138
+ function isPlanId(value) {
139
+ return typeof value === "string" && PLAN_IDS.includes(value);
140
+ }
141
+ var ENTITLEMENT_SOURCES = ["SUBSCRIPTION", "PROMO", "ADMIN"];
142
+ function isEntitlementSource(value) {
143
+ return typeof value === "string" && ENTITLEMENT_SOURCES.includes(value);
144
+ }
145
+ var FEATURE_KEYS = [
146
+ /** PROG-01: strength-trend ranges beyond 90 days. */
147
+ "STRENGTH_TRENDS_LONG_RANGES",
148
+ /** PROG-11, PROG-06: block and session comparison. */
149
+ "TRAINING_COMPARISON",
150
+ /** PROG-10, INTEL-02: training signals and the deload suggestion. */
151
+ "TRAINING_SIGNALS",
152
+ /** PROG-03, PROG-04: the muscle heatmap and volume trends past 4 weeks. */
153
+ "MUSCLE_HISTORY_LONG",
154
+ /** ROUT-09, ROUT-15: dated training blocks. */
155
+ "TRAINING_BLOCKS",
156
+ /** ROUT-16: planned deloads. */
157
+ "PLANNED_DELOADS",
158
+ /** ROUT-17 to ROUT-20: 8-week blocks. */
159
+ "EIGHT_WEEK_BLOCKS",
160
+ /** ACH-06: goal suggestions. */
161
+ "GOAL_SUGGESTIONS",
162
+ /** PROG-12: every body measurement beyond weight. */
163
+ "BODY_MEASUREMENTS",
164
+ /** DASH-05: dashboard customization. */
165
+ "DASHBOARD_CUSTOMIZATION",
166
+ /** INTEL-03: natural-language routine drafts. */
167
+ "ROUTINE_DRAFTS",
168
+ /** INTEL-04: the training review assistant. */
169
+ "TRAINING_REVIEW"
170
+ ];
171
+ function isFeatureKey(value) {
172
+ return typeof value === "string" && FEATURE_KEYS.includes(value);
173
+ }
174
+ var PLAN_LIMIT_KEYS = [
175
+ /** ROUT-08: saved versions per routine. */
176
+ "ROUTINE_VERSIONS",
177
+ /** PROG-08: measurable goals. */
178
+ "GOALS",
179
+ /** PREF-01: training locations. */
180
+ "TRAINING_LOCATIONS",
181
+ /** PROG-03, PROG-04: weeks of muscle history. */
182
+ "MUSCLE_HISTORY_WEEKS"
183
+ ];
184
+ var PLANS = {
185
+ FREE: {
186
+ id: "FREE",
187
+ features: [],
188
+ limits: {
189
+ ROUTINE_VERSIONS: 3,
190
+ GOALS: 3,
191
+ TRAINING_LOCATIONS: 1,
192
+ MUSCLE_HISTORY_WEEKS: 4
193
+ }
194
+ },
195
+ PRO: {
196
+ id: "PRO",
197
+ features: FEATURE_KEYS,
198
+ limits: {
199
+ ROUTINE_VERSIONS: 20,
200
+ GOALS: 8,
201
+ TRAINING_LOCATIONS: null,
202
+ MUSCLE_HISTORY_WEEKS: 12
203
+ }
204
+ }
205
+ };
206
+ function planIncludes(plan, feature) {
207
+ return PLANS[plan].features.includes(feature);
208
+ }
209
+ function higherPlan(a, b) {
210
+ return PLAN_IDS.indexOf(a) >= PLAN_IDS.indexOf(b) ? a : b;
211
+ }
212
+ function time(value) {
213
+ return value instanceof Date ? value.getTime() : Date.parse(value);
214
+ }
215
+ function isGrantActive(grant, now = /* @__PURE__ */ new Date()) {
216
+ const at = now.getTime();
217
+ if (grant.revokedAt !== null) return false;
218
+ if (time(grant.startsAt) > at) return false;
219
+ return grant.expiresAt === null || time(grant.expiresAt) > at;
220
+ }
221
+ function planFromGrants(grants, now = /* @__PURE__ */ new Date()) {
222
+ return grants.filter((grant) => isGrantActive(grant, now)).reduce((plan, grant) => higherPlan(plan, grant.planId), DEFAULT_PLAN);
223
+ }
224
+
135
225
  // src/dashboard-layout.ts
136
226
  var DASHBOARD_SECTION_IDS = [
137
227
  "this-week",
@@ -848,10 +938,10 @@ var DAY_MS = 24 * 60 * 60 * 1e3;
848
938
  var DATE = /^\d{4}-\d{2}-\d{2}$/;
849
939
  function dayNumber(date) {
850
940
  if (!DATE.test(date)) return null;
851
- const time = Date.parse(`${date}T00:00:00Z`);
852
- if (!Number.isFinite(time)) return null;
853
- if (new Date(time).toISOString().slice(0, 10) !== date) return null;
854
- return Math.round(time / DAY_MS);
941
+ const time2 = Date.parse(`${date}T00:00:00Z`);
942
+ if (!Number.isFinite(time2)) return null;
943
+ if (new Date(time2).toISOString().slice(0, 10) !== date) return null;
944
+ return Math.round(time2 / DAY_MS);
855
945
  }
856
946
  function addCalendarDays(date, days) {
857
947
  const day = dayNumber(date);
@@ -1332,8 +1422,8 @@ function applyDeload(setup, options) {
1332
1422
  return lighter ? { ...setup, days } : null;
1333
1423
  }
1334
1424
  function deloadLengthDays(startDate, endDate) {
1335
- const ms = (date) => Date.parse(`${date}T00:00:00Z`);
1336
- return Math.round((ms(endDate) - ms(startDate)) / 864e5) + 1;
1425
+ const ms2 = (date) => Date.parse(`${date}T00:00:00Z`);
1426
+ return Math.round((ms2(endDate) - ms2(startDate)) / 864e5) + 1;
1337
1427
  }
1338
1428
 
1339
1429
  // src/deload-suggestions.ts
@@ -1430,6 +1520,37 @@ var SESSION_SHARE_DEFAULT_FIELDS = [
1430
1520
  ];
1431
1521
  var SESSION_SHARE_MAX_ACTIVE_LINKS = 10;
1432
1522
 
1523
+ // src/workout-end-time.ts
1524
+ var FINISH_PAUSE_MINUTES = 30;
1525
+ var WORKOUT_END_CLOCK_SLACK_SECONDS = 120;
1526
+ var ms = (value) => new Date(value).getTime();
1527
+ function earliestWorkoutEnd(input) {
1528
+ const skip = input.movesWithEnd ? ms(input.movesWithEnd) : null;
1529
+ let earliest = ms(input.startedAt);
1530
+ for (const value of input.completedAts) {
1531
+ if (!value) continue;
1532
+ const at = ms(value);
1533
+ if (Number.isFinite(at) && at !== skip && at > earliest) earliest = at;
1534
+ }
1535
+ return new Date(earliest);
1536
+ }
1537
+ function finishEndTime(requested, earliest, now = /* @__PURE__ */ new Date()) {
1538
+ if (requested == null) return now;
1539
+ const at = ms(requested);
1540
+ if (!Number.isFinite(at) || at < earliest.getTime()) return null;
1541
+ if (at > now.getTime() + WORKOUT_END_CLOCK_SLACK_SECONDS * 1e3) return null;
1542
+ return new Date(Math.min(at, now.getTime()));
1543
+ }
1544
+ function correctedEndTime(requested, earliest, endedAt) {
1545
+ const at = ms(requested);
1546
+ if (!Number.isFinite(at)) return null;
1547
+ if (at < earliest.getTime() || at > ms(endedAt)) return null;
1548
+ return new Date(at);
1549
+ }
1550
+ function finishNeedsEndTime(lastActivityAt, now = /* @__PURE__ */ new Date()) {
1551
+ return now.getTime() - ms(lastActivityAt) >= FINISH_PAUSE_MINUTES * 60 * 1e3;
1552
+ }
1553
+
1433
1554
  // src/session-corrections.ts
1434
1555
  var SESSION_CORRECTION_WINDOW_HOURS = 48;
1435
1556
  var SESSION_CORRECTIONS_MAX = 10;
@@ -1691,6 +1812,7 @@ var API_ERROR_MESSAGES = {
1691
1812
  SESSION_BLOCK_NOT_IN_FORCE: "That training block is not in force today; start a day of the routine",
1692
1813
  SESSION_FINISHED: "Cannot modify set logs for a finished session",
1693
1814
  SESSION_ALREADY_FINISHED: "Session already finished with a different status",
1815
+ WORKOUT_END_TIME_RANGE: "A workout ends after it started and after its last set, and not in the future",
1694
1816
  EXTRA_SETS_MAX: "An exercise can take at most {max} extra sets",
1695
1817
  EXTRA_SET_NOT_NEXT: "Extra sets are added after the last set",
1696
1818
  PRESCRIBED_SET_NOT_REMOVABLE: "A prescribed set cannot be removed",
@@ -1728,6 +1850,7 @@ var API_ERROR_MESSAGES = {
1728
1850
  CORRECTION_COMPLETED_NEEDS_REP: "A completed set needs at least one rep",
1729
1851
  CORRECTION_NOTHING_TO_CORRECT: "Nothing to correct: every set already reads that way",
1730
1852
  CORRECTION_KEEPS_ONE_SET: "A finished workout keeps at least one completed set",
1853
+ CORRECTION_END_TIME_RANGE: "A workout's end can only move earlier, and not before it started or before its last set",
1731
1854
  // ── Sharing a workout ──────────────────────────────────────────────────
1732
1855
  SESSION_SHARE_NOTHING_CHOSEN: "Choose at least one part of the recap to share",
1733
1856
  SESSION_SHARE_NOT_COMPLETED: "Only completed sessions can be shared",
@@ -1777,6 +1900,8 @@ var API_ERROR_MESSAGES = {
1777
1900
  MESSAGING_NOT_RESTRICTED: "This member's messaging is not restricted",
1778
1901
  // ── Message requests (MSG-02) ──────────────────────────────────────────
1779
1902
  REQUEST_PENDING: "You can send more once they accept your request.",
1903
+ // ── Plans (BILL-01) ────────────────────────────────────────────────────
1904
+ ENTITLEMENT_REQUIRED: "This is available in Pro",
1780
1905
  // ── Account and settings ───────────────────────────────────────────────
1781
1906
  ACCOUNT_CONFLICT: "Account conflict for this email",
1782
1907
  ACCOUNT_DELETE_CONFIRMATION: "Type your username exactly as it appears to confirm.",
@@ -1942,6 +2067,7 @@ export {
1942
2067
  DEFAULT_DASHBOARD_LAYOUT,
1943
2068
  DEFAULT_LOCALE,
1944
2069
  DEFAULT_MESSAGE_PERMISSION,
2070
+ DEFAULT_PLAN,
1945
2071
  DEFAULT_WEEK_STARTS_ON,
1946
2072
  DELOAD_DEFAULT_DAYS,
1947
2073
  DELOAD_DEFAULT_LOAD_REDUCTION,
@@ -1955,6 +2081,7 @@ export {
1955
2081
  DELOAD_SUGGESTION_MIN_MARKED_TODAY,
1956
2082
  DELOAD_SUGGESTION_ROUTINE_DAYS,
1957
2083
  DELOAD_SUGGESTION_SIGNALS,
2084
+ ENTITLEMENT_SOURCES,
1958
2085
  EXERCISE_EQUIPMENT,
1959
2086
  EXERCISE_GROUP_KIND_LABELS,
1960
2087
  EXERCISE_GROUP_MAX,
@@ -1962,6 +2089,8 @@ export {
1962
2089
  FEATURED_PROFILE_ITEMS_MAX,
1963
2090
  FEATURED_PROFILE_ITEM_KINDS,
1964
2091
  FEATURED_PROFILE_REFERENCE_MAX_LENGTH,
2092
+ FEATURE_KEYS,
2093
+ FINISH_PAUSE_MINUTES,
1965
2094
  FOLLOW_SUGGESTIONS_DEFAULT_LIMIT,
1966
2095
  FOLLOW_SUGGESTIONS_MAX_LIMIT,
1967
2096
  FOLLOW_SUGGESTION_REASONS,
@@ -2026,6 +2155,9 @@ export {
2026
2155
  ONBOARDING_STEP_ID_PATTERN_SOURCE,
2027
2156
  ONBOARDING_VERSION_MAX,
2028
2157
  OTHER_WARM_UP_STEPS,
2158
+ PLANS,
2159
+ PLAN_IDS,
2160
+ PLAN_LIMIT_KEYS,
2029
2161
  PLATEAU_MIN_DAYS_SINCE_BEST,
2030
2162
  PLATEAU_MIN_SESSIONS,
2031
2163
  PLATEAU_MIN_SESSIONS_MAX,
@@ -2138,6 +2270,7 @@ export {
2138
2270
  USERNAME_PATTERN_SOURCE,
2139
2271
  WEEK_STARTS,
2140
2272
  WEIGHT_UNITS,
2273
+ WORKOUT_END_CLOCK_SLACK_SECONDS,
2141
2274
  WORKOUT_SESSION_ORIGINS,
2142
2275
  WORKOUT_SESSION_STATUSES,
2143
2276
  accountExportFileName,
@@ -2155,19 +2288,24 @@ export {
2155
2288
  cmToFeetInches,
2156
2289
  cmToInches,
2157
2290
  continueLinearPeriodization,
2291
+ correctedEndTime,
2158
2292
  countsAsWork,
2159
2293
  countsForProgression,
2160
2294
  customExerciseProblem,
2161
2295
  defaultWarmUpEquipment,
2162
2296
  deloadLengthDays,
2297
+ earliestWorkoutEnd,
2163
2298
  exerciseGroupLabel,
2164
2299
  exerciseGroupPosition,
2165
2300
  exerciseGroups,
2166
2301
  exerciseNameKey,
2167
2302
  feetInchesToCm,
2303
+ finishEndTime,
2304
+ finishNeedsEndTime,
2168
2305
  followWorkingLoad,
2169
2306
  goalSuggestionKey,
2170
2307
  hasOversizedGroup,
2308
+ higherPlan,
2171
2309
  inchesToCm,
2172
2310
  isApiErrorCode,
2173
2311
  isAppLocale,
@@ -2175,9 +2313,13 @@ export {
2175
2313
  isBodyMeasurementDate,
2176
2314
  isDashboardSectionId,
2177
2315
  isDefaultDashboardLayout,
2316
+ isEntitlementSource,
2317
+ isFeatureKey,
2178
2318
  isGoalSuggestionKey,
2319
+ isGrantActive,
2179
2320
  isMessagePermission,
2180
2321
  isOnboardingStepId,
2322
+ isPlanId,
2181
2323
  isRealtimeTopic,
2182
2324
  isSetKind,
2183
2325
  isWeekStartsOn,
@@ -2207,6 +2349,8 @@ export {
2207
2349
  normalizeMessageBody,
2208
2350
  normalizeSearchQuery,
2209
2351
  parseRealtimeEvent,
2352
+ planFromGrants,
2353
+ planIncludes,
2210
2354
  primaryEquipment,
2211
2355
  requiredToFinish,
2212
2356
  resolveActiveTrainingBlock,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunsteel/contracts",
3
- "version": "0.100.0",
3
+ "version": "0.102.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ezee969/sunsteel-contracts.git"