@burdenoff/microfe-mybodyshield 2026.1101.2 → 2026.1107.1

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.
@@ -1,13 +1,13 @@
1
1
  import { useMyBodyShield as e } from "../context/MyBodyShieldContext.js";
2
2
  import "../context/index.js";
3
- import { useMutation as t, useQuery as n, useQueryClient as r } from "@tanstack/react-query";
4
- import { graphqlFetch as i } from "@burdenoff/fe-libs/shared/graphql";
3
+ import { keepPreviousData as t, useMutation as n, useQuery as r, useQueryClient as i } from "@tanstack/react-query";
4
+ import { graphqlFetch as a } from "@burdenoff/fe-libs/shared/graphql";
5
5
  // src/mybodyshield/hooks/useMyBodyShieldApi.ts
6
- var a = () => {
6
+ var ee = () => {
7
7
  let e = globalThis;
8
8
  e.__graphqlFetchResponseCache?.clear(), e.__graphqlFetchPendingResponses?.clear(), e.__boffGraphQLResponseCache?.clear();
9
9
  }, o = async (e, t, n) => {
10
- let r = await i({
10
+ let r = await a({
11
11
  gateway: "workspace",
12
12
  baseUrl: n,
13
13
  query: e,
@@ -16,7 +16,7 @@ var a = () => {
16
16
  });
17
17
  if (r.errors?.length) throw Error(r.errors[0]?.message ?? "GraphQL request failed");
18
18
  if (!r.data) throw Error("GraphQL response did not include data");
19
- return /^\s*mutation\b/.test(e) && a(), r.data;
19
+ return /^\s*mutation\b/.test(e) && ee(), r.data;
20
20
  }, s = {
21
21
  programs: ["mybodyshield", "programs"],
22
22
  program: (e) => [
@@ -83,18 +83,27 @@ var a = () => {
83
83
  aiOperationLogs: ["mybodyshield", "ai-operation-logs"],
84
84
  aiConsent: ["mybodyshield", "ai-consent"],
85
85
  mindfulnessExercises: ["mybodyshield", "mindfulness-exercises"],
86
- mindfulnessSessions: ["mybodyshield", "mindfulness-sessions"]
87
- }, 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", ee = "\n memberId date readinessScore aiSummary cards { signal action reason }\n", te = `
86
+ mindfulnessSessions: ["mybodyshield", "mindfulness-sessions"],
87
+ challenges: ["mybodyshield", "challenges"],
88
+ leaderboard: (e) => [
89
+ "mybodyshield",
90
+ "leaderboard",
91
+ e
92
+ ],
93
+ socialProfile: ["mybodyshield", "social-profile"],
94
+ socialFeed: ["mybodyshield", "social-feed"],
95
+ shareableItems: ["mybodyshield", "shareable-items"]
96
+ }, 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", te = "\n memberId date readinessScore aiSummary cards { signal action reason }\n", ne = `
88
97
  dateRangeStart dateRangeEnd
89
98
  summary { consistencyStreakDays totalSessions totalVolumeKg averageReadiness macroAdherencePercent }
90
99
  daily { date sessions volumeKg readiness sleepHours calories proteinG carbsG fatG weight }
91
100
  goals { ${m} }
92
- `, b = "\n id workspaceId memberId provider hasProviderKey modelName dailyAllowance dailyAllowanceUsed allowanceResetAt createdAt updatedAt\n", x = "\n id workspaceId memberId operationType provider modelName inputTokens outputTokens status errorMessage createdAt\n", S = "\n id workspaceId actorId enabled acceptedAt withdrawnAt createdAt updatedAt\n", C = "\n barcode name brand servingG calories proteinG carbsG fatG imageUrl\n", ne = "\n date calories proteinG carbsG fatG calorieTarget proteinTarget carbsTarget fatTarget\n", w = (e) => e.map(({ exercises: e, ...t }) => ({
101
+ `, b = "\n id workspaceId memberId provider hasProviderKey modelName dailyAllowance dailyAllowanceUsed allowanceResetAt createdAt updatedAt\n", re = "\n id workspaceId memberId operationType provider modelName inputTokens outputTokens status errorMessage createdAt\n", x = "\n id workspaceId actorId enabled acceptedAt withdrawnAt createdAt updatedAt\n", S = "\n barcode name brand servingG calories proteinG carbsG fatG imageUrl\n", ie = "\n date calories proteinG carbsG fatG calorieTarget proteinTarget carbsTarget fatTarget\n", C = (e) => e.map(({ exercises: e, ...t }) => ({
93
102
  ...t,
94
103
  exercises: e.items
95
- })), T = (t = {}) => {
96
- let { apiGatewayUrl: r } = e();
97
- return n({
104
+ })), ae = (t = {}) => {
105
+ let { apiGatewayUrl: n } = e();
106
+ return r({
98
107
  queryKey: [...s.programs, t],
99
108
  queryFn: async () => (await o(`query MybListPrograms($status: MybProgramStatus, $memberId: ID, $pagination: PaginationInput) {
100
109
  mybListPrograms(status: $status, memberId: $memberId, pagination: $pagination) {
@@ -105,11 +114,11 @@ var a = () => {
105
114
  status: t.status,
106
115
  memberId: t.memberId,
107
116
  pagination: t.pagination ?? c
108
- }, r)).mybListPrograms
117
+ }, n)).mybListPrograms
109
118
  });
110
- }, E = (t) => {
111
- let { apiGatewayUrl: r } = e();
112
- return n({
119
+ }, oe = (t) => {
120
+ let { apiGatewayUrl: n } = e();
121
+ return r({
113
122
  queryKey: s.program(t ?? ""),
114
123
  enabled: !!t,
115
124
  queryFn: async () => {
@@ -123,95 +132,95 @@ var a = () => {
123
132
  }
124
133
  }
125
134
  }
126
- }`, { id: t }, r);
135
+ }`, { id: t }, n);
127
136
  if (!e.mybProgram) return null;
128
- let { workouts: n, ...i } = e.mybProgram;
137
+ let { workouts: r, ...i } = e.mybProgram;
129
138
  return {
130
139
  ...i,
131
- workouts: w(n.items)
140
+ workouts: C(r.items)
132
141
  };
133
142
  }
134
143
  });
135
- }, D = (t) => {
136
- let { apiGatewayUrl: r } = e();
137
- return n({
144
+ }, se = (t) => {
145
+ let { apiGatewayUrl: n } = e();
146
+ return r({
138
147
  queryKey: s.programWorkouts(t ?? ""),
139
148
  enabled: !!t,
140
- queryFn: async () => w((await o(`query MybProgramWorkouts($programId: ID!) {
149
+ queryFn: async () => C((await o(`query MybProgramWorkouts($programId: ID!) {
141
150
  mybProgramWorkouts(programId: $programId) {
142
151
  items {
143
152
  ${d}
144
153
  exercises { items { ${u} } }
145
154
  }
146
155
  }
147
- }`, { programId: t }, r)).mybProgramWorkouts.items)
156
+ }`, { programId: t }, n)).mybProgramWorkouts.items)
148
157
  });
149
- }, O = (t) => {
150
- let { apiGatewayUrl: r } = e();
151
- return n({
158
+ }, ce = (t) => {
159
+ let { apiGatewayUrl: n } = e();
160
+ return r({
152
161
  queryKey: s.workoutExercises(t ?? ""),
153
162
  enabled: !!t,
154
163
  queryFn: async () => (await o(`query MybWorkoutExercises($workoutId: ID!) {
155
164
  mybWorkoutExercises(workoutId: $workoutId, pagination: { limit: 100 }) {
156
165
  items { ${u} }
157
166
  }
158
- }`, { workoutId: t }, r)).mybWorkoutExercises.items.slice().sort((e, t) => e.orderIndex - t.orderIndex)
167
+ }`, { workoutId: t }, n)).mybWorkoutExercises.items.slice().sort((e, t) => e.orderIndex - t.orderIndex)
159
168
  });
160
- }, k = () => {
161
- let { apiGatewayUrl: n } = e(), i = r();
162
- return t({
169
+ }, le = () => {
170
+ let { apiGatewayUrl: t } = e(), r = i();
171
+ return n({
163
172
  mutationFn: async (e) => (await o(`mutation MybCreateProgram($input: MybCreateProgramInput!) {
164
173
  mybCreateProgram(input: $input) { ${l} }
165
- }`, { input: e }, n)).mybCreateProgram,
166
- onSuccess: () => i.invalidateQueries({ queryKey: s.programs })
174
+ }`, { input: e }, t)).mybCreateProgram,
175
+ onSuccess: () => r.invalidateQueries({ queryKey: s.programs })
167
176
  });
168
- }, A = () => {
169
- let { apiGatewayUrl: n } = e(), i = r();
170
- return t({
177
+ }, w = () => {
178
+ let { apiGatewayUrl: t } = e(), r = i();
179
+ return n({
171
180
  mutationFn: async (e) => (await o(`mutation MybUpdateProgram($id: ID!, $input: MybUpdateProgramInput!) {
172
181
  mybUpdateProgram(id: $id, input: $input) { ${l} }
173
- }`, e, n)).mybUpdateProgram,
182
+ }`, e, t)).mybUpdateProgram,
174
183
  onSuccess: (e) => {
175
- i.invalidateQueries({ queryKey: s.programs }), i.invalidateQueries({ queryKey: s.program(e.id) });
184
+ r.invalidateQueries({ queryKey: s.programs }), r.invalidateQueries({ queryKey: s.program(e.id) });
176
185
  }
177
186
  });
178
- }, j = () => {
179
- let { apiGatewayUrl: n } = e(), i = r();
180
- return t({
187
+ }, T = () => {
188
+ let { apiGatewayUrl: t } = e(), r = i();
189
+ return n({
181
190
  mutationFn: async (e) => (await o(`mutation MybTransitionProgram($id: ID!, $status: MybProgramStatus!) {
182
191
  mybTransitionProgram(id: $id, status: $status) { ${l} }
183
- }`, e, n)).mybTransitionProgram,
192
+ }`, e, t)).mybTransitionProgram,
184
193
  onSuccess: (e) => {
185
- i.invalidateQueries({ queryKey: s.programs }), i.invalidateQueries({ queryKey: s.program(e.id) });
194
+ r.invalidateQueries({ queryKey: s.programs }), r.invalidateQueries({ queryKey: s.program(e.id) });
186
195
  }
187
196
  });
188
- }, M = () => {
189
- let { apiGatewayUrl: n } = e(), i = r();
190
- return t({
191
- mutationFn: async (e) => (await o("mutation MybArchiveProgram($id: ID!) { mybArchiveProgram(id: $id) }", { id: e }, n)).mybArchiveProgram,
192
- onSuccess: () => i.invalidateQueries({ queryKey: s.programs })
197
+ }, E = () => {
198
+ let { apiGatewayUrl: t } = e(), r = i();
199
+ return n({
200
+ mutationFn: async (e) => (await o("mutation MybArchiveProgram($id: ID!) { mybArchiveProgram(id: $id) }", { id: e }, t)).mybArchiveProgram,
201
+ onSuccess: () => r.invalidateQueries({ queryKey: s.programs })
193
202
  });
194
- }, N = () => {
195
- let { apiGatewayUrl: n } = e(), i = r();
196
- return t({
203
+ }, D = () => {
204
+ let { apiGatewayUrl: t } = e(), r = i();
205
+ return n({
197
206
  mutationFn: async (e) => (await o(`mutation MybAddWorkout($input: MybCreateWorkoutInput!) {
198
207
  mybAddWorkout(input: $input) { ${d} }
199
- }`, { input: e }, n)).mybAddWorkout,
208
+ }`, { input: e }, t)).mybAddWorkout,
200
209
  onSuccess: (e) => {
201
- i.invalidateQueries({ queryKey: s.program(e.programId) }), i.invalidateQueries({ queryKey: s.programWorkouts(e.programId) });
210
+ r.invalidateQueries({ queryKey: s.program(e.programId) }), r.invalidateQueries({ queryKey: s.programWorkouts(e.programId) });
202
211
  }
203
212
  });
204
- }, P = () => {
205
- let { apiGatewayUrl: n } = e(), i = r();
206
- return t({
207
- mutationFn: async (e) => (await o("mutation MybAddExercise($input: MybCreateExerciseInput!) {\n mybAddExercise(input: $input) { id workoutId }\n }", { input: e }, n)).mybAddExercise,
213
+ }, O = () => {
214
+ let { apiGatewayUrl: t } = e(), r = i();
215
+ return n({
216
+ mutationFn: async (e) => (await o("mutation MybAddExercise($input: MybCreateExerciseInput!) {\n mybAddExercise(input: $input) { id workoutId }\n }", { input: e }, t)).mybAddExercise,
208
217
  onSuccess: () => {
209
- i.invalidateQueries({ queryKey: ["mybodyshield", "program"] }), i.invalidateQueries({ queryKey: ["mybodyshield", "program-workouts"] });
218
+ r.invalidateQueries({ queryKey: ["mybodyshield", "program"] }), r.invalidateQueries({ queryKey: ["mybodyshield", "program-workouts"] });
210
219
  }
211
220
  });
212
- }, F = (t = {}) => {
213
- let { apiGatewayUrl: r } = e();
214
- return n({
221
+ }, k = (t = {}) => {
222
+ let { apiGatewayUrl: n } = e();
223
+ return r({
215
224
  queryKey: [...s.sessions, t],
216
225
  queryFn: async () => (await o(`query MybListSessions($status: MybSessionStatus, $programId: ID, $pagination: PaginationInput) {
217
226
  mybListSessions(status: $status, programId: $programId, pagination: $pagination) {
@@ -222,11 +231,11 @@ var a = () => {
222
231
  status: t.status,
223
232
  programId: t.programId,
224
233
  pagination: t.pagination ?? c
225
- }, r)).mybListSessions
234
+ }, n)).mybListSessions
226
235
  });
227
- }, I = (t) => {
228
- let { apiGatewayUrl: r } = e();
229
- return n({
236
+ }, A = (t) => {
237
+ let { apiGatewayUrl: n } = e();
238
+ return r({
230
239
  queryKey: s.session(t ?? ""),
231
240
  enabled: !!t,
232
241
  queryFn: async () => {
@@ -235,56 +244,56 @@ var a = () => {
235
244
  ${p}
236
245
  sets { items { ${f} } }
237
246
  }
238
- }`, { id: t }, r);
247
+ }`, { id: t }, n);
239
248
  if (!e.mybSession) return null;
240
- let { sets: n, ...i } = e.mybSession;
249
+ let { sets: r, ...i } = e.mybSession;
241
250
  return {
242
251
  ...i,
243
- sets: n.items
252
+ sets: r.items
244
253
  };
245
254
  }
246
255
  });
247
- }, L = (t) => {
248
- let { apiGatewayUrl: r } = e(), i = t.trim();
249
- return n({
256
+ }, j = (t) => {
257
+ let { apiGatewayUrl: n } = e(), i = t.trim();
258
+ return r({
250
259
  queryKey: s.exerciseBestSet(i),
251
260
  enabled: i.length > 0,
252
261
  queryFn: async () => (await o(`query MybExerciseBestSet($exerciseName: String!) {
253
262
  mybExerciseBestSet(exerciseName: $exerciseName) { ${f} }
254
- }`, { exerciseName: i }, r)).mybExerciseBestSet,
263
+ }`, { exerciseName: i }, n)).mybExerciseBestSet,
255
264
  staleTime: 15e3
256
265
  });
257
- }, R = () => {
258
- let { apiGatewayUrl: n } = e(), i = r();
259
- return t({
266
+ }, M = () => {
267
+ let { apiGatewayUrl: t } = e(), r = i();
268
+ return n({
260
269
  mutationFn: async (e) => (await o(`mutation MybStartSession($input: MybStartSessionInput!) {
261
270
  mybStartSession(input: $input) { ${p} }
262
- }`, { input: e }, n)).mybStartSession,
263
- onSuccess: () => i.invalidateQueries({ queryKey: s.sessions })
271
+ }`, { input: e }, t)).mybStartSession,
272
+ onSuccess: () => r.invalidateQueries({ queryKey: s.sessions })
264
273
  });
265
- }, z = () => {
266
- let { apiGatewayUrl: n } = e(), i = r();
267
- return t({
274
+ }, N = () => {
275
+ let { apiGatewayUrl: t } = e(), r = i();
276
+ return n({
268
277
  mutationFn: async (e) => (await o(`mutation MybLogSet($input: MybLogSetInput!) {
269
278
  mybLogSet(input: $input) { ${f} }
270
- }`, { input: e }, n)).mybLogSet,
279
+ }`, { input: e }, t)).mybLogSet,
271
280
  onSuccess: (e) => {
272
- i.invalidateQueries({ queryKey: s.session(e.sessionId) }), i.invalidateQueries({ queryKey: s.sessions }), i.invalidateQueries({ queryKey: s.exerciseBestSet(e.exerciseName) });
281
+ r.invalidateQueries({ queryKey: s.session(e.sessionId) }), r.invalidateQueries({ queryKey: s.sessions }), r.invalidateQueries({ queryKey: s.exerciseBestSet(e.exerciseName) });
273
282
  }
274
283
  });
275
- }, B = () => {
276
- let { apiGatewayUrl: n } = e(), i = r();
277
- return t({
284
+ }, P = () => {
285
+ let { apiGatewayUrl: t } = e(), r = i();
286
+ return n({
278
287
  mutationFn: async (e) => (await o(`mutation MybCompleteSession($id: ID!, $input: MybCompleteSessionInput!) {
279
288
  mybCompleteSession(id: $id, input: $input) { ${p} }
280
- }`, e, n)).mybCompleteSession,
289
+ }`, e, t)).mybCompleteSession,
281
290
  onSuccess: (e) => {
282
- i.invalidateQueries({ queryKey: s.session(e.id) }), i.invalidateQueries({ queryKey: s.sessions });
291
+ r.invalidateQueries({ queryKey: s.session(e.id) }), r.invalidateQueries({ queryKey: s.sessions });
283
292
  }
284
293
  });
285
- }, V = (t = {}) => {
286
- let { apiGatewayUrl: r } = e();
287
- return n({
294
+ }, F = (t = {}) => {
295
+ let { apiGatewayUrl: n } = e();
296
+ return r({
288
297
  queryKey: [...s.goals, t],
289
298
  queryFn: async () => (await o(`query MybListGoals($status: MybGoalStatus, $memberId: ID, $pagination: PaginationInput) {
290
299
  mybListGoals(status: $status, memberId: $memberId, pagination: $pagination) {
@@ -295,43 +304,43 @@ var a = () => {
295
304
  status: t.status,
296
305
  memberId: t.memberId,
297
306
  pagination: t.pagination ?? c
298
- }, r)).mybListGoals
307
+ }, n)).mybListGoals
299
308
  });
300
- }, H = () => {
301
- let { apiGatewayUrl: n } = e(), i = r();
302
- return t({
309
+ }, I = () => {
310
+ let { apiGatewayUrl: t } = e(), r = i();
311
+ return n({
303
312
  mutationFn: async (e) => (await o(`mutation MybCreateGoal($input: MybCreateGoalInput!) {
304
313
  mybCreateGoal(input: $input) { ${m} }
305
- }`, { input: e }, n)).mybCreateGoal,
306
- onSuccess: () => i.invalidateQueries({ queryKey: s.goals })
314
+ }`, { input: e }, t)).mybCreateGoal,
315
+ onSuccess: () => r.invalidateQueries({ queryKey: s.goals })
307
316
  });
308
- }, U = () => {
309
- let { apiGatewayUrl: n } = e(), i = r();
310
- return t({
317
+ }, L = () => {
318
+ let { apiGatewayUrl: t } = e(), r = i();
319
+ return n({
311
320
  mutationFn: async (e) => (await o(`mutation MybUpdateGoal($id: ID!, $input: MybUpdateGoalInput!) {
312
321
  mybUpdateGoal(id: $id, input: $input) { ${m} }
313
- }`, e, n)).mybUpdateGoal,
314
- onSuccess: () => i.invalidateQueries({ queryKey: s.goals })
322
+ }`, e, t)).mybUpdateGoal,
323
+ onSuccess: () => r.invalidateQueries({ queryKey: s.goals })
315
324
  });
