@sunsteel/contracts 0.6.0 → 0.8.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.d.cts +70 -1
- package/dist/index.d.ts +70 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -25,6 +25,7 @@ interface PaginatedResponse<T> {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
interface UserProfile {
|
|
28
|
+
timeZone?: string | null;
|
|
28
29
|
id: string;
|
|
29
30
|
email: string;
|
|
30
31
|
name: string;
|
|
@@ -226,6 +227,20 @@ interface WorkoutSession {
|
|
|
226
227
|
}>;
|
|
227
228
|
};
|
|
228
229
|
}
|
|
230
|
+
/** Completed set from the latest earlier execution of the same routine day. */
|
|
231
|
+
interface PreviousSetPerformance {
|
|
232
|
+
exerciseId: string;
|
|
233
|
+
setNumber: number;
|
|
234
|
+
reps: number;
|
|
235
|
+
weight?: number | null;
|
|
236
|
+
rpe?: number | null;
|
|
237
|
+
}
|
|
238
|
+
/** Stable successful response of GET /workouts/sessions/:id/previous-performance. */
|
|
239
|
+
interface PreviousPerformanceResponse {
|
|
240
|
+
sessionId: string;
|
|
241
|
+
endedAt: IsoDateString;
|
|
242
|
+
sets: PreviousSetPerformance[];
|
|
243
|
+
}
|
|
229
244
|
interface StartWorkoutRequest {
|
|
230
245
|
routineId: string;
|
|
231
246
|
routineDayId: string;
|
|
@@ -293,4 +308,58 @@ interface WorkoutStatsResponse {
|
|
|
293
308
|
activeDaysThisWeek: number;
|
|
294
309
|
}
|
|
295
310
|
|
|
296
|
-
|
|
311
|
+
/** Stable successful response of GET /workouts/progress. */
|
|
312
|
+
interface WorkoutProgressQuery {
|
|
313
|
+
timeZone: string;
|
|
314
|
+
}
|
|
315
|
+
interface PersonalRecordEntry {
|
|
316
|
+
exerciseId: string;
|
|
317
|
+
exerciseName: string;
|
|
318
|
+
weight: number;
|
|
319
|
+
reps: number;
|
|
320
|
+
estimated1rm: number;
|
|
321
|
+
achievedAt: string;
|
|
322
|
+
}
|
|
323
|
+
interface RecentActivityEntry {
|
|
324
|
+
sessionId: string;
|
|
325
|
+
routineId: string;
|
|
326
|
+
routineName: string;
|
|
327
|
+
dayName: string;
|
|
328
|
+
startedAt: string;
|
|
329
|
+
endedAt: string | null;
|
|
330
|
+
durationSec: number | null;
|
|
331
|
+
totalVolumeKg: number;
|
|
332
|
+
completedSets: number;
|
|
333
|
+
}
|
|
334
|
+
interface WorkoutProgressResponse {
|
|
335
|
+
totalVolumeKg: number;
|
|
336
|
+
currentStreakDays: number;
|
|
337
|
+
bestStreakDays: number;
|
|
338
|
+
personalRecords: PersonalRecordEntry[];
|
|
339
|
+
recentActivity: RecentActivityEntry[];
|
|
340
|
+
}
|
|
341
|
+
/** Immutable prescription captured before any sets or progression. */
|
|
342
|
+
interface WorkoutSessionSnapshotV1 {
|
|
343
|
+
schemaVersion: 1;
|
|
344
|
+
sessionId: string;
|
|
345
|
+
sourceRoutineId: string;
|
|
346
|
+
sourceRoutineDayId: string;
|
|
347
|
+
capturedAt: string;
|
|
348
|
+
provenance: 'CAPTURED' | 'APPROXIMATED';
|
|
349
|
+
notes: string | null;
|
|
350
|
+
routine: NonNullable<WorkoutSession['routine']>;
|
|
351
|
+
routineDay: NonNullable<WorkoutSession['routineDay']>;
|
|
352
|
+
}
|
|
353
|
+
interface SetAccountTimeZoneRequest {
|
|
354
|
+
timeZone: string;
|
|
355
|
+
/** Bootstrap must not replace a zone registered by another device. */
|
|
356
|
+
onlyIfUnset?: boolean;
|
|
357
|
+
}
|
|
358
|
+
interface WorkoutAnalyticsStatus {
|
|
359
|
+
timeZone: string | null;
|
|
360
|
+
requestedTimeZone: string | null;
|
|
361
|
+
state: 'UNINITIALIZED' | 'BUILDING' | 'READY' | 'FAILED';
|
|
362
|
+
generationId: string | null;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
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, PROGRESSION_SCHEMES, type PaginatedResponse, type PersonalRecordEntry, type PreviousPerformanceResponse, type PreviousSetPerformance, type ProgressionScheme, type PublicUserProfile, REP_TYPES, type RecentActivityEntry, type RepType, type Routine, type RoutineDay, type RoutineDayId, type RoutineExercise, type RoutineId, type RoutineSet, SEXES, type SetAccountTimeZoneRequest, 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 WorkoutAnalyticsStatus, type WorkoutProgressQuery, type WorkoutProgressResponse, type WorkoutSession, type WorkoutSessionId, type WorkoutSessionListResponse, type WorkoutSessionSnapshotV1, type WorkoutSessionStatus, type WorkoutSessionSummary, type WorkoutStatsQuery, type WorkoutStatsResponse };
|
package/dist/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ interface PaginatedResponse<T> {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
interface UserProfile {
|
|
28
|
+
timeZone?: string | null;
|
|
28
29
|
id: string;
|
|
29
30
|
email: string;
|
|
30
31
|
name: string;
|
|
@@ -226,6 +227,20 @@ interface WorkoutSession {
|
|
|
226
227
|
}>;
|
|
227
228
|
};
|
|
228
229
|
}
|
|
230
|
+
/** Completed set from the latest earlier execution of the same routine day. */
|
|
231
|
+
interface PreviousSetPerformance {
|
|
232
|
+
exerciseId: string;
|
|
233
|
+
setNumber: number;
|
|
234
|
+
reps: number;
|
|
235
|
+
weight?: number | null;
|
|
236
|
+
rpe?: number | null;
|
|
237
|
+
}
|
|
238
|
+
/** Stable successful response of GET /workouts/sessions/:id/previous-performance. */
|
|
239
|
+
interface PreviousPerformanceResponse {
|
|
240
|
+
sessionId: string;
|
|
241
|
+
endedAt: IsoDateString;
|
|
242
|
+
sets: PreviousSetPerformance[];
|
|
243
|
+
}
|
|
229
244
|
interface StartWorkoutRequest {
|
|
230
245
|
routineId: string;
|
|
231
246
|
routineDayId: string;
|
|
@@ -293,4 +308,58 @@ interface WorkoutStatsResponse {
|
|
|
293
308
|
activeDaysThisWeek: number;
|
|
294
309
|
}
|
|
295
310
|
|
|
296
|
-
|
|
311
|
+
/** Stable successful response of GET /workouts/progress. */
|
|
312
|
+
interface WorkoutProgressQuery {
|
|
313
|
+
timeZone: string;
|
|
314
|
+
}
|
|
315
|
+
interface PersonalRecordEntry {
|
|
316
|
+
exerciseId: string;
|
|
317
|
+
exerciseName: string;
|
|
318
|
+
weight: number;
|
|
319
|
+
reps: number;
|
|
320
|
+
estimated1rm: number;
|
|
321
|
+
achievedAt: string;
|
|
322
|
+
}
|
|
323
|
+
interface RecentActivityEntry {
|
|
324
|
+
sessionId: string;
|
|
325
|
+
routineId: string;
|
|
326
|
+
routineName: string;
|
|
327
|
+
dayName: string;
|
|
328
|
+
startedAt: string;
|
|
329
|
+
endedAt: string | null;
|
|
330
|
+
durationSec: number | null;
|
|
331
|
+
totalVolumeKg: number;
|
|
332
|
+
completedSets: number;
|
|
333
|
+
}
|
|
334
|
+
interface WorkoutProgressResponse {
|
|
335
|
+
totalVolumeKg: number;
|
|
336
|
+
currentStreakDays: number;
|
|
337
|
+
bestStreakDays: number;
|
|
338
|
+
personalRecords: PersonalRecordEntry[];
|
|
339
|
+
recentActivity: RecentActivityEntry[];
|
|
340
|
+
}
|
|
341
|
+
/** Immutable prescription captured before any sets or progression. */
|
|
342
|
+
interface WorkoutSessionSnapshotV1 {
|
|
343
|
+
schemaVersion: 1;
|
|
344
|
+
sessionId: string;
|
|
345
|
+
sourceRoutineId: string;
|
|
346
|
+
sourceRoutineDayId: string;
|
|
347
|
+
capturedAt: string;
|
|
348
|
+
provenance: 'CAPTURED' | 'APPROXIMATED';
|
|
349
|
+
notes: string | null;
|
|
350
|
+
routine: NonNullable<WorkoutSession['routine']>;
|
|
351
|
+
routineDay: NonNullable<WorkoutSession['routineDay']>;
|
|
352
|
+
}
|
|
353
|
+
interface SetAccountTimeZoneRequest {
|
|
354
|
+
timeZone: string;
|
|
355
|
+
/** Bootstrap must not replace a zone registered by another device. */
|
|
356
|
+
onlyIfUnset?: boolean;
|
|
357
|
+
}
|
|
358
|
+
interface WorkoutAnalyticsStatus {
|
|
359
|
+
timeZone: string | null;
|
|
360
|
+
requestedTimeZone: string | null;
|
|
361
|
+
state: 'UNINITIALIZED' | 'BUILDING' | 'READY' | 'FAILED';
|
|
362
|
+
generationId: string | null;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
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, PROGRESSION_SCHEMES, type PaginatedResponse, type PersonalRecordEntry, type PreviousPerformanceResponse, type PreviousSetPerformance, type ProgressionScheme, type PublicUserProfile, REP_TYPES, type RecentActivityEntry, type RepType, type Routine, type RoutineDay, type RoutineDayId, type RoutineExercise, type RoutineId, type RoutineSet, SEXES, type SetAccountTimeZoneRequest, 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 WorkoutAnalyticsStatus, type WorkoutProgressQuery, type WorkoutProgressResponse, type WorkoutSession, type WorkoutSessionId, type WorkoutSessionListResponse, type WorkoutSessionSnapshotV1, type WorkoutSessionStatus, type WorkoutSessionSummary, type WorkoutStatsQuery, type WorkoutStatsResponse };
|