@sunsteel/contracts 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -25,7 +25,6 @@ __export(index_exports, {
25
25
  PROGRESSION_SCHEMES: () => PROGRESSION_SCHEMES,
26
26
  REP_TYPES: () => REP_TYPES,
27
27
  SEXES: () => SEXES,
28
- TM_ADJUSTMENT_CONSTANTS: () => TM_ADJUSTMENT_CONSTANTS,
29
28
  WEIGHT_UNITS: () => WEIGHT_UNITS,
30
29
  WORKOUT_SESSION_STATUSES: () => WORKOUT_SESSION_STATUSES
31
30
  });
@@ -44,9 +43,7 @@ var REP_TYPES = ["FIXED", "RANGE"];
44
43
  var PROGRESSION_SCHEMES = [
45
44
  "NONE",
46
45
  "DOUBLE_PROGRESSION",
47
- "DYNAMIC_DOUBLE_PROGRESSION",
48
- "PROGRAMMED_RTF",
49
- "PROGRAMMED_RTF_HYPERTROPHY"
46
+ "DYNAMIC_DOUBLE_PROGRESSION"
50
47
  ];
51
48
  var MUSCLE_GROUPS = [
52
49
  "PECTORAL",
@@ -67,15 +64,6 @@ var MUSCLE_GROUPS = [
67
64
  "CORE",
68
65
  "ADDUCTOR"
69
66
  ];
70
-
71
- // src/tm.ts
72
- var TM_ADJUSTMENT_CONSTANTS = {
73
- MAX_DELTA_KG: 15,
74
- MIN_DELTA_KG: -15,
75
- MIN_WEEK: 1,
76
- MAX_WEEK: 21,
77
- MAX_REASON_LENGTH: 160
78
- };
79
67
  // Annotate the CommonJS export names for ESM import in node:
80
68
  0 && (module.exports = {
81
69
  MUSCLE_GROUPS,
@@ -83,7 +71,6 @@ var TM_ADJUSTMENT_CONSTANTS = {
83
71
  PROGRESSION_SCHEMES,
84
72
  REP_TYPES,
85
73
  SEXES,
86
- TM_ADJUSTMENT_CONSTANTS,
87
74
  WEIGHT_UNITS,
88
75
  WORKOUT_SESSION_STATUSES
89
76
  });
package/dist/index.d.cts CHANGED
@@ -8,7 +8,7 @@ declare const SEXES: readonly ["MALE", "FEMALE"];
8
8
  type Sex = (typeof SEXES)[number];
9
9
  declare const REP_TYPES: readonly ["FIXED", "RANGE"];
10
10
  type RepType = (typeof REP_TYPES)[number];
11
- declare const PROGRESSION_SCHEMES: readonly ["NONE", "DOUBLE_PROGRESSION", "DYNAMIC_DOUBLE_PROGRESSION", "PROGRAMMED_RTF", "PROGRAMMED_RTF_HYPERTROPHY"];
11
+ declare const PROGRESSION_SCHEMES: readonly ["NONE", "DOUBLE_PROGRESSION", "DYNAMIC_DOUBLE_PROGRESSION"];
12
12
  type ProgressionScheme = (typeof PROGRESSION_SCHEMES)[number];
13
13
  declare const MUSCLE_GROUPS: readonly ["PECTORAL", "LATISSIMUS_DORSI", "TRAPEZIUS", "REAR_DELTOIDS", "ERECTOR_SPINAE", "TERES_MAJOR_MINOR", "ANTERIOR_DELTOIDS", "MEDIAL_DELTOIDS", "BICEPS", "TRICEPS", "FOREARMS", "QUADRICEPS", "HAMSTRINGS", "GLUTES", "CALVES", "CORE", "ADDUCTOR"];
14
14
  type MuscleGroup = (typeof MUSCLE_GROUPS)[number];
@@ -101,67 +101,6 @@ interface Exercise {
101
101
  updatedAt: IsoDateString;
102
102
  }
103
103
 
104
- type RtfVariant = ProgramStyle;
105
- interface RtfExerciseGoal {
106
- routineExerciseId: string;
107
- exerciseId: string;
108
- exerciseName: string;
109
- variant: RtfVariant;
110
- week: number;
111
- isDeload: boolean;
112
- intensity: number;
113
- fixedReps: number;
114
- setsPlanned: number;
115
- amrapTarget: number | null;
116
- amrapSetNumber: number | null;
117
- workingWeightKg?: number;
118
- trainingMaxKg?: number;
119
- }
120
- interface RtfWeekGoals {
121
- routineId: string;
122
- week: number;
123
- withDeloads: boolean;
124
- goals: RtfExerciseGoal[];
125
- version: number;
126
- _cache?: 'HIT' | 'MISS';
127
- }
128
- interface RtfTimelineEntry {
129
- week: number;
130
- isDeload: boolean;
131
- startDate: IsoDateString;
132
- endDate: IsoDateString;
133
- }
134
- interface RtfTimeline {
135
- routineId: string;
136
- totalWeeks: number;
137
- withDeloads: boolean;
138
- timeline: RtfTimelineEntry[];
139
- version: number;
140
- _cache?: 'HIT' | 'MISS';
141
- }
142
- interface RtfForecastData {
143
- intensity: number;
144
- fixedReps: number;
145
- amrapTarget: number;
146
- sets: number;
147
- amrapSet: number;
148
- isDeload?: boolean;
149
- }
150
- interface RtfForecastWeek {
151
- week: number;
152
- isDeload: boolean;
153
- standard?: RtfForecastData;
154
- hypertrophy?: RtfForecastData;
155
- }
156
- interface RtfForecast {
157
- routineId: string;
158
- weeks: number;
159
- version: number;
160
- withDeloads: boolean;
161
- forecast: RtfForecastWeek[];
162
- _cache?: 'HIT' | 'MISS';
163
- }
164
-
165
104
  interface RoutineSet {
166
105
  setNumber: number;
167
106
  repType: RepType;
@@ -227,7 +166,6 @@ interface Routine {
227
166
  programStartDate?: IsoDateString;
228
167
  programEndDate?: IsoDateString;
229
168
  programTimezone?: string;
230
- rtfGoals?: RtfWeekGoals;
231
169
  days: RoutineDay[];
232
170
  createdAt: IsoDateString;
233
171
  updatedAt: IsoDateString;
@@ -271,16 +209,6 @@ interface WorkoutSession {
271
209
  notes?: string | null;
272
210
  lastActivityAt?: IsoDateString | null;
273
211
  setLogs?: SetLog[];
274
- program?: {
275
- currentWeek: number;
276
- durationWeeks: number;
277
- withDeloads: boolean;
278
- isDeloadWeek: boolean;
279
- startDate: IsoDateString;
280
- endDate: IsoDateString;
281
- timeZone: string;
282
- };
283
- rtfPlans?: unknown[];
284
212
  reused?: boolean;
285
213
  routine?: {
286
214
  id: string;
@@ -330,8 +258,6 @@ interface StartWorkoutResponse {
330
258
  status: WorkoutSessionStatus;
331
259
  startedAt: IsoDateString;
332
260
  endedAt?: IsoDateString | null;
333
- program?: WorkoutSession['program'];
334
- rtfPlans?: WorkoutSession['rtfPlans'];
335
261
  reused: boolean;
336
262
  }
337
263
  type FinishStatus = Extract<WorkoutSessionStatus, 'COMPLETED' | 'ABORTED'>;
@@ -376,46 +302,4 @@ interface ListSessionsParams {
376
302
  }
377
303
  type WorkoutSessionListResponse = PaginatedResponse<WorkoutSessionSummary>;
378
304
 
379
- interface CreateTmEventRequest {
380
- exerciseId: string;
381
- weekNumber: number;
382
- deltaKg: number;
383
- preTmKg: number;
384
- postTmKg: number;
385
- reason?: string;
386
- }
387
- interface TmEventResponse {
388
- id: string;
389
- routineId: string;
390
- exerciseId: string;
391
- exerciseName: string;
392
- weekNumber: number;
393
- deltaKg: number;
394
- preTmKg: number;
395
- postTmKg: number;
396
- reason?: string;
397
- style: ProgramStyle | null;
398
- createdAt: IsoDateString;
399
- }
400
- interface TmEventSummary {
401
- exerciseId: string;
402
- exerciseName: string;
403
- totalDeltaKg: number;
404
- averageDeltaKg: number;
405
- adjustmentCount: number;
406
- lastAdjustmentDate: IsoDateString | null;
407
- }
408
- interface GetTmAdjustmentsParams {
409
- exerciseId?: string;
410
- minWeek?: number;
411
- maxWeek?: number;
412
- }
413
- declare const TM_ADJUSTMENT_CONSTANTS: {
414
- readonly MAX_DELTA_KG: 15;
415
- readonly MIN_DELTA_KG: -15;
416
- readonly MIN_WEEK: 1;
417
- readonly MAX_WEEK: 21;
418
- readonly MAX_REASON_LENGTH: 160;
419
- };
420
-
421
- export { type Brand, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateTmEventRequest, type Exercise, type ExerciseId, type FinishStatus, type FinishWorkoutRequest, type GetTmAdjustmentsParams, type IsoDateString, type ListSessionsParams, MUSCLE_GROUPS, type MuscleGroup, PROGRAM_STYLES, PROGRESSION_SCHEMES, type PaginatedResponse, type ProgramStyle, type ProgressionScheme, type PublicUserProfile, REP_TYPES, type RepType, type Routine, type RoutineDay, type RoutineDayId, type RoutineExercise, type RoutineId, type RoutineSet, type RtfExerciseGoal, type RtfForecast, type RtfForecastData, type RtfForecastWeek, type RtfTimeline, type RtfTimelineEntry, type RtfVariant, type RtfWeekGoals, SEXES, type SetLog, type Sex, type StartWorkoutRequest, type StartWorkoutResponse, type SupabaseAuthResponse, type SupabaseAuthUser, type SupabaseMigrationResponse, TM_ADJUSTMENT_CONSTANTS, type TmEventResponse, type TmEventSummary, type UpdateProfileRequest, type UpdateRoutineRequest, type UpsertSetLogRequest, type UserId, type UserProfile, type UserSearchResponse, WEIGHT_UNITS, WORKOUT_SESSION_STATUSES, type WeightUnit, type WorkoutSession, type WorkoutSessionId, type WorkoutSessionListResponse, type WorkoutSessionStatus, type WorkoutSessionSummary };
305
+ export { type Brand, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type Exercise, type ExerciseId, type FinishStatus, type FinishWorkoutRequest, type IsoDateString, type ListSessionsParams, MUSCLE_GROUPS, type MuscleGroup, PROGRAM_STYLES, PROGRESSION_SCHEMES, type PaginatedResponse, type ProgramStyle, type ProgressionScheme, type PublicUserProfile, REP_TYPES, type RepType, type Routine, type RoutineDay, type RoutineDayId, type RoutineExercise, type RoutineId, type RoutineSet, SEXES, type SetLog, type Sex, type StartWorkoutRequest, type StartWorkoutResponse, type SupabaseAuthResponse, type SupabaseAuthUser, type SupabaseMigrationResponse, type UpdateProfileRequest, type UpdateRoutineRequest, type UpsertSetLogRequest, type UserId, type UserProfile, type UserSearchResponse, WEIGHT_UNITS, WORKOUT_SESSION_STATUSES, type WeightUnit, type WorkoutSession, type WorkoutSessionId, type WorkoutSessionListResponse, type WorkoutSessionStatus, type WorkoutSessionSummary };
package/dist/index.d.ts CHANGED
@@ -8,7 +8,7 @@ declare const SEXES: readonly ["MALE", "FEMALE"];
8
8
  type Sex = (typeof SEXES)[number];
9
9
  declare const REP_TYPES: readonly ["FIXED", "RANGE"];
10
10
  type RepType = (typeof REP_TYPES)[number];
11
- declare const PROGRESSION_SCHEMES: readonly ["NONE", "DOUBLE_PROGRESSION", "DYNAMIC_DOUBLE_PROGRESSION", "PROGRAMMED_RTF", "PROGRAMMED_RTF_HYPERTROPHY"];
11
+ declare const PROGRESSION_SCHEMES: readonly ["NONE", "DOUBLE_PROGRESSION", "DYNAMIC_DOUBLE_PROGRESSION"];
12
12
  type ProgressionScheme = (typeof PROGRESSION_SCHEMES)[number];
13
13
  declare const MUSCLE_GROUPS: readonly ["PECTORAL", "LATISSIMUS_DORSI", "TRAPEZIUS", "REAR_DELTOIDS", "ERECTOR_SPINAE", "TERES_MAJOR_MINOR", "ANTERIOR_DELTOIDS", "MEDIAL_DELTOIDS", "BICEPS", "TRICEPS", "FOREARMS", "QUADRICEPS", "HAMSTRINGS", "GLUTES", "CALVES", "CORE", "ADDUCTOR"];
14
14
  type MuscleGroup = (typeof MUSCLE_GROUPS)[number];
@@ -101,67 +101,6 @@ interface Exercise {
101
101
  updatedAt: IsoDateString;
102
102
  }
103
103
 
104
- type RtfVariant = ProgramStyle;
105
- interface RtfExerciseGoal {
106
- routineExerciseId: string;
107
- exerciseId: string;
108
- exerciseName: string;
109
- variant: RtfVariant;
110
- week: number;
111
- isDeload: boolean;
112
- intensity: number;
113
- fixedReps: number;
114
- setsPlanned: number;
115
- amrapTarget: number | null;
116
- amrapSetNumber: number | null;
117
- workingWeightKg?: number;
118
- trainingMaxKg?: number;
119
- }
120
- interface RtfWeekGoals {
121
- routineId: string;
122
- week: number;
123
- withDeloads: boolean;
124
- goals: RtfExerciseGoal[];
125
- version: number;
126
- _cache?: 'HIT' | 'MISS';
127
- }
128
- interface RtfTimelineEntry {
129
- week: number;
130
- isDeload: boolean;
131
- startDate: IsoDateString;
132
- endDate: IsoDateString;
133
- }
134
- interface RtfTimeline {
135
- routineId: string;
136
- totalWeeks: number;
137
- withDeloads: boolean;
138
- timeline: RtfTimelineEntry[];
139
- version: number;
140
- _cache?: 'HIT' | 'MISS';
141
- }
142
- interface RtfForecastData {
143
- intensity: number;
144
- fixedReps: number;
145
- amrapTarget: number;
146
- sets: number;
147
- amrapSet: number;
148
- isDeload?: boolean;
149
- }
150
- interface RtfForecastWeek {
151
- week: number;
152
- isDeload: boolean;
153
- standard?: RtfForecastData;
154
- hypertrophy?: RtfForecastData;
155
- }
156
- interface RtfForecast {
157
- routineId: string;
158
- weeks: number;
159
- version: number;
160
- withDeloads: boolean;
161
- forecast: RtfForecastWeek[];
162
- _cache?: 'HIT' | 'MISS';
163
- }
164
-
165
104
  interface RoutineSet {
166
105
  setNumber: number;
167
106
  repType: RepType;
@@ -227,7 +166,6 @@ interface Routine {
227
166
  programStartDate?: IsoDateString;
228
167
  programEndDate?: IsoDateString;
229
168
  programTimezone?: string;
230
- rtfGoals?: RtfWeekGoals;
231
169
  days: RoutineDay[];
232
170
  createdAt: IsoDateString;
233
171
  updatedAt: IsoDateString;
@@ -271,16 +209,6 @@ interface WorkoutSession {
271
209
  notes?: string | null;
272
210
  lastActivityAt?: IsoDateString | null;
273
211
  setLogs?: SetLog[];
274
- program?: {
275
- currentWeek: number;
276
- durationWeeks: number;
277
- withDeloads: boolean;
278
- isDeloadWeek: boolean;
279
- startDate: IsoDateString;
280
- endDate: IsoDateString;
281
- timeZone: string;
282
- };
283
- rtfPlans?: unknown[];
284
212
  reused?: boolean;
285
213
  routine?: {
286
214
  id: string;
@@ -330,8 +258,6 @@ interface StartWorkoutResponse {
330
258
  status: WorkoutSessionStatus;
331
259
  startedAt: IsoDateString;
332
260
  endedAt?: IsoDateString | null;
333
- program?: WorkoutSession['program'];
334
- rtfPlans?: WorkoutSession['rtfPlans'];
335
261
  reused: boolean;
336
262
  }
337
263
  type FinishStatus = Extract<WorkoutSessionStatus, 'COMPLETED' | 'ABORTED'>;
@@ -376,46 +302,4 @@ interface ListSessionsParams {
376
302
  }
377
303
  type WorkoutSessionListResponse = PaginatedResponse<WorkoutSessionSummary>;
378
304
 
379
- interface CreateTmEventRequest {
380
- exerciseId: string;
381
- weekNumber: number;
382
- deltaKg: number;
383
- preTmKg: number;
384
- postTmKg: number;
385
- reason?: string;
386
- }
387
- interface TmEventResponse {
388
- id: string;
389
- routineId: string;
390
- exerciseId: string;
391
- exerciseName: string;
392
- weekNumber: number;
393
- deltaKg: number;
394
- preTmKg: number;
395
- postTmKg: number;
396
- reason?: string;
397
- style: ProgramStyle | null;
398
- createdAt: IsoDateString;
399
- }
400
- interface TmEventSummary {
401
- exerciseId: string;
402
- exerciseName: string;
403
- totalDeltaKg: number;
404
- averageDeltaKg: number;
405
- adjustmentCount: number;
406
- lastAdjustmentDate: IsoDateString | null;
407
- }
408
- interface GetTmAdjustmentsParams {
409
- exerciseId?: string;
410
- minWeek?: number;
411
- maxWeek?: number;
412
- }
413
- declare const TM_ADJUSTMENT_CONSTANTS: {
414
- readonly MAX_DELTA_KG: 15;
415
- readonly MIN_DELTA_KG: -15;
416
- readonly MIN_WEEK: 1;
417
- readonly MAX_WEEK: 21;
418
- readonly MAX_REASON_LENGTH: 160;
419
- };
420
-
421
- export { type Brand, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateTmEventRequest, type Exercise, type ExerciseId, type FinishStatus, type FinishWorkoutRequest, type GetTmAdjustmentsParams, type IsoDateString, type ListSessionsParams, MUSCLE_GROUPS, type MuscleGroup, PROGRAM_STYLES, PROGRESSION_SCHEMES, type PaginatedResponse, type ProgramStyle, type ProgressionScheme, type PublicUserProfile, REP_TYPES, type RepType, type Routine, type RoutineDay, type RoutineDayId, type RoutineExercise, type RoutineId, type RoutineSet, type RtfExerciseGoal, type RtfForecast, type RtfForecastData, type RtfForecastWeek, type RtfTimeline, type RtfTimelineEntry, type RtfVariant, type RtfWeekGoals, SEXES, type SetLog, type Sex, type StartWorkoutRequest, type StartWorkoutResponse, type SupabaseAuthResponse, type SupabaseAuthUser, type SupabaseMigrationResponse, TM_ADJUSTMENT_CONSTANTS, type TmEventResponse, type TmEventSummary, type UpdateProfileRequest, type UpdateRoutineRequest, type UpsertSetLogRequest, type UserId, type UserProfile, type UserSearchResponse, WEIGHT_UNITS, WORKOUT_SESSION_STATUSES, type WeightUnit, type WorkoutSession, type WorkoutSessionId, type WorkoutSessionListResponse, type WorkoutSessionStatus, type WorkoutSessionSummary };
305
+ export { type Brand, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type Exercise, type ExerciseId, type FinishStatus, type FinishWorkoutRequest, type IsoDateString, type ListSessionsParams, MUSCLE_GROUPS, type MuscleGroup, PROGRAM_STYLES, PROGRESSION_SCHEMES, type PaginatedResponse, type ProgramStyle, type ProgressionScheme, type PublicUserProfile, REP_TYPES, type RepType, type Routine, type RoutineDay, type RoutineDayId, type RoutineExercise, type RoutineId, type RoutineSet, SEXES, type SetLog, type Sex, type StartWorkoutRequest, type StartWorkoutResponse, type SupabaseAuthResponse, type SupabaseAuthUser, type SupabaseMigrationResponse, type UpdateProfileRequest, type UpdateRoutineRequest, type UpsertSetLogRequest, type UserId, type UserProfile, type UserSearchResponse, WEIGHT_UNITS, WORKOUT_SESSION_STATUSES, type WeightUnit, type WorkoutSession, type WorkoutSessionId, type WorkoutSessionListResponse, type WorkoutSessionStatus, type WorkoutSessionSummary };
package/dist/index.js CHANGED
@@ -11,9 +11,7 @@ var REP_TYPES = ["FIXED", "RANGE"];
11
11
  var PROGRESSION_SCHEMES = [
12
12
  "NONE",
13
13
  "DOUBLE_PROGRESSION",
14
- "DYNAMIC_DOUBLE_PROGRESSION",
15
- "PROGRAMMED_RTF",
16
- "PROGRAMMED_RTF_HYPERTROPHY"
14
+ "DYNAMIC_DOUBLE_PROGRESSION"
17
15
  ];
18
16
  var MUSCLE_GROUPS = [
19
17
  "PECTORAL",
@@ -34,22 +32,12 @@ var MUSCLE_GROUPS = [
34
32
  "CORE",
35
33
  "ADDUCTOR"
36
34
  ];
37
-
38
- // src/tm.ts
39
- var TM_ADJUSTMENT_CONSTANTS = {
40
- MAX_DELTA_KG: 15,
41
- MIN_DELTA_KG: -15,
42
- MIN_WEEK: 1,
43
- MAX_WEEK: 21,
44
- MAX_REASON_LENGTH: 160
45
- };
46
35
  export {
47
36
  MUSCLE_GROUPS,
48
37
  PROGRAM_STYLES,
49
38
  PROGRESSION_SCHEMES,
50
39
  REP_TYPES,
51
40
  SEXES,
52
- TM_ADJUSTMENT_CONSTANTS,
53
41
  WEIGHT_UNITS,
54
42
  WORKOUT_SESSION_STATUSES
55
43
  };
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@sunsteel/contracts",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "repository": {
5
5
  "type": "git",
6
- "url": "git+https://github.com//sunsteel-contracts.git"
6
+ "url": "git+https://github.com/ezee969/sunsteel-contracts.git"
7
7
  },
8
8
  "private": false,
9
9
  "engines": {