316
- }, W = () => {
317
- let { apiGatewayUrl: n } = e(), i = r();
318
- return t({
325
+ }, R = () => {
326
+ let { apiGatewayUrl: t } = e(), r = i();
327
+ return n({
319
328
  mutationFn: async (e) => (await o(`mutation MybAchieveGoal($id: ID!) {
320
329
  mybAchieveGoal(id: $id) { ${m} }
321
- }`, { id: e }, n)).mybAchieveGoal,
322
- onSuccess: () => i.invalidateQueries({ queryKey: s.goals })
330
+ }`, { id: e }, t)).mybAchieveGoal,
331
+ onSuccess: () => r.invalidateQueries({ queryKey: s.goals })
323
332
  });
324
- }, G = (t) => {
325
- let { apiGatewayUrl: r } = e();
326
- return n({
333
+ }, z = (t) => {
334
+ let { apiGatewayUrl: n } = e();
335
+ return r({
327
336
  queryKey: [...s.activePlan, t ?? "me"],
328
337
  queryFn: async () => (await o(`query MybActiveNutritionPlan($memberId: ID) {
329
338
  mybActiveNutritionPlan(memberId: $memberId) { ${g} }
330
- }`, { memberId: t }, r)).mybActiveNutritionPlan
339
+ }`, { memberId: t }, n)).mybActiveNutritionPlan
331
340
  });
