@sunsteel/contracts 0.14.0 → 0.15.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
@@ -21,6 +21,8 @@ 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
+ PROFILE_BIO_MAX_LENGTH: () => PROFILE_BIO_MAX_LENGTH,
25
+ PROFILE_LOCATION_MAX_LENGTH: () => PROFILE_LOCATION_MAX_LENGTH,
24
26
  PROFILE_VISIBILITY_VALUES: () => PROFILE_VISIBILITY_VALUES,
25
27
  PROGRESSION_SCHEMES: () => PROGRESSION_SCHEMES,
26
28
  REP_TYPES: () => REP_TYPES,
@@ -73,6 +75,8 @@ var MUSCLE_GROUPS = [
73
75
  var USERNAME_MIN_LENGTH = 3;
74
76
  var USERNAME_MAX_LENGTH = 30;
75
77
  var USERNAME_PATTERN_SOURCE = "^[a-z0-9][a-z0-9_-]{1,28}[a-z0-9]$";
78
+ var PROFILE_BIO_MAX_LENGTH = 500;
79
+ var PROFILE_LOCATION_MAX_LENGTH = 100;
76
80
  var RESERVED_USERNAMES = [
77
81
  "achievements",
78
82
  "admin",
@@ -120,6 +124,8 @@ var TRAINING_EVENT_TYPES = [
120
124
  // Annotate the CommonJS export names for ESM import in node:
121
125
  0 && (module.exports = {
122
126
  MUSCLE_GROUPS,
127
+ PROFILE_BIO_MAX_LENGTH,
128
+ PROFILE_LOCATION_MAX_LENGTH,
123
129
  PROFILE_VISIBILITY_VALUES,
124
130
  PROGRESSION_SCHEMES,
125
131
  REP_TYPES,
package/dist/index.d.cts CHANGED
@@ -299,10 +299,14 @@ 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;
302
304
  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
305
  declare const PROFILE_VISIBILITY_VALUES: readonly ["PUBLIC", "FOLLOWERS", "PRIVATE"];
304
306
  type ProfileVisibility = (typeof PROFILE_VISIBILITY_VALUES)[number];
305
307
  interface ProfilePrivacySettings {
308
+ biography: ProfileVisibility;
309
+ location: ProfileVisibility;
306
310
  workoutHistory: ProfileVisibility;
307
311
  records: ProfileVisibility;
308
312
  routines: ProfileVisibility;
@@ -310,6 +314,8 @@ interface ProfilePrivacySettings {
310
314
  bodyMetrics: ProfileVisibility;
311
315
  }
312
316
  interface ProfileViewerAccess {
317
+ biography: boolean;
318
+ location: boolean;
313
319
  workoutHistory: boolean;
314
320
  records: boolean;
315
321
  routines: boolean;
@@ -336,6 +342,8 @@ interface UserProfile {
336
342
  name: string;
337
343
  lastName?: string | null;
338
344
  avatarUrl?: string | null;
345
+ bio?: string | null;
346
+ location?: string | null;
339
347
  age?: number | null;
340
348
  sex?: Sex | null;
341
349
  weight?: number | null;
@@ -353,6 +361,8 @@ interface PublicUserProfile {
353
361
  name: string;
354
362
  lastName?: string | null;
355
363
  avatarUrl?: string | null;
364
+ bio?: string | null;
365
+ location?: string | null;
356
366
  createdAt: IsoDateString;
357
367
  updatedAt: IsoDateString;
358
368
  followerCount: number;
@@ -368,13 +378,15 @@ interface UpdateProfileRequest {
368
378
  name?: string;
369
379
  lastName?: string | null;
370
380
  avatarUrl?: string | null;
381
+ bio?: string | null;
382
+ location?: string | null;
371
383
  age?: number | null;
372
384
  sex?: Sex | null;
373
385
  weight?: number | null;
374
386
  height?: number | null;
375
387
  weightUnit?: WeightUnit;
376
388
  }
377
- type UpdateProfilePrivacyRequest = ProfilePrivacySettings;
389
+ type UpdateProfilePrivacyRequest = Omit<ProfilePrivacySettings, 'biography' | 'location'> & Partial<Pick<ProfilePrivacySettings, 'biography' | 'location'>>;
378
390
  interface PlatePairInventory {
379
391
  weightKg: number;
380
392
  pairCount: number;
@@ -502,4 +514,4 @@ interface CreateRoutineRequest {
502
514
  }
503
515
  type UpdateRoutineRequest = Partial<CreateRoutineRequest>;
504
516
 
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 };
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 };
package/dist/index.d.ts CHANGED
@@ -299,10 +299,14 @@ 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;
302
304
  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
305
  declare const PROFILE_VISIBILITY_VALUES: readonly ["PUBLIC", "FOLLOWERS", "PRIVATE"];
304
306
  type ProfileVisibility = (typeof PROFILE_VISIBILITY_VALUES)[number];
305
307
  interface ProfilePrivacySettings {
308
+ biography: ProfileVisibility;
309
+ location: ProfileVisibility;
306
310
  workoutHistory: ProfileVisibility;
307
311
  records: ProfileVisibility;
308
312
  routines: ProfileVisibility;
@@ -310,6 +314,8 @@ interface ProfilePrivacySettings {
310
314
  bodyMetrics: ProfileVisibility;
311
315
  }
312
316
  interface ProfileViewerAccess {
317
+ biography: boolean;
318
+ location: boolean;
313
319
  workoutHistory: boolean;
314
320
  records: boolean;
315
321
  routines: boolean;
@@ -336,6 +342,8 @@ interface UserProfile {
336
342
  name: string;
337
343
  lastName?: string | null;
338
344
  avatarUrl?: string | null;
345
+ bio?: string | null;
346
+ location?: string | null;
339
347
  age?: number | null;
340
348
  sex?: Sex | null;
341
349
  weight?: number | null;
@@ -353,6 +361,8 @@ interface PublicUserProfile {
353
361
  name: string;
354
362
  lastName?: string | null;
355
363
  avatarUrl?: string | null;
364
+ bio?: string | null;
365
+ location?: string | null;
356
366
  createdAt: IsoDateString;
357
367
  updatedAt: IsoDateString;
358
368
  followerCount: number;
@@ -368,13 +378,15 @@ interface UpdateProfileRequest {
368
378
  name?: string;
369
379
  lastName?: string | null;
370
380
  avatarUrl?: string | null;
381
+ bio?: string | null;
382
+ location?: string | null;
371
383
  age?: number | null;
372
384
  sex?: Sex | null;
373
385
  weight?: number | null;
374
386
  height?: number | null;
375
387
  weightUnit?: WeightUnit;
376
388
  }
377
- type UpdateProfilePrivacyRequest = ProfilePrivacySettings;
389
+ type UpdateProfilePrivacyRequest = Omit<ProfilePrivacySettings, 'biography' | 'location'> & Partial<Pick<ProfilePrivacySettings, 'biography' | 'location'>>;
378
390
  interface PlatePairInventory {
379
391
  weightKg: number;
380
392
  pairCount: number;
@@ -502,4 +514,4 @@ interface CreateRoutineRequest {
502
514
  }
503
515
  type UpdateRoutineRequest = Partial<CreateRoutineRequest>;
504
516
 
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 };
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 };
package/dist/index.js CHANGED
@@ -36,6 +36,8 @@ 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;
39
41
  var RESERVED_USERNAMES = [
40
42
  "achievements",
41
43
  "admin",
@@ -82,6 +84,8 @@ var TRAINING_EVENT_TYPES = [
82
84
  ];
83
85
  export {
84
86
  MUSCLE_GROUPS,
87
+ PROFILE_BIO_MAX_LENGTH,
88
+ PROFILE_LOCATION_MAX_LENGTH,
85
89
  PROFILE_VISIBILITY_VALUES,
86
90
  PROGRESSION_SCHEMES,
87
91
  REP_TYPES,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunsteel/contracts",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ezee969/sunsteel-contracts.git"