@beorchid-llc/thrivo-contracts 0.5.2 → 0.5.4
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/admin.d.ts +358 -45
- package/dist/admin.d.ts.map +1 -1
- package/dist/admin.js +28 -19
- package/dist/admin.js.map +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.d.ts.map +1 -1
- package/dist/common.js +1 -1
- package/dist/common.js.map +1 -1
- package/dist/users.d.ts +22 -22
- package/package.json +1 -1
package/dist/admin.d.ts
CHANGED
|
@@ -130,43 +130,193 @@ export declare const adminUserStatusSchema: z.ZodEnum<["active", "suspended", "d
|
|
|
130
130
|
export type AdminUserStatus = z.infer<typeof adminUserStatusSchema>;
|
|
131
131
|
export declare const adminSubscriptionStatusSchema: z.ZodEnum<["active", "trialing", "canceled", "expired", "none"]>;
|
|
132
132
|
export type AdminSubscriptionStatus = z.infer<typeof adminSubscriptionStatusSchema>;
|
|
133
|
-
export declare const
|
|
133
|
+
export declare const adminUserSubscriptionSchema: z.ZodObject<{
|
|
134
|
+
status: z.ZodEnum<["active", "trialing", "canceled", "expired", "none"]>;
|
|
135
|
+
priceLabel: z.ZodNullable<z.ZodString>;
|
|
136
|
+
renewsAt: z.ZodNullable<z.ZodString>;
|
|
137
|
+
cancelAtPeriodEnd: z.ZodBoolean;
|
|
138
|
+
}, "strip", z.ZodTypeAny, {
|
|
139
|
+
status: "active" | "trialing" | "canceled" | "expired" | "none";
|
|
140
|
+
priceLabel: string | null;
|
|
141
|
+
renewsAt: string | null;
|
|
142
|
+
cancelAtPeriodEnd: boolean;
|
|
143
|
+
}, {
|
|
144
|
+
status: "active" | "trialing" | "canceled" | "expired" | "none";
|
|
145
|
+
priceLabel: string | null;
|
|
146
|
+
renewsAt: string | null;
|
|
147
|
+
cancelAtPeriodEnd: boolean;
|
|
148
|
+
}>;
|
|
149
|
+
export type AdminUserSubscription = z.infer<typeof adminUserSubscriptionSchema>;
|
|
150
|
+
/** Full user record for admin list + detail — every users column except authSubjectId. */
|
|
151
|
+
export declare const adminUserDetailSchema: z.ZodObject<Omit<{
|
|
134
152
|
id: z.ZodString;
|
|
135
153
|
email: z.ZodString;
|
|
154
|
+
goal: z.ZodNullable<z.ZodEnum<["lose", "maintain", "gain"]>>;
|
|
155
|
+
sex: z.ZodNullable<z.ZodEnum<["male", "female", "prefer_not_to_say"]>>;
|
|
156
|
+
age: z.ZodNullable<z.ZodNumber>;
|
|
157
|
+
heightCm: z.ZodNullable<z.ZodString>;
|
|
158
|
+
weightKg: z.ZodNullable<z.ZodString>;
|
|
159
|
+
targetWeightKg: z.ZodNullable<z.ZodString>;
|
|
160
|
+
tdeeKcal: z.ZodNullable<z.ZodNumber>;
|
|
161
|
+
dailyTargetKcal: z.ZodNullable<z.ZodNumber>;
|
|
162
|
+
targetProteinG: z.ZodNullable<z.ZodNumber>;
|
|
163
|
+
targetCarbsG: z.ZodNullable<z.ZodNumber>;
|
|
164
|
+
targetFatG: z.ZodNullable<z.ZodNumber>;
|
|
165
|
+
activityLevel: z.ZodNullable<z.ZodEnum<["sedentary", "light", "moderate", "active", "very_active"]>>;
|
|
166
|
+
manualDailyTargetKcal: z.ZodNullable<z.ZodNumber>;
|
|
167
|
+
notifyTimes: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
168
|
+
timezone: z.ZodNullable<z.ZodString>;
|
|
169
|
+
tier: z.ZodEnum<["free", "premium"]>;
|
|
170
|
+
accountStatus: z.ZodEnum<["dormant", "free_trial", "free_plan", "paid"]>;
|
|
171
|
+
trialEndsAt: z.ZodNullable<z.ZodDate>;
|
|
172
|
+
onboardingStep: z.ZodNumber;
|
|
173
|
+
isOnboarded: z.ZodBoolean;
|
|
174
|
+
isOnboardingSkipped: z.ZodBoolean;
|
|
175
|
+
createdAt: z.ZodDate;
|
|
176
|
+
} & {
|
|
136
177
|
name: z.ZodNullable<z.ZodString>;
|
|
137
|
-
|
|
178
|
+
onboardingSkipped: z.ZodBoolean;
|
|
179
|
+
subscriptionStatus: z.ZodNullable<z.ZodString>;
|
|
180
|
+
deletedAt: z.ZodNullable<z.ZodDate>;
|
|
181
|
+
updatedAt: z.ZodDate;
|
|
138
182
|
status: z.ZodEnum<["active", "suspended", "deleted"]>;
|
|
139
|
-
createdAt: z.ZodString;
|
|
140
183
|
lastActiveAt: z.ZodNullable<z.ZodString>;
|
|
184
|
+
totalFoodLogs: z.ZodNumber;
|
|
185
|
+
currentStreakDays: z.ZodNumber;
|
|
186
|
+
subscription: z.ZodNullable<z.ZodObject<{
|
|
187
|
+
status: z.ZodEnum<["active", "trialing", "canceled", "expired", "none"]>;
|
|
188
|
+
priceLabel: z.ZodNullable<z.ZodString>;
|
|
189
|
+
renewsAt: z.ZodNullable<z.ZodString>;
|
|
190
|
+
cancelAtPeriodEnd: z.ZodBoolean;
|
|
191
|
+
}, "strip", z.ZodTypeAny, {
|
|
192
|
+
status: "active" | "trialing" | "canceled" | "expired" | "none";
|
|
193
|
+
priceLabel: string | null;
|
|
194
|
+
renewsAt: string | null;
|
|
195
|
+
cancelAtPeriodEnd: boolean;
|
|
196
|
+
}, {
|
|
197
|
+
status: "active" | "trialing" | "canceled" | "expired" | "none";
|
|
198
|
+
priceLabel: string | null;
|
|
199
|
+
renewsAt: string | null;
|
|
200
|
+
cancelAtPeriodEnd: boolean;
|
|
201
|
+
}>>;
|
|
202
|
+
}, "createdAt"> & {
|
|
203
|
+
createdAt: z.ZodDate;
|
|
141
204
|
}, "strip", z.ZodTypeAny, {
|
|
142
205
|
status: "active" | "suspended" | "deleted";
|
|
143
206
|
id: string;
|
|
144
207
|
email: string;
|
|
145
208
|
name: string | null;
|
|
146
|
-
|
|
147
|
-
|
|
209
|
+
goal: "lose" | "maintain" | "gain" | null;
|
|
210
|
+
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
211
|
+
age: number | null;
|
|
212
|
+
heightCm: string | null;
|
|
213
|
+
weightKg: string | null;
|
|
214
|
+
targetWeightKg: string | null;
|
|
215
|
+
tdeeKcal: number | null;
|
|
216
|
+
dailyTargetKcal: number | null;
|
|
217
|
+
targetProteinG: number | null;
|
|
218
|
+
targetCarbsG: number | null;
|
|
219
|
+
targetFatG: number | null;
|
|
220
|
+
activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
|
|
221
|
+
manualDailyTargetKcal: number | null;
|
|
222
|
+
notifyTimes: string[] | null;
|
|
223
|
+
timezone: string | null;
|
|
224
|
+
tier: "free" | "premium";
|
|
225
|
+
accountStatus: "dormant" | "free_trial" | "free_plan" | "paid";
|
|
226
|
+
trialEndsAt: Date | null;
|
|
227
|
+
onboardingStep: number;
|
|
228
|
+
isOnboarded: boolean;
|
|
229
|
+
isOnboardingSkipped: boolean;
|
|
230
|
+
createdAt: Date;
|
|
231
|
+
onboardingSkipped: boolean;
|
|
232
|
+
subscriptionStatus: string | null;
|
|
233
|
+
deletedAt: Date | null;
|
|
234
|
+
updatedAt: Date;
|
|
148
235
|
lastActiveAt: string | null;
|
|
236
|
+
totalFoodLogs: number;
|
|
237
|
+
currentStreakDays: number;
|
|
238
|
+
subscription: {
|
|
239
|
+
status: "active" | "trialing" | "canceled" | "expired" | "none";
|
|
240
|
+
priceLabel: string | null;
|
|
241
|
+
renewsAt: string | null;
|
|
242
|
+
cancelAtPeriodEnd: boolean;
|
|
243
|
+
} | null;
|
|
149
244
|
}, {
|
|
150
245
|
status: "active" | "suspended" | "deleted";
|
|
151
246
|
id: string;
|
|
152
247
|
email: string;
|
|
153
248
|
name: string | null;
|
|
154
|
-
|
|
155
|
-
|
|
249
|
+
goal: "lose" | "maintain" | "gain" | null;
|
|
250
|
+
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
251
|
+
age: number | null;
|
|
252
|
+
heightCm: string | null;
|
|
253
|
+
weightKg: string | null;
|
|
254
|
+
targetWeightKg: string | null;
|
|
255
|
+
tdeeKcal: number | null;
|
|
256
|
+
dailyTargetKcal: number | null;
|
|
257
|
+
targetProteinG: number | null;
|
|
258
|
+
targetCarbsG: number | null;
|
|
259
|
+
targetFatG: number | null;
|
|
260
|
+
activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
|
|
261
|
+
manualDailyTargetKcal: number | null;
|
|
262
|
+
notifyTimes: string[] | null;
|
|
263
|
+
timezone: string | null;
|
|
264
|
+
tier: "free" | "premium";
|
|
265
|
+
accountStatus: "dormant" | "free_trial" | "free_plan" | "paid";
|
|
266
|
+
trialEndsAt: Date | null;
|
|
267
|
+
onboardingStep: number;
|
|
268
|
+
isOnboarded: boolean;
|
|
269
|
+
isOnboardingSkipped: boolean;
|
|
270
|
+
createdAt: Date;
|
|
271
|
+
onboardingSkipped: boolean;
|
|
272
|
+
subscriptionStatus: string | null;
|
|
273
|
+
deletedAt: Date | null;
|
|
274
|
+
updatedAt: Date;
|
|
156
275
|
lastActiveAt: string | null;
|
|
276
|
+
totalFoodLogs: number;
|
|
277
|
+
currentStreakDays: number;
|
|
278
|
+
subscription: {
|
|
279
|
+
status: "active" | "trialing" | "canceled" | "expired" | "none";
|
|
280
|
+
priceLabel: string | null;
|
|
281
|
+
renewsAt: string | null;
|
|
282
|
+
cancelAtPeriodEnd: boolean;
|
|
283
|
+
} | null;
|
|
157
284
|
}>;
|
|
158
|
-
export type
|
|
159
|
-
|
|
285
|
+
export type AdminUserDetail = z.infer<typeof adminUserDetailSchema>;
|
|
286
|
+
/** List rows use the same full shape as detail. */
|
|
287
|
+
export declare const adminUserSchema: z.ZodObject<Omit<{
|
|
160
288
|
id: z.ZodString;
|
|
161
289
|
email: z.ZodString;
|
|
290
|
+
goal: z.ZodNullable<z.ZodEnum<["lose", "maintain", "gain"]>>;
|
|
291
|
+
sex: z.ZodNullable<z.ZodEnum<["male", "female", "prefer_not_to_say"]>>;
|
|
292
|
+
age: z.ZodNullable<z.ZodNumber>;
|
|
293
|
+
heightCm: z.ZodNullable<z.ZodString>;
|
|
294
|
+
weightKg: z.ZodNullable<z.ZodString>;
|
|
295
|
+
targetWeightKg: z.ZodNullable<z.ZodString>;
|
|
296
|
+
tdeeKcal: z.ZodNullable<z.ZodNumber>;
|
|
297
|
+
dailyTargetKcal: z.ZodNullable<z.ZodNumber>;
|
|
298
|
+
targetProteinG: z.ZodNullable<z.ZodNumber>;
|
|
299
|
+
targetCarbsG: z.ZodNullable<z.ZodNumber>;
|
|
300
|
+
targetFatG: z.ZodNullable<z.ZodNumber>;
|
|
301
|
+
activityLevel: z.ZodNullable<z.ZodEnum<["sedentary", "light", "moderate", "active", "very_active"]>>;
|
|
302
|
+
manualDailyTargetKcal: z.ZodNullable<z.ZodNumber>;
|
|
303
|
+
notifyTimes: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
304
|
+
timezone: z.ZodNullable<z.ZodString>;
|
|
305
|
+
tier: z.ZodEnum<["free", "premium"]>;
|
|
306
|
+
accountStatus: z.ZodEnum<["dormant", "free_trial", "free_plan", "paid"]>;
|
|
307
|
+
trialEndsAt: z.ZodNullable<z.ZodDate>;
|
|
308
|
+
onboardingStep: z.ZodNumber;
|
|
309
|
+
isOnboarded: z.ZodBoolean;
|
|
310
|
+
isOnboardingSkipped: z.ZodBoolean;
|
|
311
|
+
createdAt: z.ZodDate;
|
|
312
|
+
} & {
|
|
162
313
|
name: z.ZodNullable<z.ZodString>;
|
|
163
|
-
|
|
314
|
+
onboardingSkipped: z.ZodBoolean;
|
|
315
|
+
subscriptionStatus: z.ZodNullable<z.ZodString>;
|
|
316
|
+
deletedAt: z.ZodNullable<z.ZodDate>;
|
|
317
|
+
updatedAt: z.ZodDate;
|
|
164
318
|
status: z.ZodEnum<["active", "suspended", "deleted"]>;
|
|
165
|
-
createdAt: z.ZodString;
|
|
166
319
|
lastActiveAt: z.ZodNullable<z.ZodString>;
|
|
167
|
-
} & {
|
|
168
|
-
goal: z.ZodNullable<z.ZodString>;
|
|
169
|
-
targetCalories: z.ZodNullable<z.ZodNumber>;
|
|
170
320
|
totalFoodLogs: z.ZodNumber;
|
|
171
321
|
currentStreakDays: z.ZodNumber;
|
|
172
322
|
subscription: z.ZodNullable<z.ZodObject<{
|
|
@@ -185,16 +335,40 @@ export declare const adminUserDetailSchema: z.ZodObject<{
|
|
|
185
335
|
renewsAt: string | null;
|
|
186
336
|
cancelAtPeriodEnd: boolean;
|
|
187
337
|
}>>;
|
|
338
|
+
}, "createdAt"> & {
|
|
339
|
+
createdAt: z.ZodDate;
|
|
188
340
|
}, "strip", z.ZodTypeAny, {
|
|
189
341
|
status: "active" | "suspended" | "deleted";
|
|
190
342
|
id: string;
|
|
191
343
|
email: string;
|
|
192
344
|
name: string | null;
|
|
193
|
-
|
|
194
|
-
|
|
345
|
+
goal: "lose" | "maintain" | "gain" | null;
|
|
346
|
+
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
347
|
+
age: number | null;
|
|
348
|
+
heightCm: string | null;
|
|
349
|
+
weightKg: string | null;
|
|
350
|
+
targetWeightKg: string | null;
|
|
351
|
+
tdeeKcal: number | null;
|
|
352
|
+
dailyTargetKcal: number | null;
|
|
353
|
+
targetProteinG: number | null;
|
|
354
|
+
targetCarbsG: number | null;
|
|
355
|
+
targetFatG: number | null;
|
|
356
|
+
activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
|
|
357
|
+
manualDailyTargetKcal: number | null;
|
|
358
|
+
notifyTimes: string[] | null;
|
|
359
|
+
timezone: string | null;
|
|
360
|
+
tier: "free" | "premium";
|
|
361
|
+
accountStatus: "dormant" | "free_trial" | "free_plan" | "paid";
|
|
362
|
+
trialEndsAt: Date | null;
|
|
363
|
+
onboardingStep: number;
|
|
364
|
+
isOnboarded: boolean;
|
|
365
|
+
isOnboardingSkipped: boolean;
|
|
366
|
+
createdAt: Date;
|
|
367
|
+
onboardingSkipped: boolean;
|
|
368
|
+
subscriptionStatus: string | null;
|
|
369
|
+
deletedAt: Date | null;
|
|
370
|
+
updatedAt: Date;
|
|
195
371
|
lastActiveAt: string | null;
|
|
196
|
-
goal: string | null;
|
|
197
|
-
targetCalories: number | null;
|
|
198
372
|
totalFoodLogs: number;
|
|
199
373
|
currentStreakDays: number;
|
|
200
374
|
subscription: {
|
|
@@ -208,11 +382,33 @@ export declare const adminUserDetailSchema: z.ZodObject<{
|
|
|
208
382
|
id: string;
|
|
209
383
|
email: string;
|
|
210
384
|
name: string | null;
|
|
211
|
-
|
|
212
|
-
|
|
385
|
+
goal: "lose" | "maintain" | "gain" | null;
|
|
386
|
+
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
387
|
+
age: number | null;
|
|
388
|
+
heightCm: string | null;
|
|
389
|
+
weightKg: string | null;
|
|
390
|
+
targetWeightKg: string | null;
|
|
391
|
+
tdeeKcal: number | null;
|
|
392
|
+
dailyTargetKcal: number | null;
|
|
393
|
+
targetProteinG: number | null;
|
|
394
|
+
targetCarbsG: number | null;
|
|
395
|
+
targetFatG: number | null;
|
|
396
|
+
activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
|
|
397
|
+
manualDailyTargetKcal: number | null;
|
|
398
|
+
notifyTimes: string[] | null;
|
|
399
|
+
timezone: string | null;
|
|
400
|
+
tier: "free" | "premium";
|
|
401
|
+
accountStatus: "dormant" | "free_trial" | "free_plan" | "paid";
|
|
402
|
+
trialEndsAt: Date | null;
|
|
403
|
+
onboardingStep: number;
|
|
404
|
+
isOnboarded: boolean;
|
|
405
|
+
isOnboardingSkipped: boolean;
|
|
406
|
+
createdAt: Date;
|
|
407
|
+
onboardingSkipped: boolean;
|
|
408
|
+
subscriptionStatus: string | null;
|
|
409
|
+
deletedAt: Date | null;
|
|
410
|
+
updatedAt: Date;
|
|
213
411
|
lastActiveAt: string | null;
|
|
214
|
-
goal: string | null;
|
|
215
|
-
targetCalories: number | null;
|
|
216
412
|
totalFoodLogs: number;
|
|
217
413
|
currentStreakDays: number;
|
|
218
414
|
subscription: {
|
|
@@ -222,19 +418,41 @@ export declare const adminUserDetailSchema: z.ZodObject<{
|
|
|
222
418
|
cancelAtPeriodEnd: boolean;
|
|
223
419
|
} | null;
|
|
224
420
|
}>;
|
|
225
|
-
export type
|
|
421
|
+
export type AdminUser = AdminUserDetail;
|
|
226
422
|
export declare const adminUserDetailResponseSchema: z.ZodObject<{
|
|
227
|
-
user: z.ZodObject<{
|
|
423
|
+
user: z.ZodObject<Omit<{
|
|
228
424
|
id: z.ZodString;
|
|
229
425
|
email: z.ZodString;
|
|
426
|
+
goal: z.ZodNullable<z.ZodEnum<["lose", "maintain", "gain"]>>;
|
|
427
|
+
sex: z.ZodNullable<z.ZodEnum<["male", "female", "prefer_not_to_say"]>>;
|
|
428
|
+
age: z.ZodNullable<z.ZodNumber>;
|
|
429
|
+
heightCm: z.ZodNullable<z.ZodString>;
|
|
430
|
+
weightKg: z.ZodNullable<z.ZodString>;
|
|
431
|
+
targetWeightKg: z.ZodNullable<z.ZodString>;
|
|
432
|
+
tdeeKcal: z.ZodNullable<z.ZodNumber>;
|
|
433
|
+
dailyTargetKcal: z.ZodNullable<z.ZodNumber>;
|
|
434
|
+
targetProteinG: z.ZodNullable<z.ZodNumber>;
|
|
435
|
+
targetCarbsG: z.ZodNullable<z.ZodNumber>;
|
|
436
|
+
targetFatG: z.ZodNullable<z.ZodNumber>;
|
|
437
|
+
activityLevel: z.ZodNullable<z.ZodEnum<["sedentary", "light", "moderate", "active", "very_active"]>>;
|
|
438
|
+
manualDailyTargetKcal: z.ZodNullable<z.ZodNumber>;
|
|
439
|
+
notifyTimes: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
440
|
+
timezone: z.ZodNullable<z.ZodString>;
|
|
441
|
+
tier: z.ZodEnum<["free", "premium"]>;
|
|
442
|
+
accountStatus: z.ZodEnum<["dormant", "free_trial", "free_plan", "paid"]>;
|
|
443
|
+
trialEndsAt: z.ZodNullable<z.ZodDate>;
|
|
444
|
+
onboardingStep: z.ZodNumber;
|
|
445
|
+
isOnboarded: z.ZodBoolean;
|
|
446
|
+
isOnboardingSkipped: z.ZodBoolean;
|
|
447
|
+
createdAt: z.ZodDate;
|
|
448
|
+
} & {
|
|
230
449
|
name: z.ZodNullable<z.ZodString>;
|
|
231
|
-
|
|
450
|
+
onboardingSkipped: z.ZodBoolean;
|
|
451
|
+
subscriptionStatus: z.ZodNullable<z.ZodString>;
|
|
452
|
+
deletedAt: z.ZodNullable<z.ZodDate>;
|
|
453
|
+
updatedAt: z.ZodDate;
|
|
232
454
|
status: z.ZodEnum<["active", "suspended", "deleted"]>;
|
|
233
|
-
createdAt: z.ZodString;
|
|
234
455
|
lastActiveAt: z.ZodNullable<z.ZodString>;
|
|
235
|
-
} & {
|
|
236
|
-
goal: z.ZodNullable<z.ZodString>;
|
|
237
|
-
targetCalories: z.ZodNullable<z.ZodNumber>;
|
|
238
456
|
totalFoodLogs: z.ZodNumber;
|
|
239
457
|
currentStreakDays: z.ZodNumber;
|
|
240
458
|
subscription: z.ZodNullable<z.ZodObject<{
|
|
@@ -253,16 +471,40 @@ export declare const adminUserDetailResponseSchema: z.ZodObject<{
|
|
|
253
471
|
renewsAt: string | null;
|
|
254
472
|
cancelAtPeriodEnd: boolean;
|
|
255
473
|
}>>;
|
|
474
|
+
}, "createdAt"> & {
|
|
475
|
+
createdAt: z.ZodDate;
|
|
256
476
|
}, "strip", z.ZodTypeAny, {
|
|
257
477
|
status: "active" | "suspended" | "deleted";
|
|
258
478
|
id: string;
|
|
259
479
|
email: string;
|
|
260
480
|
name: string | null;
|
|
261
|
-
|
|
262
|
-
|
|
481
|
+
goal: "lose" | "maintain" | "gain" | null;
|
|
482
|
+
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
483
|
+
age: number | null;
|
|
484
|
+
heightCm: string | null;
|
|
485
|
+
weightKg: string | null;
|
|
486
|
+
targetWeightKg: string | null;
|
|
487
|
+
tdeeKcal: number | null;
|
|
488
|
+
dailyTargetKcal: number | null;
|
|
489
|
+
targetProteinG: number | null;
|
|
490
|
+
targetCarbsG: number | null;
|
|
491
|
+
targetFatG: number | null;
|
|
492
|
+
activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
|
|
493
|
+
manualDailyTargetKcal: number | null;
|
|
494
|
+
notifyTimes: string[] | null;
|
|
495
|
+
timezone: string | null;
|
|
496
|
+
tier: "free" | "premium";
|
|
497
|
+
accountStatus: "dormant" | "free_trial" | "free_plan" | "paid";
|
|
498
|
+
trialEndsAt: Date | null;
|
|
499
|
+
onboardingStep: number;
|
|
500
|
+
isOnboarded: boolean;
|
|
501
|
+
isOnboardingSkipped: boolean;
|
|
502
|
+
createdAt: Date;
|
|
503
|
+
onboardingSkipped: boolean;
|
|
504
|
+
subscriptionStatus: string | null;
|
|
505
|
+
deletedAt: Date | null;
|
|
506
|
+
updatedAt: Date;
|
|
263
507
|
lastActiveAt: string | null;
|
|
264
|
-
goal: string | null;
|
|
265
|
-
targetCalories: number | null;
|
|
266
508
|
totalFoodLogs: number;
|
|
267
509
|
currentStreakDays: number;
|
|
268
510
|
subscription: {
|
|
@@ -276,11 +518,33 @@ export declare const adminUserDetailResponseSchema: z.ZodObject<{
|
|
|
276
518
|
id: string;
|
|
277
519
|
email: string;
|
|
278
520
|
name: string | null;
|
|
279
|
-
|
|
280
|
-
|
|
521
|
+
goal: "lose" | "maintain" | "gain" | null;
|
|
522
|
+
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
523
|
+
age: number | null;
|
|
524
|
+
heightCm: string | null;
|
|
525
|
+
weightKg: string | null;
|
|
526
|
+
targetWeightKg: string | null;
|
|
527
|
+
tdeeKcal: number | null;
|
|
528
|
+
dailyTargetKcal: number | null;
|
|
529
|
+
targetProteinG: number | null;
|
|
530
|
+
targetCarbsG: number | null;
|
|
531
|
+
targetFatG: number | null;
|
|
532
|
+
activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
|
|
533
|
+
manualDailyTargetKcal: number | null;
|
|
534
|
+
notifyTimes: string[] | null;
|
|
535
|
+
timezone: string | null;
|
|
536
|
+
tier: "free" | "premium";
|
|
537
|
+
accountStatus: "dormant" | "free_trial" | "free_plan" | "paid";
|
|
538
|
+
trialEndsAt: Date | null;
|
|
539
|
+
onboardingStep: number;
|
|
540
|
+
isOnboarded: boolean;
|
|
541
|
+
isOnboardingSkipped: boolean;
|
|
542
|
+
createdAt: Date;
|
|
543
|
+
onboardingSkipped: boolean;
|
|
544
|
+
subscriptionStatus: string | null;
|
|
545
|
+
deletedAt: Date | null;
|
|
546
|
+
updatedAt: Date;
|
|
281
547
|
lastActiveAt: string | null;
|
|
282
|
-
goal: string | null;
|
|
283
|
-
targetCalories: number | null;
|
|
284
548
|
totalFoodLogs: number;
|
|
285
549
|
currentStreakDays: number;
|
|
286
550
|
subscription: {
|
|
@@ -296,11 +560,33 @@ export declare const adminUserDetailResponseSchema: z.ZodObject<{
|
|
|
296
560
|
id: string;
|
|
297
561
|
email: string;
|
|
298
562
|
name: string | null;
|
|
299
|
-
|
|
300
|
-
|
|
563
|
+
goal: "lose" | "maintain" | "gain" | null;
|
|
564
|
+
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
565
|
+
age: number | null;
|
|
566
|
+
heightCm: string | null;
|
|
567
|
+
weightKg: string | null;
|
|
568
|
+
targetWeightKg: string | null;
|
|
569
|
+
tdeeKcal: number | null;
|
|
570
|
+
dailyTargetKcal: number | null;
|
|
571
|
+
targetProteinG: number | null;
|
|
572
|
+
targetCarbsG: number | null;
|
|
573
|
+
targetFatG: number | null;
|
|
574
|
+
activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
|
|
575
|
+
manualDailyTargetKcal: number | null;
|
|
576
|
+
notifyTimes: string[] | null;
|
|
577
|
+
timezone: string | null;
|
|
578
|
+
tier: "free" | "premium";
|
|
579
|
+
accountStatus: "dormant" | "free_trial" | "free_plan" | "paid";
|
|
580
|
+
trialEndsAt: Date | null;
|
|
581
|
+
onboardingStep: number;
|
|
582
|
+
isOnboarded: boolean;
|
|
583
|
+
isOnboardingSkipped: boolean;
|
|
584
|
+
createdAt: Date;
|
|
585
|
+
onboardingSkipped: boolean;
|
|
586
|
+
subscriptionStatus: string | null;
|
|
587
|
+
deletedAt: Date | null;
|
|
588
|
+
updatedAt: Date;
|
|
301
589
|
lastActiveAt: string | null;
|
|
302
|
-
goal: string | null;
|
|
303
|
-
targetCalories: number | null;
|
|
304
590
|
totalFoodLogs: number;
|
|
305
591
|
currentStreakDays: number;
|
|
306
592
|
subscription: {
|
|
@@ -316,11 +602,33 @@ export declare const adminUserDetailResponseSchema: z.ZodObject<{
|
|
|
316
602
|
id: string;
|
|
317
603
|
email: string;
|
|
318
604
|
name: string | null;
|
|
319
|
-
|
|
320
|
-
|
|
605
|
+
goal: "lose" | "maintain" | "gain" | null;
|
|
606
|
+
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
607
|
+
age: number | null;
|
|
608
|
+
heightCm: string | null;
|
|
609
|
+
weightKg: string | null;
|
|
610
|
+
targetWeightKg: string | null;
|
|
611
|
+
tdeeKcal: number | null;
|
|
612
|
+
dailyTargetKcal: number | null;
|
|
613
|
+
targetProteinG: number | null;
|
|
614
|
+
targetCarbsG: number | null;
|
|
615
|
+
targetFatG: number | null;
|
|
616
|
+
activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
|
|
617
|
+
manualDailyTargetKcal: number | null;
|
|
618
|
+
notifyTimes: string[] | null;
|
|
619
|
+
timezone: string | null;
|
|
620
|
+
tier: "free" | "premium";
|
|
621
|
+
accountStatus: "dormant" | "free_trial" | "free_plan" | "paid";
|
|
622
|
+
trialEndsAt: Date | null;
|
|
623
|
+
onboardingStep: number;
|
|
624
|
+
isOnboarded: boolean;
|
|
625
|
+
isOnboardingSkipped: boolean;
|
|
626
|
+
createdAt: Date;
|
|
627
|
+
onboardingSkipped: boolean;
|
|
628
|
+
subscriptionStatus: string | null;
|
|
629
|
+
deletedAt: Date | null;
|
|
630
|
+
updatedAt: Date;
|
|
321
631
|
lastActiveAt: string | null;
|
|
322
|
-
goal: string | null;
|
|
323
|
-
targetCalories: number | null;
|
|
324
632
|
totalFoodLogs: number;
|
|
325
633
|
currentStreakDays: number;
|
|
326
634
|
subscription: {
|
|
@@ -396,6 +704,11 @@ export declare const adminRoutes: {
|
|
|
396
704
|
path: "/api/v1/admin/users/:id";
|
|
397
705
|
auth: "admin";
|
|
398
706
|
};
|
|
707
|
+
getDashboardMetrics: {
|
|
708
|
+
method: "GET";
|
|
709
|
+
path: "/api/v1/admin/metrics/dashboard";
|
|
710
|
+
auth: "admin";
|
|
711
|
+
};
|
|
399
712
|
cancelSubscription: {
|
|
400
713
|
method: "POST";
|
|
401
714
|
path: "/api/v1/admin/users/:id/subscription/cancel";
|
package/dist/admin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../src/admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../src/admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,eAAe,8CAA4C,CAAC;AACzE,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;EAKtB,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAMhD,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAmC,CAAC;AAC3E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,cAAc,WAAW,CAAC;AACvC,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC;AAE5B,eAAO,MAAM,4BAA4B;;;;;;EAEvC,CAAC;AACH,MAAM,MA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@@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { userProfileSchema } from "./users";
|
|
2
3
|
// ---------------------------------------------------------------------------
|
|
3
4
|
// Admin identity
|
|
4
5
|
// ---------------------------------------------------------------------------
|
|
@@ -43,29 +44,32 @@ export const adminSubscriptionStatusSchema = z.enum([
|
|
|
43
44
|
"expired",
|
|
44
45
|
"none",
|
|
45
46
|
]);
|
|
46
|
-
export const
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
export const adminUserSubscriptionSchema = z.object({
|
|
48
|
+
status: adminSubscriptionStatusSchema,
|
|
49
|
+
priceLabel: z.string().nullable(),
|
|
50
|
+
renewsAt: z.string().nullable(),
|
|
51
|
+
cancelAtPeriodEnd: z.boolean(),
|
|
52
|
+
});
|
|
53
|
+
/** Full user record for admin list + detail — every users column except authSubjectId. */
|
|
54
|
+
export const adminUserDetailSchema = userProfileSchema
|
|
55
|
+
.extend({
|
|
49
56
|
name: z.string().nullable(),
|
|
50
|
-
|
|
57
|
+
onboardingSkipped: z.boolean(),
|
|
58
|
+
subscriptionStatus: z.string().nullable(),
|
|
59
|
+
deletedAt: z.coerce.date().nullable(),
|
|
60
|
+
updatedAt: z.coerce.date(),
|
|
51
61
|
status: adminUserStatusSchema,
|
|
52
|
-
createdAt: z.string(), // ISO-8601
|
|
53
62
|
lastActiveAt: z.string().nullable(),
|
|
63
|
+
totalFoodLogs: z.number().int(),
|
|
64
|
+
currentStreakDays: z.number().int(),
|
|
65
|
+
subscription: adminUserSubscriptionSchema.nullable(),
|
|
66
|
+
})
|
|
67
|
+
.omit({ createdAt: true })
|
|
68
|
+
.extend({
|
|
69
|
+
createdAt: z.coerce.date(),
|
|
54
70
|
});
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
targetCalories: z.number().nullable(),
|
|
58
|
-
totalFoodLogs: z.number(),
|
|
59
|
-
currentStreakDays: z.number(),
|
|
60
|
-
subscription: z
|
|
61
|
-
.object({
|
|
62
|
-
status: adminSubscriptionStatusSchema,
|
|
63
|
-
priceLabel: z.string().nullable(),
|
|
64
|
-
renewsAt: z.string().nullable(),
|
|
65
|
-
cancelAtPeriodEnd: z.boolean(),
|
|
66
|
-
})
|
|
67
|
-
.nullable(),
|
|
68
|
-
});
|
|
71
|
+
/** List rows use the same full shape as detail. */
|
|
72
|
+
export const adminUserSchema = adminUserDetailSchema;
|
|
69
73
|
export const adminUserDetailResponseSchema = z.object({ user: adminUserDetailSchema });
|
|
70
74
|
export const adminCancelPayloadSchema = z.object({ reason: z.string().min(1) });
|
|
71
75
|
export const adminRefundPayloadSchema = z.object({
|
|
@@ -115,6 +119,11 @@ export const adminRoutes = {
|
|
|
115
119
|
path: "/api/v1/admin/users/:id",
|
|
116
120
|
auth: "admin",
|
|
117
121
|
},
|
|
122
|
+
getDashboardMetrics: {
|
|
123
|
+
method: "GET",
|
|
124
|
+
path: "/api/v1/admin/metrics/dashboard",
|
|
125
|
+
auth: "admin",
|
|
126
|
+
},
|
|
118
127
|
cancelSubscription: {
|
|
119
128
|
method: "POST",
|
|
120
129
|
path: "/api/v1/admin/users/:id/subscription/cancel",
|
package/dist/admin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.js","sourceRoot":"","sources":["../src/admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"admin.js","sourceRoot":"","sources":["../src/admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;AAGzE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MA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U,EAAE;QACV,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,gCAAgC;QACtC,IAAI,EAAE,QAAQ;KACf;IACD,SAAS,EAAE;QACT,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,+BAA+B;QACrC,IAAI,EAAE,QAAQ;KACf;IACD,WAAW,EAAE;QACX,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,2BAA2B;QACjC,IAAI,EAAE,OAAO;KACd;IAED,kBAAkB;IAClB,SAAS,EAAE;QACT,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,qBAAqB;QAC3B,IAAI,EAAE,OAAO;KACd;IACD,OAAO,EAAE;QACP,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,yBAAyB;QAC/B,IAAI,EAAE,OAAO;KACd;IACD,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,yBAAyB;QAC/B,IAAI,EAAE,OAAO;KACd;IACD,mBAAmB,EAAE;QACnB,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,iCAAiC;QACvC,IAAI,EAAE,OAAO;KACd;IACD,kBAAkB,EAAE;QAClB,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,6CAA6C;QACnD,IAAI,EAAE,OAAO;KACd;IACD,kBAAkB,EAAE;QAClB,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,6CAA6C;QACnD,IAAI,EAAE,OAAO;KACd;CACsC,CAAC"}
|
package/dist/common.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const errorCodeSchema: z.ZodEnum<["VALIDATION_ERROR", "
|
|
2
|
+
export declare const errorCodeSchema: z.ZodEnum<["VALIDATION_ERROR", "UNAUTHENTICATED", "FORBIDDEN", "PREMIUM_REQUIRED", "NOT_FOUND", "CONFLICT", "RATE_LIMITED", "UPSTREAM_ERROR", "INTERNAL_ERROR"]>;
|
|
3
3
|
export type ErrorCode = z.infer<typeof errorCodeSchema>;
|
|
4
4
|
export declare const metaSchema: z.ZodObject<{
|
|
5
5
|
nextCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
package/dist/common.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,eAAe,kKAU1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,UAAU;;;;;;0BAIC,CAAC;AAEzB,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAE9C,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC;;;;;;;;;;;;;;;kEAO/D;AAED,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI;IAC1B,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,CAAC,CAAC;IACR,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE7D,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE,WAAW,MAAM,EAAE,CAAC;IAC1B,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,WAAW,CAAC;CACjD,CAAC;AAMF,6FAA6F;AAC7F,eAAO,MAAM,eAAe,yBAAmB,CAAC;AAEhD,oEAAoE;AACpE,eAAO,MAAM,QAAQ,aAAoB,CAAC;AAC1C,eAAO,MAAM,aAAa,aAAa,CAAC;AAExC,8DAA8D;AAC9D,eAAO,MAAM,eAAe;;;;;;;;;EAAoD,CAAC;AACjF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
package/dist/common.js
CHANGED
package/dist/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC;IACpC,kBAAkB;IAClB,
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC;IACpC,kBAAkB;IAClB,iBAAiB;IACjB,WAAW;IACX,kBAAkB;IAClB,WAAW;IACX,UAAU;IACV,cAAc;IACd,gBAAgB;IAChB,gBAAgB;CACjB,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC;KACxB,MAAM,CAAC;IACN,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC7C,CAAC;KACD,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;AAIzB,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CA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: Date;
|
|
39
38
|
goal: "lose" | "maintain" | "gain" | null;
|
|
40
39
|
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
41
40
|
age: number | null;
|
|
@@ -47,7 +46,7 @@ export declare const userProfileSchema: z.ZodObject<{
|
|
|
47
46
|
targetProteinG: number | null;
|
|
48
47
|
targetCarbsG: number | null;
|
|
49
48
|
targetFatG: number | null;
|
|
50
|
-
activityLevel: "
|
|
49
|
+
activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
|
|
51
50
|
manualDailyTargetKcal: number | null;
|
|
52
51
|
notifyTimes: string[] | null;
|
|
53
52
|
timezone: string | null;
|
|
@@ -57,11 +56,11 @@ export declare const userProfileSchema: z.ZodObject<{
|
|
|
57
56
|
onboardingStep: number;
|
|
58
57
|
isOnboarded: boolean;
|
|
59
58
|
isOnboardingSkipped: boolean;
|
|
59
|
+
createdAt: Date;
|
|
60
60
|
}, {
|
|
61
61
|
id: string;
|
|
62
62
|
email: string;
|
|
63
63
|
name: string;
|
|
64
|
-
createdAt: Date;
|
|
65
64
|
goal: "lose" | "maintain" | "gain" | null;
|
|
66
65
|
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
67
66
|
age: number | null;
|
|
@@ -73,7 +72,7 @@ export declare const userProfileSchema: z.ZodObject<{
|
|
|
73
72
|
targetProteinG: number | null;
|
|
74
73
|
targetCarbsG: number | null;
|
|
75
74
|
targetFatG: number | null;
|
|
76
|
-
activityLevel: "
|
|
75
|
+
activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
|
|
77
76
|
manualDailyTargetKcal: number | null;
|
|
78
77
|
notifyTimes: string[] | null;
|
|
79
78
|
timezone: string | null;
|
|
@@ -83,6 +82,7 @@ export declare const userProfileSchema: z.ZodObject<{
|
|
|
83
82
|
onboardingStep: number;
|
|
84
83
|
isOnboarded: boolean;
|
|
85
84
|
isOnboardingSkipped: boolean;
|
|
85
|
+
createdAt: Date;
|
|
86
86
|
}>;
|
|
87
87
|
export type UserProfile = z.infer<typeof userProfileSchema>;
|
|
88
88
|
export declare const getMeResponseSchema: z.ZodObject<{
|
|
@@ -117,7 +117,6 @@ export declare const getMeResponseSchema: z.ZodObject<{
|
|
|
117
117
|
id: string;
|
|
118
118
|
email: string;
|
|
119
119
|
name: string;
|
|
120
|
-
createdAt: Date;
|
|
121
120
|
goal: "lose" | "maintain" | "gain" | null;
|
|
122
121
|
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
123
122
|
age: number | null;
|
|
@@ -129,7 +128,7 @@ export declare const getMeResponseSchema: z.ZodObject<{
|
|
|
129
128
|
targetProteinG: number | null;
|
|
130
129
|
targetCarbsG: number | null;
|
|
131
130
|
targetFatG: number | null;
|
|
132
|
-
activityLevel: "
|
|
131
|
+
activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
|
|
133
132
|
manualDailyTargetKcal: number | null;
|
|
134
133
|
notifyTimes: string[] | null;
|
|
135
134
|
timezone: string | null;
|
|
@@ -139,11 +138,11 @@ export declare const getMeResponseSchema: z.ZodObject<{
|
|
|
139
138
|
onboardingStep: number;
|
|
140
139
|
isOnboarded: boolean;
|
|
141
140
|
isOnboardingSkipped: boolean;
|
|
141
|
+
createdAt: Date;
|
|
142
142
|
}, {
|
|
143
143
|
id: string;
|
|
144
144
|
email: string;
|
|
145
145
|
name: string;
|
|
146
|
-
createdAt: Date;
|
|
147
146
|
goal: "lose" | "maintain" | "gain" | null;
|
|
148
147
|
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
149
148
|
age: number | null;
|
|
@@ -155,7 +154,7 @@ export declare const getMeResponseSchema: z.ZodObject<{
|
|
|
155
154
|
targetProteinG: number | null;
|
|
156
155
|
targetCarbsG: number | null;
|
|
157
156
|
targetFatG: number | null;
|
|
158
|
-
activityLevel: "
|
|
157
|
+
activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
|
|
159
158
|
manualDailyTargetKcal: number | null;
|
|
160
159
|
notifyTimes: string[] | null;
|
|
161
160
|
timezone: string | null;
|
|
@@ -165,6 +164,7 @@ export declare const getMeResponseSchema: z.ZodObject<{
|
|
|
165
164
|
onboardingStep: number;
|
|
166
165
|
isOnboarded: boolean;
|
|
167
166
|
isOnboardingSkipped: boolean;
|
|
167
|
+
createdAt: Date;
|
|
168
168
|
}>;
|
|
169
169
|
responseCode: z.ZodNumber;
|
|
170
170
|
message: z.ZodString;
|
|
@@ -176,7 +176,6 @@ export declare const getMeResponseSchema: z.ZodObject<{
|
|
|
176
176
|
id: string;
|
|
177
177
|
email: string;
|
|
178
178
|
name: string;
|
|
179
|
-
createdAt: Date;
|
|
180
179
|
goal: "lose" | "maintain" | "gain" | null;
|
|
181
180
|
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
182
181
|
age: number | null;
|
|
@@ -188,7 +187,7 @@ export declare const getMeResponseSchema: z.ZodObject<{
|
|
|
188
187
|
targetProteinG: number | null;
|
|
189
188
|
targetCarbsG: number | null;
|
|
190
189
|
targetFatG: number | null;
|
|
191
|
-
activityLevel: "
|
|
190
|
+
activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
|
|
192
191
|
manualDailyTargetKcal: number | null;
|
|
193
192
|
notifyTimes: string[] | null;
|
|
194
193
|
timezone: string | null;
|
|
@@ -198,6 +197,7 @@ export declare const getMeResponseSchema: z.ZodObject<{
|
|
|
198
197
|
onboardingStep: number;
|
|
199
198
|
isOnboarded: boolean;
|
|
200
199
|
isOnboardingSkipped: boolean;
|
|
200
|
+
createdAt: Date;
|
|
201
201
|
};
|
|
202
202
|
}, {
|
|
203
203
|
message: string;
|
|
@@ -207,7 +207,6 @@ export declare const getMeResponseSchema: z.ZodObject<{
|
|
|
207
207
|
id: string;
|
|
208
208
|
email: string;
|
|
209
209
|
name: string;
|
|
210
|
-
createdAt: Date;
|
|
211
210
|
goal: "lose" | "maintain" | "gain" | null;
|
|
212
211
|
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
213
212
|
age: number | null;
|
|
@@ -219,7 +218,7 @@ export declare const getMeResponseSchema: z.ZodObject<{
|
|
|
219
218
|
targetProteinG: number | null;
|
|
220
219
|
targetCarbsG: number | null;
|
|
221
220
|
targetFatG: number | null;
|
|
222
|
-
activityLevel: "
|
|
221
|
+
activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
|
|
223
222
|
manualDailyTargetKcal: number | null;
|
|
224
223
|
notifyTimes: string[] | null;
|
|
225
224
|
timezone: string | null;
|
|
@@ -229,6 +228,7 @@ export declare const getMeResponseSchema: z.ZodObject<{
|
|
|
229
228
|
onboardingStep: number;
|
|
230
229
|
isOnboarded: boolean;
|
|
231
230
|
isOnboardingSkipped: boolean;
|
|
231
|
+
createdAt: Date;
|
|
232
232
|
};
|
|
233
233
|
}>;
|
|
234
234
|
export type GetMeResponse = z.infer<typeof getMeResponseSchema>;
|
|
@@ -252,7 +252,7 @@ export declare const updateProfilePayloadSchema: z.ZodObject<{
|
|
|
252
252
|
sex?: "male" | "female" | "prefer_not_to_say" | undefined;
|
|
253
253
|
heightCm?: number | undefined;
|
|
254
254
|
targetWeightKg?: number | undefined;
|
|
255
|
-
activityLevel?: "
|
|
255
|
+
activityLevel?: "sedentary" | "light" | "moderate" | "active" | "very_active" | undefined;
|
|
256
256
|
manualDailyTargetKcal?: number | undefined;
|
|
257
257
|
notifyTimes?: string[] | undefined;
|
|
258
258
|
timezone?: string | undefined;
|
|
@@ -267,7 +267,7 @@ export declare const updateProfilePayloadSchema: z.ZodObject<{
|
|
|
267
267
|
sex?: "male" | "female" | "prefer_not_to_say" | undefined;
|
|
268
268
|
heightCm?: number | undefined;
|
|
269
269
|
targetWeightKg?: number | undefined;
|
|
270
|
-
activityLevel?: "
|
|
270
|
+
activityLevel?: "sedentary" | "light" | "moderate" | "active" | "very_active" | undefined;
|
|
271
271
|
manualDailyTargetKcal?: number | undefined;
|
|
272
272
|
notifyTimes?: string[] | undefined;
|
|
273
273
|
timezone?: string | undefined;
|
|
@@ -311,7 +311,6 @@ export declare const updateProfileResponseSchema: z.ZodObject<{
|
|
|
311
311
|
id: string;
|
|
312
312
|
email: string;
|
|
313
313
|
name: string;
|
|
314
|
-
createdAt: Date;
|
|
315
314
|
goal: "lose" | "maintain" | "gain" | null;
|
|
316
315
|
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
317
316
|
age: number | null;
|
|
@@ -323,7 +322,7 @@ export declare const updateProfileResponseSchema: z.ZodObject<{
|
|
|
323
322
|
targetProteinG: number | null;
|
|
324
323
|
targetCarbsG: number | null;
|
|
325
324
|
targetFatG: number | null;
|
|
326
|
-
activityLevel: "
|
|
325
|
+
activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
|
|
327
326
|
manualDailyTargetKcal: number | null;
|
|
328
327
|
notifyTimes: string[] | null;
|
|
329
328
|
timezone: string | null;
|
|
@@ -333,11 +332,11 @@ export declare const updateProfileResponseSchema: z.ZodObject<{
|
|
|
333
332
|
onboardingStep: number;
|
|
334
333
|
isOnboarded: boolean;
|
|
335
334
|
isOnboardingSkipped: boolean;
|
|
335
|
+
createdAt: Date;
|
|
336
336
|
}, {
|
|
337
337
|
id: string;
|
|
338
338
|
email: string;
|
|
339
339
|
name: string;
|
|
340
|
-
createdAt: Date;
|
|
341
340
|
goal: "lose" | "maintain" | "gain" | null;
|
|
342
341
|
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
343
342
|
age: number | null;
|
|
@@ -349,7 +348,7 @@ export declare const updateProfileResponseSchema: z.ZodObject<{
|
|
|
349
348
|
targetProteinG: number | null;
|
|
350
349
|
targetCarbsG: number | null;
|
|
351
350
|
targetFatG: number | null;
|
|
352
|
-
activityLevel: "
|
|
351
|
+
activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
|
|
353
352
|
manualDailyTargetKcal: number | null;
|
|
354
353
|
notifyTimes: string[] | null;
|
|
355
354
|
timezone: string | null;
|
|
@@ -359,6 +358,7 @@ export declare const updateProfileResponseSchema: z.ZodObject<{
|
|
|
359
358
|
onboardingStep: number;
|
|
360
359
|
isOnboarded: boolean;
|
|
361
360
|
isOnboardingSkipped: boolean;
|
|
361
|
+
createdAt: Date;
|
|
362
362
|
}>;
|
|
363
363
|
responseCode: z.ZodNumber;
|
|
364
364
|
message: z.ZodString;
|
|
@@ -370,7 +370,6 @@ export declare const updateProfileResponseSchema: z.ZodObject<{
|
|
|
370
370
|
id: string;
|
|
371
371
|
email: string;
|
|
372
372
|
name: string;
|
|
373
|
-
createdAt: Date;
|
|
374
373
|
goal: "lose" | "maintain" | "gain" | null;
|
|
375
374
|
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
376
375
|
age: number | null;
|
|
@@ -382,7 +381,7 @@ export declare const updateProfileResponseSchema: z.ZodObject<{
|
|
|
382
381
|
targetProteinG: number | null;
|
|
383
382
|
targetCarbsG: number | null;
|
|
384
383
|
targetFatG: number | null;
|
|
385
|
-
activityLevel: "
|
|
384
|
+
activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
|
|
386
385
|
manualDailyTargetKcal: number | null;
|
|
387
386
|
notifyTimes: string[] | null;
|
|
388
387
|
timezone: string | null;
|
|
@@ -392,6 +391,7 @@ export declare const updateProfileResponseSchema: z.ZodObject<{
|
|
|
392
391
|
onboardingStep: number;
|
|
393
392
|
isOnboarded: boolean;
|
|
394
393
|
isOnboardingSkipped: boolean;
|
|
394
|
+
createdAt: Date;
|
|
395
395
|
};
|
|
396
396
|
}, {
|
|
397
397
|
message: string;
|
|
@@ -401,7 +401,6 @@ export declare const updateProfileResponseSchema: z.ZodObject<{
|
|
|
401
401
|
id: string;
|
|
402
402
|
email: string;
|
|
403
403
|
name: string;
|
|
404
|
-
createdAt: Date;
|
|
405
404
|
goal: "lose" | "maintain" | "gain" | null;
|
|
406
405
|
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
407
406
|
age: number | null;
|
|
@@ -413,7 +412,7 @@ export declare const updateProfileResponseSchema: z.ZodObject<{
|
|
|
413
412
|
targetProteinG: number | null;
|
|
414
413
|
targetCarbsG: number | null;
|
|
415
414
|
targetFatG: number | null;
|
|
416
|
-
activityLevel: "
|
|
415
|
+
activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
|
|
417
416
|
manualDailyTargetKcal: number | null;
|
|
418
417
|
notifyTimes: string[] | null;
|
|
419
418
|
timezone: string | null;
|
|
@@ -423,6 +422,7 @@ export declare const updateProfileResponseSchema: z.ZodObject<{
|
|
|
423
422
|
onboardingStep: number;
|
|
424
423
|
isOnboarded: boolean;
|
|
425
424
|
isOnboardingSkipped: boolean;
|
|
425
|
+
createdAt: Date;
|
|
426
426
|
};
|
|
427
427
|
}>;
|
|
428
428
|
export declare const deleteMeResponseSchema: z.ZodNull;
|