332
- }, K = (t = {}) => {
333
- let { apiGatewayUrl: r } = e();
334
- return n({
341
+ }, B = (t = {}) => {
342
+ let { apiGatewayUrl: n } = e();
343
+ return r({
335
344
  queryKey: [...s.meals, t],
336
345
  queryFn: async () => (await o(`query MybListMeals($mealType: MybMealType, $planId: ID, $pagination: PaginationInput) {
337
346
  mybListMeals(mealType: $mealType, planId: $planId, pagination: $pagination) {
@@ -342,74 +351,74 @@ var a = () => {
342
351
  mealType: t.mealType,
343
352
  planId: t.planId,
344
353
  pagination: t.pagination ?? c
345
- }, r)).mybListMeals
354
+ }, n)).mybListMeals
346
355
  });
347
- }, q = (t, r) => {
356
+ }, V = (t, n) => {
348
357
  let { apiGatewayUrl: i } = e();
349
- return n({
358
+ return r({
350
359
  queryKey: [
351
360
  ...s.dailyMacros,
352
361
  t ?? "today",
353
- r ?? "me"
362
+ n ?? "me"
354
363
  ],
355
364
  queryFn: async () => (await o(`query MybDailyMacros($date: DateTime, $memberId: ID) {
356
- mybDailyMacros(date: $date, memberId: $memberId) { ${ne} }
365
+ mybDailyMacros(date: $date, memberId: $memberId) { ${ie} }
357
366
  }`, {
358
367
  date: t,
359
- memberId: r
368
+ memberId: n
360
369
  }, i)).mybDailyMacros
361
370
  });
362
- }, re = () => {
363
- let { apiGatewayUrl: n } = e(), i = r();
364
- return t({
371
+ }, H = () => {
372
+ let { apiGatewayUrl: t } = e(), r = i();
373
+ return n({
365
374
  mutationFn: async (e) => (await o(`mutation MybCreateNutritionPlan($input: MybCreateNutritionPlanInput!) {
366
375
  mybCreateNutritionPlan(input: $input) { ${g} }
367
- }`, { input: e }, n)).mybCreateNutritionPlan,
376
+ }`, { input: e }, t)).mybCreateNutritionPlan,
368
377
  onSuccess: () => {
369
- i.invalidateQueries({ queryKey: s.activePlan });
378
+ r.invalidateQueries({ queryKey: s.activePlan });
370
379
  }
371
380
  });
372
- }, J = () => {
373
- let { apiGatewayUrl: n } = e(), i = r();
374
- return t({
381
+ }, U = () => {
382
+ let { apiGatewayUrl: t } = e(), r = i();
383
+ return n({
375
384
  mutationFn: async (e) => (await o(`mutation MybUpdateNutritionPlan($id: ID!, $input: MybUpdateNutritionPlanInput!) {
376
385
  mybUpdateNutritionPlan(id: $id, input: $input) { ${g} }
377
- }`, e, n)).mybUpdateNutritionPlan,
386
+ }`, e, t)).mybUpdateNutritionPlan,
378
387
  onSuccess: (e) => {
379
- i.invalidateQueries({ queryKey: s.activePlan }), i.invalidateQueries({ queryKey: s.nutritionPlan(e.id) });
388
+ r.invalidateQueries({ queryKey: s.activePlan }), r.invalidateQueries({ queryKey: s.nutritionPlan(e.id) });
380
389
  }
381
390
  });
382
- }, Y = () => {
383
- let { apiGatewayUrl: n } = e(), i = r();
384
- return t({
391
+ }, W = () => {
392
+ let { apiGatewayUrl: t } = e(), r = i();
393
+ return n({
385
394
  mutationFn: async (e) => (await o(`mutation MybActivateNutritionPlan($id: ID!) {
386
395
  mybActivateNutritionPlan(id: $id) { ${g} }
387
- }`, { id: e }, n)).mybActivateNutritionPlan,
396
+ }`, { id: e }, t)).mybActivateNutritionPlan,
388
397
  onSuccess: (e) => {
389
- i.invalidateQueries({ queryKey: s.activePlan }), i.invalidateQueries({ queryKey: s.nutritionPlan(e.id) });
398
+ r.invalidateQueries({ queryKey: s.activePlan }), r.invalidateQueries({ queryKey: s.nutritionPlan(e.id) });
390
399
  }
391
400
  });
392
- }, X = () => {
393
- let { apiGatewayUrl: n } = e(), i = r();
394
- return t({
401
+ }, ue = () => {
402
+ let { apiGatewayUrl: t } = e(), r = i();
403
+ return n({
395
404
  mutationFn: async (e) => (await o(`mutation MybLogMeal($input: MybLogMealInput!) {
396
405
  mybLogMeal(input: $input) { ${h} }
397
- }`, { input: e }, n)).mybLogMeal,
406
+ }`, { input: e }, t)).mybLogMeal,
398
407
  onSuccess: (e) => {
399
- i.invalidateQueries({ queryKey: s.meals }), i.invalidateQueries({ queryKey: s.dailyMacros }), e.planId && i.invalidateQueries({ queryKey: s.nutritionPlan(e.planId) });
408
+ r.invalidateQueries({ queryKey: s.meals }), r.invalidateQueries({ queryKey: s.dailyMacros }), e.planId && r.invalidateQueries({ queryKey: s.nutritionPlan(e.planId) });
400
409
  }
401
410
  });
402
- }, ie = () => {
403
- let { apiGatewayUrl: n } = e(), i = r();
404
- return t({
405
- mutationFn: async (e) => (await o("mutation MybDeleteMeal($id: ID!) { mybDeleteMeal(id: $id) }", { id: e }, n)).mybDeleteMeal,
411
+ }, de = () => {
412
+ let { apiGatewayUrl: t } = e(), r = i();
413
+ return n({
414
+ mutationFn: async (e) => (await o("mutation MybDeleteMeal($id: ID!) { mybDeleteMeal(id: $id) }", { id: e }, t)).mybDeleteMeal,
406
415
  onSuccess: () => {
407
- i.invalidateQueries({ queryKey: s.meals }), i.invalidateQueries({ queryKey: s.dailyMacros });
416
+ r.invalidateQueries({ queryKey: s.meals }), r.invalidateQueries({ queryKey: s.dailyMacros });
408
417
  }
409
418
  });
410
- }, ae = (t = {}) => {
411
- let { apiGatewayUrl: r } = e();
412
- return n({
419
+ }, fe = (t = {}) => {
420
+ let { apiGatewayUrl: n } = e();
421
+ return r({
413
422
  queryKey: [...s.bodyMetrics, t],
414
423
  queryFn: async () => (await o(`query MybListBodyMetrics($type: MybBodyMetricType, $memberId: ID, $pagination: PaginationInput) {
415
424
  mybListBodyMetrics(type: $type, memberId: $memberId, pagination: $pagination) {
@@ -420,23 +429,23 @@ var a = () => {
420
429
  type: t.type,
421
430
  memberId: t.memberId,
422
431
  pagination: t.pagination ?? c
423
- }, r)).mybListBodyMetrics
432
+ }, n)).mybListBodyMetrics
424
433
  });
