@sunsteel/contracts 0.14.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 +53 -0
- package/dist/index.d.cts +45 -2
- package/dist/index.d.ts +45 -2
- package/dist/index.js +44 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -21,12 +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,
|
|
25
|
+
PROFILE_BIO_MAX_LENGTH: () => PROFILE_BIO_MAX_LENGTH,
|
|
26
|
+
PROFILE_FAVORITE_EXERCISES_MAX: () => PROFILE_FAVORITE_EXERCISES_MAX,
|
|
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,
|
|
24
30
|
PROFILE_VISIBILITY_VALUES: () => PROFILE_VISIBILITY_VALUES,
|
|
25
31
|
PROGRESSION_SCHEMES: () => PROGRESSION_SCHEMES,
|
|
26
32
|
REP_TYPES: () => REP_TYPES,
|
|
27
33
|
RESERVED_USERNAMES: () => RESERVED_USERNAMES,
|
|
28
34
|
SEXES: () => SEXES,
|
|
35
|
+
TRAINING_DISCIPLINE_VALUES: () => TRAINING_DISCIPLINE_VALUES,
|
|
29
36
|
TRAINING_EVENT_TYPES: () => TRAINING_EVENT_TYPES,
|
|
37
|
+
TRAINING_EXPERIENCE_LEVEL_VALUES: () => TRAINING_EXPERIENCE_LEVEL_VALUES,
|
|
38
|
+
TRAINING_GOAL_VALUES: () => TRAINING_GOAL_VALUES,
|
|
30
39
|
USERNAME_MAX_LENGTH: () => USERNAME_MAX_LENGTH,
|
|
31
40
|
USERNAME_MIN_LENGTH: () => USERNAME_MIN_LENGTH,
|
|
32
41
|
USERNAME_PATTERN_SOURCE: () => USERNAME_PATTERN_SOURCE,
|
|
@@ -73,6 +82,11 @@ var MUSCLE_GROUPS = [
|
|
|
73
82
|
var USERNAME_MIN_LENGTH = 3;
|
|
74
83
|
var USERNAME_MAX_LENGTH = 30;
|
|
75
84
|
var USERNAME_PATTERN_SOURCE = "^[a-z0-9][a-z0-9_-]{1,28}[a-z0-9]$";
|
|
85
|
+
var PROFILE_BIO_MAX_LENGTH = 500;
|
|
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;
|
|
76
90
|
var RESERVED_USERNAMES = [
|
|
77
91
|
"achievements",
|
|
78
92
|
"admin",
|
|
@@ -110,6 +124,36 @@ var PROFILE_VISIBILITY_VALUES = [
|
|
|
110
124
|
"FOLLOWERS",
|
|
111
125
|
"PRIVATE"
|
|
112
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
|
+
];
|
|
113
157
|
|
|
114
158
|
// src/analytics.ts
|
|
115
159
|
var TRAINING_EVENT_TYPES = [
|
|
@@ -120,12 +164,21 @@ var TRAINING_EVENT_TYPES = [
|
|
|
120
164
|
// Annotate the CommonJS export names for ESM import in node:
|
|
121
165
|
0 && (module.exports = {
|
|
122
166
|
MUSCLE_GROUPS,
|
|
167
|
+
PREFERRED_TRAINING_STYLE_VALUES,
|
|
168
|
+
PROFILE_BIO_MAX_LENGTH,
|
|
169
|
+
PROFILE_FAVORITE_EXERCISES_MAX,
|
|
170
|
+
PROFILE_LOCATION_MAX_LENGTH,
|
|
171
|
+
PROFILE_TRAINING_DISCIPLINES_MAX,
|
|
172
|
+
PROFILE_TRAINING_GOALS_MAX,
|
|
123
173
|
PROFILE_VISIBILITY_VALUES,
|
|
124
174
|
PROGRESSION_SCHEMES,
|
|
125
175
|
REP_TYPES,
|
|
126
176
|
RESERVED_USERNAMES,
|
|
127
177
|
SEXES,
|
|
178
|
+
TRAINING_DISCIPLINE_VALUES,
|
|
128
179
|
TRAINING_EVENT_TYPES,
|
|
180
|
+
TRAINING_EXPERIENCE_LEVEL_VALUES,
|
|
181
|
+
TRAINING_GOAL_VALUES,
|
|
129
182
|
USERNAME_MAX_LENGTH,
|
|
130
183
|
USERNAME_MIN_LENGTH,
|
|
131
184
|
USERNAME_PATTERN_SOURCE,
|
package/dist/index.d.cts
CHANGED
|
@@ -299,10 +299,37 @@ interface WorkoutAnalyticsStatus {
|
|
|
299
299
|
declare const USERNAME_MIN_LENGTH = 3;
|
|
300
300
|
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
|
+
declare const PROFILE_BIO_MAX_LENGTH = 500;
|
|
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;
|
|
302
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"];
|
|
303
308
|
declare const PROFILE_VISIBILITY_VALUES: readonly ["PUBLIC", "FOLLOWERS", "PRIVATE"];
|
|
304
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
|
+
}
|
|
305
329
|
interface ProfilePrivacySettings {
|
|
330
|
+
biography: ProfileVisibility;
|
|
331
|
+
location: ProfileVisibility;
|
|
332
|
+
trainingIdentity: ProfileVisibility;
|
|
306
333
|
workoutHistory: ProfileVisibility;
|
|
307
334
|
records: ProfileVisibility;
|
|
308
335
|
routines: ProfileVisibility;
|
|
@@ -310,6 +337,9 @@ interface ProfilePrivacySettings {
|
|
|
310
337
|
bodyMetrics: ProfileVisibility;
|
|
311
338
|
}
|
|
312
339
|
interface ProfileViewerAccess {
|
|
340
|
+
biography: boolean;
|
|
341
|
+
location: boolean;
|
|
342
|
+
trainingIdentity: boolean;
|
|
313
343
|
workoutHistory: boolean;
|
|
314
344
|
records: boolean;
|
|
315
345
|
routines: boolean;
|
|
@@ -336,6 +366,9 @@ interface UserProfile {
|
|
|
336
366
|
name: string;
|
|
337
367
|
lastName?: string | null;
|
|
338
368
|
avatarUrl?: string | null;
|
|
369
|
+
bio?: string | null;
|
|
370
|
+
location?: string | null;
|
|
371
|
+
trainingIdentity: TrainingIdentity;
|
|
339
372
|
age?: number | null;
|
|
340
373
|
sex?: Sex | null;
|
|
341
374
|
weight?: number | null;
|
|
@@ -353,6 +386,9 @@ interface PublicUserProfile {
|
|
|
353
386
|
name: string;
|
|
354
387
|
lastName?: string | null;
|
|
355
388
|
avatarUrl?: string | null;
|
|
389
|
+
bio?: string | null;
|
|
390
|
+
location?: string | null;
|
|
391
|
+
trainingIdentity?: TrainingIdentity;
|
|
356
392
|
createdAt: IsoDateString;
|
|
357
393
|
updatedAt: IsoDateString;
|
|
358
394
|
followerCount: number;
|
|
@@ -368,13 +404,20 @@ interface UpdateProfileRequest {
|
|
|
368
404
|
name?: string;
|
|
369
405
|
lastName?: string | null;
|
|
370
406
|
avatarUrl?: string | null;
|
|
407
|
+
bio?: string | null;
|
|
408
|
+
location?: string | null;
|
|
409
|
+
trainingGoals?: TrainingGoal[];
|
|
410
|
+
trainingExperienceLevel?: TrainingExperienceLevel | null;
|
|
411
|
+
trainingDisciplines?: TrainingDiscipline[];
|
|
412
|
+
preferredTrainingStyle?: PreferredTrainingStyle | null;
|
|
413
|
+
favoriteExerciseIds?: string[];
|
|
371
414
|
age?: number | null;
|
|
372
415
|
sex?: Sex | null;
|
|
373
416
|
weight?: number | null;
|
|
374
417
|
height?: number | null;
|
|
375
418
|
weightUnit?: WeightUnit;
|
|
376
419
|
}
|
|
377
|
-
type UpdateProfilePrivacyRequest = ProfilePrivacySettings
|
|
420
|
+
type UpdateProfilePrivacyRequest = Omit<ProfilePrivacySettings, 'biography' | 'location' | 'trainingIdentity'> & Partial<Pick<ProfilePrivacySettings, 'biography' | 'location' | 'trainingIdentity'>>;
|
|
378
421
|
interface PlatePairInventory {
|
|
379
422
|
weightKg: number;
|
|
380
423
|
pairCount: number;
|
|
@@ -502,4 +545,4 @@ interface CreateRoutineRequest {
|
|
|
502
545
|
}
|
|
503
546
|
type UpdateRoutineRequest = Partial<CreateRoutineRequest>;
|
|
504
547
|
|
|
505
|
-
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_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
|
@@ -299,10 +299,37 @@ interface WorkoutAnalyticsStatus {
|
|
|
299
299
|
declare const USERNAME_MIN_LENGTH = 3;
|
|
300
300
|
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
|
+
declare const PROFILE_BIO_MAX_LENGTH = 500;
|
|
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;
|
|
302
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"];
|
|
303
308
|
declare const PROFILE_VISIBILITY_VALUES: readonly ["PUBLIC", "FOLLOWERS", "PRIVATE"];
|
|
304
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
|
+
}
|
|
305
329
|
interface ProfilePrivacySettings {
|
|
330
|
+
biography: ProfileVisibility;
|
|
331
|
+
location: ProfileVisibility;
|
|
332
|
+
trainingIdentity: ProfileVisibility;
|
|
306
333
|
workoutHistory: ProfileVisibility;
|
|
307
334
|
records: ProfileVisibility;
|
|
308
335
|
routines: ProfileVisibility;
|
|
@@ -310,6 +337,9 @@ interface ProfilePrivacySettings {
|
|
|
310
337
|
bodyMetrics: ProfileVisibility;
|
|
311
338
|
}
|
|
312
339
|
interface ProfileViewerAccess {
|
|
340
|
+
biography: boolean;
|
|
341
|
+
location: boolean;
|
|
342
|
+
trainingIdentity: boolean;
|
|
313
343
|
workoutHistory: boolean;
|
|
314
344
|
records: boolean;
|
|
315
345
|
routines: boolean;
|
|
@@ -336,6 +366,9 @@ interface UserProfile {
|
|
|
336
366
|
name: string;
|
|
337
367
|
lastName?: string | null;
|
|
338
368
|
avatarUrl?: string | null;
|
|
369
|
+
bio?: string | null;
|
|
370
|
+
location?: string | null;
|
|
371
|
+
trainingIdentity: TrainingIdentity;
|
|
339
372
|
age?: number | null;
|
|
340
373
|
sex?: Sex | null;
|
|
341
374
|
weight?: number | null;
|
|
@@ -353,6 +386,9 @@ interface PublicUserProfile {
|
|
|
353
386
|
name: string;
|
|
354
387
|
lastName?: string | null;
|
|
355
388
|
avatarUrl?: string | null;
|
|
389
|
+
bio?: string | null;
|
|
390
|
+
location?: string | null;
|
|
391
|
+
trainingIdentity?: TrainingIdentity;
|
|
356
392
|
createdAt: IsoDateString;
|
|
357
393
|
updatedAt: IsoDateString;
|
|
358
394
|
followerCount: number;
|
|
@@ -368,13 +404,20 @@ interface UpdateProfileRequest {
|
|
|
368
404
|
name?: string;
|
|
369
405
|
lastName?: string | null;
|
|
370
406
|
avatarUrl?: string | null;
|
|
407
|
+
bio?: string | null;
|
|
408
|
+
location?: string | null;
|
|
409
|
+
trainingGoals?: TrainingGoal[];
|
|
410
|
+
trainingExperienceLevel?: TrainingExperienceLevel | null;
|
|
411
|
+
trainingDisciplines?: TrainingDiscipline[];
|
|
412
|
+
preferredTrainingStyle?: PreferredTrainingStyle | null;
|
|
413
|
+
favoriteExerciseIds?: string[];
|
|
371
414
|
age?: number | null;
|
|
372
415
|
sex?: Sex | null;
|
|
373
416
|
weight?: number | null;
|
|
374
417
|
height?: number | null;
|
|
375
418
|
weightUnit?: WeightUnit;
|
|
376
419
|
}
|
|
377
|
-
type UpdateProfilePrivacyRequest = ProfilePrivacySettings
|
|
420
|
+
type UpdateProfilePrivacyRequest = Omit<ProfilePrivacySettings, 'biography' | 'location' | 'trainingIdentity'> & Partial<Pick<ProfilePrivacySettings, 'biography' | 'location' | 'trainingIdentity'>>;
|
|
378
421
|
interface PlatePairInventory {
|
|
379
422
|
weightKg: number;
|
|
380
423
|
pairCount: number;
|
|
@@ -502,4 +545,4 @@ interface CreateRoutineRequest {
|
|
|
502
545
|
}
|
|
503
546
|
type UpdateRoutineRequest = Partial<CreateRoutineRequest>;
|
|
504
547
|
|
|
505
|
-
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_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
|
@@ -36,6 +36,11 @@ var MUSCLE_GROUPS = [
|
|
|
36
36
|
var USERNAME_MIN_LENGTH = 3;
|
|
37
37
|
var USERNAME_MAX_LENGTH = 30;
|
|
38
38
|
var USERNAME_PATTERN_SOURCE = "^[a-z0-9][a-z0-9_-]{1,28}[a-z0-9]$";
|
|
39
|
+
var PROFILE_BIO_MAX_LENGTH = 500;
|
|
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;
|
|
39
44
|
var RESERVED_USERNAMES = [
|
|
40
45
|
"achievements",
|
|
41
46
|
"admin",
|
|
@@ -73,6 +78,36 @@ var PROFILE_VISIBILITY_VALUES = [
|
|
|
73
78
|
"FOLLOWERS",
|
|
74
79
|
"PRIVATE"
|
|
75
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
|
+
];
|
|
76
111
|
|
|
77
112
|
// src/analytics.ts
|
|
78
113
|
var TRAINING_EVENT_TYPES = [
|
|
@@ -82,12 +117,21 @@ var TRAINING_EVENT_TYPES = [
|
|
|
82
117
|
];
|
|
83
118
|
export {
|
|
84
119
|
MUSCLE_GROUPS,
|
|
120
|
+
PREFERRED_TRAINING_STYLE_VALUES,
|
|
121
|
+
PROFILE_BIO_MAX_LENGTH,
|
|
122
|
+
PROFILE_FAVORITE_EXERCISES_MAX,
|
|
123
|
+
PROFILE_LOCATION_MAX_LENGTH,
|
|
124
|
+
PROFILE_TRAINING_DISCIPLINES_MAX,
|
|
125
|
+
PROFILE_TRAINING_GOALS_MAX,
|
|
85
126
|
PROFILE_VISIBILITY_VALUES,
|
|
86
127
|
PROGRESSION_SCHEMES,
|
|
87
128
|
REP_TYPES,
|
|
88
129
|
RESERVED_USERNAMES,
|
|
89
130
|
SEXES,
|
|
131
|
+
TRAINING_DISCIPLINE_VALUES,
|
|
90
132
|
TRAINING_EVENT_TYPES,
|
|
133
|
+
TRAINING_EXPERIENCE_LEVEL_VALUES,
|
|
134
|
+
TRAINING_GOAL_VALUES,
|
|
91
135
|
USERNAME_MAX_LENGTH,
|
|
92
136
|
USERNAME_MIN_LENGTH,
|
|
93
137
|
USERNAME_PATTERN_SOURCE,
|