@burdenoff/microfe-mybodyshield 2026.720.3 → 2026.731.2
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/hooks/useMyBodyShieldApi.d.ts +28 -1
- package/dist/mybodyshield/hooks/useMyBodyShieldApi.d.ts.map +1 -1
- package/dist/mybodyshield/hooks/useMyBodyShieldApi.js +79 -40
- package/dist/mybodyshield/hooks/useMyBodyShieldApi.js.map +1 -1
- package/dist/mybodyshield/lib/offlineSessionQueue.d.ts +76 -0
- package/dist/mybodyshield/lib/offlineSessionQueue.d.ts.map +1 -0
- package/dist/mybodyshield/lib/offlineSessionQueue.js +77 -0
- package/dist/mybodyshield/lib/offlineSessionQueue.js.map +1 -0
- package/dist/mybodyshield/lib/useOfflineSessionSync.d.ts +30 -0
- package/dist/mybodyshield/lib/useOfflineSessionSync.d.ts.map +1 -0
- package/dist/mybodyshield/lib/useOfflineSessionSync.js +80 -0
- package/dist/mybodyshield/lib/useOfflineSessionSync.js.map +1 -0
- package/dist/mybodyshield/pages/DashboardPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/DashboardPage.js +247 -170
- package/dist/mybodyshield/pages/DashboardPage.js.map +1 -1
- package/dist/mybodyshield/pages/nutrition/NutritionPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/nutrition/NutritionPage.js +540 -441
- package/dist/mybodyshield/pages/nutrition/NutritionPage.js.map +1 -1
- package/dist/mybodyshield/pages/train/SessionDetailPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/train/SessionDetailPage.js +242 -173
- package/dist/mybodyshield/pages/train/SessionDetailPage.js.map +1 -1
- package/dist/mybodyshield/types/index.d.ts +46 -0
- package/dist/mybodyshield/types/index.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
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';
|
|
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, MybDeviceConnection, MybDeviceProvider, MybWearableMetricType, MybTodayGuidance, MybFood } from '../types';
|
|
2
2
|
|
|
3
3
|
export interface ProgramFilters {
|
|
4
4
|
status?: MybProgramStatus;
|
|
@@ -129,4 +129,31 @@ export declare const useMybTransitionCoaching: () => import('@tanstack/react-que
|
|
|
129
129
|
id: string;
|
|
130
130
|
status: MybCoachingStatus;
|
|
131
131
|
}, unknown>;
|
|
132
|
+
export declare const useMybDeviceConnections: (memberId?: string) => import('@tanstack/react-query').UseQueryResult<NoInfer<MybDeviceConnection[]>, Error>;
|
|
133
|
+
export declare const useMybConnectDevice: () => import('@tanstack/react-query').UseMutationResult<MybDeviceConnection, Error, {
|
|
134
|
+
provider: MybDeviceProvider;
|
|
135
|
+
externalAccountId?: string;
|
|
136
|
+
scopes?: string[];
|
|
137
|
+
}, unknown>;
|
|
138
|
+
export declare const useMybDisconnectDevice: () => import('@tanstack/react-query').UseMutationResult<boolean, Error, string, unknown>;
|
|
139
|
+
export interface MybSyncReadingInput {
|
|
140
|
+
metricType: MybWearableMetricType;
|
|
141
|
+
value: number;
|
|
142
|
+
unit?: string;
|
|
143
|
+
recordedAt: string;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Sync a batch of readings a native health bridge (Apple HealthKit / Google
|
|
147
|
+
* Health Connect) already pulled on-device. The bridge itself is a Capacitor
|
|
148
|
+
* plugin concern that lives in the app shell (`mybodyshield-app`), not this
|
|
149
|
+
* MFE; this hook is the transport primitive it calls once it has readings to
|
|
150
|
+
* push (BOFF-4172).
|
|
151
|
+
*/
|
|
152
|
+
export declare const useMybSyncDeviceReadings: () => import('@tanstack/react-query').UseMutationResult<unknown[], Error, {
|
|
153
|
+
connectionId: string;
|
|
154
|
+
readings: MybSyncReadingInput[];
|
|
155
|
+
}, unknown>;
|
|
156
|
+
export declare const useMybTodayGuidance: (memberId?: string) => import('@tanstack/react-query').UseQueryResult<NoInfer<MybTodayGuidance>, Error>;
|
|
157
|
+
export declare const useMybSearchFoods: (query: string, limit?: number) => import('@tanstack/react-query').UseQueryResult<NoInfer<MybFood[]>, Error>;
|
|
158
|
+
export declare const useMybFoodByBarcode: () => import('@tanstack/react-query').UseMutationResult<MybFood | null, Error, string, unknown>;
|
|
132
159
|
//# sourceMappingURL=useMyBodyShieldApi.d.ts.map
|
|
@@ -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,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;
|
|
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,EACf,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EAChB,OAAO,EACR,MAAM,UAAU,CAAC;AAwKlB,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,QAAQ,CAA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AAkB,GAAI,SAAS,iBAAiB,EAAE,WAAW,MAAM,kGAkB/E,CAAC;AAEF,eAAO,MAAM,iBAAiB,8GAgB7B,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;AAMF,eAAO,MAAM,uBAAuB,GAAI,WAAW,MAAM,0FAexD,CAAC;AAEF,eAAO,MAAM,mBAAmB;cAKhB,iBAAiB;wBACP,MAAM;aACjB,MAAM,EAAE;WAatB,CAAC;AAEF,eAAO,MAAM,sBAAsB,0FAclC,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,qBAAqB,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB;kBAIQ,MAAM;cAAY,mBAAmB,EAAE;WAgBnF,CAAC;AAMF,eAAO,MAAM,mBAAmB,GAAI,WAAW,MAAM,qFAkBpD,CAAC;AAMF,eAAO,MAAM,iBAAiB,GAAI,OAAO,MAAM,EAAE,cAAU,8EAkB1D,CAAC;AAEF,eAAO,MAAM,mBAAmB,iGAc/B,CAAC"}
|
|
@@ -61,11 +61,23 @@ var a = () => {
|
|
|
61
61
|
dailyMacros: ["mybodyshield", "daily-macros"],
|
|
62
62
|
bodyMetrics: ["mybodyshield", "body-metrics"],
|
|
63
63
|
recovery: ["mybodyshield", "recovery"],
|
|
64
|
-
coaching: ["mybodyshield", "coaching"]
|
|
65
|
-
|
|
64
|
+
coaching: ["mybodyshield", "coaching"],
|
|
65
|
+
deviceConnections: ["mybodyshield", "device-connections"],
|
|
66
|
+
guidance: ["mybodyshield", "guidance"],
|
|
67
|
+
foodSearch: (e) => [
|
|
68
|
+
"mybodyshield",
|
|
69
|
+
"food-search",
|
|
70
|
+
e
|
|
71
|
+
],
|
|
72
|
+
foodByBarcode: (e) => [
|
|
73
|
+
"mybodyshield",
|
|
74
|
+
"food-barcode",
|
|
75
|
+
e
|
|
76
|
+
]
|
|
77
|
+
}, c = { limit: 50 }, l = "\n id workspaceId memberId coachId name description goalType level phase status\n weeks daysPerWeek startDate endDate tags createdAt updatedAt\n", u = "\n id workspaceId workoutId name instructions muscleGroup sets reps targetWeight\n restSeconds orderIndex demo { id } createdAt updatedAt\n", d = "\n id workspaceId programId name description type dayOfWeek weekNumber orderIndex\n durationMin createdAt updatedAt\n", f = "\n id workspaceId sessionId exerciseName setNumber reps weight distanceM durationSec\n isPersonalRecord createdAt updatedAt\n", p = "\n id workspaceId memberId programId workoutId status scheduledFor startedAt completedAt\n caloriesBurned perceivedExertion notes createdAt updatedAt\n", m = "\n id workspaceId memberId title description type status targetValue currentValue\n baselineValue unit targetDate achievedAt createdAt updatedAt\n", h = "\n id workspaceId memberId planId name mealType calories proteinG carbsG fatG servings\n isFavorite loggedAt barcode createdAt updatedAt\n", g = "\n id workspaceId memberId coachId name goalType calorieTarget proteinTarget carbsTarget\n fatTarget startDate endDate isActive notes createdAt updatedAt\n", _ = "\n id workspaceId memberId type value unit measuredAt notes photo { id } createdAt updatedAt\n", v = "\n id workspaceId memberId metric score sleepHours notes loggedAt createdAt updatedAt\n", y = "\n id workspaceId coachId memberId status specialty shareWorkouts shareNutrition\n shareMetrics startedAt endedAt notes createdAt updatedAt\n", b = "\n memberId date readinessScore aiSummary cards { signal action reason }\n", x = "\n barcode name brand servingG calories proteinG carbsG fatG imageUrl\n", S = "\n date calories proteinG carbsG fatG calorieTarget proteinTarget carbsTarget fatTarget\n", C = (e) => e.map(({ exercises: e, ...t }) => ({
|
|
66
78
|
...t,
|
|
67
79
|
exercises: e.items
|
|
68
|
-
})),
|
|
80
|
+
})), w = (t = {}) => {
|
|
69
81
|
let { apiGatewayUrl: r } = e();
|
|
70
82
|
return n({
|
|
71
83
|
queryKey: [...s.programs, t],
|
|
@@ -80,7 +92,7 @@ var a = () => {
|
|
|
80
92
|
pagination: t.pagination ?? c
|
|
81
93
|
}, r)).mybListPrograms
|
|
82
94
|
});
|
|
83
|
-
},
|
|
95
|
+
}, T = (t) => {
|
|
84
96
|
let { apiGatewayUrl: r } = e();
|
|
85
97
|
return n({
|
|
86
98
|
queryKey: s.program(t ?? ""),
|
|
@@ -101,16 +113,16 @@ var a = () => {
|
|
|
101
113
|
let { workouts: n, ...i } = e.mybProgram;
|
|
102
114
|
return {
|
|
103
115
|
...i,
|
|
104
|
-
workouts:
|
|
116
|
+
workouts: C(n.items)
|
|
105
117
|
};
|
|
106
118
|
}
|
|
107
119
|
});
|
|
108
|
-
},
|
|
120
|
+
}, E = (t) => {
|
|
109
121
|
let { apiGatewayUrl: r } = e();
|
|
110
122
|
return n({
|
|
111
123
|
queryKey: s.programWorkouts(t ?? ""),
|
|
112
124
|
enabled: !!t,
|
|
113
|
-
queryFn: async () =>
|
|
125
|
+
queryFn: async () => C((await o(`query MybProgramWorkouts($programId: ID!) {
|
|
114
126
|
mybProgramWorkouts(programId: $programId) {
|
|
115
127
|
items {
|
|
116
128
|
${d}
|
|
@@ -119,7 +131,7 @@ var a = () => {
|
|
|
119
131
|
}
|
|
120
132
|
}`, { programId: t }, r)).mybProgramWorkouts.items)
|
|
121
133
|
});
|
|
122
|
-
},
|
|
134
|
+
}, D = (t) => {
|
|
123
135
|
let { apiGatewayUrl: r } = e();
|
|
124
136
|
return n({
|
|
125
137
|
queryKey: s.workoutExercises(t ?? ""),
|
|
@@ -130,7 +142,7 @@ var a = () => {
|
|
|
130
142
|
}
|
|
131
143
|
}`, { workoutId: t }, r)).mybWorkoutExercises.items.slice().sort((e, t) => e.orderIndex - t.orderIndex)
|
|
132
144
|
});
|
|
133
|
-
},
|
|
145
|
+
}, O = () => {
|
|
134
146
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
135
147
|
return t({
|
|
136
148
|
mutationFn: async (e) => (await o(`mutation MybCreateProgram($input: MybCreateProgramInput!) {
|
|
@@ -138,7 +150,7 @@ var a = () => {
|
|
|
138
150
|
}`, { input: e }, n)).mybCreateProgram,
|
|
139
151
|
onSuccess: () => i.invalidateQueries({ queryKey: s.programs })
|
|
140
152
|
});
|
|
141
|
-
},
|
|
153
|
+
}, k = () => {
|
|
142
154
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
143
155
|
return t({
|
|
144
156
|
mutationFn: async (e) => (await o(`mutation MybUpdateProgram($id: ID!, $input: MybUpdateProgramInput!) {
|
|
@@ -148,7 +160,7 @@ var a = () => {
|
|
|
148
160
|
i.invalidateQueries({ queryKey: s.programs }), i.invalidateQueries({ queryKey: s.program(e.id) });
|
|
149
161
|
}
|
|
150
162
|
});
|
|
151
|
-
},
|
|
163
|
+
}, A = () => {
|
|
152
164
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
153
165
|
return t({
|
|
154
166
|
mutationFn: async (e) => (await o(`mutation MybTransitionProgram($id: ID!, $status: MybProgramStatus!) {
|
|
@@ -158,13 +170,13 @@ var a = () => {
|
|
|
158
170
|
i.invalidateQueries({ queryKey: s.programs }), i.invalidateQueries({ queryKey: s.program(e.id) });
|
|
159
171
|
}
|
|
160
172
|
});
|
|
161
|
-
},
|
|
173
|
+
}, j = () => {
|
|
162
174
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
163
175
|
return t({
|
|
164
176
|
mutationFn: async (e) => (await o("mutation MybArchiveProgram($id: ID!) { mybArchiveProgram(id: $id) }", { id: e }, n)).mybArchiveProgram,
|
|
165
177
|
onSuccess: () => i.invalidateQueries({ queryKey: s.programs })
|
|
166
178
|
});
|
|
167
|
-
},
|
|
179
|
+
}, M = () => {
|
|
168
180
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
169
181
|
return t({
|
|
170
182
|
mutationFn: async (e) => (await o(`mutation MybAddWorkout($input: MybCreateWorkoutInput!) {
|
|
@@ -174,7 +186,7 @@ var a = () => {
|
|
|
174
186
|
i.invalidateQueries({ queryKey: s.program(e.programId) }), i.invalidateQueries({ queryKey: s.programWorkouts(e.programId) });
|
|
175
187
|
}
|
|
176
188
|
});
|
|
177
|
-
},
|
|
189
|
+
}, N = () => {
|
|
178
190
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
179
191
|
return t({
|
|
180
192
|
mutationFn: async (e) => (await o("mutation MybAddExercise($input: MybCreateExerciseInput!) {\n mybAddExercise(input: $input) { id workoutId }\n }", { input: e }, n)).mybAddExercise,
|
|
@@ -182,7 +194,7 @@ var a = () => {
|
|
|
182
194
|
i.invalidateQueries({ queryKey: ["mybodyshield", "program"] }), i.invalidateQueries({ queryKey: ["mybodyshield", "program-workouts"] });
|
|
183
195
|
}
|
|
184
196
|
});
|
|
185
|
-
},
|
|
197
|
+
}, P = (t = {}) => {
|
|
186
198
|
let { apiGatewayUrl: r } = e();
|
|
187
199
|
return n({
|
|
188
200
|
queryKey: [...s.sessions, t],
|
|
@@ -197,7 +209,7 @@ var a = () => {
|
|
|
197
209
|
pagination: t.pagination ?? c
|
|
198
210
|
}, r)).mybListSessions
|
|
199
211
|
});
|
|
200
|
-
},
|
|
212
|
+
}, F = (t) => {
|
|
201
213
|
let { apiGatewayUrl: r } = e();
|
|
202
214
|
return n({
|
|
203
215
|
queryKey: s.session(t ?? ""),
|
|
@@ -217,7 +229,7 @@ var a = () => {
|
|
|
217
229
|
};
|
|
218
230
|
}
|
|
219
231
|
});
|
|
220
|
-
},
|
|
232
|
+
}, I = (t) => {
|
|
221
233
|
let { apiGatewayUrl: r } = e(), i = t.trim();
|
|
222
234
|
return n({
|
|
223
235
|
queryKey: s.exerciseBestSet(i),
|
|
@@ -227,7 +239,7 @@ var a = () => {
|
|
|
227
239
|
}`, { exerciseName: i }, r)).mybExerciseBestSet,
|
|
228
240
|
staleTime: 15e3
|
|
229
241
|
});
|
|
230
|
-
},
|
|
242
|
+
}, L = () => {
|
|
231
243
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
232
244
|
return t({
|
|
233
245
|
mutationFn: async (e) => (await o(`mutation MybStartSession($input: MybStartSessionInput!) {
|
|
@@ -235,7 +247,7 @@ var a = () => {
|
|
|
235
247
|
}`, { input: e }, n)).mybStartSession,
|
|
236
248
|
onSuccess: () => i.invalidateQueries({ queryKey: s.sessions })
|
|
237
249
|
});
|
|
238
|
-
},
|
|
250
|
+
}, R = () => {
|
|
239
251
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
240
252
|
return t({
|
|
241
253
|
mutationFn: async (e) => (await o(`mutation MybLogSet($input: MybLogSetInput!) {
|
|
@@ -255,7 +267,7 @@ var a = () => {
|
|
|
255
267
|
i.invalidateQueries({ queryKey: s.session(e.id) }), i.invalidateQueries({ queryKey: s.sessions });
|
|
256
268
|
}
|
|
257
269
|
});
|
|
258
|
-
},
|
|
270
|
+
}, z = (t = {}) => {
|
|
259
271
|
let { apiGatewayUrl: r } = e();
|
|
260
272
|
return n({
|
|
261
273
|
queryKey: [...s.goals, t],
|
|
@@ -270,7 +282,7 @@ var a = () => {
|
|
|
270
282
|
pagination: t.pagination ?? c
|
|
271
283
|
}, r)).mybListGoals
|
|
272
284
|
});
|
|
273
|
-
},
|
|
285
|
+
}, B = () => {
|
|
274
286
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
275
287
|
return t({
|
|
276
288
|
mutationFn: async (e) => (await o(`mutation MybCreateGoal($input: MybCreateGoalInput!) {
|
|
@@ -278,7 +290,7 @@ var a = () => {
|
|
|
278
290
|
}`, { input: e }, n)).mybCreateGoal,
|
|
279
291
|
onSuccess: () => i.invalidateQueries({ queryKey: s.goals })
|
|
280
292
|
});
|
|
281
|
-
},
|
|
293
|
+
}, V = () => {
|
|
282
294
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
283
295
|
return t({
|
|
284
296
|
mutationFn: async (e) => (await o(`mutation MybUpdateGoal($id: ID!, $input: MybUpdateGoalInput!) {
|
|
@@ -286,7 +298,7 @@ var a = () => {
|
|
|
286
298
|
}`, e, n)).mybUpdateGoal,
|
|
287
299
|
onSuccess: () => i.invalidateQueries({ queryKey: s.goals })
|
|
288
300
|
});
|
|
289
|
-
},
|
|
301
|
+
}, H = () => {
|
|
290
302
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
291
303
|
return t({
|
|
292
304
|
mutationFn: async (e) => (await o(`mutation MybAchieveGoal($id: ID!) {
|
|
@@ -294,7 +306,7 @@ var a = () => {
|
|
|
294
306
|
}`, { id: e }, n)).mybAchieveGoal,
|
|
295
307
|
onSuccess: () => i.invalidateQueries({ queryKey: s.goals })
|
|
296
308
|
});
|
|
297
|
-
},
|
|
309
|
+
}, U = (t) => {
|
|
298
310
|
let { apiGatewayUrl: r } = e();
|
|
299
311
|
return n({
|
|
300
312
|
queryKey: [...s.activePlan, t ?? "me"],
|
|
@@ -302,7 +314,7 @@ var a = () => {
|
|
|
302
314
|
mybActiveNutritionPlan(memberId: $memberId) { ${g} }
|
|
303
315
|
}`, { memberId: t }, r)).mybActiveNutritionPlan
|
|
304
316
|
});
|
|
305
|
-
},
|
|
317
|
+
}, W = (t = {}) => {
|
|
306
318
|
let { apiGatewayUrl: r } = e();
|
|
307
319
|
return n({
|
|
308
320
|
queryKey: [...s.meals, t],
|
|
@@ -317,7 +329,7 @@ var a = () => {
|
|
|
317
329
|
pagination: t.pagination ?? c
|
|
318
330
|
}, r)).mybListMeals
|
|
319
331
|
});
|
|
320
|
-
},
|
|
332
|
+
}, G = (t, r) => {
|
|
321
333
|
let { apiGatewayUrl: i } = e();
|
|
322
334
|
return n({
|
|
323
335
|
queryKey: [
|
|
@@ -326,13 +338,13 @@ var a = () => {
|
|
|
326
338
|
r ?? "me"
|
|
327
339
|
],
|
|
328
340
|
queryFn: async () => (await o(`query MybDailyMacros($date: DateTime, $memberId: ID) {
|
|
329
|
-
mybDailyMacros(date: $date, memberId: $memberId) { ${
|
|
341
|
+
mybDailyMacros(date: $date, memberId: $memberId) { ${S} }
|
|
330
342
|
}`, {
|
|
331
343
|
date: t,
|
|
332
344
|
memberId: r
|
|
333
345
|
}, i)).mybDailyMacros
|
|
334
346
|
});
|
|
335
|
-
},
|
|
347
|
+
}, K = () => {
|
|
336
348
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
337
349
|
return t({
|
|
338
350
|
mutationFn: async (e) => (await o(`mutation MybCreateNutritionPlan($input: MybCreateNutritionPlanInput!) {
|
|
@@ -342,7 +354,7 @@ var a = () => {
|
|
|
342
354
|
i.invalidateQueries({ queryKey: s.activePlan });
|
|
343
355
|
}
|
|
344
356
|
});
|
|
345
|
-
},
|
|
357
|
+
}, q = () => {
|
|
346
358
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
347
359
|
return t({
|
|
348
360
|
mutationFn: async (e) => (await o(`mutation MybUpdateNutritionPlan($id: ID!, $input: MybUpdateNutritionPlanInput!) {
|
|
@@ -352,7 +364,7 @@ var a = () => {
|
|
|
352
364
|
i.invalidateQueries({ queryKey: s.activePlan }), i.invalidateQueries({ queryKey: s.nutritionPlan(e.id) });
|
|
353
365
|
}
|
|
354
366
|
});
|
|
355
|
-
},
|
|
367
|
+
}, J = () => {
|
|
356
368
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
357
369
|
return t({
|
|
358
370
|
mutationFn: async (e) => (await o(`mutation MybActivateNutritionPlan($id: ID!) {
|
|
@@ -362,7 +374,7 @@ var a = () => {
|
|
|
362
374
|
i.invalidateQueries({ queryKey: s.activePlan }), i.invalidateQueries({ queryKey: s.nutritionPlan(e.id) });
|
|
363
375
|
}
|
|
364
376
|
});
|
|
365
|
-
},
|
|
377
|
+
}, Y = () => {
|
|
366
378
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
367
379
|
return t({
|
|
368
380
|
mutationFn: async (e) => (await o(`mutation MybLogMeal($input: MybLogMealInput!) {
|
|
@@ -372,7 +384,7 @@ var a = () => {
|
|
|
372
384
|
i.invalidateQueries({ queryKey: s.meals }), i.invalidateQueries({ queryKey: s.dailyMacros }), e.planId && i.invalidateQueries({ queryKey: s.nutritionPlan(e.planId) });
|
|
373
385
|
}
|
|
374
386
|
});
|
|
375
|
-
},
|
|
387
|
+
}, X = () => {
|
|
376
388
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
377
389
|
return t({
|
|
378
390
|
mutationFn: async (e) => (await o("mutation MybDeleteMeal($id: ID!) { mybDeleteMeal(id: $id) }", { id: e }, n)).mybDeleteMeal,
|
|
@@ -380,7 +392,7 @@ var a = () => {
|
|
|
380
392
|
i.invalidateQueries({ queryKey: s.meals }), i.invalidateQueries({ queryKey: s.dailyMacros });
|
|
381
393
|
}
|
|
382
394
|
});
|
|
383
|
-
},
|
|
395
|
+
}, Z = (t = {}) => {
|
|
384
396
|
let { apiGatewayUrl: r } = e();
|
|
385
397
|
return n({
|
|
386
398
|
queryKey: [...s.bodyMetrics, t],
|
|
@@ -395,7 +407,7 @@ var a = () => {
|
|
|
395
407
|
pagination: t.pagination ?? c
|
|
396
408
|
}, r)).mybListBodyMetrics
|
|
397
409
|
});
|
|
398
|
-
},
|
|
410
|
+
}, Q = () => {
|
|
399
411
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
400
412
|
return t({
|
|
401
413
|
mutationFn: async (e) => (await o(`mutation MybRecordBodyMetric($input: MybRecordMetricInput!) {
|
|
@@ -403,7 +415,7 @@ var a = () => {
|
|
|
403
415
|
}`, { input: e }, n)).mybRecordBodyMetric,
|
|
404
416
|
onSuccess: () => i.invalidateQueries({ queryKey: s.bodyMetrics })
|
|
405
417
|
});
|
|
406
|
-
},
|
|
418
|
+
}, $ = (t, r) => {
|
|
407
419
|
let { apiGatewayUrl: i } = e();
|
|
408
420
|
return n({
|
|
409
421
|
queryKey: [
|
|
@@ -421,7 +433,7 @@ var a = () => {
|
|
|
421
433
|
memberId: r
|
|
422
434
|
}, i)).mybListRecoveryLogs
|
|
423
435
|
});
|
|
424
|
-
},
|
|
436
|
+
}, te = () => {
|
|
425
437
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
426
438
|
return t({
|
|
427
439
|
mutationFn: async (e) => (await o(`mutation MybLogRecovery($input: MybLogRecoveryInput!) {
|
|
@@ -429,7 +441,7 @@ var a = () => {
|
|
|
429
441
|
}`, { input: e }, n)).mybLogRecovery,
|
|
430
442
|
onSuccess: () => i.invalidateQueries({ queryKey: s.recovery })
|
|
431
443
|
});
|
|
432
|
-
},
|
|
444
|
+
}, ne = (t, r) => {
|
|
433
445
|
let { apiGatewayUrl: i } = e();
|
|
434
446
|
return n({
|
|
435
447
|
queryKey: [
|
|
@@ -447,7 +459,7 @@ var a = () => {
|
|
|
447
459
|
memberId: r
|
|
448
460
|
}, i)).mybListCoaching
|
|
449
461
|
});
|
|
450
|
-
},
|
|
462
|
+
}, re = () => {
|
|
451
463
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
452
464
|
return t({
|
|
453
465
|
mutationFn: async (e) => (await o(`mutation MybCreateCoaching($input: MybCreateCoachingInput!) {
|
|
@@ -455,7 +467,7 @@ var a = () => {
|
|
|
455
467
|
}`, { input: e }, n)).mybCreateCoaching,
|
|
456
468
|
onSuccess: () => i.invalidateQueries({ queryKey: s.coaching })
|
|
457
469
|
});
|
|
458
|
-
},
|
|
470
|
+
}, ie = () => {
|
|
459
471
|
let { apiGatewayUrl: n } = e(), i = r();
|
|
460
472
|
return t({
|
|
461
473
|
mutationFn: async (e) => (await o(`mutation MybTransitionCoaching($id: ID!, $status: MybCoachingStatus!) {
|
|
@@ -463,8 +475,35 @@ var a = () => {
|
|
|
463
475
|
}`, e, n)).mybTransitionCoaching,
|
|
464
476
|
onSuccess: () => i.invalidateQueries({ queryKey: s.coaching })
|
|
465
477
|
});
|
|
478
|
+
}, ae = (t) => {
|
|
479
|
+
let { apiGatewayUrl: r } = e();
|
|
480
|
+
return n({
|
|
481
|
+
queryKey: [...s.guidance, t ?? "me"],
|
|
482
|
+
queryFn: async () => (await o(`query MybTodayGuidance($memberId: ID) {
|
|
483
|
+
mybTodayGuidance(memberId: $memberId) { ${b} }
|
|
484
|
+
}`, { memberId: t }, r)).mybTodayGuidance,
|
|
485
|
+
staleTime: 6e4
|
|
486
|
+
});
|
|
487
|
+
}, oe = (t, r = 10) => {
|
|
488
|
+
let { apiGatewayUrl: i } = e(), a = t.trim();
|
|
489
|
+
return n({
|
|
490
|
+
queryKey: s.foodSearch(a),
|
|
491
|
+
enabled: a.length >= 2,
|
|
492
|
+
queryFn: async () => (await o(`query MybSearchFoods($query: String!, $limit: Int) {
|
|
493
|
+
mybSearchFoods(query: $query, limit: $limit) { ${x} }
|
|
494
|
+
}`, {
|
|
495
|
+
query: a,
|
|
496
|
+
limit: r
|
|
497
|
+
}, i)).mybSearchFoods,
|
|
498
|
+
staleTime: 3e4
|
|
499
|
+
});
|
|
500
|
+
}, se = () => {
|
|
501
|
+
let { apiGatewayUrl: n } = e();
|
|
502
|
+
return t({ mutationFn: async (e) => (await o(`query MybFoodByBarcode($barcode: String!) {
|
|
503
|
+
mybFoodByBarcode(barcode: $barcode) { ${x} }
|
|
504
|
+
}`, { barcode: e }, n)).mybFoodByBarcode });
|
|
466
505
|
};
|
|
467
506
|
//#endregion
|
|
468
|
-
export {
|
|
507
|
+
export { H as useMybAchieveGoal, J as useMybActivateNutritionPlan, U as useMybActiveNutritionPlan, N as useMybAddExercise, M as useMybAddWorkout, j as useMybArchiveProgram, Z as useMybBodyMetrics, ne as useMybCoaching, ee as useMybCompleteSession, re as useMybCreateCoaching, B as useMybCreateGoal, K as useMybCreateNutritionPlan, O as useMybCreateProgram, G as useMybDailyMacros, X as useMybDeleteMeal, I as useMybExerciseBestSet, se as useMybFoodByBarcode, z as useMybGoals, Y as useMybLogMeal, te as useMybLogRecovery, R as useMybLogSet, W as useMybMeals, T as useMybProgram, E as useMybProgramWorkouts, w as useMybPrograms, Q as useMybRecordBodyMetric, $ as useMybRecoveryLogs, oe as useMybSearchFoods, F as useMybSession, P as useMybSessions, L as useMybStartSession, ae as useMybTodayGuidance, ie as useMybTransitionCoaching, A as useMybTransitionProgram, V as useMybUpdateGoal, q as useMybUpdateNutritionPlan, k as useMybUpdateProgram, D as useMybWorkoutExercises };
|
|
469
508
|
|
|
470
509
|
//# sourceMappingURL=useMyBodyShieldApi.js.map
|