425
- }, oe = () => {
426
- let { apiGatewayUrl: n } = e(), i = r();
427
- return t({
434
+ }, pe = () => {
435
+ let { apiGatewayUrl: t } = e(), r = i();
436
+ return n({
428
437
  mutationFn: async (e) => (await o(`mutation MybRecordBodyMetric($input: MybRecordMetricInput!) {
429
438
  mybRecordBodyMetric(input: $input) { ${_} }
430
- }`, { input: e }, n)).mybRecordBodyMetric,
431
- onSuccess: () => i.invalidateQueries({ queryKey: s.bodyMetrics })
439
+ }`, { input: e }, t)).mybRecordBodyMetric,
440
+ onSuccess: () => r.invalidateQueries({ queryKey: s.bodyMetrics })
432
441
  });
433
- }, se = (t, r) => {
442
+ }, me = (t, n) => {
434
443
  let { apiGatewayUrl: i } = e();
435
- return n({
444
+ return r({
436
445
  queryKey: [
437
446
  ...s.recovery,
438
447
  t ?? "all",
439
- r ?? "me"
448
+ n ?? "me"
440
449
  ],
441
450
  queryFn: async () => (await o(`query MybListRecoveryLogs($metric: MybRecoveryMetric, $memberId: ID) {
442
451
  mybListRecoveryLogs(metric: $metric, memberId: $memberId) {
@@ -445,47 +454,135 @@ var a = () => {
445
454
  }
446
455
  }`, {
447
456
  metric: t,
448
- memberId: r
457
+ memberId: n
449
458
  }, i)).mybListRecoveryLogs
450
459
  });
451
- }, ce = () => {
452
- let { apiGatewayUrl: n } = e(), i = r();
453
- return t({
460
+ }, he = () => {
461
+ let { apiGatewayUrl: t } = e(), r = i();
462
+ return n({
454
463
  mutationFn: async (e) => (await o(`mutation MybLogRecovery($input: MybLogRecoveryInput!) {
455
464
  mybLogRecovery(input: $input) { ${v} }
456
- }`, { input: e }, n)).mybLogRecovery,
457
- onSuccess: () => i.invalidateQueries({ queryKey: s.recovery })
465
+ }`, { input: e }, t)).mybLogRecovery,
466
+ onSuccess: () => r.invalidateQueries({ queryKey: s.recovery })
458
467
  });
459
- }, Z = "\n id slug title description kind durationSeconds inhaleSeconds holdSeconds\n exhaleSeconds cycles contentSource\n", Q = `
468
+ }, G = "\n id slug title description kind durationSeconds inhaleSeconds holdSeconds\n exhaleSeconds cycles contentSource\n", K = `
460
469
  id workspaceId memberId startedAt completedAt durationSeconds cyclesCompleted createdAt
