@beorchid-llc/thrivo-contracts 0.5.5 → 0.7.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.
- package/dist/admin-analytics.d.ts +488 -0
- package/dist/admin-analytics.d.ts.map +1 -0
- package/dist/admin-analytics.js +46 -0
- package/dist/admin-analytics.js.map +1 -0
- package/dist/admin-content.d.ts +92 -0
- package/dist/admin-content.d.ts.map +1 -0
- package/dist/admin-content.js +24 -0
- package/dist/admin-content.js.map +1 -0
- package/dist/admin-logs.d.ts +55 -0
- package/dist/admin-logs.d.ts.map +1 -0
- package/dist/admin-logs.js +24 -0
- package/dist/admin-logs.js.map +1 -0
- package/dist/admin-subscriptions.d.ts +40 -0
- package/dist/admin-subscriptions.d.ts.map +1 -0
- package/dist/admin-subscriptions.js +22 -0
- package/dist/admin-subscriptions.js.map +1 -0
- package/dist/admin.d.ts +75 -75
- package/dist/checkins.d.ts +130 -0
- package/dist/checkins.d.ts.map +1 -0
- package/dist/checkins.js +23 -0
- package/dist/checkins.js.map +1 -0
- package/dist/foods.d.ts +1986 -482
- package/dist/foods.d.ts.map +1 -1
- package/dist/foods.js +166 -10
- package/dist/foods.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/metrics.d.ts +913 -0
- package/dist/metrics.d.ts.map +1 -1
- package/dist/metrics.js +124 -1
- package/dist/metrics.js.map +1 -1
- package/dist/push.d.ts +19 -0
- package/dist/push.d.ts.map +1 -0
- package/dist/push.js +12 -0
- package/dist/push.js.map +1 -0
- package/dist/settings.d.ts +52 -52
- package/dist/subscriptions.d.ts +46 -46
- package/dist/users.d.ts +32 -32
- package/package.json +1 -1
|
@@ -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
|
}>;
|
|
@@ -203,9 +203,17 @@ export declare const adminUserDetailSchema: z.ZodObject<Omit<{
|
|
|
203
203
|
createdAt: z.ZodDate;
|
|
204
204
|
}, "strip", z.ZodTypeAny, {
|
|
205
205
|
status: "active" | "suspended" | "deleted";
|
|
206
|
+
name: string | null;
|
|
206
207
|
id: string;
|
|
208
|
+
updatedAt: Date;
|
|
209
|
+
createdAt: Date;
|
|
210
|
+
subscription: {
|
|
211
|
+
status: "active" | "trialing" | "canceled" | "expired" | "none";
|
|
212
|
+
priceLabel: string | null;
|
|
213
|
+
renewsAt: string | null;
|
|
214
|
+
cancelAtPeriodEnd: boolean;
|
|
215
|
+
} | null;
|
|
207
216
|
email: string;
|
|
208
|
-
name: string | null;
|
|
209
217
|
goal: "lose" | "maintain" | "gain" | null;
|
|
210
218
|
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
211
219
|
age: number | null;
|
|
@@ -217,7 +225,7 @@ export declare const adminUserDetailSchema: z.ZodObject<Omit<{
|
|
|
217
225
|
targetProteinG: number | null;
|
|
218
226
|
targetCarbsG: number | null;
|
|
219
227
|
targetFatG: number | null;
|
|
220
|
-
activityLevel: "
|
|
228
|
+
activityLevel: "active" | "sedentary" | "light" | "moderate" | "very_active" | null;
|
|
221
229
|
manualDailyTargetKcal: number | null;
|
|
222
230
|
notifyTimes: string[] | null;
|
|
223
231
|
timezone: string | null;
|
|
@@ -227,25 +235,25 @@ export declare const adminUserDetailSchema: z.ZodObject<Omit<{
|
|
|
227
235
|
onboardingStep: number;
|
|
228
236
|
isOnboarded: boolean;
|
|
229
237
|
isOnboardingSkipped: boolean;
|
|
230
|
-
createdAt: Date;
|
|
231
238
|
onboardingSkipped: boolean;
|
|
232
239
|
subscriptionStatus: string | null;
|
|
233
240
|
deletedAt: Date | null;
|
|
234
|
-
updatedAt: Date;
|
|
235
241
|
lastActiveAt: string | null;
|
|
236
242
|
totalFoodLogs: number;
|
|
237
243
|
currentStreakDays: number;
|
|
244
|
+
}, {
|
|
245
|
+
status: "active" | "suspended" | "deleted";
|
|
246
|
+
name: string | null;
|
|
247
|
+
id: string;
|
|
248
|
+
updatedAt: Date;
|
|
249
|
+
createdAt: Date;
|
|
238
250
|
subscription: {
|
|
239
251
|
status: "active" | "trialing" | "canceled" | "expired" | "none";
|
|
240
252
|
priceLabel: string | null;
|
|
241
253
|
renewsAt: string | null;
|
|
242
254
|
cancelAtPeriodEnd: boolean;
|
|
243
255
|
} | null;
|
|
244
|
-
}, {
|
|
245
|
-
status: "active" | "suspended" | "deleted";
|
|
246
|
-
id: string;
|
|
247
256
|
email: string;
|
|
248
|
-
name: string | null;
|
|
249
257
|
goal: "lose" | "maintain" | "gain" | null;
|
|
250
258
|
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
251
259
|
age: number | null;
|
|
@@ -257,7 +265,7 @@ export declare const adminUserDetailSchema: z.ZodObject<Omit<{
|
|
|
257
265
|
targetProteinG: number | null;
|
|
258
266
|
targetCarbsG: number | null;
|
|
259
267
|
targetFatG: number | null;
|
|
260
|
-
activityLevel: "
|
|
268
|
+
activityLevel: "active" | "sedentary" | "light" | "moderate" | "very_active" | null;
|
|
261
269
|
manualDailyTargetKcal: number | null;
|
|
262
270
|
notifyTimes: string[] | null;
|
|
263
271
|
timezone: string | null;
|
|
@@ -267,20 +275,12 @@ export declare const adminUserDetailSchema: z.ZodObject<Omit<{
|
|
|
267
275
|
onboardingStep: number;
|
|
268
276
|
isOnboarded: boolean;
|
|
269
277
|
isOnboardingSkipped: boolean;
|
|
270
|
-
createdAt: Date;
|
|
271
278
|
onboardingSkipped: boolean;
|
|
272
279
|
subscriptionStatus: string | null;
|
|
273
280
|
deletedAt: Date | null;
|
|
274
|
-
updatedAt: Date;
|
|
275
281
|
lastActiveAt: string | null;
|
|
276
282
|
totalFoodLogs: number;
|
|
277
283
|
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
284
|
}>;
|
|
285
285
|
export type AdminUserDetail = z.infer<typeof adminUserDetailSchema>;
|
|
286
286
|
/** List rows use the same full shape as detail. */
|
|
@@ -339,9 +339,17 @@ export declare const adminUserSchema: z.ZodObject<Omit<{
|
|
|
339
339
|
createdAt: z.ZodDate;
|
|
340
340
|
}, "strip", z.ZodTypeAny, {
|
|
341
341
|
status: "active" | "suspended" | "deleted";
|
|
342
|
+
name: string | null;
|
|
342
343
|
id: string;
|
|
344
|
+
updatedAt: Date;
|
|
345
|
+
createdAt: Date;
|
|
346
|
+
subscription: {
|
|
347
|
+
status: "active" | "trialing" | "canceled" | "expired" | "none";
|
|
348
|
+
priceLabel: string | null;
|
|
349
|
+
renewsAt: string | null;
|
|
350
|
+
cancelAtPeriodEnd: boolean;
|
|
351
|
+
} | null;
|
|
343
352
|
email: string;
|
|
344
|
-
name: string | null;
|
|
345
353
|
goal: "lose" | "maintain" | "gain" | null;
|
|
346
354
|
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
347
355
|
age: number | null;
|
|
@@ -353,7 +361,7 @@ export declare const adminUserSchema: z.ZodObject<Omit<{
|
|
|
353
361
|
targetProteinG: number | null;
|
|
354
362
|
targetCarbsG: number | null;
|
|
355
363
|
targetFatG: number | null;
|
|
356
|
-
activityLevel: "
|
|
364
|
+
activityLevel: "active" | "sedentary" | "light" | "moderate" | "very_active" | null;
|
|
357
365
|
manualDailyTargetKcal: number | null;
|
|
358
366
|
notifyTimes: string[] | null;
|
|
359
367
|
timezone: string | null;
|
|
@@ -363,25 +371,25 @@ export declare const adminUserSchema: z.ZodObject<Omit<{
|
|
|
363
371
|
onboardingStep: number;
|
|
364
372
|
isOnboarded: boolean;
|
|
365
373
|
isOnboardingSkipped: boolean;
|
|
366
|
-
createdAt: Date;
|
|
367
374
|
onboardingSkipped: boolean;
|
|
368
375
|
subscriptionStatus: string | null;
|
|
369
376
|
deletedAt: Date | null;
|
|
370
|
-
updatedAt: Date;
|
|
371
377
|
lastActiveAt: string | null;
|
|
372
378
|
totalFoodLogs: number;
|
|
373
379
|
currentStreakDays: number;
|
|
380
|
+
}, {
|
|
381
|
+
status: "active" | "suspended" | "deleted";
|
|
382
|
+
name: string | null;
|
|
383
|
+
id: string;
|
|
384
|
+
updatedAt: Date;
|
|
385
|
+
createdAt: Date;
|
|
374
386
|
subscription: {
|
|
375
387
|
status: "active" | "trialing" | "canceled" | "expired" | "none";
|
|
376
388
|
priceLabel: string | null;
|
|
377
389
|
renewsAt: string | null;
|
|
378
390
|
cancelAtPeriodEnd: boolean;
|
|
379
391
|
} | null;
|
|
380
|
-
}, {
|
|
381
|
-
status: "active" | "suspended" | "deleted";
|
|
382
|
-
id: string;
|
|
383
392
|
email: string;
|
|
384
|
-
name: string | null;
|
|
385
393
|
goal: "lose" | "maintain" | "gain" | null;
|
|
386
394
|
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
387
395
|
age: number | null;
|
|
@@ -393,7 +401,7 @@ export declare const adminUserSchema: z.ZodObject<Omit<{
|
|
|
393
401
|
targetProteinG: number | null;
|
|
394
402
|
targetCarbsG: number | null;
|
|
395
403
|
targetFatG: number | null;
|
|
396
|
-
activityLevel: "
|
|
404
|
+
activityLevel: "active" | "sedentary" | "light" | "moderate" | "very_active" | null;
|
|
397
405
|
manualDailyTargetKcal: number | null;
|
|
398
406
|
notifyTimes: string[] | null;
|
|
399
407
|
timezone: string | null;
|
|
@@ -403,20 +411,12 @@ export declare const adminUserSchema: z.ZodObject<Omit<{
|
|
|
403
411
|
onboardingStep: number;
|
|
404
412
|
isOnboarded: boolean;
|
|
405
413
|
isOnboardingSkipped: boolean;
|
|
406
|
-
createdAt: Date;
|
|
407
414
|
onboardingSkipped: boolean;
|
|
408
415
|
subscriptionStatus: string | null;
|
|
409
416
|
deletedAt: Date | null;
|
|
410
|
-
updatedAt: Date;
|
|
411
417
|
lastActiveAt: string | null;
|
|
412
418
|
totalFoodLogs: number;
|
|
413
419
|
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
420
|
}>;
|
|
421
421
|
export type AdminUser = AdminUserDetail;
|
|
422
422
|
export declare const adminUserDetailResponseSchema: z.ZodObject<{
|
|
@@ -475,9 +475,17 @@ export declare const adminUserDetailResponseSchema: z.ZodObject<{
|
|
|
475
475
|
createdAt: z.ZodDate;
|
|
476
476
|
}, "strip", z.ZodTypeAny, {
|
|
477
477
|
status: "active" | "suspended" | "deleted";
|
|
478
|
+
name: string | null;
|
|
478
479
|
id: string;
|
|
480
|
+
updatedAt: Date;
|
|
481
|
+
createdAt: Date;
|
|
482
|
+
subscription: {
|
|
483
|
+
status: "active" | "trialing" | "canceled" | "expired" | "none";
|
|
484
|
+
priceLabel: string | null;
|
|
485
|
+
renewsAt: string | null;
|
|
486
|
+
cancelAtPeriodEnd: boolean;
|
|
487
|
+
} | null;
|
|
479
488
|
email: string;
|
|
480
|
-
name: string | null;
|
|
481
489
|
goal: "lose" | "maintain" | "gain" | null;
|
|
482
490
|
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
483
491
|
age: number | null;
|
|
@@ -489,7 +497,7 @@ export declare const adminUserDetailResponseSchema: z.ZodObject<{
|
|
|
489
497
|
targetProteinG: number | null;
|
|
490
498
|
targetCarbsG: number | null;
|
|
491
499
|
targetFatG: number | null;
|
|
492
|
-
activityLevel: "
|
|
500
|
+
activityLevel: "active" | "sedentary" | "light" | "moderate" | "very_active" | null;
|
|
493
501
|
manualDailyTargetKcal: number | null;
|
|
494
502
|
notifyTimes: string[] | null;
|
|
495
503
|
timezone: string | null;
|
|
@@ -499,25 +507,25 @@ export declare const adminUserDetailResponseSchema: z.ZodObject<{
|
|
|
499
507
|
onboardingStep: number;
|
|
500
508
|
isOnboarded: boolean;
|
|
501
509
|
isOnboardingSkipped: boolean;
|
|
502
|
-
createdAt: Date;
|
|
503
510
|
onboardingSkipped: boolean;
|
|
504
511
|
subscriptionStatus: string | null;
|
|
505
512
|
deletedAt: Date | null;
|
|
506
|
-
updatedAt: Date;
|
|
507
513
|
lastActiveAt: string | null;
|
|
508
514
|
totalFoodLogs: number;
|
|
509
515
|
currentStreakDays: number;
|
|
516
|
+
}, {
|
|
517
|
+
status: "active" | "suspended" | "deleted";
|
|
518
|
+
name: string | null;
|
|
519
|
+
id: string;
|
|
520
|
+
updatedAt: Date;
|
|
521
|
+
createdAt: Date;
|
|
510
522
|
subscription: {
|
|
511
523
|
status: "active" | "trialing" | "canceled" | "expired" | "none";
|
|
512
524
|
priceLabel: string | null;
|
|
513
525
|
renewsAt: string | null;
|
|
514
526
|
cancelAtPeriodEnd: boolean;
|
|
515
527
|
} | null;
|
|
516
|
-
}, {
|
|
517
|
-
status: "active" | "suspended" | "deleted";
|
|
518
|
-
id: string;
|
|
519
528
|
email: string;
|
|
520
|
-
name: string | null;
|
|
521
529
|
goal: "lose" | "maintain" | "gain" | null;
|
|
522
530
|
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
523
531
|
age: number | null;
|
|
@@ -529,7 +537,7 @@ export declare const adminUserDetailResponseSchema: z.ZodObject<{
|
|
|
529
537
|
targetProteinG: number | null;
|
|
530
538
|
targetCarbsG: number | null;
|
|
531
539
|
targetFatG: number | null;
|
|
532
|
-
activityLevel: "
|
|
540
|
+
activityLevel: "active" | "sedentary" | "light" | "moderate" | "very_active" | null;
|
|
533
541
|
manualDailyTargetKcal: number | null;
|
|
534
542
|
notifyTimes: string[] | null;
|
|
535
543
|
timezone: string | null;
|
|
@@ -539,27 +547,27 @@ export declare const adminUserDetailResponseSchema: z.ZodObject<{
|
|
|
539
547
|
onboardingStep: number;
|
|
540
548
|
isOnboarded: boolean;
|
|
541
549
|
isOnboardingSkipped: boolean;
|
|
542
|
-
createdAt: Date;
|
|
543
550
|
onboardingSkipped: boolean;
|
|
544
551
|
subscriptionStatus: string | null;
|
|
545
552
|
deletedAt: Date | null;
|
|
546
|
-
updatedAt: Date;
|
|
547
553
|
lastActiveAt: string | null;
|
|
548
554
|
totalFoodLogs: number;
|
|
549
555
|
currentStreakDays: number;
|
|
556
|
+
}>;
|
|
557
|
+
}, "strip", z.ZodTypeAny, {
|
|
558
|
+
user: {
|
|
559
|
+
status: "active" | "suspended" | "deleted";
|
|
560
|
+
name: string | null;
|
|
561
|
+
id: string;
|
|
562
|
+
updatedAt: Date;
|
|
563
|
+
createdAt: Date;
|
|
550
564
|
subscription: {
|
|
551
565
|
status: "active" | "trialing" | "canceled" | "expired" | "none";
|
|
552
566
|
priceLabel: string | null;
|
|
553
567
|
renewsAt: string | null;
|
|
554
568
|
cancelAtPeriodEnd: boolean;
|
|
555
569
|
} | null;
|
|
556
|
-
}>;
|
|
557
|
-
}, "strip", z.ZodTypeAny, {
|
|
558
|
-
user: {
|
|
559
|
-
status: "active" | "suspended" | "deleted";
|
|
560
|
-
id: string;
|
|
561
570
|
email: string;
|
|
562
|
-
name: string | null;
|
|
563
571
|
goal: "lose" | "maintain" | "gain" | null;
|
|
564
572
|
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
565
573
|
age: number | null;
|
|
@@ -571,7 +579,7 @@ export declare const adminUserDetailResponseSchema: z.ZodObject<{
|
|
|
571
579
|
targetProteinG: number | null;
|
|
572
580
|
targetCarbsG: number | null;
|
|
573
581
|
targetFatG: number | null;
|
|
574
|
-
activityLevel: "
|
|
582
|
+
activityLevel: "active" | "sedentary" | "light" | "moderate" | "very_active" | null;
|
|
575
583
|
manualDailyTargetKcal: number | null;
|
|
576
584
|
notifyTimes: string[] | null;
|
|
577
585
|
timezone: string | null;
|
|
@@ -581,27 +589,27 @@ export declare const adminUserDetailResponseSchema: z.ZodObject<{
|
|
|
581
589
|
onboardingStep: number;
|
|
582
590
|
isOnboarded: boolean;
|
|
583
591
|
isOnboardingSkipped: boolean;
|
|
584
|
-
createdAt: Date;
|
|
585
592
|
onboardingSkipped: boolean;
|
|
586
593
|
subscriptionStatus: string | null;
|
|
587
594
|
deletedAt: Date | null;
|
|
588
|
-
updatedAt: Date;
|
|
589
595
|
lastActiveAt: string | null;
|
|
590
596
|
totalFoodLogs: number;
|
|
591
597
|
currentStreakDays: number;
|
|
598
|
+
};
|
|
599
|
+
}, {
|
|
600
|
+
user: {
|
|
601
|
+
status: "active" | "suspended" | "deleted";
|
|
602
|
+
name: string | null;
|
|
603
|
+
id: string;
|
|
604
|
+
updatedAt: Date;
|
|
605
|
+
createdAt: Date;
|
|
592
606
|
subscription: {
|
|
593
607
|
status: "active" | "trialing" | "canceled" | "expired" | "none";
|
|
594
608
|
priceLabel: string | null;
|
|
595
609
|
renewsAt: string | null;
|
|
596
610
|
cancelAtPeriodEnd: boolean;
|
|
597
611
|
} | null;
|
|
598
|
-
};
|
|
599
|
-
}, {
|
|
600
|
-
user: {
|
|
601
|
-
status: "active" | "suspended" | "deleted";
|
|
602
|
-
id: string;
|
|
603
612
|
email: string;
|
|
604
|
-
name: string | null;
|
|
605
613
|
goal: "lose" | "maintain" | "gain" | null;
|
|
606
614
|
sex: "male" | "female" | "prefer_not_to_say" | null;
|
|
607
615
|
age: number | null;
|
|
@@ -613,7 +621,7 @@ export declare const adminUserDetailResponseSchema: z.ZodObject<{
|
|
|
613
621
|
targetProteinG: number | null;
|
|
614
622
|
targetCarbsG: number | null;
|
|
615
623
|
targetFatG: number | null;
|
|
616
|
-
activityLevel: "
|
|
624
|
+
activityLevel: "active" | "sedentary" | "light" | "moderate" | "very_active" | null;
|
|
617
625
|
manualDailyTargetKcal: number | null;
|
|
618
626
|
notifyTimes: string[] | null;
|
|
619
627
|
timezone: string | null;
|
|
@@ -623,20 +631,12 @@ export declare const adminUserDetailResponseSchema: z.ZodObject<{
|
|
|
623
631
|
onboardingStep: number;
|
|
624
632
|
isOnboarded: boolean;
|
|
625
633
|
isOnboardingSkipped: boolean;
|
|
626
|
-
createdAt: Date;
|
|
627
634
|
onboardingSkipped: boolean;
|
|
628
635
|
subscriptionStatus: string | null;
|
|
629
636
|
deletedAt: Date | null;
|
|
630
|
-
updatedAt: Date;
|
|
631
637
|
lastActiveAt: string | null;
|
|
632
638
|
totalFoodLogs: number;
|
|
633
639
|
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
640
|
};
|
|
641
641
|
}>;
|
|
642
642
|
export type AdminUserDetailResponse = z.infer<typeof adminUserDetailResponseSchema>;
|