hevy-shared 1.0.1050 → 1.0.1051
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/built/index.d.ts +14 -1
- package/package.json +1 -1
package/built/index.d.ts
CHANGED
|
@@ -302,8 +302,21 @@ export interface BackofficeExistingUserResponse {
|
|
|
302
302
|
public_api_key: string | null;
|
|
303
303
|
limited_discovery: boolean;
|
|
304
304
|
coach_trial_expire_date?: string;
|
|
305
|
-
hevy_trainer_program:
|
|
305
|
+
hevy_trainer_program: BackofficeTrainerProgram | null;
|
|
306
306
|
}
|
|
307
|
+
/**
|
|
308
|
+
* A user has at most one active Hevy Trainer program, on either the v2 schema
|
|
309
|
+
* (program → routines) or the v3 schema (program → templates). The backoffice
|
|
310
|
+
* receives whichever exists as a discriminated union keyed by `schema_version`
|
|
311
|
+
* so the front-end can render each shape.
|
|
312
|
+
*/
|
|
313
|
+
export type BackofficeTrainerProgram = {
|
|
314
|
+
schema_version: 'v2';
|
|
315
|
+
program: HevyTrainerProgram;
|
|
316
|
+
} | {
|
|
317
|
+
schema_version: 'v3';
|
|
318
|
+
program: TrainerProgramV3;
|
|
319
|
+
};
|
|
307
320
|
export interface BackofficeDeletedUserResponse {
|
|
308
321
|
state: 'deleted-account';
|
|
309
322
|
id: string;
|