461
- exercise { ${Z} }
462
- `, le = () => {
470
+ exercise { ${G} }
471
+ `, ge = () => {
463
472
  let { apiGatewayUrl: t } = e();
464
- return n({
473
+ return r({
465
474
  queryKey: s.mindfulnessExercises,
466
- queryFn: async () => (await o(`query MybListMindfulnessExercises { mybListMindfulnessExercises { ${Z} } }`, {}, t)).mybListMindfulnessExercises
475
+ queryFn: async () => (await o(`query MybListMindfulnessExercises { mybListMindfulnessExercises { ${G} } }`, {}, t)).mybListMindfulnessExercises
467
476
  });
468
- }, ue = () => {
477
+ }, _e = () => {
469
478
  let { apiGatewayUrl: t } = e();
470
- return n({
479
+ return r({
471
480
  queryKey: s.mindfulnessSessions,
472
- queryFn: async () => (await o(`query MybListMindfulnessSessions { mybListMindfulnessSessions { items { ${Q} } pageInfo { cursor hasMore } } }`, {}, t)).mybListMindfulnessSessions
481
+ queryFn: async () => (await o(`query MybListMindfulnessSessions { mybListMindfulnessSessions { items { ${K} } pageInfo { cursor hasMore } } }`, {}, t)).mybListMindfulnessSessions
473
482
  });
474
- }, de = () => {
475
- let { apiGatewayUrl: n } = e(), i = r();
476
- return t({
483
+ }, ve = () => {
484
+ let { apiGatewayUrl: t } = e(), r = i();
485
+ return n({
477
486
  mutationFn: async (e) => (await o(`mutation MybCompleteMindfulnessSession($input: MybCompleteMindfulnessSessionInput!) {
478
- mybCompleteMindfulnessSession(input: $input) { ${Q} }
479
- }`, { input: e }, n)).mybCompleteMindfulnessSession,
480
- onSuccess: () => i.invalidateQueries({ queryKey: s.mindfulnessSessions })
487
+ mybCompleteMindfulnessSession(input: $input) { ${K} }
488
+ }`, { input: e }, t)).mybCompleteMindfulnessSession,
489
+ onSuccess: () => r.invalidateQueries({ queryKey: s.mindfulnessSessions })
490
+ });
491
+ }, q = "\n id workspaceId title description metric targetValue status startDate endDate\n createdAt updatedAt isJoined isMine participantCount\n", J = "id workspaceId memberId displayName shareActivity createdAt updatedAt", Y = "\n id workspaceId authorId authorDisplayName kind visibility sourceId title\n highlights { label value } caption kudosCount hasGivenKudos isMine createdAt\n", X = 6e4, ye = (t) => {
492
+ let { apiGatewayUrl: n } = e();
493
+ return r({
494
+ queryKey: [...s.challenges, t ?? "all"],
495
+ queryFn: async () => (await o(`query MybListChallenges($pagination: PaginationInput, $status: MybChallengeStatus) {
496
+ mybListChallenges(pagination: $pagination, status: $status) {
497
+ items { ${q} } pageInfo { cursor hasMore }
498
+ }
499
+ }`, {
500
+ pagination: c,
501
+ status: t ?? null
502
+ }, n)).mybListChallenges
503
+ });
504
+ }, be = (t) => {
505
+ let { apiGatewayUrl: n } = e();
506
+ return r({
507
+ queryKey: s.leaderboard(t ?? "none"),
508
+ enabled: !!t,
509
+ refetchInterval: X,
510
+ queryFn: async () => (await o("query MybChallengeLeaderboard($challengeId: ID!) {\n mybChallengeLeaderboard(challengeId: $challengeId) { memberId displayName rank value joinedAt }\n }", { challengeId: t }, n)).mybChallengeLeaderboard
511
+ });
512
+ }, xe = () => {
513
+ let { apiGatewayUrl: t } = e(), r = i();
514
+ return n({
515
+ mutationFn: async (e) => (await o(`mutation MybCreateChallenge($input: MybCreateChallengeInput!) {
516
+ mybCreateChallenge(input: $input) { ${q} }
517
+ }`, { input: e }, t)).mybCreateChallenge,
518
+ onSuccess: () => r.invalidateQueries({ queryKey: s.challenges })
519
+ });
520
+ }, Z = (t) => {
521
+ let { apiGatewayUrl: r } = e(), a = i();
522
+ return n({
523
+ mutationFn: async (e) => (t === "join" ? await o("mutation MybJoinChallenge($challengeId: ID!) { mybJoinChallenge(challengeId: $challengeId) { id } }", { challengeId: e }, r) : t === "leave" ? await o("mutation MybLeaveChallenge($challengeId: ID!) { mybLeaveChallenge(challengeId: $challengeId) }", { challengeId: e }, r) : await o("mutation MybCancelChallenge($id: ID!) { mybCancelChallenge(id: $id) { id } }", { id: e }, r), e),
524
+ onSuccess: (e) => {
525
+ a.invalidateQueries({ queryKey: s.challenges }), a.invalidateQueries({ queryKey: s.leaderboard(e) });
526
+ }
527
+ });
528
+ }, Se = () => Z("join"), Ce = () => Z("leave"), we = () => Z("cancel"), Te = () => {
529
+ let { apiGatewayUrl: t } = e();
530
+ return r({
531
+ queryKey: s.socialProfile,
532
+ queryFn: async () => (await o(`query MybMySocialProfile { mybMySocialProfile { ${J} } }`, {}, t)).mybMySocialProfile
533
+ });
534
+ }, Ee = () => {
535
+ let { apiGatewayUrl: t } = e(), r = i();
536
+ return n({
537
+ mutationFn: async (e) => (await o(`mutation MybUpdateMySocialProfile($input: MybUpdateSocialProfileInput!) {
538
+ mybUpdateMySocialProfile(input: $input) { ${J} }
539
+ }`, { input: e }, t)).mybUpdateMySocialProfile,
540
+ onSuccess: () => {
541
+ r.invalidateQueries({ queryKey: s.socialProfile }), r.invalidateQueries({ queryKey: s.socialFeed }), r.invalidateQueries({ queryKey: s.challenges });
542
+ }
481
543
  });
482
- }, fe = (t, r) => {
544
+ }, De = (n = { limit: 20 }) => {
483
545
  let { apiGatewayUrl: i } = e();
546
+ return r({
547
+ queryKey: [...s.socialFeed, n],
548
+ refetchInterval: X,
549
+ placeholderData: t,
550
+ queryFn: async () => (await o(`query MybSocialFeed($pagination: PaginationInput) {
551
+ mybSocialFeed(pagination: $pagination) { items { ${Y} } pageInfo { cursor hasMore } }
552
+ }`, { pagination: n }, i)).mybSocialFeed
553
+ });
554
+ }, Oe = (t) => {
555
+ let { apiGatewayUrl: n } = e();
556
+ return r({
557
+ queryKey: s.shareableItems,
558
+ enabled: t,
559
+ queryFn: async () => (await o("query MybShareableItems { mybShareableItems { kind sourceId title occurredAt alreadyShared } }", {}, n)).mybShareableItems
560
+ });
561
+ }, ke = () => {
562
+ let { apiGatewayUrl: t } = e(), r = i();
563
+ return n({
564
+ mutationFn: async (e) => (await o(`mutation MybShareToFeed($input: MybShareToFeedInput!) {
565
+ mybShareToFeed(input: $input) { ${Y} }
566
+ }`, { input: e }, t)).mybShareToFeed,
567
+ onSuccess: () => {
568
+ r.invalidateQueries({ queryKey: s.socialFeed }), r.invalidateQueries({ queryKey: s.shareableItems });
569
+ }
570
+ });
571
+ }, Q = (t) => {
572
+ let { apiGatewayUrl: r } = e(), a = i();
484
573
  return n({
574
+ mutationFn: async (e) => (t === "giveKudos" ? await o("mutation MybGiveKudos($postId: ID!) { mybGiveKudos(postId: $postId) { id } }", { postId: e }, r) : t === "removeKudos" ? await o("mutation MybRemoveKudos($postId: ID!) { mybRemoveKudos(postId: $postId) { id } }", { postId: e }, r) : t === "delete" ? await o("mutation MybDeleteMySocialPost($id: ID!) { mybDeleteMySocialPost(id: $id) }", { id: e }, r) : await o("mutation MybModerateSocialPost($id: ID!) { mybModerateSocialPost(id: $id) }", { id: e }, r), e),
575
+ onSuccess: () => {
576
+ a.invalidateQueries({ queryKey: s.socialFeed }), a.invalidateQueries({ queryKey: s.shareableItems });
577
+ }
578
+ });
579
+ }, Ae = () => Q("giveKudos"), je = () => Q("removeKudos"), Me = () => Q("delete"), Ne = () => Q("moderate"), Pe = (t, n) => {
580
+ let { apiGatewayUrl: i } = e();
581
+ return r({
485
582
  queryKey: [
486
583
  ...s.coaching,
487
584
  t ?? "all",
488
- r ?? "me"
585
+ n ?? "me"
489
586
  ],
490
587
  queryFn: async () => (await o(`query MybListCoaching($status: MybCoachingStatus, $memberId: ID) {
491
588
  mybListCoaching(status: $status, memberId: $memberId) {
@@ -494,108 +591,108 @@ var a = () => {
494
591
  }
495
592
  }`, {
496
593
  status: t,
497
- memberId: r
594
+ memberId: n
498
595
  }, i)).mybListCoaching
499
596
  });
500
- }, pe = () => {
501
- let { apiGatewayUrl: n } = e(), i = r();
502
- return t({
597
+ }, $ = () => {
598
+ let { apiGatewayUrl: t } = e(), r = i();
599
+ return n({
503
600
  mutationFn: async (e) => (await o(`mutation MybCreateCoaching($input: MybCreateCoachingInput!) {
504
601
  mybCreateCoaching(input: $input) { ${y} }
505
- }`, { input: e }, n)).mybCreateCoaching,
506
- onSuccess: () => i.invalidateQueries({ queryKey: s.coaching })
602
+ }`, { input: e }, t)).mybCreateCoaching,
603
+ onSuccess: () => r.invalidateQueries({ queryKey: s.coaching })
507
604
  });
508
- }, $ = () => {
509
- let { apiGatewayUrl: n } = e(), i = r();
510
- return t({
605
+ }, Fe = () => {
606
+ let { apiGatewayUrl: t } = e(), r = i();
607
+ return n({
511
608
  mutationFn: async (e) => (await o(`mutation MybTransitionCoaching($id: ID!, $status: MybCoachingStatus!) {
512
609
  mybTransitionCoaching(id: $id, status: $status) { ${y} }
513
- }`, e, n)).mybTransitionCoaching,
514
- onSuccess: () => i.invalidateQueries({ queryKey: s.coaching })
610
+ }`, e, t)).mybTransitionCoaching,
611
+ onSuccess: () => r.invalidateQueries({ queryKey: s.coaching })
515
612
  });
516
- }, me = (t) => {
517
- let { apiGatewayUrl: r } = e();
518
- return n({
613
+ }, Ie = (t) => {
614
+ let { apiGatewayUrl: n } = e();
615
+ return r({
519
616
  queryKey: [...s.guidance, t ?? "me"],
520
617
  queryFn: async () => (await o(`query MybTodayGuidance($memberId: ID) {
521
- mybTodayGuidance(memberId: $memberId) { ${ee} }
522
- }`, { memberId: t }, r)).mybTodayGuidance,
618
+ mybTodayGuidance(memberId: $memberId) { ${te} }
619
+ }`, { memberId: t }, n)).mybTodayGuidance,
523
620
  staleTime: 6e4
524
621
  });
525
- }, he = (t = {}) => {
526
- let { apiGatewayUrl: r } = e(), i = `${t.dateRangeStart ?? ""}|${t.dateRangeEnd ?? ""}|${t.memberId ?? "me"}`;
527
- return n({
622
+ }, Le = (t = {}) => {
623
+ let { apiGatewayUrl: n } = e(), i = `${t.dateRangeStart ?? ""}|${t.dateRangeEnd ?? ""}|${t.memberId ?? "me"}`;
624
+ return r({
528
625
  queryKey: s.insights(i),
529
626
  queryFn: async () => (await o(`query MybInsights($dateRangeStart: DateTime, $dateRangeEnd: DateTime, $memberId: ID) {
530
- mybInsights(dateRangeStart: $dateRangeStart, dateRangeEnd: $dateRangeEnd, memberId: $memberId) { ${te} }
627
+ mybInsights(dateRangeStart: $dateRangeStart, dateRangeEnd: $dateRangeEnd, memberId: $memberId) { ${ne} }
531
628
  }`, {
532
629
  dateRangeStart: t.dateRangeStart,
533
630
  dateRangeEnd: t.dateRangeEnd,
534
631
  memberId: t.memberId
535
- }, r)).mybInsights
632
+ }, n)).mybInsights
536
633
  });
537
- }, ge = () => {
634
+ }, Re = () => {
538
635
  let { apiGatewayUrl: t } = e();
539
- return n({
636
+ return r({
540
637
  queryKey: s.aiSettings,
541
638
  queryFn: async () => (await o(`query MybAiSettings { mybAiSettings { ${b} } }`, {}, t)).mybAiSettings
542
639
  });
543
- }, _e = () => {
544
- let { apiGatewayUrl: n } = e(), i = r();
545
- return t({
640
+ }, ze = () => {
641
+ let { apiGatewayUrl: t } = e(), r = i();
642
+ return n({
546
643
  mutationFn: async (e) => (await o(`mutation MybUpdateAiSettings($input: MybUpdateAiSettingsInput!) {
547
644
  mybUpdateAiSettings(input: $input) { ${b} }
548
- }`, { input: e }, n)).mybUpdateAiSettings,
645
+ }`, { input: e }, t)).mybUpdateAiSettings,
549
646
  onSuccess: () => {
550
- i.invalidateQueries({ queryKey: s.aiSettings });
647
+ r.invalidateQueries({ queryKey: s.aiSettings });
551
648
  }
552
649
  });
553
- }, ve = (t) => {
554
- let { apiGatewayUrl: r } = e();
555
- return n({
650
+ }, Be = (t) => {
651
+ let { apiGatewayUrl: n } = e();
652
+ return r({
556
653
  queryKey: [...s.aiOperationLogs, t ?? c],
557
654
  queryFn: async () => (await o(`query MybListAiOperationLogs($pagination: PaginationInput) {
558
655
  mybListAiOperationLogs(pagination: $pagination) {
559
- items { ${x} }
656
+ items { ${re} }
560
657
  pageInfo { cursor hasMore }
561
658
  }
562
- }`, { pagination: t ?? c }, r)).mybListAiOperationLogs
659
+ }`, { pagination: t ?? c }, n)).mybListAiOperationLogs
563
660
  });
564
- }, ye = () => {
661
+ }, Ve = () => {
565
662
  let { apiGatewayUrl: t } = e();
566
- return n({
663
+ return r({
567
664
  queryKey: s.aiConsent,
568
- queryFn: async () => (await o(`query MybMyAiProcessingConsent { mybMyAiProcessingConsent { ${S} } }`, {}, t)).mybMyAiProcessingConsent
665
+ queryFn: async () => (await o(`query MybMyAiProcessingConsent { mybMyAiProcessingConsent { ${x} } }`, {}, t)).mybMyAiProcessingConsent
569
666
  });
570
- }, be = () => {
571
- let { apiGatewayUrl: n } = e(), i = r();
572
- return t({
667
+ }, He = () => {
668
+ let { apiGatewayUrl: t } = e(), r = i();
669
+ return n({
573
670
  mutationFn: async (e) => (await o(`mutation MybSetAiProcessingConsent($enabled: Boolean!) {
574
- mybSetAiProcessingConsent(enabled: $enabled) { ${S} }
575
- }`, { enabled: e }, n)).mybSetAiProcessingConsent,
671
+ mybSetAiProcessingConsent(enabled: $enabled) { ${x} }
672
+ }`, { enabled: e }, t)).mybSetAiProcessingConsent,
576
673
  onSuccess: () => {
577
- i.invalidateQueries({ queryKey: s.aiConsent });
674
+ r.invalidateQueries({ queryKey: s.aiConsent });
578
675
  }
579
676
  });
580
- }, xe = (t, r = 10) => {
677
+ }, Ue = (t, n = 10) => {
581
678
  let { apiGatewayUrl: i } = e(), a = t.trim();
582
- return n({
679
+ return r({
583
680
  queryKey: s.foodSearch(a),
584
681
  enabled: a.length >= 2,
585
682
  queryFn: async () => (await o(`query MybSearchFoods($query: String!, $limit: Int) {
586
- mybSearchFoods(query: $query, limit: $limit) { ${C} }
683
+ mybSearchFoods(query: $query, limit: $limit) { ${S} }
587
684
  }`, {
588
685
  query: a,
589
- limit: r
686
+ limit: n
590
687
  }, i)).mybSearchFoods,
591
688
  staleTime: 3e4
592
689
  });
593
- }, Se = () => {
594
- let { apiGatewayUrl: n } = e();
595
- return t({ mutationFn: async (e) => (await o(`query MybFoodByBarcode($barcode: String!) {
596
- mybFoodByBarcode(barcode: $barcode) { ${C} }
597
- }`, { barcode: e }, n)).mybFoodByBarcode });
690
+ }, We = () => {
691
+ let { apiGatewayUrl: t } = e();
692
+ return n({ mutationFn: async (e) => (await o(`query MybFoodByBarcode($barcode: String!) {
693
+ mybFoodByBarcode(barcode: $barcode) { ${S} }
694
+ }`, { barcode: e }, t)).mybFoodByBarcode });
598
695
  };
599
- export { W as useMybAchieveGoal, Y as useMybActivateNutritionPlan, G as useMybActiveNutritionPlan, P as useMybAddExercise, N as useMybAddWorkout, ve as useMybAiOperationLogs, ye as useMybAiProcessingConsent, ge as useMybAiSettings, M as useMybArchiveProgram, ae as useMybBodyMetrics, fe as useMybCoaching, de as useMybCompleteMindfulnessSession, B as useMybCompleteSession, pe as useMybCreateCoaching, H as useMybCreateGoal, re as useMybCreateNutritionPlan, k as useMybCreateProgram, q as useMybDailyMacros, ie as useMybDeleteMeal, L as useMybExerciseBestSet, Se as useMybFoodByBarcode, V as useMybGoals, he as useMybInsights, X as useMybLogMeal, ce as useMybLogRecovery, z as useMybLogSet, K as useMybMeals, le as useMybMindfulnessExercises, ue as useMybMindfulnessSessions, E as useMybProgram, D as useMybProgramWorkouts, T as useMybPrograms, oe as useMybRecordBodyMetric, se as useMybRecoveryLogs, xe as useMybSearchFoods, I as useMybSession, F as useMybSessions, be as useMybSetAiProcessingConsent, R as useMybStartSession, me as useMybTodayGuidance, $ as useMybTransitionCoaching, j as useMybTransitionProgram, _e as useMybUpdateAiSettings, U as useMybUpdateGoal, J as useMybUpdateNutritionPlan, A as useMybUpdateProgram, O as useMybWorkoutExercises };
696
+ export { R as useMybAchieveGoal, W as useMybActivateNutritionPlan, z as useMybActiveNutritionPlan, O as useMybAddExercise, D as useMybAddWorkout, Be as useMybAiOperationLogs, Ve as useMybAiProcessingConsent, Re as useMybAiSettings, E as useMybArchiveProgram, fe as useMybBodyMetrics, we as useMybCancelChallenge, be as useMybChallengeLeaderboard, ye as useMybChallenges, Pe as useMybCoaching, ve as useMybCompleteMindfulnessSession, P as useMybCompleteSession, xe as useMybCreateChallenge, $ as useMybCreateCoaching, I as useMybCreateGoal, H as useMybCreateNutritionPlan, le as useMybCreateProgram, V as useMybDailyMacros, de as useMybDeleteMeal, Me as useMybDeleteMySocialPost, j as useMybExerciseBestSet, We as useMybFoodByBarcode, Ae as useMybGiveKudos, F as useMybGoals, Le as useMybInsights, Se as useMybJoinChallenge, Ce as useMybLeaveChallenge, ue as useMybLogMeal, he as useMybLogRecovery, N as useMybLogSet, B as useMybMeals, ge as useMybMindfulnessExercises, _e as useMybMindfulnessSessions, Ne as useMybModerateSocialPost, Te as useMybMySocialProfile, oe as useMybProgram, se as useMybProgramWorkouts, ae as useMybPrograms, pe as useMybRecordBodyMetric, me as useMybRecoveryLogs, je as useMybRemoveKudos, Ue as useMybSearchFoods, A as useMybSession, k as useMybSessions, He as useMybSetAiProcessingConsent, ke as useMybShareToFeed, Oe as useMybShareableItems, De as useMybSocialFeed, M as useMybStartSession, Ie as useMybTodayGuidance, Fe as useMybTransitionCoaching, T as useMybTransitionProgram, ze as useMybUpdateAiSettings, L as useMybUpdateGoal, Ee as useMybUpdateMySocialProfile, U as useMybUpdateNutritionPlan, w as useMybUpdateProgram, ce as useMybWorkoutExercises };
600
697
 
601
698
  //# sourceMappingURL=useMyBodyShieldApi.js.map