@burdenoff/microfe-mybodyshield 2026.720.1 → 2026.720.3
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/mybodyshield/data/programTemplates.d.ts +23 -0
- package/dist/mybodyshield/data/programTemplates.d.ts.map +1 -0
- package/dist/mybodyshield/data/programTemplates.js +212 -0
- package/dist/mybodyshield/data/programTemplates.js.map +1 -0
- package/dist/mybodyshield/hooks/useMyBodyShieldApi.d.ts +15 -1
- package/dist/mybodyshield/hooks/useMyBodyShieldApi.d.ts.map +1 -1
- package/dist/mybodyshield/hooks/useMyBodyShieldApi.js +77 -32
- package/dist/mybodyshield/hooks/useMyBodyShieldApi.js.map +1 -1
- package/dist/mybodyshield/pages/programs/ProgramsPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/programs/ProgramsPage.js +169 -121
- package/dist/mybodyshield/pages/programs/ProgramsPage.js.map +1 -1
- package/dist/mybodyshield/pages/train/SessionDetailPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/train/SessionDetailPage.js +438 -266
- package/dist/mybodyshield/pages/train/SessionDetailPage.js.map +1 -1
- package/dist/mybodyshield/pages/train/SessionsPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/train/SessionsPage.js +162 -123
- package/dist/mybodyshield/pages/train/SessionsPage.js.map +1 -1
- package/dist/mybodyshield/types/assistant.d.ts.map +1 -1
- package/dist/mybodyshield/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { MybFitnessLevel, MybGoalType, MybWorkoutType } from '../types';
|
|
2
|
+
|
|
3
|
+
export interface ProgramTemplateWorkout {
|
|
4
|
+
name: string;
|
|
5
|
+
type: MybWorkoutType;
|
|
6
|
+
dayOfWeek: number;
|
|
7
|
+
weekNumber: number;
|
|
8
|
+
durationMin: number;
|
|
9
|
+
}
|
|
10
|
+
export interface ProgramTemplate {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
goalType: MybGoalType;
|
|
15
|
+
level: MybFitnessLevel;
|
|
16
|
+
weeks: number;
|
|
17
|
+
daysPerWeek: number;
|
|
18
|
+
/** First week's workouts only — a real starter block; members extend later weeks manually. */
|
|
19
|
+
workouts: readonly ProgramTemplateWorkout[];
|
|
20
|
+
}
|
|
21
|
+
export declare const PROGRAM_TEMPLATES: readonly ProgramTemplate[];
|
|
22
|
+
export declare function findProgramTemplate(id: string): ProgramTemplate | undefined;
|
|
23
|
+
//# sourceMappingURL=programTemplates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"programTemplates.d.ts","sourceRoot":"","sources":["../../../src/mybodyshield/data/programTemplates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE7E,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,WAAW,CAAC;IACtB,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,8FAA8F;IAC9F,QAAQ,EAAE,SAAS,sBAAsB,EAAE,CAAC;CAC7C;AAED,eAAO,MAAM,iBAAiB,EAAE,SAAS,eAAe,EA8G9C,CAAC;AAEX,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAE3E"}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
//#region src/mybodyshield/data/programTemplates.ts
|
|
2
|
+
var e = [
|
|
3
|
+
{
|
|
4
|
+
id: "couch-to-5k",
|
|
5
|
+
name: "Couch to 5K",
|
|
6
|
+
description: "Progressive walk-run intervals building to a continuous 5K run — for true beginners.",
|
|
7
|
+
goalType: "ENDURANCE",
|
|
8
|
+
level: "BEGINNER",
|
|
9
|
+
weeks: 9,
|
|
10
|
+
daysPerWeek: 3,
|
|
11
|
+
workouts: [
|
|
12
|
+
{
|
|
13
|
+
name: "Walk-Run Intervals",
|
|
14
|
+
type: "CARDIO",
|
|
15
|
+
dayOfWeek: 1,
|
|
16
|
+
weekNumber: 1,
|
|
17
|
+
durationMin: 30
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: "Easy Run",
|
|
21
|
+
type: "CARDIO",
|
|
22
|
+
dayOfWeek: 3,
|
|
23
|
+
weekNumber: 1,
|
|
24
|
+
durationMin: 25
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "Recovery Walk",
|
|
28
|
+
type: "RECOVERY",
|
|
29
|
+
dayOfWeek: 5,
|
|
30
|
+
weekNumber: 1,
|
|
31
|
+
durationMin: 20
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: "run-and-burn-8wk",
|
|
37
|
+
name: "Run & Burn — 8 Week",
|
|
38
|
+
description: "High-volume running paired with metabolic conditioning, built for fat-loss goals.",
|
|
39
|
+
goalType: "WEIGHT_LOSS",
|
|
40
|
+
level: "INTERMEDIATE",
|
|
41
|
+
weeks: 8,
|
|
42
|
+
daysPerWeek: 4,
|
|
43
|
+
workouts: [
|
|
44
|
+
{
|
|
45
|
+
name: "Tempo Run",
|
|
46
|
+
type: "CARDIO",
|
|
47
|
+
dayOfWeek: 1,
|
|
48
|
+
weekNumber: 1,
|
|
49
|
+
durationMin: 35
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "HIIT Circuit",
|
|
53
|
+
type: "HIIT",
|
|
54
|
+
dayOfWeek: 2,
|
|
55
|
+
weekNumber: 1,
|
|
56
|
+
durationMin: 30
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "Long Slow Run",
|
|
60
|
+
type: "CARDIO",
|
|
61
|
+
dayOfWeek: 4,
|
|
62
|
+
weekNumber: 1,
|
|
63
|
+
durationMin: 50
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "Active Recovery Mobility",
|
|
67
|
+
type: "MOBILITY",
|
|
68
|
+
dayOfWeek: 6,
|
|
69
|
+
weekNumber: 1,
|
|
70
|
+
durationMin: 25
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: "hiit-shred",
|
|
76
|
+
name: "HIIT Shred",
|
|
77
|
+
description: "Short, intense interval sessions for maximum calorie burn in minimal time.",
|
|
78
|
+
goalType: "WEIGHT_LOSS",
|
|
79
|
+
level: "INTERMEDIATE",
|
|
80
|
+
weeks: 6,
|
|
81
|
+
daysPerWeek: 4,
|
|
82
|
+
workouts: [
|
|
83
|
+
{
|
|
84
|
+
name: "Full-Body HIIT",
|
|
85
|
+
type: "HIIT",
|
|
86
|
+
dayOfWeek: 1,
|
|
87
|
+
weekNumber: 1,
|
|
88
|
+
durationMin: 25
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: "Sprint Intervals",
|
|
92
|
+
type: "CARDIO",
|
|
93
|
+
dayOfWeek: 3,
|
|
94
|
+
weekNumber: 1,
|
|
95
|
+
durationMin: 20
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: "Tabata Circuit",
|
|
99
|
+
type: "HIIT",
|
|
100
|
+
dayOfWeek: 5,
|
|
101
|
+
weekNumber: 1,
|
|
102
|
+
durationMin: 20
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: "Yoga Flow Recovery",
|
|
106
|
+
type: "YOGA",
|
|
107
|
+
dayOfWeek: 6,
|
|
108
|
+
weekNumber: 1,
|
|
109
|
+
durationMin: 30
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: "hybrid-strength-cardio",
|
|
115
|
+
name: "Hybrid Strength + Cardio",
|
|
116
|
+
description: "Balanced periodized block pairing strength days with dedicated cardio conditioning.",
|
|
117
|
+
goalType: "GENERAL_FITNESS",
|
|
118
|
+
level: "INTERMEDIATE",
|
|
119
|
+
weeks: 10,
|
|
120
|
+
daysPerWeek: 5,
|
|
121
|
+
workouts: [
|
|
122
|
+
{
|
|
123
|
+
name: "Lower Body Strength",
|
|
124
|
+
type: "STRENGTH",
|
|
125
|
+
dayOfWeek: 1,
|
|
126
|
+
weekNumber: 1,
|
|
127
|
+
durationMin: 55
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: "Steady-State Cardio",
|
|
131
|
+
type: "CARDIO",
|
|
132
|
+
dayOfWeek: 2,
|
|
133
|
+
weekNumber: 1,
|
|
134
|
+
durationMin: 35
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
name: "Upper Body Strength",
|
|
138
|
+
type: "STRENGTH",
|
|
139
|
+
dayOfWeek: 3,
|
|
140
|
+
weekNumber: 1,
|
|
141
|
+
durationMin: 55
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: "HIIT Finisher",
|
|
145
|
+
type: "HIIT",
|
|
146
|
+
dayOfWeek: 4,
|
|
147
|
+
weekNumber: 1,
|
|
148
|
+
durationMin: 25
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
name: "Full-Body Strength",
|
|
152
|
+
type: "STRENGTH",
|
|
153
|
+
dayOfWeek: 5,
|
|
154
|
+
weekNumber: 1,
|
|
155
|
+
durationMin: 50
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: "marathon-base-builder",
|
|
161
|
+
name: "Marathon Base Builder",
|
|
162
|
+
description: "Aerobic base-building mileage with strength support for marathon prep.",
|
|
163
|
+
goalType: "ENDURANCE",
|
|
164
|
+
level: "ADVANCED",
|
|
165
|
+
weeks: 12,
|
|
166
|
+
daysPerWeek: 5,
|
|
167
|
+
workouts: [
|
|
168
|
+
{
|
|
169
|
+
name: "Easy Base Run",
|
|
170
|
+
type: "CARDIO",
|
|
171
|
+
dayOfWeek: 1,
|
|
172
|
+
weekNumber: 1,
|
|
173
|
+
durationMin: 45
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: "Tempo Run",
|
|
177
|
+
type: "CARDIO",
|
|
178
|
+
dayOfWeek: 2,
|
|
179
|
+
weekNumber: 1,
|
|
180
|
+
durationMin: 40
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
name: "Strength & Mobility",
|
|
184
|
+
type: "STRENGTH",
|
|
185
|
+
dayOfWeek: 3,
|
|
186
|
+
weekNumber: 1,
|
|
187
|
+
durationMin: 45
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
name: "Hill Repeats",
|
|
191
|
+
type: "CARDIO",
|
|
192
|
+
dayOfWeek: 4,
|
|
193
|
+
weekNumber: 1,
|
|
194
|
+
durationMin: 40
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
name: "Long Run",
|
|
198
|
+
type: "CARDIO",
|
|
199
|
+
dayOfWeek: 6,
|
|
200
|
+
weekNumber: 1,
|
|
201
|
+
durationMin: 75
|
|
202
|
+
}
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
];
|
|
206
|
+
function t(t) {
|
|
207
|
+
return e.find((e) => e.id === t);
|
|
208
|
+
}
|
|
209
|
+
//#endregion
|
|
210
|
+
export { e as PROGRAM_TEMPLATES, t as findProgramTemplate };
|
|
211
|
+
|
|
212
|
+
//# sourceMappingURL=programTemplates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"programTemplates.js","names":[],"sources":["../../../src/mybodyshield/data/programTemplates.ts"],"sourcesContent":["/**\n * Named program templates — BOFF-4182.\n * @module mybodyshield/data/programTemplates\n *\n * Program creation today (`ProgramsPage`'s create dialog) is a blank\n * strength-style form regardless of the member's goal, even though the\n * backend's `MybWorkoutType` enum already has CARDIO/HIIT/MOBILITY/YOGA/\n * RECOVERY values (`wspace-mybodyshield-svc/prisma/schema/enums.prisma`) —\n * nothing in the UI ever offers them as a starting point. These are seed\n * presets only: picking one pre-fills the create-program form and, once the\n * program is created via the real `mybCreateProgram` mutation, seeds its\n * first week of workouts via the real `mybAddWorkout` mutation (same\n * mutations a member would call manually) — no schema change, no new\n * backend endpoint.\n */\n\nimport type { MybFitnessLevel, MybGoalType, MybWorkoutType } from '../types';\n\nexport interface ProgramTemplateWorkout {\n name: string;\n type: MybWorkoutType;\n dayOfWeek: number;\n weekNumber: number;\n durationMin: number;\n}\n\nexport interface ProgramTemplate {\n id: string;\n name: string;\n description: string;\n goalType: MybGoalType;\n level: MybFitnessLevel;\n weeks: number;\n daysPerWeek: number;\n /** First week's workouts only — a real starter block; members extend later weeks manually. */\n workouts: readonly ProgramTemplateWorkout[];\n}\n\nexport const PROGRAM_TEMPLATES: readonly ProgramTemplate[] = [\n {\n id: 'couch-to-5k',\n name: 'Couch to 5K',\n description:\n 'Progressive walk-run intervals building to a continuous 5K run — for true beginners.',\n goalType: 'ENDURANCE',\n level: 'BEGINNER',\n weeks: 9,\n daysPerWeek: 3,\n workouts: [\n { name: 'Walk-Run Intervals', type: 'CARDIO', dayOfWeek: 1, weekNumber: 1, durationMin: 30 },\n { name: 'Easy Run', type: 'CARDIO', dayOfWeek: 3, weekNumber: 1, durationMin: 25 },\n { name: 'Recovery Walk', type: 'RECOVERY', dayOfWeek: 5, weekNumber: 1, durationMin: 20 },\n ],\n },\n {\n id: 'run-and-burn-8wk',\n name: 'Run & Burn — 8 Week',\n description:\n 'High-volume running paired with metabolic conditioning, built for fat-loss goals.',\n goalType: 'WEIGHT_LOSS',\n level: 'INTERMEDIATE',\n weeks: 8,\n daysPerWeek: 4,\n workouts: [\n { name: 'Tempo Run', type: 'CARDIO', dayOfWeek: 1, weekNumber: 1, durationMin: 35 },\n { name: 'HIIT Circuit', type: 'HIIT', dayOfWeek: 2, weekNumber: 1, durationMin: 30 },\n { name: 'Long Slow Run', type: 'CARDIO', dayOfWeek: 4, weekNumber: 1, durationMin: 50 },\n {\n name: 'Active Recovery Mobility',\n type: 'MOBILITY',\n dayOfWeek: 6,\n weekNumber: 1,\n durationMin: 25,\n },\n ],\n },\n {\n id: 'hiit-shred',\n name: 'HIIT Shred',\n description: 'Short, intense interval sessions for maximum calorie burn in minimal time.',\n goalType: 'WEIGHT_LOSS',\n level: 'INTERMEDIATE',\n weeks: 6,\n daysPerWeek: 4,\n workouts: [\n { name: 'Full-Body HIIT', type: 'HIIT', dayOfWeek: 1, weekNumber: 1, durationMin: 25 },\n { name: 'Sprint Intervals', type: 'CARDIO', dayOfWeek: 3, weekNumber: 1, durationMin: 20 },\n { name: 'Tabata Circuit', type: 'HIIT', dayOfWeek: 5, weekNumber: 1, durationMin: 20 },\n { name: 'Yoga Flow Recovery', type: 'YOGA', dayOfWeek: 6, weekNumber: 1, durationMin: 30 },\n ],\n },\n {\n id: 'hybrid-strength-cardio',\n name: 'Hybrid Strength + Cardio',\n description:\n 'Balanced periodized block pairing strength days with dedicated cardio conditioning.',\n goalType: 'GENERAL_FITNESS',\n level: 'INTERMEDIATE',\n weeks: 10,\n daysPerWeek: 5,\n workouts: [\n {\n name: 'Lower Body Strength',\n type: 'STRENGTH',\n dayOfWeek: 1,\n weekNumber: 1,\n durationMin: 55,\n },\n { name: 'Steady-State Cardio', type: 'CARDIO', dayOfWeek: 2, weekNumber: 1, durationMin: 35 },\n {\n name: 'Upper Body Strength',\n type: 'STRENGTH',\n dayOfWeek: 3,\n weekNumber: 1,\n durationMin: 55,\n },\n { name: 'HIIT Finisher', type: 'HIIT', dayOfWeek: 4, weekNumber: 1, durationMin: 25 },\n {\n name: 'Full-Body Strength',\n type: 'STRENGTH',\n dayOfWeek: 5,\n weekNumber: 1,\n durationMin: 50,\n },\n ],\n },\n {\n id: 'marathon-base-builder',\n name: 'Marathon Base Builder',\n description: 'Aerobic base-building mileage with strength support for marathon prep.',\n goalType: 'ENDURANCE',\n level: 'ADVANCED',\n weeks: 12,\n daysPerWeek: 5,\n workouts: [\n { name: 'Easy Base Run', type: 'CARDIO', dayOfWeek: 1, weekNumber: 1, durationMin: 45 },\n { name: 'Tempo Run', type: 'CARDIO', dayOfWeek: 2, weekNumber: 1, durationMin: 40 },\n {\n name: 'Strength & Mobility',\n type: 'STRENGTH',\n dayOfWeek: 3,\n weekNumber: 1,\n durationMin: 45,\n },\n { name: 'Hill Repeats', type: 'CARDIO', dayOfWeek: 4, weekNumber: 1, durationMin: 40 },\n { name: 'Long Run', type: 'CARDIO', dayOfWeek: 6, weekNumber: 1, durationMin: 75 },\n ],\n },\n] as const;\n\nexport function findProgramTemplate(id: string): ProgramTemplate | undefined {\n return PROGRAM_TEMPLATES.find((t) => t.id === id);\n}\n"],"mappings":";AAsCA,IAAa,IAAgD;CAC3D;EACE,IAAI;EACJ,MAAM;EACN,aACE;EACF,UAAU;EACV,OAAO;EACP,OAAO;EACP,aAAa;EACb,UAAU;GACR;IAAE,MAAM;IAAsB,MAAM;IAAU,WAAW;IAAG,YAAY;IAAG,aAAa;IAAI;GAC5F;IAAE,MAAM;IAAY,MAAM;IAAU,WAAW;IAAG,YAAY;IAAG,aAAa;IAAI;GAClF;IAAE,MAAM;IAAiB,MAAM;IAAY,WAAW;IAAG,YAAY;IAAG,aAAa;IAAI;GAC1F;EACF;CACD;EACE,IAAI;EACJ,MAAM;EACN,aACE;EACF,UAAU;EACV,OAAO;EACP,OAAO;EACP,aAAa;EACb,UAAU;GACR;IAAE,MAAM;IAAa,MAAM;IAAU,WAAW;IAAG,YAAY;IAAG,aAAa;IAAI;GACnF;IAAE,MAAM;IAAgB,MAAM;IAAQ,WAAW;IAAG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G,YAAY;IAAG,aAAa;IAAI;GACnF;IACE,MAAM;IACN,MAAM;IACN,WAAW;IACX,YAAY;IACZ,aAAa;IACd;GACD;IAAE,MAAM;IAAgB,MAAM;IAAU,WAAW;IAAG,YAAY;IAAG,aAAa;IAAI;GACtF;IAAE,MAAM;IAAY,MAAM;IAAU,WAAW;IAAG,YAAY;IAAG,aAAa;IAAI;GACnF;EACF;CACF;AAED,SAAgB,EAAoB,GAAyC;AAC3E,QAAO,EAAkB,MAAM,MAAM,EAAE,OAAO,EAAG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MybConnection, MybProgram, MybProgramStatus, MybWorkout, MybWorkoutSession, MybSessionStatus, MybSessionSet, MybGoal, MybGoalStatus, MybMealLog, MybMealType, MybNutritionPlan, MybDailyMacros, MybBodyMetric, MybBodyMetricType, MybRecoveryLog, MybRecoveryMetric, MybCoachingRelationship, MybCoachingStatus, MybCreateProgramInput, MybUpdateProgramInput, MybCreateWorkoutInput, MybCreateExerciseInput, MybStartSessionInput, MybLogSetInput, MybCompleteSessionInput, MybCreateGoalInput, MybUpdateGoalInput, MybCreateNutritionPlanInput, MybUpdateNutritionPlanInput, MybLogMealInput, MybRecordMetricInput, MybLogRecoveryInput, MybCreateCoachingInput, PaginationInput } from '../types';
|
|
1
|
+
import { MybConnection, MybProgram, MybProgramStatus, MybWorkout, MybExercise, MybWorkoutSession, MybSessionStatus, MybSessionSet, MybGoal, MybGoalStatus, MybMealLog, MybMealType, MybNutritionPlan, MybDailyMacros, MybBodyMetric, MybBodyMetricType, MybRecoveryLog, MybRecoveryMetric, MybCoachingRelationship, MybCoachingStatus, MybCreateProgramInput, MybUpdateProgramInput, MybCreateWorkoutInput, MybCreateExerciseInput, MybStartSessionInput, MybLogSetInput, MybCompleteSessionInput, MybCreateGoalInput, MybUpdateGoalInput, MybCreateNutritionPlanInput, MybUpdateNutritionPlanInput, MybLogMealInput, MybRecordMetricInput, MybLogRecoveryInput, MybCreateCoachingInput, PaginationInput } from '../types';
|
|
2
2
|
|
|
3
3
|
export interface ProgramFilters {
|
|
4
4
|
status?: MybProgramStatus;
|
|
@@ -27,6 +27,12 @@ export declare const useMybProgram: (id: string | undefined) => import('@tanstac
|
|
|
27
27
|
updatedAt: string;
|
|
28
28
|
} | null>, Error>;
|
|
29
29
|
export declare const useMybProgramWorkouts: (programId: string | undefined) => import('@tanstack/react-query').UseQueryResult<NoInfer<MybWorkout[]>, Error>;
|
|
30
|
+
/**
|
|
31
|
+
* Planned exercises for a single workout, in `orderIndex` order — the
|
|
32
|
+
* guided-workout stepper (BOFF-4096) walks a live session's `workoutId`
|
|
33
|
+
* through these to drive the "next exercise" flow.
|
|
34
|
+
*/
|
|
35
|
+
export declare const useMybWorkoutExercises: (workoutId: string | undefined) => import('@tanstack/react-query').UseQueryResult<NoInfer<MybExercise[]>, Error>;
|
|
30
36
|
export declare const useMybCreateProgram: () => import('@tanstack/react-query').UseMutationResult<MybProgram, Error, MybCreateProgramInput, unknown>;
|
|
31
37
|
export declare const useMybUpdateProgram: () => import('@tanstack/react-query').UseMutationResult<MybProgram, Error, {
|
|
32
38
|
id: string;
|
|
@@ -65,6 +71,14 @@ export declare const useMybSession: (id: string | undefined) => import('@tanstac
|
|
|
65
71
|
perceivedExertion?: number | null | undefined;
|
|
66
72
|
notes?: string | null | undefined;
|
|
67
73
|
} | null>, Error>;
|
|
74
|
+
/**
|
|
75
|
+
* The calling member's own best-ever logged set for `exerciseName` (backend:
|
|
76
|
+
* `mybExerciseBestSet`, self-scoped — no memberId argument). Drives live
|
|
77
|
+
* auto-PR detection in the log-set dialog (BOFF-4096): `null` means the
|
|
78
|
+
* member has never logged this exercise before, so there is no record to
|
|
79
|
+
* beat yet.
|
|
80
|
+
*/
|
|
81
|
+
export declare const useMybExerciseBestSet: (exerciseName: string) => import('@tanstack/react-query').UseQueryResult<NoInfer<MybSessionSet | null>, Error>;
|
|
68
82
|
export declare const useMybStartSession: () => import('@tanstack/react-query').UseMutationResult<MybWorkoutSession, Error, MybStartSessionInput, unknown>;
|
|
69
83
|
export declare const useMybLogSet: () => import('@tanstack/react-query').UseMutationResult<MybSessionSet, Error, MybLogSetInput, unknown>;
|
|
70
84
|
export declare const useMybCompleteSession: () => import('@tanstack/react-query').UseMutationResult<MybWorkoutSession, Error, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMyBodyShieldApi.d.ts","sourceRoot":"","sources":["../../../src/mybodyshield/hooks/useMyBodyShieldApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,OAAO,KAAK,EACV,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,UAAU,
|
|
1
|
+
{"version":3,"file":"useMyBodyShieldApi.d.ts","sourceRoot":"","sources":["../../../src/mybodyshield/hooks/useMyBodyShieldApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,OAAO,KAAK,EACV,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,OAAO,EACP,aAAa,EACb,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,cAAc,EACd,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,2BAA2B,EAC3B,2BAA2B,EAC3B,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,eAAe,EAChB,MAAM,UAAU,CAAC;AAwJlB,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B;AAED,eAAO,MAAM,cAAc,GA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AgB7B,CAAC;AAMF,eAAO,MAAM,cAAc,GAAI,SAAS,iBAAiB,EAAE,WAAW,MAAM,2GAkB3E,CAAC;AAEF,eAAO,MAAM,oBAAoB,0HAgBhC,CAAC;AAEF,eAAO,MAAM,wBAAwB;QAIF,MAAM;YAAU,iBAAiB;WAYnE,CAAC"}
|
|
@@ -29,12 +29,22 @@ var a = () => {
|
|
|
29
29
|
"program-workouts",
|
|
30
30
|
e
|
|
31
31
|
],
|
|
32
|
+
workoutExercises: (e) => [
|
|
33
|
+
"mybodyshield",
|
|
34
|
+
"workout-exercises",
|
|
35
|
+
e
|
|
36
|
+
],
|
|
32
37
|
sessions: ["mybodyshield", "sessions"],
|
|
33
38
|
session: (e) => [
|
|
34
39
|
"mybodyshield",
|
|
35
40
|
"session",
|
|
36
41
|
e
|
|
37
42
|
],
|
|
43
|
+
exerciseBestSet: (e) => [
|
|
44
|
+
"mybodyshield",
|
|
45
|
+
"exercise-best-set",
|
|
46
|
+
e
|
|
47
|
+
],
|
|
38
48
|
goals: ["mybodyshield", "goals"],
|
|
39
49
|
goal: (e) => [
|
|
40
50
|
"mybodyshield",
|
|
@@ -95,7 +105,32 @@ var a = () => {
|
|
|
95
105
|
};
|
|
96
106
|
}
|
|
97
107
|
});
|
|
98
|
-
}, w = () => {
|
|
108
|
+
}, w = (t) => {
|
|
109
|
+
let { apiGatewayUrl: r } = e();
|
|
110
|
+
return n({
|
|
111
|
+
queryKey: s.programWorkouts(t ?? ""),
|
|
112
|
+
enabled: !!t,
|
|
113
|
+
queryFn: async () => x((await o(`query MybProgramWorkouts($programId: ID!) {
|
|
114
|
+
mybProgramWorkouts(programId: $programId) {
|
|
115
|
+
items {
|
|
116
|
+
${d}
|
|
117
|
+
exercises { items { ${u} } }
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}`, { programId: t }, r)).mybProgramWorkouts.items)
|
|
121
|
+
});
|
|
122
|
+
}, T = (t) => {
|
|
123
|
+
let { apiGatewayUrl: r } = e();
|
|
124
|
+
return n({
|
|
125
|
+
queryKey: s.workoutExercises(t ?? ""),
|
|
126
|
+
enabled: !!t,
|
|
127
|
+
queryFn: async () => (await o(`query MybWorkoutExercises($workoutId: ID!) {
|
|
128
|
+
mybWorkoutExercises(workoutId: $workoutId, pagination: { limit: 100 }) {
|
|
129
|
+
items { ${u} }
|
|
130
|
+
}
|
|
131
|
+
}`, { workoutId: t }, r)).mybWorkoutExercises.items.slice().sort((e, t) => e.orderIndex - t.orderIndex)
|
|
132
|
+
});
|
|
133
|
+
}, E = () => {
|
|
99
134
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
100
135
|
return t({
|
|
101
136
|
mutationFn: async (e) => (await o(`mutation MybCreateProgram($input: MybCreateProgramInput!) {
|
|
@@ -103,7 +138,7 @@ var a = () => {
|
|
|
103
138
|
}`, { input: e }, n)).mybCreateProgram,
|
|
104
139
|
onSuccess: () => i.invalidateQueries({ queryKey: s.programs })
|
|
105
140
|
});
|
|
106
|
-
},
|
|
141
|
+
}, D = () => {
|
|
107
142
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
108
143
|
return t({
|
|
109
144
|
mutationFn: async (e) => (await o(`mutation MybUpdateProgram($id: ID!, $input: MybUpdateProgramInput!) {
|
|
@@ -113,7 +148,7 @@ var a = () => {
|
|
|
113
148
|
i.invalidateQueries({ queryKey: s.programs }), i.invalidateQueries({ queryKey: s.program(e.id) });
|
|
114
149
|
}
|
|
115
150
|
});
|
|
116
|
-
},
|
|
151
|
+
}, O = () => {
|
|
117
152
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
118
153
|
return t({
|
|
119
154
|
mutationFn: async (e) => (await o(`mutation MybTransitionProgram($id: ID!, $status: MybProgramStatus!) {
|
|
@@ -123,13 +158,13 @@ var a = () => {
|
|
|
123
158
|
i.invalidateQueries({ queryKey: s.programs }), i.invalidateQueries({ queryKey: s.program(e.id) });
|
|
124
159
|
}
|
|
125
160
|
});
|
|
126
|
-
},
|
|
161
|
+
}, k = () => {
|
|
127
162
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
128
163
|
return t({
|
|
129
164
|
mutationFn: async (e) => (await o("mutation MybArchiveProgram($id: ID!) { mybArchiveProgram(id: $id) }", { id: e }, n)).mybArchiveProgram,
|
|
130
165
|
onSuccess: () => i.invalidateQueries({ queryKey: s.programs })
|
|
131
166
|
});
|
|
132
|
-
},
|
|
167
|
+
}, A = () => {
|
|
133
168
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
134
169
|
return t({
|
|
135
170
|
mutationFn: async (e) => (await o(`mutation MybAddWorkout($input: MybCreateWorkoutInput!) {
|
|
@@ -139,7 +174,7 @@ var a = () => {
|
|
|
139
174
|
i.invalidateQueries({ queryKey: s.program(e.programId) }), i.invalidateQueries({ queryKey: s.programWorkouts(e.programId) });
|
|
140
175
|
}
|
|
141
176
|
});
|
|
142
|
-
},
|
|
177
|
+
}, j = () => {
|
|
143
178
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
144
179
|
return t({
|
|
145
180
|
mutationFn: async (e) => (await o("mutation MybAddExercise($input: MybCreateExerciseInput!) {\n mybAddExercise(input: $input) { id workoutId }\n }", { input: e }, n)).mybAddExercise,
|
|
@@ -147,7 +182,7 @@ var a = () => {
|
|
|
147
182
|
i.invalidateQueries({ queryKey: ["mybodyshield", "program"] }), i.invalidateQueries({ queryKey: ["mybodyshield", "program-workouts"] });
|
|
148
183
|
}
|
|
149
184
|
});
|
|
150
|
-
},
|
|
185
|
+
}, M = (t = {}) => {
|
|
151
186
|
let { apiGatewayUrl: r } = e();
|
|
152
187
|
return n({
|
|
153
188
|
queryKey: [...s.sessions, t],
|
|
@@ -162,7 +197,7 @@ var a = () => {
|
|
|
162
197
|
pagination: t.pagination ?? c
|
|
163
198
|
}, r)).mybListSessions
|
|
164
199
|
});
|
|
165
|
-
},
|
|
200
|
+
}, N = (t) => {
|
|
166
201
|
let { apiGatewayUrl: r } = e();
|
|
167
202
|
return n({
|
|
168
203
|
queryKey: s.session(t ?? ""),
|
|
@@ -182,7 +217,17 @@ var a = () => {
|
|
|
182
217
|
};
|
|
183
218
|
}
|
|
184
219
|
});
|
|
185
|
-
},
|
|
220
|
+
}, P = (t) => {
|
|
221
|
+
let { apiGatewayUrl: r } = e(), i = t.trim();
|
|
222
|
+
return n({
|
|
223
|
+
queryKey: s.exerciseBestSet(i),
|
|
224
|
+
enabled: i.length > 0,
|
|
225
|
+
queryFn: async () => (await o(`query MybExerciseBestSet($exerciseName: String!) {
|
|
226
|
+
mybExerciseBestSet(exerciseName: $exerciseName) { ${f} }
|
|
227
|
+
}`, { exerciseName: i }, r)).mybExerciseBestSet,
|
|
228
|
+
staleTime: 15e3
|
|
229
|
+
});
|
|
230
|
+
}, F = () => {
|
|
186
231
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
187
232
|
return t({
|
|
188
233
|
mutationFn: async (e) => (await o(`mutation MybStartSession($input: MybStartSessionInput!) {
|
|
@@ -190,17 +235,17 @@ var a = () => {
|
|
|
190
235
|
}`, { input: e }, n)).mybStartSession,
|
|
191
236
|
onSuccess: () => i.invalidateQueries({ queryKey: s.sessions })
|
|
192
237
|
});
|
|
193
|
-
},
|
|
238
|
+
}, I = () => {
|
|
194
239
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
195
240
|
return t({
|
|
196
241
|
mutationFn: async (e) => (await o(`mutation MybLogSet($input: MybLogSetInput!) {
|
|
197
242
|
mybLogSet(input: $input) { ${f} }
|
|
198
243
|
}`, { input: e }, n)).mybLogSet,
|
|
199
244
|
onSuccess: (e) => {
|
|
200
|
-
i.invalidateQueries({ queryKey: s.session(e.sessionId) }), i.invalidateQueries({ queryKey: s.sessions });
|
|
245
|
+
i.invalidateQueries({ queryKey: s.session(e.sessionId) }), i.invalidateQueries({ queryKey: s.sessions }), i.invalidateQueries({ queryKey: s.exerciseBestSet(e.exerciseName) });
|
|
201
246
|
}
|
|
202
247
|
});
|
|
203
|
-
},
|
|
248
|
+
}, ee = () => {
|
|
204
249
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
205
250
|
return t({
|
|
206
251
|
mutationFn: async (e) => (await o(`mutation MybCompleteSession($id: ID!, $input: MybCompleteSessionInput!) {
|
|
@@ -210,7 +255,7 @@ var a = () => {
|
|
|
210
255
|
i.invalidateQueries({ queryKey: s.session(e.id) }), i.invalidateQueries({ queryKey: s.sessions });
|
|
211
256
|
}
|
|
212
257
|
});
|
|
213
|
-
},
|
|
258
|
+
}, L = (t = {}) => {
|
|
214
259
|
let { apiGatewayUrl: r } = e();
|
|
215
260
|
return n({
|
|
216
261
|
queryKey: [...s.goals, t],
|
|
@@ -225,7 +270,7 @@ var a = () => {
|
|
|
225
270
|
pagination: t.pagination ?? c
|
|
226
271
|
}, r)).mybListGoals
|
|
227
272
|
});
|
|
228
|
-
},
|
|
273
|
+
}, R = () => {
|
|
229
274
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
230
275
|
return t({
|
|
231
276
|
mutationFn: async (e) => (await o(`mutation MybCreateGoal($input: MybCreateGoalInput!) {
|
|
@@ -233,7 +278,7 @@ var a = () => {
|
|
|
233
278
|
}`, { input: e }, n)).mybCreateGoal,
|
|
234
279
|
onSuccess: () => i.invalidateQueries({ queryKey: s.goals })
|
|
235
280
|
});
|
|
236
|
-
},
|
|
281
|
+
}, z = () => {
|
|
237
282
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
238
283
|
return t({
|
|
239
284
|
mutationFn: async (e) => (await o(`mutation MybUpdateGoal($id: ID!, $input: MybUpdateGoalInput!) {
|
|
@@ -241,7 +286,7 @@ var a = () => {
|
|
|
241
286
|
}`, e, n)).mybUpdateGoal,
|
|
242
287
|
onSuccess: () => i.invalidateQueries({ queryKey: s.goals })
|
|
243
288
|
});
|
|
244
|
-
},
|
|
289
|
+
}, B = () => {
|
|
245
290
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
246
291
|
return t({
|
|
247
292
|
mutationFn: async (e) => (await o(`mutation MybAchieveGoal($id: ID!) {
|
|
@@ -249,7 +294,7 @@ var a = () => {
|
|
|
249
294
|
}`, { id: e }, n)).mybAchieveGoal,
|
|
250
295
|
onSuccess: () => i.invalidateQueries({ queryKey: s.goals })
|
|
251
296
|
});
|
|
252
|
-
},
|
|
297
|
+
}, V = (t) => {
|
|
253
298
|
let { apiGatewayUrl: r } = e();
|
|
254
299
|
return n({
|
|
255
300
|
queryKey: [...s.activePlan, t ?? "me"],
|
|
@@ -257,7 +302,7 @@ var a = () => {
|
|
|
257
302
|
mybActiveNutritionPlan(memberId: $memberId) { ${g} }
|
|
258
303
|
}`, { memberId: t }, r)).mybActiveNutritionPlan
|
|
259
304
|
});
|
|
260
|
-
},
|
|
305
|
+
}, H = (t = {}) => {
|
|
261
306
|
let { apiGatewayUrl: r } = e();
|
|
262
307
|
return n({
|
|
263
308
|
queryKey: [...s.meals, t],
|
|
@@ -272,7 +317,7 @@ var a = () => {
|
|
|
272
317
|
pagination: t.pagination ?? c
|
|
273
318
|
}, r)).mybListMeals
|
|
274
319
|
});
|
|
275
|
-
},
|
|
320
|
+
}, U = (t, r) => {
|
|
276
321
|
let { apiGatewayUrl: i } = e();
|
|
277
322
|
return n({
|
|
278
323
|
queryKey: [
|
|
@@ -287,7 +332,7 @@ var a = () => {
|
|
|
287
332
|
memberId: r
|
|
288
333
|
}, i)).mybDailyMacros
|
|
289
334
|
});
|
|
290
|
-
},
|
|
335
|
+
}, W = () => {
|
|
291
336
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
292
337
|
return t({
|
|
293
338
|
mutationFn: async (e) => (await o(`mutation MybCreateNutritionPlan($input: MybCreateNutritionPlanInput!) {
|
|
@@ -297,7 +342,7 @@ var a = () => {
|
|
|
297
342
|
i.invalidateQueries({ queryKey: s.activePlan });
|
|
298
343
|
}
|
|
299
344
|
});
|
|
300
|
-
},
|
|
345
|
+
}, G = () => {
|
|
301
346
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
302
347
|
return t({
|
|
303
348
|
mutationFn: async (e) => (await o(`mutation MybUpdateNutritionPlan($id: ID!, $input: MybUpdateNutritionPlanInput!) {
|
|
@@ -307,7 +352,7 @@ var a = () => {
|
|
|
307
352
|
i.invalidateQueries({ queryKey: s.activePlan }), i.invalidateQueries({ queryKey: s.nutritionPlan(e.id) });
|
|
308
353
|
}
|
|
309
354
|
});
|
|
310
|
-
},
|
|
355
|
+
}, K = () => {
|
|
311
356
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
312
357
|
return t({
|
|
313
358
|
mutationFn: async (e) => (await o(`mutation MybActivateNutritionPlan($id: ID!) {
|
|
@@ -317,7 +362,7 @@ var a = () => {
|
|
|
317
362
|
i.invalidateQueries({ queryKey: s.activePlan }), i.invalidateQueries({ queryKey: s.nutritionPlan(e.id) });
|
|
318
363
|
}
|
|
319
364
|
});
|
|
320
|
-
},
|
|
365
|
+
}, q = () => {
|
|
321
366
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
322
367
|
return t({
|
|
323
368
|
mutationFn: async (e) => (await o(`mutation MybLogMeal($input: MybLogMealInput!) {
|
|
@@ -327,7 +372,7 @@ var a = () => {
|
|
|
327
372
|
i.invalidateQueries({ queryKey: s.meals }), i.invalidateQueries({ queryKey: s.dailyMacros }), e.planId && i.invalidateQueries({ queryKey: s.nutritionPlan(e.planId) });
|
|
328
373
|
}
|
|
329
374
|
});
|
|
330
|
-
},
|
|
375
|
+
}, J = () => {
|
|
331
376
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
332
377
|
return t({
|
|
333
378
|
mutationFn: async (e) => (await o("mutation MybDeleteMeal($id: ID!) { mybDeleteMeal(id: $id) }", { id: e }, n)).mybDeleteMeal,
|
|
@@ -335,7 +380,7 @@ var a = () => {
|
|
|
335
380
|
i.invalidateQueries({ queryKey: s.meals }), i.invalidateQueries({ queryKey: s.dailyMacros });
|
|
336
381
|
}
|
|
337
382
|
});
|
|
338
|
-
},
|
|
383
|
+
}, Y = (t = {}) => {
|
|
339
384
|
let { apiGatewayUrl: r } = e();
|
|
340
385
|
return n({
|
|
341
386
|
queryKey: [...s.bodyMetrics, t],
|
|
@@ -350,7 +395,7 @@ var a = () => {
|
|
|
350
395
|
pagination: t.pagination ?? c
|
|
351
396
|
}, r)).mybListBodyMetrics
|
|
352
397
|
});
|
|
353
|
-
},
|
|
398
|
+
}, X = () => {
|
|
354
399
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
355
400
|
return t({
|
|
356
401
|
mutationFn: async (e) => (await o(`mutation MybRecordBodyMetric($input: MybRecordMetricInput!) {
|
|
@@ -358,7 +403,7 @@ var a = () => {
|
|
|
358
403
|
}`, { input: e }, n)).mybRecordBodyMetric,
|
|
359
404
|
onSuccess: () => i.invalidateQueries({ queryKey: s.bodyMetrics })
|
|
360
405
|
});
|
|
361
|
-
},
|
|
406
|
+
}, Z = (t, r) => {
|
|
362
407
|
let { apiGatewayUrl: i } = e();
|
|
363
408
|
return n({
|
|
364
409
|
queryKey: [
|
|
@@ -376,7 +421,7 @@ var a = () => {
|
|
|
376
421
|
memberId: r
|
|
377
422
|
}, i)).mybListRecoveryLogs
|
|
378
423
|
});
|
|
379
|
-
},
|
|
424
|
+
}, Q = () => {
|
|
380
425
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
381
426
|
return t({
|
|
382
427
|
mutationFn: async (e) => (await o(`mutation MybLogRecovery($input: MybLogRecoveryInput!) {
|
|
@@ -384,7 +429,7 @@ var a = () => {
|
|
|
384
429
|
}`, { input: e }, n)).mybLogRecovery,
|
|
385
430
|
onSuccess: () => i.invalidateQueries({ queryKey: s.recovery })
|
|
386
431
|
});
|
|
387
|
-
},
|
|
432
|
+
}, $ = (t, r) => {
|
|
388
433
|
let { apiGatewayUrl: i } = e();
|
|
389
434
|
return n({
|
|
390
435
|
queryKey: [
|
|
@@ -402,7 +447,7 @@ var a = () => {
|
|
|
402
447
|
memberId: r
|
|
403
448
|
}, i)).mybListCoaching
|
|
404
449
|
});
|
|
405
|
-
},
|
|
450
|
+
}, te = () => {
|
|
406
451
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
407
452
|
return t({
|
|
408
453
|
mutationFn: async (e) => (await o(`mutation MybCreateCoaching($input: MybCreateCoachingInput!) {
|
|
@@ -410,7 +455,7 @@ var a = () => {
|
|
|
410
455
|
}`, { input: e }, n)).mybCreateCoaching,
|
|
411
456
|
onSuccess: () => i.invalidateQueries({ queryKey: s.coaching })
|
|
412
457
|
});
|
|
413
|
-
},
|
|
458
|
+
}, ne = () => {
|
|
414
459
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
415
460
|
return t({
|
|
416
461
|
mutationFn: async (e) => (await o(`mutation MybTransitionCoaching($id: ID!, $status: MybCoachingStatus!) {
|
|
@@ -420,6 +465,6 @@ var a = () => {
|
|
|
420
465
|
});
|
|
421
466
|
};
|
|
422
467
|
//#endregion
|
|
423
|
-
export {
|
|
468
|
+
export { B as useMybAchieveGoal, K as useMybActivateNutritionPlan, V as useMybActiveNutritionPlan, j as useMybAddExercise, A as useMybAddWorkout, k as useMybArchiveProgram, Y as useMybBodyMetrics, $ as useMybCoaching, ee as useMybCompleteSession, te as useMybCreateCoaching, R as useMybCreateGoal, W as useMybCreateNutritionPlan, E as useMybCreateProgram, U as useMybDailyMacros, J as useMybDeleteMeal, P as useMybExerciseBestSet, L as useMybGoals, q as useMybLogMeal, Q as useMybLogRecovery, I as useMybLogSet, H as useMybMeals, C as useMybProgram, w as useMybProgramWorkouts, S as useMybPrograms, X as useMybRecordBodyMetric, Z as useMybRecoveryLogs, N as useMybSession, M as useMybSessions, F as useMybStartSession, ne as useMybTransitionCoaching, O as useMybTransitionProgram, z as useMybUpdateGoal, G as useMybUpdateNutritionPlan, D as useMybUpdateProgram, T as useMybWorkoutExercises };
|
|
424
469
|
|
|
425
470
|
//# sourceMappingURL=useMyBodyShieldApi.js.map
|