@beorchid-llc/thrivo-contracts 0.6.0 → 0.8.0

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.
@@ -0,0 +1,55 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Admin observability DTOs (email + audit logs), promoted from the admin app's
4
+ * local `lib/contracts/logs.ts`.
5
+ */
6
+ export declare const adminEmailLogSchema: z.ZodObject<{
7
+ id: z.ZodString;
8
+ to: z.ZodString;
9
+ template: z.ZodString;
10
+ status: z.ZodEnum<["queued", "sent", "failed", "bounced"]>;
11
+ error: z.ZodNullable<z.ZodString>;
12
+ createdAt: z.ZodString;
13
+ }, "strip", z.ZodTypeAny, {
14
+ status: "queued" | "sent" | "failed" | "bounced";
15
+ error: string | null;
16
+ id: string;
17
+ to: string;
18
+ template: string;
19
+ createdAt: string;
20
+ }, {
21
+ status: "queued" | "sent" | "failed" | "bounced";
22
+ error: string | null;
23
+ id: string;
24
+ to: string;
25
+ template: string;
26
+ createdAt: string;
27
+ }>;
28
+ export type AdminEmailLog = z.infer<typeof adminEmailLogSchema>;
29
+ export declare const adminAuditLogEntrySchema: z.ZodObject<{
30
+ id: z.ZodString;
31
+ actorEmail: z.ZodString;
32
+ action: z.ZodString;
33
+ targetType: z.ZodString;
34
+ targetId: z.ZodNullable<z.ZodString>;
35
+ requestId: z.ZodNullable<z.ZodString>;
36
+ createdAt: z.ZodString;
37
+ }, "strip", z.ZodTypeAny, {
38
+ id: string;
39
+ createdAt: string;
40
+ actorEmail: string;
41
+ action: string;
42
+ targetType: string;
43
+ targetId: string | null;
44
+ requestId: string | null;
45
+ }, {
46
+ id: string;
47
+ createdAt: string;
48
+ actorEmail: string;
49
+ action: string;
50
+ targetType: string;
51
+ targetId: string | null;
52
+ requestId: string | null;
53
+ }>;
54
+ export type AdminAuditLogEntry = z.infer<typeof adminAuditLogEntrySchema>;
55
+ //# sourceMappingURL=admin-logs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-logs.d.ts","sourceRoot":"","sources":["../src/admin-logs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;EAO9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;EAQnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { z } from "zod";
2
+ import { idSchema, isoDateSchema } from "./common";
3
+ /**
4
+ * Admin observability DTOs (email + audit logs), promoted from the admin app's
5
+ * local `lib/contracts/logs.ts`.
6
+ */
7
+ export const adminEmailLogSchema = z.object({
8
+ id: idSchema,
9
+ to: z.string().email(),
10
+ template: z.string(),
11
+ status: z.enum(["queued", "sent", "failed", "bounced"]),
12
+ error: z.string().nullable(),
13
+ createdAt: isoDateSchema,
14
+ });
15
+ export const adminAuditLogEntrySchema = z.object({
16
+ id: idSchema,
17
+ actorEmail: z.string().email(),
18
+ action: z.string(),
19
+ targetType: z.string(),
20
+ targetId: z.string().nullable(),
21
+ requestId: z.string().nullable(),
22
+ createdAt: isoDateSchema,
23
+ });
24
+ //# sourceMappingURL=admin-logs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-logs.js","sourceRoot":"","sources":["../src/admin-logs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEnD;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;IACtB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;IACvD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,SAAS,EAAE,aAAa;CACzB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,EAAE,EAAE,QAAQ;IACZ,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;IAC9B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,SAAS,EAAE,aAAa;CACzB,CAAC,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Admin subscription-row DTO, promoted from the admin app's local
4
+ * `lib/contracts/subscription.ts`. Reuses the shared `entitlementSchema`
5
+ * (free | premium) and the existing `adminSubscriptionStatusSchema` from the
6
+ * admin contract — no duplicate enums.
7
+ */
8
+ export declare const adminSubscriptionRowSchema: z.ZodObject<{
9
+ id: z.ZodString;
10
+ userId: z.ZodString;
11
+ userEmail: z.ZodString;
12
+ entitlement: z.ZodEnum<["free", "premium"]>;
13
+ status: z.ZodEnum<["active", "trialing", "canceled", "expired", "none"]>;
14
+ priceLabel: z.ZodNullable<z.ZodString>;
15
+ upgradeTrigger: z.ZodNullable<z.ZodString>;
16
+ startedAt: z.ZodNullable<z.ZodString>;
17
+ renewsAt: z.ZodNullable<z.ZodString>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ status: "active" | "trialing" | "canceled" | "expired" | "none";
20
+ id: string;
21
+ priceLabel: string | null;
22
+ entitlement: "free" | "premium";
23
+ renewsAt: string | null;
24
+ userId: string;
25
+ userEmail: string;
26
+ upgradeTrigger: string | null;
27
+ startedAt: string | null;
28
+ }, {
29
+ status: "active" | "trialing" | "canceled" | "expired" | "none";
30
+ id: string;
31
+ priceLabel: string | null;
32
+ entitlement: "free" | "premium";
33
+ renewsAt: string | null;
34
+ userId: string;
35
+ userEmail: string;
36
+ upgradeTrigger: string | null;
37
+ startedAt: string | null;
38
+ }>;
39
+ export type AdminSubscriptionRow = z.infer<typeof adminSubscriptionRowSchema>;
40
+ //# sourceMappingURL=admin-subscriptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-subscriptions.d.ts","sourceRoot":"","sources":["../src/admin-subscriptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { z } from "zod";
2
+ import { idSchema, isoDateSchema } from "./common";
3
+ import { entitlementSchema } from "./subscriptions";
4
+ import { adminSubscriptionStatusSchema } from "./admin";
5
+ /**
6
+ * Admin subscription-row DTO, promoted from the admin app's local
7
+ * `lib/contracts/subscription.ts`. Reuses the shared `entitlementSchema`
8
+ * (free | premium) and the existing `adminSubscriptionStatusSchema` from the
9
+ * admin contract — no duplicate enums.
10
+ */
11
+ export const adminSubscriptionRowSchema = z.object({
12
+ id: idSchema,
13
+ userId: idSchema,
14
+ userEmail: z.string().email(),
15
+ entitlement: entitlementSchema,
16
+ status: adminSubscriptionStatusSchema,
17
+ priceLabel: z.string().nullable(),
18
+ upgradeTrigger: z.string().nullable(),
19
+ startedAt: isoDateSchema.nullable(),
20
+ renewsAt: isoDateSchema.nullable(),
21
+ });
22
+ //# sourceMappingURL=admin-subscriptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-subscriptions.js","sourceRoot":"","sources":["../src/admin-subscriptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAExD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,EAAE,EAAE,QAAQ;IACZ,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;IAC7B,WAAW,EAAE,iBAAiB;IAC9B,MAAM,EAAE,6BAA6B;IACrC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,SAAS,EAAE,aAAa,CAAC,QAAQ,EAAE;IACnC,QAAQ,EAAE,aAAa,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAC"}
package/dist/admin.d.ts CHANGED
@@ -7,14 +7,14 @@ export declare const adminSchema: z.ZodObject<{
7
7
  name: z.ZodNullable<z.ZodString>;
8
8
  role: z.ZodEnum<["admin", "support", "read-only"]>;
9
9
  }, "strip", z.ZodTypeAny, {
10
+ name: string | null;
10
11
  id: string;
11
12
  email: string;
12
- name: string | null;
13
13
  role: "admin" | "support" | "read-only";
14
14
  }, {
15
+ name: string | null;
15
16
  id: string;
16
17
  email: string;
17
- name: string | null;
18
18
  role: "admin" | "support" | "read-only";
19
19
  }>;
