@sunsteel/contracts 0.15.0 → 0.16.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 +47 -0
- package/dist/index.d.cts +33 -2
- package/dist/index.d.ts +33 -2
- package/dist/index.js +40 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -21,14 +21,21 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
MUSCLE_GROUPS: () => MUSCLE_GROUPS,
|
|
24
|
+
PREFERRED_TRAINING_STYLE_VALUES: () => PREFERRED_TRAINING_STYLE_VALUES,
|
|
24
25
|
PROFILE_BIO_MAX_LENGTH: () => PROFILE_BIO_MAX_LENGTH,
|
|
26
|
+
PROFILE_FAVORITE_EXERCISES_MAX: () => PROFILE_FAVORITE_EXERCISES_MAX,
|
|
25
27
|
PROFILE_LOCATION_MAX_LENGTH: () => PROFILE_LOCATION_MAX_LENGTH,
|
|
28
|
+
PROFILE_TRAINING_DISCIPLINES_MAX: () => PROFILE_TRAINING_DISCIPLINES_MAX,
|
|
29
|
+
PROFILE_TRAINING_GOALS_MAX: () => PROFILE_TRAINING_GOALS_MAX,
|
|
26
30
|
PROFILE_VISIBILITY_VALUES: () => PROFILE_VISIBILITY_VALUES,
|
|
27
31
|
PROGRESSION_SCHEMES: () => PROGRESSION_SCHEMES,
|
|
28
32
|
REP_TYPES: () => REP_TYPES,
|
|
29
33
|
RESERVED_USERNAMES: () => RESERVED_USERNAMES,
|
|
30
34
|
SEXES: () => SEXES,
|
|
35
|
+
TRAINING_DISCIPLINE_VALUES: () => TRAINING_DISCIPLINE_VALUES,
|
|
31
36
|
TRAINING_EVENT_TYPES: () => TRAINING_EVENT_TYPES,
|
|
37
|
+
TRAINING_EXPERIENCE_LEVEL_VALUES: () => TRAINING_EXPERIENCE_LEVEL_VALUES,
|
|
38
|
+
TRAINING_GOAL_VALUES: () => TRAINING_GOAL_VALUES,
|
|
32
39
|
USERNAME_MAX_LENGTH: () => USERNAME_MAX_LENGTH,
|
|
33
40
|
USERNAME_MIN_LENGTH: () => USERNAME_MIN_LENGTH,
|
|
34
41
|
USERNAME_PATTERN_SOURCE: () => USERNAME_PATTERN_SOURCE,
|
|
@@ -77,6 +84,9 @@ var USERNAME_MAX_LENGTH = 30;
|
|
|
77
84
|
var USERNAME_PATTERN_SOURCE = "^[a-z0-9][a-z0-9_-]{1,28}[a-z0-9]$";
|
|
78
85
|
var PROFILE_BIO_MAX_LENGTH = 500;
|
|
79
86
|
var PROFILE_LOCATION_MAX_LENGTH = 100;
|
|
87
|
+
var PROFILE_TRAINING_GOALS_MAX = 3;
|
|
88
|
+
var PROFILE_TRAINING_DISCIPLINES_MAX = 3;
|
|
89
|
+
var PROFILE_FAVORITE_EXERCISES_MAX = 5;
|
|
80
90
|
var RESERVED_USERNAMES = [
|
|
81
91
|
"achievements",
|
|
82
92
|
"admin",
|
|
@@ -114,6 +124,36 @@ var PROFILE_VISIBILITY_VALUES = [
|
|
|
114
124
|
"FOLLOWERS",
|
|
115
125
|
"PRIVATE"
|
|
116
126
|
];
|
|
127
|
+
var TRAINING_GOAL_VALUES = [
|
|
128
|
+
"STRENGTH",
|
|
129
|
+
"MUSCLE_GROWTH",
|
|
130
|
+
"FAT_LOSS",
|
|
131
|
+
"ENDURANCE",
|
|
132
|
+
"GENERAL_FITNESS",
|
|
133
|
+
"ATHLETIC_PERFORMANCE",
|
|
134
|
+
"MOBILITY"
|
|
135
|
+
];
|
|
136
|
+
var TRAINING_EXPERIENCE_LEVEL_VALUES = [
|
|
137
|
+
"BEGINNER",
|
|
138
|
+
"INTERMEDIATE",
|
|
139
|
+
"ADVANCED"
|
|
140
|
+
];
|
|
141
|
+
var TRAINING_DISCIPLINE_VALUES = [
|
|
142
|
+
"BODYBUILDING",
|
|
143
|
+
"POWERLIFTING",
|
|
144
|
+
"WEIGHTLIFTING",
|
|
145
|
+
"CALISTHENICS",
|
|
146
|
+
"STRONGMAN",
|
|
147
|
+
"HYBRID_TRAINING",
|
|
148
|
+
"GENERAL_STRENGTH"
|
|
149
|
+
];
|
|
150
|
+
var PREFERRED_TRAINING_STYLE_VALUES = [
|
|
151
|
+
"FULL_BODY",
|
|
152
|
+
"UPPER_LOWER",
|
|
153
|
+
"PUSH_PULL_LEGS",
|
|
154
|
+
"BODY_PART_SPLIT",
|
|
155
|
+
"CIRCUIT"
|
|
156
|
+
];
|
|
117
157
|
|
|
118
158
|
// src/analytics.ts
|
|
119
159
|
var TRAINING_EVENT_TYPES = [
|
|
@@ -124,14 +164,21 @@ var TRAINING_EVENT_TYPES = [
|
|
|
124
164
|
// Annotate the CommonJS export names for ESM import in node:
|
|
125
165
|
0 && (module.exports = {
|
|
126
166
|
MUSCLE_GROUPS,
|
|
167
|
+
PREFERRED_TRAINING_STYLE_VALUES,
|
|
127
168
|
PROFILE_BIO_MAX_LENGTH,
|
|
169
|
+
PROFILE_FAVORITE_EXERCISES_MAX,
|
|
128
170
|
PROFILE_LOCATION_MAX_LENGTH,
|
|
171
|
+
PROFILE_TRAINING_DISCIPLINES_MAX,
|
|
172
|
+
PROFILE_TRAINING_GOALS_MAX,
|
|
129
173
|
PROFILE_VISIBILITY_VALUES,
|
|
130
174
|
PROGRESSION_SCHEMES,
|
|
131
175
|
REP_TYPES,
|
|
132
176
|
RESERVED_USERNAMES,
|
|
133
177
|
SEXES,
|
|
178
|
+
TRAINING_DISCIPLINE_VALUES,
|
|
134
179
|
TRAINING_EVENT_TYPES,
|
|
180
|
+
TRAINING_EXPERIENCE_LEVEL_VALUES,
|
|
181
|
+
TRAINING_GOAL_VALUES,
|
|
135
182
|
USERNAME_MAX_LENGTH,
|
|
136
183
|
USERNAME_MIN_LENGTH,
|
|
137
184
|
USERNAME_PATTERN_SOURCE,
|
package/dist/index.d.cts
CHANGED
|
@@ -301,12 +301,35 @@ declare const USERNAME_MAX_LENGTH = 30;
|
|
|
301
301
|
declare const USERNAME_PATTERN_SOURCE = "^[a-z0-9][a-z0-9_-]{1,28}[a-z0-9]$";
|
|
302
302
|
declare const PROFILE_BIO_MAX_LENGTH = 500;
|
|
303
303
|
declare const PROFILE_LOCATION_MAX_LENGTH = 100;
|
|
304
|
+
declare const PROFILE_TRAINING_GOALS_MAX = 3;
|
|
305
|
+
declare const PROFILE_TRAINING_DISCIPLINES_MAX = 3;
|
|
306
|
+
declare const PROFILE_FAVORITE_EXERCISES_MAX = 5;
|
|
304
307
|
declare const RESERVED_USERNAMES: readonly ["achievements", "admin", "api", "auth", "dashboard", "edit", "exercises", "help", "login", "logout", "me", "new", "notifications", "privacy", "profile", "profiles", "progress", "register", "routines", "schedule", "search", "settings", "signup", "sunnsteel", "sunsteel", "support", "system", "terms", "users", "workouts"];
|
|
305
308
|
declare const PROFILE_VISIBILITY_VALUES: readonly ["PUBLIC", "FOLLOWERS", "PRIVATE"];
|
|
306
309
|
type ProfileVisibility = (typeof PROFILE_VISIBILITY_VALUES)[number];
|
|
310
|
+
declare const TRAINING_GOAL_VALUES: readonly ["STRENGTH", "MUSCLE_GROWTH", "FAT_LOSS", "ENDURANCE", "GENERAL_FITNESS", "ATHLETIC_PERFORMANCE", "MOBILITY"];
|
|
311
|
+
type TrainingGoal = (typeof TRAINING_GOAL_VALUES)[number];
|
|
312
|
+
declare const TRAINING_EXPERIENCE_LEVEL_VALUES: readonly ["BEGINNER", "INTERMEDIATE", "ADVANCED"];
|
|
313
|
+
type TrainingExperienceLevel = (typeof TRAINING_EXPERIENCE_LEVEL_VALUES)[number];
|
|
314
|
+
declare const TRAINING_DISCIPLINE_VALUES: readonly ["BODYBUILDING", "POWERLIFTING", "WEIGHTLIFTING", "CALISTHENICS", "STRONGMAN", "HYBRID_TRAINING", "GENERAL_STRENGTH"];
|
|
315
|
+
type TrainingDiscipline = (typeof TRAINING_DISCIPLINE_VALUES)[number];
|
|
316
|
+
declare const PREFERRED_TRAINING_STYLE_VALUES: readonly ["FULL_BODY", "UPPER_LOWER", "PUSH_PULL_LEGS", "BODY_PART_SPLIT", "CIRCUIT"];
|
|
317
|
+
type PreferredTrainingStyle = (typeof PREFERRED_TRAINING_STYLE_VALUES)[number];
|
|
318
|
+
interface ProfileFavoriteExercise {
|
|
319
|
+
id: string;
|
|
320
|
+
name: string;
|
|
321
|
+
}
|
|
322
|
+
interface TrainingIdentity {
|
|
323
|
+
goals: TrainingGoal[];
|
|
324
|
+
experienceLevel: TrainingExperienceLevel | null;
|
|
325
|
+
disciplines: TrainingDiscipline[];
|
|
326
|
+
preferredStyle: PreferredTrainingStyle | null;
|
|
327
|
+
favoriteExercises: ProfileFavoriteExercise[];
|
|
328
|
+
}
|
|
307
329
|
interface ProfilePrivacySettings {
|
|
308
330
|
biography: ProfileVisibility;
|
|
309
331
|
location: ProfileVisibility;
|
|
332
|
+
trainingIdentity: ProfileVisibility;
|
|
310
333
|
workoutHistory: ProfileVisibility;
|
|
311
334
|
records: ProfileVisibility;
|
|
312
335
|
routines: ProfileVisibility;
|
|
@@ -316,6 +339,7 @@ interface ProfilePrivacySettings {
|
|
|
316
339
|
interface ProfileViewerAccess {
|
|
317
340
|
biography: boolean;
|
|
318
341
|
location: boolean;
|
|
342
|
+
trainingIdentity: boolean;
|
|
319
343
|
workoutHistory: boolean;
|
|
320
344
|
records: boolean;
|
|
321
345
|
routines: boolean;
|
|
@@ -344,6 +368,7 @@ interface UserProfile {
|
|
|
344
368
|
avatarUrl?: string | null;
|
|
345
369
|
bio?: string | null;
|
|
346
370
|
location?: string | null;
|
|
371
|
+
trainingIdentity: TrainingIdentity;
|
|
347
372
|
age?: number | null;
|
|
348
373
|
sex?: Sex | null;
|
|
349
374
|
weight?: number | null;
|
|
@@ -363,6 +388,7 @@ interface PublicUserProfile {
|
|
|
363
388
|
avatarUrl?: string | null;
|
|
364
389
|
bio?: string | null;
|
|
365
390
|
location?: string | null;
|
|
391
|
+
trainingIdentity?: TrainingIdentity;
|
|
366
392
|
createdAt: IsoDateString;
|
|
367
393
|
updatedAt: IsoDateString;
|
|
368
394
|
followerCount: number;
|
|
@@ -380,13 +406,18 @@ interface UpdateProfileRequest {
|
|
|
380
406
|
avatarUrl?: string | null;
|
|
381
407
|
bio?: string | null;
|
|
382
408
|
location?: string | null;
|
|
409
|
+
trainingGoals?: TrainingGoal[];
|
|
410
|
+
trainingExperienceLevel?: TrainingExperienceLevel | null;
|
|
411
|
+
trainingDisciplines?: TrainingDiscipline[];
|
|
412
|
+
preferredTrainingStyle?: PreferredTrainingStyle | null;
|
|
413
|
+
favoriteExerciseIds?: string[];
|
|
383
414
|
age?: number | null;
|
|
384
415
|
sex?: Sex | null;
|
|
385
416
|
weight?: number | null;
|
|
386
417
|
height?: number | null;
|
|
387
418
|
weightUnit?: WeightUnit;
|
|
388
419
|
}
|
|
389
|
-
type UpdateProfilePrivacyRequest = Omit<ProfilePrivacySettings, 'biography' | 'location'> & Partial<Pick<ProfilePrivacySettings, 'biography' | 'location'>>;
|
|
420
|
+
type UpdateProfilePrivacyRequest = Omit<ProfilePrivacySettings, 'biography' | 'location' | 'trainingIdentity'> & Partial<Pick<ProfilePrivacySettings, 'biography' | 'location' | 'trainingIdentity'>>;
|
|
390
421
|
interface PlatePairInventory {
|
|
391
422
|
weightKg: number;
|
|
392
423
|
pairCount: number;
|
|
@@ -514,4 +545,4 @@ interface CreateRoutineRequest {
|
|
|
514
545
|
}
|
|
515
546
|
type UpdateRoutineRequest = Partial<CreateRoutineRequest>;
|
|
516
547
|
|
|
517
|
-
export { type Brand, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type EarnedPersonalRecord, type Exercise, type ExerciseId, type FinishStatus, type FinishWorkoutRequest, type FinishWorkoutResponse, type IsoDateString, type ListSessionsParams, MUSCLE_GROUPS, type MuscleGroup, PROFILE_BIO_MAX_LENGTH, PROFILE_LOCATION_MAX_LENGTH, PROFILE_VISIBILITY_VALUES, PROGRESSION_SCHEMES, type PaginatedResponse, type PersonalRecordEntry, type PersonalRecordKind, type PlatePairInventory, type PreviousPerformanceResponse, type PreviousSessionRecap, type PreviousSetPerformance, type ProfilePrivacySettings, type ProfileViewerAccess, type ProfileVisibility, type ProgressionChange, type ProgressionRule, type ProgressionScheme, type ProgressionSetChange, type PublicBodyMetrics, type PublicTrainingSummary, type PublicUserProfile, REP_TYPES, RESERVED_USERNAMES, type RecentActivityEntry, type RepType, type ReplaceTrainingLocationsRequest, type Routine, type RoutineDay, type RoutineDayId, type RoutineExercise, type RoutineId, type RoutineSet, SEXES, type SessionRecapRecord, type SetAccountTimeZoneRequest, type SetLog, type Sex, type StartWorkoutRequest, type StartWorkoutResponse, type SupabaseAuthResponse, type SupabaseAuthUser, type SupabaseMigrationResponse, TRAINING_EVENT_TYPES, type TrainingEventType, type TrainingLocationPreference, type TrainingLocationPreferenceInput, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, USERNAME_PATTERN_SOURCE, type UpdateProfilePrivacyRequest, type UpdateProfileRequest, type UpdateRoutineRequest, type UpsertSetLogRequest, type UpsertSetLogResponse, 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 WorkoutSessionRecap, type WorkoutSessionSnapshotV1, type WorkoutSessionStatus, type WorkoutSessionSummary, type WorkoutStatsQuery, type WorkoutStatsResponse };
|
|
548
|
+
export { type Brand, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type EarnedPersonalRecord, type Exercise, type ExerciseId, type FinishStatus, type FinishWorkoutRequest, type FinishWorkoutResponse, type IsoDateString, type ListSessionsParams, MUSCLE_GROUPS, type MuscleGroup, 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, type PaginatedResponse, type PersonalRecordEntry, type PersonalRecordKind, type PlatePairInventory, type PreferredTrainingStyle, type PreviousPerformanceResponse, type PreviousSessionRecap, type PreviousSetPerformance, type ProfileFavoriteExercise, type ProfilePrivacySettings, type ProfileViewerAccess, type ProfileVisibility, type ProgressionChange, type ProgressionRule, type ProgressionScheme, type ProgressionSetChange, type PublicBodyMetrics, type PublicTrainingSummary, type PublicUserProfile, REP_TYPES, RESERVED_USERNAMES, type RecentActivityEntry, type RepType, type ReplaceTrainingLocationsRequest, type Routine, type RoutineDay, type RoutineDayId, type RoutineExercise, type RoutineId, type RoutineSet, SEXES, type SessionRecapRecord, type SetAccountTimeZoneRequest, type SetLog, type Sex, type StartWorkoutRequest, type StartWorkoutResponse, type SupabaseAuthResponse, type SupabaseAuthUser, type SupabaseMigrationResponse, TRAINING_DISCIPLINE_VALUES, TRAINING_EVENT_TYPES, TRAINING_EXPERIENCE_LEVEL_VALUES, TRAINING_GOAL_VALUES, type TrainingDiscipline, type TrainingEventType, type TrainingExperienceLevel, type TrainingGoal, type TrainingIdentity, type TrainingLocationPreference, type TrainingLocationPreferenceInput, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, USERNAME_PATTERN_SOURCE, type UpdateProfilePrivacyRequest, type UpdateProfileRequest, type UpdateRoutineRequest, type UpsertSetLogRequest, type UpsertSetLogResponse, 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 WorkoutSessionRecap, type WorkoutSessionSnapshotV1, type WorkoutSessionStatus, type WorkoutSessionSummary, type WorkoutStatsQuery, type WorkoutStatsResponse };
|
package/dist/index.d.ts
CHANGED
|
@@ -301,12 +301,35 @@ declare const USERNAME_MAX_LENGTH = 30;
|
|
|
301
301
|
declare const USERNAME_PATTERN_SOURCE = "^[a-z0-9][a-z0-9_-]{1,28}[a-z0-9]$";
|
|
302
302
|
declare const PROFILE_BIO_MAX_LENGTH = 500;
|
|
303
303
|
declare const PROFILE_LOCATION_MAX_LENGTH = 100;
|
|
304
|
+
declare const PROFILE_TRAINING_GOALS_MAX = 3;
|
|
305
|
+
declare const PROFILE_TRAINING_DISCIPLINES_MAX = 3;
|
|
306
|
+
declare const PROFILE_FAVORITE_EXERCISES_MAX = 5;
|
|
304
307
|
declare const RESERVED_USERNAMES: readonly ["achievements", "admin", "api", "auth", "dashboard", "edit", "exercises", "help", "login", "logout", "me", "new", "notifications", "privacy", "profile", "profiles", "progress", "register", "routines", "schedule", "search", "settings", "signup", "sunnsteel", "sunsteel", "support", "system", "terms", "users", "workouts"];
|
|
305
308
|
declare const PROFILE_VISIBILITY_VALUES: readonly ["PUBLIC", "FOLLOWERS", "PRIVATE"];
|
|
306
309
|
type ProfileVisibility = (typeof PROFILE_VISIBILITY_VALUES)[number];
|
|
310
|
+
declare const TRAINING_GOAL_VALUES: readonly ["STRENGTH", "MUSCLE_GROWTH", "FAT_LOSS", "ENDURANCE", "GENERAL_FITNESS", "ATHLETIC_PERFORMANCE", "MOBILITY"];
|
|
311
|
+
type TrainingGoal = (typeof TRAINING_GOAL_VALUES)[number];
|
|
312
|
+
declare const TRAINING_EXPERIENCE_LEVEL_VALUES: readonly ["BEGINNER", "INTERMEDIATE", "ADVANCED"];
|
|
313
|
+
type TrainingExperienceLevel = (typeof TRAINING_EXPERIENCE_LEVEL_VALUES)[number];
|
|
314
|
+
declare const TRAINING_DISCIPLINE_VALUES: readonly ["BODYBUILDING", "POWERLIFTING", "WEIGHTLIFTING", "CALISTHENICS", "STRONGMAN", "HYBRID_TRAINING", "GENERAL_STRENGTH"];
|
|
315
|
+
type TrainingDiscipline = (typeof TRAINING_DISCIPLINE_VALUES)[number];
|
|
316
|
+
declare const PREFERRED_TRAINING_STYLE_VALUES: readonly ["FULL_BODY", "UPPER_LOWER", "PUSH_PULL_LEGS", "BODY_PART_SPLIT", "CIRCUIT"];
|
|
317
|
+
type PreferredTrainingStyle = (typeof PREFERRED_TRAINING_STYLE_VALUES)[number];
|
|
318
|
+
interface ProfileFavoriteExercise {
|
|
319
|
+
id: string;
|
|
320
|
+
name: string;
|
|
321
|
+
}
|
|
322
|
+
interface TrainingIdentity {
|
|
323
|
+
goals: TrainingGoal[];
|
|
324
|
+
experienceLevel: TrainingExperienceLevel | null;
|
|
325
|
+
disciplines: TrainingDiscipline[];
|
|
326
|
+
preferredStyle: PreferredTrainingStyle | null;
|
|
327
|
+
favoriteExercises: ProfileFavoriteExercise[];
|
|
328
|
+
}
|
|
307
329
|
interface ProfilePrivacySettings {
|
|
308
330
|
biography: ProfileVisibility;
|
|
309
331
|
location: ProfileVisibility;
|
|
332
|
+
trainingIdentity: ProfileVisibility;
|
|
310
333
|
workoutHistory: ProfileVisibility;
|
|
311
334
|
records: ProfileVisibility;
|
|
312
335
|
routines: ProfileVisibility;
|
|
@@ -316,6 +339,7 @@ interface ProfilePrivacySettings {
|
|
|
316
339
|
interface ProfileViewerAccess {
|
|
317
340
|
biography: boolean;
|
|
318
341
|
location: boolean;
|
|
342
|
+
trainingIdentity: boolean;
|
|
319
343
|
workoutHistory: boolean;
|
|
320
344
|
records: boolean;
|
|
321
345
|
routines: boolean;
|
|
@@ -344,6 +368,7 @@ interface UserProfile {
|
|
|
344
368
|
avatarUrl?: string | null;
|
|
345
369
|
bio?: string | null;
|
|
346
370
|
location?: string | null;
|
|
371
|
+
trainingIdentity: TrainingIdentity;
|
|
347
372
|
age?: number | null;
|
|
348
373
|
sex?: Sex | null;
|
|
349
374
|
weight?: number | null;
|
|
@@ -363,6 +388,7 @@ interface PublicUserProfile {
|
|
|
363
388
|
avatarUrl?: string | null;
|
|
364
389
|
bio?: string | null;
|
|
365
390
|
location?: string | null;
|
|
391
|
+
trainingIdentity?: TrainingIdentity;
|
|
366
392
|
createdAt: IsoDateString;
|
|
367
393
|
updatedAt: IsoDateString;
|
|
368
394
|
followerCount: number;
|
|
@@ -380,13 +406,18 @@ interface UpdateProfileRequest {
|
|
|
380
406
|
avatarUrl?: string | null;
|
|
381
407
|
bio?: string | null;
|
|
382
408
|
location?: string | null;
|
|
409
|
+
trainingGoals?: TrainingGoal[];
|
|
410
|
+
trainingExperienceLevel?: TrainingExperienceLevel | null;
|
|
411
|
+
trainingDisciplines?: TrainingDiscipline[];
|
|
412
|
+
preferredTrainingStyle?: PreferredTrainingStyle | null;
|
|
413
|
+
favoriteExerciseIds?: string[];
|
|
383
414
|
age?: number | null;
|
|
384
415
|
sex?: Sex | null;
|
|
385
416
|
weight?: number | null;
|
|
386
417
|
height?: number | null;
|
|
387
418
|
weightUnit?: WeightUnit;
|
|
388
419
|
}
|
|
389
|
-
type UpdateProfilePrivacyRequest = Omit<ProfilePrivacySettings, 'biography' | 'location'> & Partial<Pick<ProfilePrivacySettings, 'biography' | 'location'>>;
|
|
420
|
+
type UpdateProfilePrivacyRequest = Omit<ProfilePrivacySettings, 'biography' | 'location' | 'trainingIdentity'> & Partial<Pick<ProfilePrivacySettings, 'biography' | 'location' | 'trainingIdentity'>>;
|
|
390
421
|
interface PlatePairInventory {
|
|
391
422
|
weightKg: number;
|
|
392
423
|
pairCount: number;
|
|
@@ -514,4 +545,4 @@ interface CreateRoutineRequest {
|
|
|
514
545
|
}
|
|
515
546
|
type UpdateRoutineRequest = Partial<CreateRoutineRequest>;
|
|
516
547
|
|
|
517
|
-
export { type Brand, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type EarnedPersonalRecord, type Exercise, type ExerciseId, type FinishStatus, type FinishWorkoutRequest, type FinishWorkoutResponse, type IsoDateString, type ListSessionsParams, MUSCLE_GROUPS, type MuscleGroup, PROFILE_BIO_MAX_LENGTH, PROFILE_LOCATION_MAX_LENGTH, PROFILE_VISIBILITY_VALUES, PROGRESSION_SCHEMES, type PaginatedResponse, type PersonalRecordEntry, type PersonalRecordKind, type PlatePairInventory, type PreviousPerformanceResponse, type PreviousSessionRecap, type PreviousSetPerformance, type ProfilePrivacySettings, type ProfileViewerAccess, type ProfileVisibility, type ProgressionChange, type ProgressionRule, type ProgressionScheme, type ProgressionSetChange, type PublicBodyMetrics, type PublicTrainingSummary, type PublicUserProfile, REP_TYPES, RESERVED_USERNAMES, type RecentActivityEntry, type RepType, type ReplaceTrainingLocationsRequest, type Routine, type RoutineDay, type RoutineDayId, type RoutineExercise, type RoutineId, type RoutineSet, SEXES, type SessionRecapRecord, type SetAccountTimeZoneRequest, type SetLog, type Sex, type StartWorkoutRequest, type StartWorkoutResponse, type SupabaseAuthResponse, type SupabaseAuthUser, type SupabaseMigrationResponse, TRAINING_EVENT_TYPES, type TrainingEventType, type TrainingLocationPreference, type TrainingLocationPreferenceInput, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, USERNAME_PATTERN_SOURCE, type UpdateProfilePrivacyRequest, type UpdateProfileRequest, type UpdateRoutineRequest, type UpsertSetLogRequest, type UpsertSetLogResponse, 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 WorkoutSessionRecap, type WorkoutSessionSnapshotV1, type WorkoutSessionStatus, type WorkoutSessionSummary, type WorkoutStatsQuery, type WorkoutStatsResponse };
|
|
548
|
+
export { type Brand, type CreateRoutineDayInput, type CreateRoutineExerciseInput, type CreateRoutineRequest, type EarnedPersonalRecord, type Exercise, type ExerciseId, type FinishStatus, type FinishWorkoutRequest, type FinishWorkoutResponse, type IsoDateString, type ListSessionsParams, MUSCLE_GROUPS, type MuscleGroup, 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, type PaginatedResponse, type PersonalRecordEntry, type PersonalRecordKind, type PlatePairInventory, type PreferredTrainingStyle, type PreviousPerformanceResponse, type PreviousSessionRecap, type PreviousSetPerformance, type ProfileFavoriteExercise, type ProfilePrivacySettings, type ProfileViewerAccess, type ProfileVisibility, type ProgressionChange, type ProgressionRule, type ProgressionScheme, type ProgressionSetChange, type PublicBodyMetrics, type PublicTrainingSummary, type PublicUserProfile, REP_TYPES, RESERVED_USERNAMES, type RecentActivityEntry, type RepType, type ReplaceTrainingLocationsRequest, type Routine, type RoutineDay, type RoutineDayId, type RoutineExercise, type RoutineId, type RoutineSet, SEXES, type SessionRecapRecord, type SetAccountTimeZoneRequest, type SetLog, type Sex, type StartWorkoutRequest, type StartWorkoutResponse, type SupabaseAuthResponse, type SupabaseAuthUser, type SupabaseMigrationResponse, TRAINING_DISCIPLINE_VALUES, TRAINING_EVENT_TYPES, TRAINING_EXPERIENCE_LEVEL_VALUES, TRAINING_GOAL_VALUES, type TrainingDiscipline, type TrainingEventType, type TrainingExperienceLevel, type TrainingGoal, type TrainingIdentity, type TrainingLocationPreference, type TrainingLocationPreferenceInput, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, USERNAME_PATTERN_SOURCE, type UpdateProfilePrivacyRequest, type UpdateProfileRequest, type UpdateRoutineRequest, type UpsertSetLogRequest, type UpsertSetLogResponse, 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 WorkoutSessionRecap, type WorkoutSessionSnapshotV1, type WorkoutSessionStatus, type WorkoutSessionSummary, type WorkoutStatsQuery, type WorkoutStatsResponse };
|
package/dist/index.js
CHANGED
|
@@ -38,6 +38,9 @@ var USERNAME_MAX_LENGTH = 30;
|
|
|
38
38
|
var USERNAME_PATTERN_SOURCE = "^[a-z0-9][a-z0-9_-]{1,28}[a-z0-9]$";
|
|
39
39
|
var PROFILE_BIO_MAX_LENGTH = 500;
|
|
40
40
|
var PROFILE_LOCATION_MAX_LENGTH = 100;
|
|
41
|
+
var PROFILE_TRAINING_GOALS_MAX = 3;
|
|
42
|
+
var PROFILE_TRAINING_DISCIPLINES_MAX = 3;
|
|
43
|
+
var PROFILE_FAVORITE_EXERCISES_MAX = 5;
|
|
41
44
|
var RESERVED_USERNAMES = [
|
|
42
45
|
"achievements",
|
|
43
46
|
"admin",
|
|
@@ -75,6 +78,36 @@ var PROFILE_VISIBILITY_VALUES = [
|
|
|
75
78
|
"FOLLOWERS",
|
|
76
79
|
"PRIVATE"
|
|
77
80
|
];
|
|
81
|
+
var TRAINING_GOAL_VALUES = [
|
|
82
|
+
"STRENGTH",
|
|
83
|
+
"MUSCLE_GROWTH",
|
|
84
|
+
"FAT_LOSS",
|
|
85
|
+
"ENDURANCE",
|
|
86
|
+
"GENERAL_FITNESS",
|
|
87
|
+
"ATHLETIC_PERFORMANCE",
|
|
88
|
+
"MOBILITY"
|
|
89
|
+
];
|
|
90
|
+
var TRAINING_EXPERIENCE_LEVEL_VALUES = [
|
|
91
|
+
"BEGINNER",
|
|
92
|
+
"INTERMEDIATE",
|
|
93
|
+
"ADVANCED"
|
|
94
|
+
];
|
|
95
|
+
var TRAINING_DISCIPLINE_VALUES = [
|
|
96
|
+
"BODYBUILDING",
|
|
97
|
+
"POWERLIFTING",
|
|
98
|
+
"WEIGHTLIFTING",
|
|
99
|
+
"CALISTHENICS",
|
|
100
|
+
"STRONGMAN",
|
|
101
|
+
"HYBRID_TRAINING",
|
|
102
|
+
"GENERAL_STRENGTH"
|
|
103
|
+
];
|
|
104
|
+
var PREFERRED_TRAINING_STYLE_VALUES = [
|
|
105
|
+
"FULL_BODY",
|
|
106
|
+
"UPPER_LOWER",
|
|
107
|
+
"PUSH_PULL_LEGS",
|
|
108
|
+
"BODY_PART_SPLIT",
|
|
109
|
+
"CIRCUIT"
|
|
110
|
+
];
|
|
78
111
|
|
|
79
112
|
// src/analytics.ts
|
|
80
113
|
var TRAINING_EVENT_TYPES = [
|
|
@@ -84,14 +117,21 @@ var TRAINING_EVENT_TYPES = [
|
|
|
84
117
|
];
|
|
85
118
|
export {
|
|
86
119
|
MUSCLE_GROUPS,
|
|
120
|
+
PREFERRED_TRAINING_STYLE_VALUES,
|
|
87
121
|
PROFILE_BIO_MAX_LENGTH,
|
|
122
|
+
PROFILE_FAVORITE_EXERCISES_MAX,
|
|
88
123
|
PROFILE_LOCATION_MAX_LENGTH,
|
|
124
|
+
PROFILE_TRAINING_DISCIPLINES_MAX,
|
|
125
|
+
PROFILE_TRAINING_GOALS_MAX,
|
|
89
126
|
PROFILE_VISIBILITY_VALUES,
|
|
90
127
|
PROGRESSION_SCHEMES,
|
|
91
128
|
REP_TYPES,
|
|
92
129
|
RESERVED_USERNAMES,
|
|
93
130
|
SEXES,
|
|
131
|
+
TRAINING_DISCIPLINE_VALUES,
|
|
94
132
|
TRAINING_EVENT_TYPES,
|
|
133
|
+
TRAINING_EXPERIENCE_LEVEL_VALUES,
|
|
134
|
+
TRAINING_GOAL_VALUES,
|
|
95
135
|
USERNAME_MAX_LENGTH,
|
|
96
136
|
USERNAME_MIN_LENGTH,
|
|
97
137
|
USERNAME_PATTERN_SOURCE,
|