@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.
- package/README.md +2 -0
- package/dist/mybodyshield/MyBodyShieldRoutes.d.ts.map +1 -1
- package/dist/mybodyshield/MyBodyShieldRoutes.js +35 -24
- package/dist/mybodyshield/MyBodyShieldRoutes.js.map +1 -1
- package/dist/mybodyshield/hooks/index.js +9 -9
- package/dist/mybodyshield/hooks/useMyBodyShieldApi.d.ts +16 -1
- package/dist/mybodyshield/hooks/useMyBodyShieldApi.d.ts.map +1 -1
- package/dist/mybodyshield/hooks/useMyBodyShieldApi.js +326 -229
- package/dist/mybodyshield/hooks/useMyBodyShieldApi.js.map +1 -1
- package/dist/mybodyshield/pages/community/CommunityPage.d.ts +16 -0
- package/dist/mybodyshield/pages/community/CommunityPage.d.ts.map +1 -0
- package/dist/mybodyshield/pages/community/CommunityPage.js +724 -0
- package/dist/mybodyshield/pages/community/CommunityPage.js.map +1 -0
- package/dist/mybodyshield/types/index.d.ts +81 -0
- package/dist/mybodyshield/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { useMyBodyShield as e } from "../context/MyBodyShieldContext.js";
|
|
2
2
|
import "../context/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import { graphqlFetch as
|
|
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
|
|
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
|
|
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) &&
|
|
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
|
-
|
|
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",
|
|
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
|
-
})),
|
|
96
|
-
let { apiGatewayUrl:
|
|
97
|
-
return
|
|
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
|
-
},
|
|
117
|
+
}, n)).mybListPrograms
|
|
109
118
|
});
|
|
110
|
-
},
|
|
111
|
-
let { apiGatewayUrl:
|
|
112
|
-
return
|
|
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 },
|
|
135
|
+
}`, { id: t }, n);
|
|
127
136
|
if (!e.mybProgram) return null;
|
|
128
|
-
let { workouts:
|
|
137
|
+
let { workouts: r, ...i } = e.mybProgram;
|
|
129
138
|
return {
|
|
130
139
|
...i,
|
|
131
|
-
workouts:
|
|
140
|
+
workouts: C(r.items)
|
|
132
141
|
};
|
|
133
142
|
}
|
|
134
143
|
});
|
|
135
|
-
},
|
|
136
|
-
let { apiGatewayUrl:
|
|
137
|
-
return
|
|
144
|
+
}, se = (t) => {
|
|
145
|
+
let { apiGatewayUrl: n } = e();
|
|
146
|
+
return r({
|
|
138
147
|
queryKey: s.programWorkouts(t ?? ""),
|
|
139
148
|
enabled: !!t,
|
|
140
|
-
queryFn: async () =>
|
|
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 },
|
|
156
|
+
}`, { programId: t }, n)).mybProgramWorkouts.items)
|
|
148
157
|
});
|
|
149
|
-
},
|
|
150
|
-
let { apiGatewayUrl:
|
|
151
|
-
return
|
|
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 },
|
|
167
|
+
}`, { workoutId: t }, n)).mybWorkoutExercises.items.slice().sort((e, t) => e.orderIndex - t.orderIndex)
|
|
159
168
|
});
|
|
160
|
-
},
|
|
161
|
-
let { apiGatewayUrl:
|
|
162
|
-
return
|
|
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 },
|
|
166
|
-
onSuccess: () =>
|
|
174
|
+
}`, { input: e }, t)).mybCreateProgram,
|
|
175
|
+
onSuccess: () => r.invalidateQueries({ queryKey: s.programs })
|
|
167
176
|
});
|
|
168
|
-
},
|
|
169
|
-
let { apiGatewayUrl:
|
|
170
|
-
return
|
|
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,
|
|
182
|
+
}`, e, t)).mybUpdateProgram,
|
|
174
183
|
onSuccess: (e) => {
|
|
175
|
-
|
|
184
|
+
r.invalidateQueries({ queryKey: s.programs }), r.invalidateQueries({ queryKey: s.program(e.id) });
|
|
176
185
|
}
|
|
177
186
|
});
|
|
178
|
-
},
|
|
179
|
-
let { apiGatewayUrl:
|
|
180
|
-
return
|
|
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,
|
|
192
|
+
}`, e, t)).mybTransitionProgram,
|
|
184
193
|
onSuccess: (e) => {
|
|
185
|
-
|
|
194
|
+
r.invalidateQueries({ queryKey: s.programs }), r.invalidateQueries({ queryKey: s.program(e.id) });
|
|
186
195
|
}
|
|
187
196
|
});
|
|
188
|
-
},
|
|
189
|
-
let { apiGatewayUrl:
|
|
190
|
-
return
|
|
191
|
-
mutationFn: async (e) => (await o("mutation MybArchiveProgram($id: ID!) { mybArchiveProgram(id: $id) }", { id: e },
|
|
192
|
-
onSuccess: () =>
|
|
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
|
-
},
|
|
195
|
-
let { apiGatewayUrl:
|
|
196
|
-
return
|
|
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 },
|
|
208
|
+
}`, { input: e }, t)).mybAddWorkout,
|
|
200
209
|
onSuccess: (e) => {
|
|
201
|
-
|
|
210
|
+
r.invalidateQueries({ queryKey: s.program(e.programId) }), r.invalidateQueries({ queryKey: s.programWorkouts(e.programId) });
|
|
202
211
|
}
|
|
203
212
|
});
|
|
204
|
-
},
|
|
205
|
-
let { apiGatewayUrl:
|
|
206
|
-
return
|
|
207
|
-
mutationFn: async (e) => (await o("mutation MybAddExercise($input: MybCreateExerciseInput!) {\n mybAddExercise(input: $input) { id workoutId }\n }", { input: e },
|
|
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
|
-
|
|
218
|
+
r.invalidateQueries({ queryKey: ["mybodyshield", "program"] }), r.invalidateQueries({ queryKey: ["mybodyshield", "program-workouts"] });
|
|
210
219
|
}
|
|
211
220
|
});
|
|
212
|
-
},
|
|
213
|
-
let { apiGatewayUrl:
|
|
214
|
-
return
|
|
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
|
-
},
|
|
234
|
+
}, n)).mybListSessions
|
|
226
235
|
});
|
|
227
|
-
},
|
|
228
|
-
let { apiGatewayUrl:
|
|
229
|
-
return
|
|
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 },
|
|
247
|
+
}`, { id: t }, n);
|
|
239
248
|
if (!e.mybSession) return null;
|
|
240
|
-
let { sets:
|
|
249
|
+
let { sets: r, ...i } = e.mybSession;
|
|
241
250
|
return {
|
|
242
251
|
...i,
|
|
243
|
-
sets:
|
|
252
|
+
sets: r.items
|
|
244
253
|
};
|
|
245
254
|
}
|
|
246
255
|
});
|
|
247
|
-
},
|
|
248
|
-
let { apiGatewayUrl:
|
|
249
|
-
return
|
|
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 },
|
|
263
|
+
}`, { exerciseName: i }, n)).mybExerciseBestSet,
|
|
255
264
|
staleTime: 15e3
|
|
256
265
|
});
|
|
257
|
-
},
|
|
258
|
-
let { apiGatewayUrl:
|
|
259
|
-
return
|
|
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 },
|
|
263
|
-
onSuccess: () =>
|
|
271
|
+
}`, { input: e }, t)).mybStartSession,
|
|
272
|
+
onSuccess: () => r.invalidateQueries({ queryKey: s.sessions })
|
|
264
273
|
});
|
|
265
|
-
},
|
|
266
|
-
let { apiGatewayUrl:
|
|
267
|
-
return
|
|
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 },
|
|
279
|
+
}`, { input: e }, t)).mybLogSet,
|
|
271
280
|
onSuccess: (e) => {
|
|
272
|
-
|
|
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
|
-
},
|
|
276
|
-
let { apiGatewayUrl:
|
|
277
|
-
return
|
|
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,
|
|
289
|
+
}`, e, t)).mybCompleteSession,
|
|
281
290
|
onSuccess: (e) => {
|
|
282
|
-
|
|
291
|
+
r.invalidateQueries({ queryKey: s.session(e.id) }), r.invalidateQueries({ queryKey: s.sessions });
|
|
283
292
|
}
|
|
284
293
|
});
|
|
285
|
-
},
|
|
286
|
-
let { apiGatewayUrl:
|
|
287
|
-
return
|
|
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
|
-
},
|
|
307
|
+
}, n)).mybListGoals
|
|
299
308
|
});
|
|
300
|
-
},
|
|
301
|
-
let { apiGatewayUrl:
|
|
302
|
-
return
|
|
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 },
|
|
306
|
-
onSuccess: () =>
|
|
314
|
+
}`, { input: e }, t)).mybCreateGoal,
|
|
315
|
+
onSuccess: () => r.invalidateQueries({ queryKey: s.goals })
|
|
307
316
|
});
|
|
308
|
-
},
|
|
309
|
-
let { apiGatewayUrl:
|
|
310
|
-
return
|
|
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,
|
|
314
|
-
onSuccess: () =>
|
|
322
|
+
}`, e, t)).mybUpdateGoal,
|
|
323
|
+
onSuccess: () => r.invalidateQueries({ queryKey: s.goals })
|
|
315
324
|
});
|
|
316
|
-
},
|
|
317
|
-
let { apiGatewayUrl:
|
|
318
|
-
return
|
|
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 },
|
|
322
|
-
onSuccess: () =>
|
|
330
|
+
}`, { id: e }, t)).mybAchieveGoal,
|
|
331
|
+
onSuccess: () => r.invalidateQueries({ queryKey: s.goals })
|
|
323
332
|
});
|
|
324
|
-
},
|
|
325
|
-
let { apiGatewayUrl:
|
|
326
|
-
return
|
|
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 },
|
|
339
|
+
}`, { memberId: t }, n)).mybActiveNutritionPlan
|
|
331
340
|
});
|
|
332
|
-
},
|
|
333
|
-
let { apiGatewayUrl:
|
|
334
|
-
return
|
|
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
|
-
},
|
|
354
|
+
}, n)).mybListMeals
|
|
346
355
|
});
|
|
347
|
-
},
|
|
356
|
+
}, V = (t, n) => {
|
|
348
357
|
let { apiGatewayUrl: i } = e();
|
|
349
|
-
return
|
|
358
|
+
return r({
|
|
350
359
|
queryKey: [
|
|
351
360
|
...s.dailyMacros,
|
|
352
361
|
t ?? "today",
|
|
353
|
-
|
|
362
|
+
n ?? "me"
|
|
354
363
|
],
|
|
355
364
|
queryFn: async () => (await o(`query MybDailyMacros($date: DateTime, $memberId: ID) {
|
|
356
|
-
mybDailyMacros(date: $date, memberId: $memberId) { ${
|
|
365
|
+
mybDailyMacros(date: $date, memberId: $memberId) { ${ie} }
|
|
357
366
|
}`, {
|
|
358
367
|
date: t,
|
|
359
|
-
memberId:
|
|
368
|
+
memberId: n
|
|
360
369
|
}, i)).mybDailyMacros
|
|
361
370
|
});
|
|
362
|
-
},
|
|
363
|
-
let { apiGatewayUrl:
|
|
364
|
-
return
|
|
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 },
|
|
376
|
+
}`, { input: e }, t)).mybCreateNutritionPlan,
|
|
368
377
|
onSuccess: () => {
|
|
369
|
-
|
|
378
|
+
r.invalidateQueries({ queryKey: s.activePlan });
|
|
370
379
|
}
|
|
371
380
|
});
|
|
372
|
-
},
|
|
373
|
-
let { apiGatewayUrl:
|
|
374
|
-
return
|
|
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,
|
|
386
|
+
}`, e, t)).mybUpdateNutritionPlan,
|
|
378
387
|
onSuccess: (e) => {
|
|
379
|
-
|
|
388
|
+
r.invalidateQueries({ queryKey: s.activePlan }), r.invalidateQueries({ queryKey: s.nutritionPlan(e.id) });
|
|
380
389
|
}
|
|
381
390
|
});
|
|
382
|
-
},
|
|
383
|
-
let { apiGatewayUrl:
|
|
384
|
-
return
|
|
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 },
|
|
396
|
+
}`, { id: e }, t)).mybActivateNutritionPlan,
|
|
388
397
|
onSuccess: (e) => {
|
|
389
|
-
|
|
398
|
+
r.invalidateQueries({ queryKey: s.activePlan }), r.invalidateQueries({ queryKey: s.nutritionPlan(e.id) });
|
|
390
399
|
}
|
|
391
400
|
});
|
|
392
|
-
},
|
|
393
|
-
let { apiGatewayUrl:
|
|
394
|
-
return
|
|
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 },
|
|
406
|
+
}`, { input: e }, t)).mybLogMeal,
|
|
398
407
|
onSuccess: (e) => {
|
|
399
|
-
|
|
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
|
-
},
|
|
403
|
-
let { apiGatewayUrl:
|
|
404
|
-
return
|
|
405
|
-
mutationFn: async (e) => (await o("mutation MybDeleteMeal($id: ID!) { mybDeleteMeal(id: $id) }", { id: e },
|
|
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
|
-
|
|
416
|
+
r.invalidateQueries({ queryKey: s.meals }), r.invalidateQueries({ queryKey: s.dailyMacros });
|
|
408
417
|
}
|
|
409
418
|
});
|
|
410
|
-
},
|
|
411
|
-
let { apiGatewayUrl:
|
|
412
|
-
return
|
|
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
|
-
},
|
|
432
|
+
}, n)).mybListBodyMetrics
|
|
424
433
|
});
|
|
425
|
-
},
|
|
426
|
-
let { apiGatewayUrl:
|
|
427
|
-
return
|
|
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 },
|
|
431
|
-
onSuccess: () =>
|
|
439
|
+
}`, { input: e }, t)).mybRecordBodyMetric,
|
|
440
|
+
onSuccess: () => r.invalidateQueries({ queryKey: s.bodyMetrics })
|
|
432
441
|
});
|
|
433
|
-
},
|
|
442
|
+
}, me = (t, n) => {
|
|
434
443
|
let { apiGatewayUrl: i } = e();
|
|
435
|
-
return
|
|
444
|
+
return r({
|
|
436
445
|
queryKey: [
|
|
437
446
|
...s.recovery,
|
|
438
447
|
t ?? "all",
|
|
439
|
-
|
|
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:
|
|
457
|
+
memberId: n
|
|
449
458
|
}, i)).mybListRecoveryLogs
|
|
450
459
|
});
|
|
451
|
-
},
|
|
452
|
-
let { apiGatewayUrl:
|
|
453
|
-
return
|
|
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 },
|
|
457
|
-
onSuccess: () =>
|
|
465
|
+
}`, { input: e }, t)).mybLogRecovery,
|
|
466
|
+
onSuccess: () => r.invalidateQueries({ queryKey: s.recovery })
|
|
458
467
|
});
|
|
459
|
-
},
|
|
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 { ${
|
|
462
|
-
`,
|
|
470
|
+
exercise { ${G} }
|
|
471
|
+
`, ge = () => {
|
|
463
472
|
let { apiGatewayUrl: t } = e();
|
|
464
|
-
return
|
|
473
|
+
return r({
|
|
465
474
|
queryKey: s.mindfulnessExercises,
|
|
466
|
-
queryFn: async () => (await o(`query MybListMindfulnessExercises { mybListMindfulnessExercises { ${
|
|
475
|
+
queryFn: async () => (await o(`query MybListMindfulnessExercises { mybListMindfulnessExercises { ${G} } }`, {}, t)).mybListMindfulnessExercises
|
|
467
476
|
});
|
|
468
|
-
},
|
|
477
|
+
}, _e = () => {
|
|
469
478
|
let { apiGatewayUrl: t } = e();
|
|
470
|
-
return
|
|
479
|
+
return r({
|
|
471
480
|
queryKey: s.mindfulnessSessions,
|
|
472
|
-
queryFn: async () => (await o(`query MybListMindfulnessSessions { mybListMindfulnessSessions { items { ${
|
|
481
|
+
queryFn: async () => (await o(`query MybListMindfulnessSessions { mybListMindfulnessSessions { items { ${K} } pageInfo { cursor hasMore } } }`, {}, t)).mybListMindfulnessSessions
|
|
473
482
|
});
|
|
474
|
-
},
|
|
475
|
-
let { apiGatewayUrl:
|
|
476
|
-
return
|
|
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) { ${
|
|
479
|
-
}`, { input: e },
|
|
480
|
-
onSuccess: () =>
|
|
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
|
-
},
|
|
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
|
-
|
|
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:
|
|
594
|
+
memberId: n
|
|
498
595
|
}, i)).mybListCoaching
|
|
499
596
|
});
|
|
500
|
-
},
|
|
501
|
-
let { apiGatewayUrl:
|
|
502
|
-
return
|
|
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 },
|
|
506
|
-
onSuccess: () =>
|
|
602
|
+
}`, { input: e }, t)).mybCreateCoaching,
|
|
603
|
+
onSuccess: () => r.invalidateQueries({ queryKey: s.coaching })
|
|
507
604
|
});
|
|
508
|
-
},
|
|
509
|
-
let { apiGatewayUrl:
|
|
510
|
-
return
|
|
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,
|
|
514
|
-
onSuccess: () =>
|
|
610
|
+
}`, e, t)).mybTransitionCoaching,
|
|
611
|
+
onSuccess: () => r.invalidateQueries({ queryKey: s.coaching })
|
|
515
612
|
});
|
|
516
|
-
},
|
|
517
|
-
let { apiGatewayUrl:
|
|
518
|
-
return
|
|
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) { ${
|
|
522
|
-
}`, { memberId: t },
|
|
618
|
+
mybTodayGuidance(memberId: $memberId) { ${te} }
|
|
619
|
+
}`, { memberId: t }, n)).mybTodayGuidance,
|
|
523
620
|
staleTime: 6e4
|
|
524
621
|
});
|
|
525
|
-
},
|
|
526
|
-
let { apiGatewayUrl:
|
|
527
|
-
return
|
|
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) { ${
|
|
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
|
-
},
|
|
632
|
+
}, n)).mybInsights
|
|
536
633
|
});
|
|
537
|
-
},
|
|
634
|
+
}, Re = () => {
|
|
538
635
|
let { apiGatewayUrl: t } = e();
|
|
539
|
-
return
|
|
636
|
+
return r({
|
|
540
637
|
queryKey: s.aiSettings,
|
|
541
638
|
queryFn: async () => (await o(`query MybAiSettings { mybAiSettings { ${b} } }`, {}, t)).mybAiSettings
|
|
542
639
|
});
|
|
543
|
-
},
|
|
544
|
-
let { apiGatewayUrl:
|
|
545
|
-
return
|
|
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 },
|
|
645
|
+
}`, { input: e }, t)).mybUpdateAiSettings,
|
|
549
646
|
onSuccess: () => {
|
|
550
|
-
|
|
647
|
+
r.invalidateQueries({ queryKey: s.aiSettings });
|
|
551
648
|
}
|
|
552
649
|
});
|
|
553
|
-
},
|
|
554
|
-
let { apiGatewayUrl:
|
|
555
|
-
return
|
|
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 { ${
|
|
656
|
+
items { ${re} }
|
|
560
657
|
pageInfo { cursor hasMore }
|
|
561
658
|
}
|
|
562
|
-
}`, { pagination: t ?? c },
|
|
659
|
+
}`, { pagination: t ?? c }, n)).mybListAiOperationLogs
|
|
563
660
|
});
|
|
564
|
-
},
|
|
661
|
+
}, Ve = () => {
|
|
565
662
|
let { apiGatewayUrl: t } = e();
|
|
566
|
-
return
|
|
663
|
+
return r({
|
|
567
664
|
queryKey: s.aiConsent,
|
|
568
|
-
queryFn: async () => (await o(`query MybMyAiProcessingConsent { mybMyAiProcessingConsent { ${
|
|
665
|
+
queryFn: async () => (await o(`query MybMyAiProcessingConsent { mybMyAiProcessingConsent { ${x} } }`, {}, t)).mybMyAiProcessingConsent
|
|
569
666
|
});
|
|
570
|
-
},
|
|
571
|
-
let { apiGatewayUrl:
|
|
572
|
-
return
|
|
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) { ${
|
|
575
|
-
}`, { enabled: e },
|
|
671
|
+
mybSetAiProcessingConsent(enabled: $enabled) { ${x} }
|
|
672
|
+
}`, { enabled: e }, t)).mybSetAiProcessingConsent,
|
|
576
673
|
onSuccess: () => {
|
|
577
|
-
|
|
674
|
+
r.invalidateQueries({ queryKey: s.aiConsent });
|
|
578
675
|
}
|
|
579
676
|
});
|
|
580
|
-
},
|
|
677
|
+
}, Ue = (t, n = 10) => {
|
|
581
678
|
let { apiGatewayUrl: i } = e(), a = t.trim();
|
|
582
|
-
return
|
|
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) { ${
|
|
683
|
+
mybSearchFoods(query: $query, limit: $limit) { ${S} }
|
|
587
684
|
}`, {
|
|
588
685
|
query: a,
|
|
589
|
-
limit:
|
|
686
|
+
limit: n
|
|
590
687
|
}, i)).mybSearchFoods,
|
|
591
688
|
staleTime: 3e4
|
|
592
689
|
});
|
|
593
|
-
},
|
|
594
|
-
let { apiGatewayUrl:
|
|
595
|
-
return
|
|
596
|
-
mybFoodByBarcode(barcode: $barcode) { ${
|
|
597
|
-
}`, { barcode: e },
|
|
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 {
|
|
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
|