@sunsteel/contracts 0.2.5 → 0.3.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
@@ -30,6 +30,8 @@ __export(index_exports, {
30
30
  WORKOUT_SESSION_STATUSES: () => WORKOUT_SESSION_STATUSES
31
31
  });
32
32
  module.exports = __toCommonJS(index_exports);
33
+
34
+ // src/shared.ts
33
35
  var PROGRAM_STYLES = ["STANDARD", "HYPERTROPHY"];
34
36
  var WORKOUT_SESSION_STATUSES = [
35
37
  "IN_PROGRESS",
@@ -49,19 +51,24 @@ var PROGRESSION_SCHEMES = [
49
51
  var MUSCLE_GROUPS = [
50
52
  "PECTORAL",
51
53
  "LATISSIMUS_DORSI",
52
- "DELTOID",
53
54
  "TRAPEZIUS",
55
+ "REAR_DELTOIDS",
56
+ "ERECTOR_SPINAE",
57
+ "TERES_MAJOR_MINOR",
58
+ "ANTERIOR_DELTOIDS",
59
+ "MEDIAL_DELTOIDS",
54
60
  "BICEPS",
55
61
  "TRICEPS",
56
- "FOREARM",
57
- "ABDOMINAL",
58
- "OBLIQUE",
59
- "ERECTOR_SPINAE",
60
- "GLUTEUS",
62
+ "FOREARMS",
61
63
  "QUADRICEPS",
62
64
  "HAMSTRINGS",
63
- "CALVES"
65
+ "GLUTES",
66
+ "CALVES",
67
+ "CORE",
68
+ "ADDUCTOR"
64
69
  ];
70
+
71
+ // src/tm.ts
65
72
  var TM_ADJUSTMENT_CONSTANTS = {
66
73
  MAX_DELTA_KG: 15,
67
74
  MIN_DELTA_KG: -15,
package/dist/index.d.cts CHANGED
@@ -10,7 +10,7 @@ declare const REP_TYPES: readonly ["FIXED", "RANGE"];
10
10
  type RepType = (typeof REP_TYPES)[number];
11
11
  declare const PROGRESSION_SCHEMES: readonly ["NONE", "DOUBLE_PROGRESSION", "DYNAMIC_DOUBLE_PROGRESSION", "PROGRAMMED_RTF", "PROGRAMMED_RTF_HYPERTROPHY"];
12
12
  type ProgressionScheme = (typeof PROGRESSION_SCHEMES)[number];
13
- declare const MUSCLE_GROUPS: readonly ["PECTORAL", "LATISSIMUS_DORSI", "DELTOID", "TRAPEZIUS", "BICEPS", "TRICEPS", "FOREARM", "ABDOMINAL", "OBLIQUE", "ERECTOR_SPINAE", "GLUTEUS", "QUADRICEPS", "HAMSTRINGS", "CALVES"];
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];
15
15
  type IsoDateString = string;
16
16
  type Brand<T, B> = T & {
@@ -21,6 +21,11 @@ type RoutineId = Brand<string, 'RoutineId'>;
21
21
  type RoutineDayId = Brand<string, 'RoutineDayId'>;
22
22
  type WorkoutSessionId = Brand<string, 'WorkoutSessionId'>;
23
23
  type ExerciseId = Brand<string, 'ExerciseId'>;
24
+ interface PaginatedResponse<T> {
25
+ items: T[];
26
+ nextCursor?: string;
27
+ }
28
+
24
29
  interface UserProfile {
25
30
  id: string;
26
31
  email: string;
@@ -32,8 +37,21 @@ interface UserProfile {
32
37
  weight?: number | null;
33
38
  height?: number | null;
34
39
  weightUnit: WeightUnit;
40
+ followerCount: number;
41
+ followingCount: number;
42
+ createdAt: IsoDateString;
43
+ updatedAt: IsoDateString;
44
+ }
45
+ interface PublicUserProfile {
46
+ id: string;
47
+ name: string;
48
+ lastName?: string | null;
49
+ avatarUrl?: string | null;
35
50
  createdAt: IsoDateString;
36
51
  updatedAt: IsoDateString;
52
+ followerCount: number;
53
+ followingCount: number;
54
+ isFollowedByMe: boolean;
37
55
  }
38
56
  interface UpdateProfileRequest {
39
57
  name?: string;
@@ -52,16 +70,98 @@ interface UserSearchResponse {
52
70
  lastName?: string | null;
53
71
  avatarUrl?: string | null;
54
72
  }
55
- interface PublicUserProfile {
73
+
74
+ interface SupabaseAuthUser {
56
75
  id: string;
76
+ email: string;
57
77
  name: string;
58
- lastName?: string | null;
59
- avatarUrl?: string | null;
60
- followersCount: number;
61
- followingCount: number;
62
- isFollowing: boolean;
78
+ supabaseUserId?: string | null;
79
+ weightUnit: WeightUnit;
80
+ createdAt?: IsoDateString;
81
+ updatedAt?: IsoDateString;
82
+ }
83
+ interface SupabaseAuthResponse {
84
+ user: SupabaseAuthUser;
85
+ message?: string;
86
+ requiresEmailVerification?: boolean;
87
+ }
88
+ interface SupabaseMigrationResponse {
89
+ message: string;
90
+ userId: string;
91
+ email: string;
92
+ }
93
+
94
+ interface Exercise {
95
+ id: string;
96
+ name: string;
97
+ primaryMuscles: MuscleGroup[];
98
+ secondaryMuscles: MuscleGroup[];
99
+ equipment: string;
63
100
  createdAt: IsoDateString;
101
+ updatedAt: IsoDateString;
102
+ }
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';
64
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
+
65
165
  interface RoutineSet {
66
166
  setNumber: number;
67
167
  repType: RepType;
@@ -143,6 +243,8 @@ interface CreateRoutineRequest {
143
243
  programStyle?: ProgramStyle;
144
244
  days: CreateRoutineDayInput[];
145
245
  }
246
+ type UpdateRoutineRequest = Partial<CreateRoutineRequest>;
247
+
146
248
  interface SetLog {
147
249
  id: string;
148
250
  sessionId: string;
@@ -262,10 +364,6 @@ interface WorkoutSessionSummary {
262
364
  dayName?: string | null;
263
365
  };
264
366
  }
265
- interface PaginatedResponse<T> {
266
- items: T[];
267
- nextCursor?: string;
268
- }
269
367
  interface ListSessionsParams {
270
368
  status?: WorkoutSessionStatus;
271
369
  routineId?: string;
@@ -276,66 +374,8 @@ interface ListSessionsParams {
276
374
  limit?: number;
277
375
  sort?: 'finishedAt:desc' | 'finishedAt:asc' | 'startedAt:desc' | 'startedAt:asc';
278
376
  }
279
- type RtfVariant = ProgramStyle;
280
- interface RtfExerciseGoal {
281
- routineExerciseId: string;
282
- exerciseId: string;
283
- exerciseName: string;
284
- variant: RtfVariant;
285
- week: number;
286
- isDeload: boolean;
287
- intensity: number;
288
- fixedReps: number;
289
- setsPlanned: number;
290
- amrapTarget: number | null;
291
- amrapSetNumber: number | null;
292
- workingWeightKg?: number;
293
- trainingMaxKg?: number;
294
- }
295
- interface RtfWeekGoals {
296
- routineId: string;
297
- week: number;
298
- withDeloads: boolean;
299
- goals: RtfExerciseGoal[];
300
- version: number;
301
- _cache?: 'HIT' | 'MISS';
302
- }
303
- interface RtfTimelineEntry {
304
- week: number;
305
- isDeload: boolean;
306
- startDate: IsoDateString;
307
- endDate: IsoDateString;
308
- }
309
- interface RtfTimeline {
310
- routineId: string;
311
- totalWeeks: number;
312
- withDeloads: boolean;
313
- timeline: RtfTimelineEntry[];
314
- version: number;
315
- _cache?: 'HIT' | 'MISS';
316
- }
317
- interface RtfForecastData {
318
- intensity: number;
319
- fixedReps: number;
320
- amrapTarget: number;
321
- sets: number;
322
- amrapSet: number;
323
- isDeload?: boolean;
324
- }
325
- interface RtfForecastWeek {
326
- week: number;
327
- isDeload: boolean;
328
- standard?: RtfForecastData;
329
- hypertrophy?: RtfForecastData;
330
- }
331
- interface RtfForecast {
332
- routineId: string;
333
- weeks: number;
334
- version: number;
335
- withDeloads: boolean;
336
- forecast: RtfForecastWeek[];
337
- _cache?: 'HIT' | 'MISS';
338
- }
377
+ type WorkoutSessionListResponse = PaginatedResponse<WorkoutSessionSummary>;
378
+
339
379
  interface CreateTmEventRequest {
340
380
  exerciseId: string;
341
381
  weekNumber: number;
@@ -378,4 +418,4 @@ declare const TM_ADJUSTMENT_CONSTANTS: {
378
418
  readonly MAX_REASON_LENGTH: 160;
379
419
  };
380
420
 
381
- export { type Brand, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateTmEventRequest, 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, TM_ADJUSTMENT_CONSTANTS, type TmEventResponse, type TmEventSummary, type UpdateProfileRequest, type UpsertSetLogRequest, type UserId, type UserProfile, type UserSearchResponse, WEIGHT_UNITS, WORKOUT_SESSION_STATUSES, type WeightUnit, type WorkoutSession, type WorkoutSessionId, type WorkoutSessionStatus, type WorkoutSessionSummary };
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 };
package/dist/index.d.ts CHANGED
@@ -10,7 +10,7 @@ declare const REP_TYPES: readonly ["FIXED", "RANGE"];
10
10
  type RepType = (typeof REP_TYPES)[number];
11
11
  declare const PROGRESSION_SCHEMES: readonly ["NONE", "DOUBLE_PROGRESSION", "DYNAMIC_DOUBLE_PROGRESSION", "PROGRAMMED_RTF", "PROGRAMMED_RTF_HYPERTROPHY"];
12
12
  type ProgressionScheme = (typeof PROGRESSION_SCHEMES)[number];
13
- declare const MUSCLE_GROUPS: readonly ["PECTORAL", "LATISSIMUS_DORSI", "DELTOID", "TRAPEZIUS", "BICEPS", "TRICEPS", "FOREARM", "ABDOMINAL", "OBLIQUE", "ERECTOR_SPINAE", "GLUTEUS", "QUADRICEPS", "HAMSTRINGS", "CALVES"];
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];
15
15
  type IsoDateString = string;
16
16
  type Brand<T, B> = T & {
@@ -21,6 +21,11 @@ type RoutineId = Brand<string, 'RoutineId'>;
21
21
  type RoutineDayId = Brand<string, 'RoutineDayId'>;
22
22
  type WorkoutSessionId = Brand<string, 'WorkoutSessionId'>;
23
23
  type ExerciseId = Brand<string, 'ExerciseId'>;
24
+ interface PaginatedResponse<T> {
25
+ items: T[];
26
+ nextCursor?: string;
27
+ }
28
+
24
29
  interface UserProfile {
25
30
  id: string;
26
31
  email: string;
@@ -32,8 +37,21 @@ interface UserProfile {
32
37
  weight?: number | null;
33
38
  height?: number | null;
34
39
  weightUnit: WeightUnit;
40
+ followerCount: number;
41
+ followingCount: number;
42
+ createdAt: IsoDateString;
43
+ updatedAt: IsoDateString;
44
+ }
45
+ interface PublicUserProfile {
46
+ id: string;
47
+ name: string;
48
+ lastName?: string | null;
49
+ avatarUrl?: string | null;
35
50
  createdAt: IsoDateString;
36
51
  updatedAt: IsoDateString;
52
+ followerCount: number;
53
+ followingCount: number;
54
+ isFollowedByMe: boolean;
37
55
  }
38
56
  interface UpdateProfileRequest {
39
57
  name?: string;
@@ -52,16 +70,98 @@ interface UserSearchResponse {
52
70
  lastName?: string | null;
53
71
  avatarUrl?: string | null;
54
72
  }
55
- interface PublicUserProfile {
73
+
74
+ interface SupabaseAuthUser {
56
75
  id: string;
76
+ email: string;
57
77
  name: string;
58
- lastName?: string | null;
59
- avatarUrl?: string | null;
60
- followersCount: number;
61
- followingCount: number;
62
- isFollowing: boolean;
78
+ supabaseUserId?: string | null;
79
+ weightUnit: WeightUnit;
80
+ createdAt?: IsoDateString;
81
+ updatedAt?: IsoDateString;
82
+ }
83
+ interface SupabaseAuthResponse {
84
+ user: SupabaseAuthUser;
85
+ message?: string;
86
+ requiresEmailVerification?: boolean;
87
+ }
88
+ interface SupabaseMigrationResponse {
89
+ message: string;
90
+ userId: string;
91
+ email: string;
92
+ }
93
+
94
+ interface Exercise {
95
+ id: string;
96
+ name: string;
97
+ primaryMuscles: MuscleGroup[];
98
+ secondaryMuscles: MuscleGroup[];
99
+ equipment: string;
63
100
  createdAt: IsoDateString;
101
+ updatedAt: IsoDateString;
102
+ }
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';
64
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
+
65
165
  interface RoutineSet {
66
166
  setNumber: number;
67
167
  repType: RepType;
@@ -143,6 +243,8 @@ interface CreateRoutineRequest {
143
243
  programStyle?: ProgramStyle;
144
244
  days: CreateRoutineDayInput[];
145
245
  }
246
+ type UpdateRoutineRequest = Partial<CreateRoutineRequest>;
247
+
146
248
  interface SetLog {
147
249
  id: string;
148
250
  sessionId: string;
@@ -262,10 +364,6 @@ interface WorkoutSessionSummary {
262
364
  dayName?: string | null;
263
365
  };
264
366
  }
265
- interface PaginatedResponse<T> {
266
- items: T[];
267
- nextCursor?: string;
268
- }
269
367
  interface ListSessionsParams {
270
368
  status?: WorkoutSessionStatus;
271
369
  routineId?: string;
@@ -276,66 +374,8 @@ interface ListSessionsParams {
276
374
  limit?: number;
277
375
  sort?: 'finishedAt:desc' | 'finishedAt:asc' | 'startedAt:desc' | 'startedAt:asc';
278
376
  }
279
- type RtfVariant = ProgramStyle;
280
- interface RtfExerciseGoal {
281
- routineExerciseId: string;
282
- exerciseId: string;
283
- exerciseName: string;
284
- variant: RtfVariant;
285
- week: number;
286
- isDeload: boolean;
287
- intensity: number;
288
- fixedReps: number;
289
- setsPlanned: number;
290
- amrapTarget: number | null;
291
- amrapSetNumber: number | null;
292
- workingWeightKg?: number;
293
- trainingMaxKg?: number;
294
- }
295
- interface RtfWeekGoals {
296
- routineId: string;
297
- week: number;
298
- withDeloads: boolean;
299
- goals: RtfExerciseGoal[];
300
- version: number;
301
- _cache?: 'HIT' | 'MISS';
302
- }
303
- interface RtfTimelineEntry {
304
- week: number;
305
- isDeload: boolean;
306
- startDate: IsoDateString;
307
- endDate: IsoDateString;
308
- }
309
- interface RtfTimeline {
310
- routineId: string;
311
- totalWeeks: number;
312
- withDeloads: boolean;
313
- timeline: RtfTimelineEntry[];
314
- version: number;
315
- _cache?: 'HIT' | 'MISS';
316
- }
317
- interface RtfForecastData {
318
- intensity: number;
319
- fixedReps: number;
320
- amrapTarget: number;
321
- sets: number;
322
- amrapSet: number;
323
- isDeload?: boolean;
324
- }
325
- interface RtfForecastWeek {
326
- week: number;
327
- isDeload: boolean;
328
- standard?: RtfForecastData;
329
- hypertrophy?: RtfForecastData;
330
- }
331
- interface RtfForecast {
332
- routineId: string;
333
- weeks: number;
334
- version: number;
335
- withDeloads: boolean;
336
- forecast: RtfForecastWeek[];
337
- _cache?: 'HIT' | 'MISS';
338
- }
377
+ type WorkoutSessionListResponse = PaginatedResponse<WorkoutSessionSummary>;
378
+
339
379
  interface CreateTmEventRequest {
340
380
  exerciseId: string;
341
381
  weekNumber: number;
@@ -378,4 +418,4 @@ declare const TM_ADJUSTMENT_CONSTANTS: {
378
418
  readonly MAX_REASON_LENGTH: 160;
379
419
  };
380
420
 
381
- export { type Brand, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type CreateTmEventRequest, 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, TM_ADJUSTMENT_CONSTANTS, type TmEventResponse, type TmEventSummary, type UpdateProfileRequest, type UpsertSetLogRequest, type UserId, type UserProfile, type UserSearchResponse, WEIGHT_UNITS, WORKOUT_SESSION_STATUSES, type WeightUnit, type WorkoutSession, type WorkoutSessionId, type WorkoutSessionStatus, type WorkoutSessionSummary };
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 };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // src/index.ts
1
+ // src/shared.ts
2
2
  var PROGRAM_STYLES = ["STANDARD", "HYPERTROPHY"];
3
3
  var WORKOUT_SESSION_STATUSES = [
4
4
  "IN_PROGRESS",
@@ -18,19 +18,24 @@ var PROGRESSION_SCHEMES = [
18
18
  var MUSCLE_GROUPS = [
19
19
  "PECTORAL",
20
20
  "LATISSIMUS_DORSI",
21
- "DELTOID",
22
21
  "TRAPEZIUS",
22
+ "REAR_DELTOIDS",
23
+ "ERECTOR_SPINAE",
24
+ "TERES_MAJOR_MINOR",
25
+ "ANTERIOR_DELTOIDS",
26
+ "MEDIAL_DELTOIDS",
23
27
  "BICEPS",
24
28
  "TRICEPS",
25
- "FOREARM",
26
- "ABDOMINAL",
27
- "OBLIQUE",
28
- "ERECTOR_SPINAE",
29
- "GLUTEUS",
29
+ "FOREARMS",
30
30
  "QUADRICEPS",
31
31
  "HAMSTRINGS",
32
- "CALVES"
32
+ "GLUTES",
33
+ "CALVES",
34
+ "CORE",
35
+ "ADDUCTOR"
33
36
  ];
37
+
38
+ // src/tm.ts
34
39
  var TM_ADJUSTMENT_CONSTANTS = {
35
40
  MAX_DELTA_KG: 15,
36
41
  MIN_DELTA_KG: -15,
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "@sunsteel/contracts",
3
- "version": "0.2.5",
3
+ "version": "0.3.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com//sunsteel-contracts.git"
7
7
  },
8
8
  "private": false,
9
+ "engines": {
10
+ "node": ">=20.11"
11
+ },
9
12
  "type": "module",
10
13
  "sideEffects": false,
11
14
  "main": "./dist/index.cjs",
@@ -24,10 +27,14 @@
24
27
  "scripts": {
25
28
  "build": "tsup src/index.ts --format esm,cjs --dts --clean",
26
29
  "dev": "tsup src/index.ts --format esm,cjs --dts --watch",
30
+ "typecheck": "tsc --noEmit",
31
+ "lint": "npm run typecheck",
32
+ "verify": "npm run typecheck && npm run build",
33
+ "verify:security": "npm audit",
27
34
  "prepublishOnly": "npm run build"
28
35
  },
29
36
  "devDependencies": {
30
37
  "tsup": "^8.3.5",
31
38
  "typescript": "^5.7.3"
32
39
  }
33
- }
40
+ }