20
20
  export type Admin = z.infer<typeof adminSchema>;
@@ -25,28 +25,28 @@ export declare const adminSessionResponseSchema: z.ZodObject<{
25
25
  name: z.ZodNullable<z.ZodString>;
26
26
  role: z.ZodEnum<["admin", "support", "read-only"]>;
27
27
  }, "strip", z.ZodTypeAny, {
28
+ name: string | null;
28
29
  id: string;
29
30
  email: string;
30
- name: string | null;
31
31
  role: "admin" | "support" | "read-only";
32
32
  }, {
33
+ name: string | null;
33
34
  id: string;
34
35
  email: string;
35
- name: string | null;
36
36
  role: "admin" | "support" | "read-only";
37
37
  }>;
38
38
  }, "strip", z.ZodTypeAny, {
39
39
  admin: {
40
+ name: string | null;
40
41
  id: string;
41
42
  email: string;
42
- name: string | null;
43
43
  role: "admin" | "support" | "read-only";
44
44
  };
45
45
  }, {
46
46
  admin: {
47
+ name: string | null;
47
48
  id: string;
48
49
  email: string;
49
- name: string | null;
50
50
  role: "admin" | "support" | "read-only";
51
51
  };
52
52
  }>;
@@ -151,6 +151,7 @@ export type AdminUserSubscription = z.infer<typeof adminUserSubscriptionSchema>;
151
151
  export declare const adminUserDetailSchema: z.ZodObject<Omit<{
152
152
  id: z.ZodString;
153
153
  email: z.ZodString;
154
+ image: z.ZodNullable<z.ZodString>;
154
155
  goal: z.ZodNullable<z.ZodEnum<["lose", "maintain", "gain"]>>;
155
156
  sex: z.ZodNullable<z.ZodEnum<["male", "female", "prefer_not_to_say"]>>;
156
157
  age: z.ZodNullable<z.ZodNumber>;
@@ -203,9 +204,18 @@ export declare const adminUserDetailSchema: z.ZodObject<Omit<{
203
204
  createdAt: z.ZodDate;
204
205
  }, "strip", z.ZodTypeAny, {
205
206
  status: "active" | "suspended" | "deleted";
207
+ name: string | null;
206
208
  id: string;
209
+ updatedAt: Date;
210
+ createdAt: Date;
211
+ subscription: {
212
+ status: "active" | "trialing" | "canceled" | "expired" | "none";
213
+ priceLabel: string | null;
214
+ renewsAt: string | null;
215
+ cancelAtPeriodEnd: boolean;
216
+ } | null;
207
217
  email: string;
208
- name: string | null;
218
+ image: string | null;
209
219
  goal: "lose" | "maintain" | "gain" | null;
210
220
  sex: "male" | "female" | "prefer_not_to_say" | null;
211
221
  age: number | null;
@@ -217,7 +227,7 @@ export declare const adminUserDetailSchema: z.ZodObject<Omit<{
217
227
  targetProteinG: number | null;
218
228
  targetCarbsG: number | null;
219
229
  targetFatG: number | null;
220
- activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
230
+ activityLevel: "active" | "sedentary" | "light" | "moderate" | "very_active" | null;
221
231
  manualDailyTargetKcal: number | null;
222
232
  notifyTimes: string[] | null;
223
233
  timezone: string | null;
@@ -227,25 +237,26 @@ export declare const adminUserDetailSchema: z.ZodObject<Omit<{
227
237
  onboardingStep: number;
228
238
  isOnboarded: boolean;
229
239
  isOnboardingSkipped: boolean;
230
- createdAt: Date;
231
240
  onboardingSkipped: boolean;
232
241
  subscriptionStatus: string | null;
233
242
  deletedAt: Date | null;
234
- updatedAt: Date;
235
243
  lastActiveAt: string | null;
236
244
  totalFoodLogs: number;
237
245
  currentStreakDays: number;
246
+ }, {
247
+ status: "active" | "suspended" | "deleted";
248
+ name: string | null;
249
+ id: string;
250
+ updatedAt: Date;
251
+ createdAt: Date;
238
252
  subscription: {
239
253
  status: "active" | "trialing" | "canceled" | "expired" | "none";
240
254
  priceLabel: string | null;
241
255
  renewsAt: string | null;
242
256
  cancelAtPeriodEnd: boolean;
243
257
  } | null;
244
- }, {
245
- status: "active" | "suspended" | "deleted";
246
- id: string;
247
258
  email: string;
248
- name: string | null;
259
+ image: string | null;
249
260
  goal: "lose" | "maintain" | "gain" | null;
250
261
  sex: "male" | "female" | "prefer_not_to_say" | null;
251
262
  age: number | null;
@@ -257,7 +268,7 @@ export declare const adminUserDetailSchema: z.ZodObject<Omit<{
257
268
  targetProteinG: number | null;
258
269
  targetCarbsG: number | null;
259
270
  targetFatG: number | null;
260
- activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
271
+ activityLevel: "active" | "sedentary" | "light" | "moderate" | "very_active" | null;
261
272
  manualDailyTargetKcal: number | null;
262
273
  notifyTimes: string[] | null;
263
274
  timezone: string | null;
@@ -267,26 +278,19 @@ export declare const adminUserDetailSchema: z.ZodObject<Omit<{
267
278
  onboardingStep: number;
268
279
  isOnboarded: boolean;
269
280
  isOnboardingSkipped: boolean;
270
- createdAt: Date;
271
281
  onboardingSkipped: boolean;
272
282
  subscriptionStatus: string | null;
273
283
  deletedAt: Date | null;
274
- updatedAt: Date;
275
284
  lastActiveAt: string | null;
276
285
  totalFoodLogs: number;
277
286
  currentStreakDays: number;
278
- subscription: {
279
- status: "active" | "trialing" | "canceled" | "expired" | "none";
280
- priceLabel: string | null;
281
- renewsAt: string | null;
282
- cancelAtPeriodEnd: boolean;
283
- } | null;
284
287
  }>;
285
288
  export type AdminUserDetail = z.infer<typeof adminUserDetailSchema>;
286
289
  /** List rows use the same full shape as detail. */
287
290
  export declare const adminUserSchema: z.ZodObject<Omit<{
288
291
  id: z.ZodString;
289
292
  email: z.ZodString;
293
+ image: z.ZodNullable<z.ZodString>;
290
294
  goal: z.ZodNullable<z.ZodEnum<["lose", "maintain", "gain"]>>;
291
295
  sex: z.ZodNullable<z.ZodEnum<["male", "female", "prefer_not_to_say"]>>;
292
296
  age: z.ZodNullable<z.ZodNumber>;
@@ -339,9 +343,18 @@ export declare const adminUserSchema: z.ZodObject<Omit<{
339
343
  createdAt: z.ZodDate;
340
344
  }, "strip", z.ZodTypeAny, {
341
345
  status: "active" | "suspended" | "deleted";
346
+ name: string | null;
342
347
  id: string;
348
+ updatedAt: Date;
349
+ createdAt: Date;
350
+ subscription: {
351
+ status: "active" | "trialing" | "canceled" | "expired" | "none";
352
+ priceLabel: string | null;
353
+ renewsAt: string | null;
354
+ cancelAtPeriodEnd: boolean;
355
+ } | null;
343
356
  email: string;
344
- name: string | null;
357
+ image: string | null;
345
358
  goal: "lose" | "maintain" | "gain" | null;
346
359
  sex: "male" | "female" | "prefer_not_to_say" | null;
347
360
  age: number | null;
@@ -353,7 +366,7 @@ export declare const adminUserSchema: z.ZodObject<Omit<{
353
366
  targetProteinG: number | null;
354
367
  targetCarbsG: number | null;
355
368
  targetFatG: number | null;
356
- activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
369
+ activityLevel: "active" | "sedentary" | "light" | "moderate" | "very_active" | null;
357
370
  manualDailyTargetKcal: number | null;
358
371
  notifyTimes: string[] | null;
359
372
  timezone: string | null;
@@ -363,25 +376,26 @@ export declare const adminUserSchema: z.ZodObject<Omit<{
363
376
  onboardingStep: number;
364
377
  isOnboarded: boolean;
365
378
  isOnboardingSkipped: boolean;
366
- createdAt: Date;
367
379
  onboardingSkipped: boolean;
368
380
  subscriptionStatus: string | null;
369
381
  deletedAt: Date | null;
370
- updatedAt: Date;
371
382
  lastActiveAt: string | null;
372
383
  totalFoodLogs: number;
373
384
  currentStreakDays: number;
385
+ }, {
386
+ status: "active" | "suspended" | "deleted";
387
+ name: string | null;
388
+ id: string;
389
+ updatedAt: Date;
390
+ createdAt: Date;
374
391
  subscription: {
375
392
  status: "active" | "trialing" | "canceled" | "expired" | "none";
376
393
  priceLabel: string | null;
377
394
  renewsAt: string | null;
378
395
  cancelAtPeriodEnd: boolean;
379
396
  } | null;
380
- }, {
381
- status: "active" | "suspended" | "deleted";
382
- id: string;
383
397
  email: string;
384
- name: string | null;
398
+ image: string | null;
385
399
  goal: "lose" | "maintain" | "gain" | null;
386
400
  sex: "male" | "female" | "prefer_not_to_say" | null;
387
401
  age: number | null;
@@ -393,7 +407,7 @@ export declare const adminUserSchema: z.ZodObject<Omit<{
393
407
  targetProteinG: number | null;
394
408
  targetCarbsG: number | null;
395
409
  targetFatG: number | null;
396
- activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
410
+ activityLevel: "active" | "sedentary" | "light" | "moderate" | "very_active" | null;
397
411
  manualDailyTargetKcal: number | null;
398
412
  notifyTimes: string[] | null;
399
413
  timezone: string | null;
@@ -403,26 +417,19 @@ export declare const adminUserSchema: z.ZodObject<Omit<{
403
417
  onboardingStep: number;
404
418
  isOnboarded: boolean;
405
419
  isOnboardingSkipped: boolean;
406
- createdAt: Date;
407
420
  onboardingSkipped: boolean;
408
421
  subscriptionStatus: string | null;
409
422
  deletedAt: Date | null;
410
- updatedAt: Date;
411
423
  lastActiveAt: string | null;
412
424
  totalFoodLogs: number;
413
425
  currentStreakDays: number;
414
- subscription: {
415
- status: "active" | "trialing" | "canceled" | "expired" | "none";
416
- priceLabel: string | null;
417
- renewsAt: string | null;
418
- cancelAtPeriodEnd: boolean;
419
- } | null;
420
426
  }>;
421
427
  export type AdminUser = AdminUserDetail;
422
428
  export declare const adminUserDetailResponseSchema: z.ZodObject<{
423
429
  user: z.ZodObject<Omit<{
424
430
  id: z.ZodString;
425
431
  email: z.ZodString;
432
+ image: z.ZodNullable<z.ZodString>;
426
433
  goal: z.ZodNullable<z.ZodEnum<["lose", "maintain", "gain"]>>;
427
434
  sex: z.ZodNullable<z.ZodEnum<["male", "female", "prefer_not_to_say"]>>;
428
435
  age: z.ZodNullable<z.ZodNumber>;
@@ -475,9 +482,18 @@ export declare const adminUserDetailResponseSchema: z.ZodObject<{
475
482
  createdAt: z.ZodDate;
476
483
  }, "strip", z.ZodTypeAny, {
477
484
  status: "active" | "suspended" | "deleted";
485
+ name: string | null;
478
486
  id: string;
487
+ updatedAt: Date;
488
+ createdAt: Date;
489
+ subscription: {
490
+ status: "active" | "trialing" | "canceled" | "expired" | "none";
491
+ priceLabel: string | null;
492
+ renewsAt: string | null;
493
+ cancelAtPeriodEnd: boolean;
494
+ } | null;
479
495
  email: string;
480
- name: string | null;
496
+ image: string | null;
481
497
  goal: "lose" | "maintain" | "gain" | null;
482
498
  sex: "male" | "female" | "prefer_not_to_say" | null;
483
499
  age: number | null;
@@ -489,7 +505,7 @@ export declare const adminUserDetailResponseSchema: z.ZodObject<{
489
505
  targetProteinG: number | null;
490
506
  targetCarbsG: number | null;
491
507
  targetFatG: number | null;
492
- activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
508
+ activityLevel: "active" | "sedentary" | "light" | "moderate" | "very_active" | null;
493
509
  manualDailyTargetKcal: number | null;
494
510
  notifyTimes: string[] | null;
495
511
  timezone: string | null;
@@ -499,25 +515,26 @@ export declare const adminUserDetailResponseSchema: z.ZodObject<{
499
515
  onboardingStep: number;
500
516
  isOnboarded: boolean;
501
517
  isOnboardingSkipped: boolean;
502
- createdAt: Date;
503
518
  onboardingSkipped: boolean;
504
519
  subscriptionStatus: string | null;
505
520
  deletedAt: Date | null;
506
- updatedAt: Date;
507
521
  lastActiveAt: string | null;
508
522
  totalFoodLogs: number;
509
523
  currentStreakDays: number;
524
+ }, {
525
+ status: "active" | "suspended" | "deleted";
526
+ name: string | null;
527
+ id: string;
528
+ updatedAt: Date;
529
+ createdAt: Date;
510
530
  subscription: {
511
531
  status: "active" | "trialing" | "canceled" | "expired" | "none";
512
532
  priceLabel: string | null;
513
533
  renewsAt: string | null;
514
534
  cancelAtPeriodEnd: boolean;
515
535
  } | null;
516
- }, {
517
- status: "active" | "suspended" | "deleted";
518
- id: string;
519
536
  email: string;
520
- name: string | null;
537
+ image: string | null;
521
538
  goal: "lose" | "maintain" | "gain" | null;
522
539
  sex: "male" | "female" | "prefer_not_to_say" | null;
523
540
  age: number | null;
@@ -529,7 +546,7 @@ export declare const adminUserDetailResponseSchema: z.ZodObject<{
529
546
  targetProteinG: number | null;
530
547
  targetCarbsG: number | null;
531
548
  targetFatG: number | null;
532
- activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
549
+ activityLevel: "active" | "sedentary" | "light" | "moderate" | "very_active" | null;
533
550
  manualDailyTargetKcal: number | null;
534
551
  notifyTimes: string[] | null;
535
552
  timezone: string | null;
@@ -539,27 +556,28 @@ export declare const adminUserDetailResponseSchema: z.ZodObject<{
539
556
  onboardingStep: number;
540
557
  isOnboarded: boolean;
541
558
  isOnboardingSkipped: boolean;
542
- createdAt: Date;
543
559
  onboardingSkipped: boolean;
544
560
  subscriptionStatus: string | null;
545
561
  deletedAt: Date | null;
546
- updatedAt: Date;
547
562
  lastActiveAt: string | null;
548
563
  totalFoodLogs: number;
549
564
  currentStreakDays: number;
565
+ }>;
566
+ }, "strip", z.ZodTypeAny, {
567
+ user: {
568
+ status: "active" | "suspended" | "deleted";
569
+ name: string | null;
570
+ id: string;
571
+ updatedAt: Date;
572
+ createdAt: Date;
550
573
  subscription: {
551
574
  status: "active" | "trialing" | "canceled" | "expired" | "none";
552
575
  priceLabel: string | null;
553
576
  renewsAt: string | null;
554
577
  cancelAtPeriodEnd: boolean;
555
578
  } | null;
556
- }>;
557
- }, "strip", z.ZodTypeAny, {
558
- user: {
559
- status: "active" | "suspended" | "deleted";
560
- id: string;
561
579
  email: string;
562
- name: string | null;
580
+ image: string | null;
563
581
  goal: "lose" | "maintain" | "gain" | null;
564
582
  sex: "male" | "female" | "prefer_not_to_say" | null;
565
583
  age: number | null;
@@ -571,7 +589,7 @@ export declare const adminUserDetailResponseSchema: z.ZodObject<{
571
589
  targetProteinG: number | null;
572
590
  targetCarbsG: number | null;
573
591
  targetFatG: number | null;
574
- activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
592
+ activityLevel: "active" | "sedentary" | "light" | "moderate" | "very_active" | null;
575
593
  manualDailyTargetKcal: number | null;
576
594
  notifyTimes: string[] | null;
577
595
  timezone: string | null;
@@ -581,27 +599,28 @@ export declare const adminUserDetailResponseSchema: z.ZodObject<{
581
599
  onboardingStep: number;
582
600
  isOnboarded: boolean;
583
601
  isOnboardingSkipped: boolean;
584
- createdAt: Date;
585
602
  onboardingSkipped: boolean;
586
603
  subscriptionStatus: string | null;
587
604
  deletedAt: Date | null;
588
- updatedAt: Date;
589
605
  lastActiveAt: string | null;
590
606
  totalFoodLogs: number;
591
607
  currentStreakDays: number;
608
+ };
609
+ }, {
610
+ user: {
611
+ status: "active" | "suspended" | "deleted";
612
+ name: string | null;
613
+ id: string;
614
+ updatedAt: Date;
615
+ createdAt: Date;
592
616
  subscription: {
593
617
  status: "active" | "trialing" | "canceled" | "expired" | "none";
594
618
  priceLabel: string | null;
595
619
  renewsAt: string | null;
596
620
  cancelAtPeriodEnd: boolean;
597
621
  } | null;
598
- };
599
- }, {
600
- user: {
601
- status: "active" | "suspended" | "deleted";
602
- id: string;
603
622
  email: string;
604
- name: string | null;
623
+ image: string | null;
605
624
  goal: "lose" | "maintain" | "gain" | null;
606
625
  sex: "male" | "female" | "prefer_not_to_say" | null;
607
626
  age: number | null;
@@ -613,7 +632,7 @@ export declare const adminUserDetailResponseSchema: z.ZodObject<{
613
632
  targetProteinG: number | null;
614
633
  targetCarbsG: number | null;
615
634
  targetFatG: number | null;
616
- activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active" | null;
635
+ activityLevel: "active" | "sedentary" | "light" | "moderate" | "very_active" | null;
617
636
  manualDailyTargetKcal: number | null;
618
637
  notifyTimes: string[] | null;
619
638
  timezone: string | null;
@@ -623,20 +642,12 @@ export declare const adminUserDetailResponseSchema: z.ZodObject<{
623
642
  onboardingStep: number;
624
643
  isOnboarded: boolean;
625
644
  isOnboardingSkipped: boolean;
626
- createdAt: Date;
627
645
  onboardingSkipped: boolean;
628
646
  subscriptionStatus: string | null;
629
647
  deletedAt: Date | null;
630
- updatedAt: Date;
631
648
  lastActiveAt: string | null;
632
649
  totalFoodLogs: number;
633
650
  currentStreakDays: number;
634
- subscription: {
635
- status: "active" | "trialing" | "canceled" | "expired" | "none";
636
- priceLabel: string | null;
637
- renewsAt: string | null;
638
- cancelAtPeriodEnd: boolean;
639
- } | null;
640
651
  };
641
652
  }>;
642
653
  export type AdminUserDetailResponse = z.infer<typeof adminUserDetailResponseSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../src/admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO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