gymmonk-schema 0.2.0 → 0.3.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.
Files changed (97) hide show
  1. package/dist/announcement.d.ts +56 -0
  2. package/dist/announcement.d.ts.map +1 -0
  3. package/dist/announcement.js +40 -0
  4. package/dist/announcement.js.map +1 -0
  5. package/dist/center.d.ts +381 -0
  6. package/dist/center.d.ts.map +1 -0
  7. package/dist/center.js +96 -0
  8. package/dist/center.js.map +1 -0
  9. package/dist/common.d.ts +28 -0
  10. package/dist/common.d.ts.map +1 -1
  11. package/dist/common.js +37 -0
  12. package/dist/common.js.map +1 -1
  13. package/dist/equipment.d.ts +93 -0
  14. package/dist/equipment.d.ts.map +1 -0
  15. package/dist/equipment.js +54 -0
  16. package/dist/equipment.js.map +1 -0
  17. package/dist/exercise.d.ts +234 -0
  18. package/dist/exercise.d.ts.map +1 -0
  19. package/dist/exercise.js +93 -0
  20. package/dist/exercise.js.map +1 -0
  21. package/dist/feedback.d.ts +119 -0
  22. package/dist/feedback.d.ts.map +1 -0
  23. package/dist/feedback.js +77 -0
  24. package/dist/feedback.js.map +1 -0
  25. package/dist/home.d.ts +74 -0
  26. package/dist/home.d.ts.map +1 -0
  27. package/dist/home.js +28 -0
  28. package/dist/home.js.map +1 -0
  29. package/dist/index.d.ts +27 -4
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +33 -5
  32. package/dist/index.js.map +1 -1
  33. package/dist/insights.d.ts +143 -0
  34. package/dist/insights.d.ts.map +1 -0
  35. package/dist/insights.js +79 -0
  36. package/dist/insights.js.map +1 -0
  37. package/dist/member-profile.d.ts +312 -0
  38. package/dist/member-profile.d.ts.map +1 -0
  39. package/dist/member-profile.js +103 -0
  40. package/dist/member-profile.js.map +1 -0
  41. package/dist/member.d.ts +365 -0
  42. package/dist/member.d.ts.map +1 -0
  43. package/dist/member.js +169 -0
  44. package/dist/member.js.map +1 -0
  45. package/dist/membership-plan.d.ts +244 -0
  46. package/dist/membership-plan.d.ts.map +1 -0
  47. package/dist/membership-plan.js +80 -0
  48. package/dist/membership-plan.js.map +1 -0
  49. package/dist/membership.d.ts +154 -0
  50. package/dist/membership.d.ts.map +1 -0
  51. package/dist/membership.js +103 -0
  52. package/dist/membership.js.map +1 -0
  53. package/dist/notification.d.ts +59 -0
  54. package/dist/notification.d.ts.map +1 -0
  55. package/dist/notification.js +49 -0
  56. package/dist/notification.js.map +1 -0
  57. package/dist/onboarding.d.ts +361 -0
  58. package/dist/onboarding.d.ts.map +1 -0
  59. package/dist/onboarding.js +74 -0
  60. package/dist/onboarding.js.map +1 -0
  61. package/dist/organisation.d.ts +199 -0
  62. package/dist/organisation.d.ts.map +1 -0
  63. package/dist/organisation.js +51 -0
  64. package/dist/organisation.js.map +1 -0
  65. package/dist/owner-profile.d.ts +50 -0
  66. package/dist/owner-profile.d.ts.map +1 -0
  67. package/dist/owner-profile.js +34 -0
  68. package/dist/owner-profile.js.map +1 -0
  69. package/dist/pricing.d.ts +103 -0
  70. package/dist/pricing.d.ts.map +1 -0
  71. package/dist/pricing.js +73 -0
  72. package/dist/pricing.js.map +1 -0
  73. package/dist/session.d.ts +90 -0
  74. package/dist/session.d.ts.map +1 -0
  75. package/dist/session.js +59 -0
  76. package/dist/session.js.map +1 -0
  77. package/dist/shared.d.ts +199 -0
  78. package/dist/shared.d.ts.map +1 -0
  79. package/dist/shared.js +107 -0
  80. package/dist/shared.js.map +1 -0
  81. package/dist/staff.d.ts +288 -0
  82. package/dist/staff.d.ts.map +1 -0
  83. package/dist/staff.js +115 -0
  84. package/dist/staff.js.map +1 -0
  85. package/dist/subscription.d.ts +69 -0
  86. package/dist/subscription.d.ts.map +1 -0
  87. package/dist/subscription.js +47 -0
  88. package/dist/subscription.js.map +1 -0
  89. package/dist/user.d.ts +63 -0
  90. package/dist/user.d.ts.map +1 -0
  91. package/dist/user.js +44 -0
  92. package/dist/user.js.map +1 -0
  93. package/dist/workout-plan.d.ts +201 -0
  94. package/dist/workout-plan.d.ts.map +1 -0
  95. package/dist/workout-plan.js +71 -0
  96. package/dist/workout-plan.js.map +1 -0
  97. package/package.json +1 -1
@@ -0,0 +1,119 @@
1
+ /**
2
+ * gymmonk-schema — Feedback & complaints
3
+ * ======================================
4
+ * Member-submitted experience feedback (a rating + note) and complaints (about
5
+ * the gym or the app). Both support anonymity and optional media.
6
+ *
7
+ * @module gymmonk-schema/feedback
8
+ */
9
+ import { z } from 'zod';
10
+ export declare const feedbackRatingSchema: z.ZodEnum<{
11
+ worst: "worst";
12
+ bad: "bad";
13
+ fair: "fair";
14
+ good: "good";
15
+ perfect: "perfect";
16
+ }>;
17
+ export type FeedbackRating = z.infer<typeof feedbackRatingSchema>;
18
+ export declare const createFeedbackBodySchema: z.ZodObject<{
19
+ rating: z.ZodEnum<{
20
+ worst: "worst";
21
+ bad: "bad";
22
+ fair: "fair";
23
+ good: "good";
24
+ perfect: "perfect";
25
+ }>;
26
+ text: z.ZodDefault<z.ZodString>;
27
+ anonymous: z.ZodDefault<z.ZodBoolean>;
28
+ mediaUrls: z.ZodDefault<z.ZodArray<z.ZodString>>;
29
+ }, z.core.$strip>;
30
+ export type CreateFeedbackBody = z.infer<typeof createFeedbackBodySchema>;
31
+ export declare const feedbackSchema: z.ZodObject<{
32
+ id: z.ZodString;
33
+ centerId: z.ZodNullable<z.ZodString>;
34
+ userId: z.ZodNullable<z.ZodString>;
35
+ rating: z.ZodEnum<{
36
+ worst: "worst";
37
+ bad: "bad";
38
+ fair: "fair";
39
+ good: "good";
40
+ perfect: "perfect";
41
+ }>;
42
+ text: z.ZodString;
43
+ anonymous: z.ZodBoolean;
44
+ mediaUrls: z.ZodArray<z.ZodString>;
45
+ createdAt: z.ZodISODateTime;
46
+ }, z.core.$strip>;
47
+ export type Feedback = z.infer<typeof feedbackSchema>;
48
+ export declare const complaintTargetSchema: z.ZodEnum<{
49
+ gym: "gym";
50
+ app: "app";
51
+ }>;
52
+ export type ComplaintTarget = z.infer<typeof complaintTargetSchema>;
53
+ export declare const complaintUrgencySchema: z.ZodEnum<{
54
+ normal: "normal";
55
+ urgent: "urgent";
56
+ }>;
57
+ export type ComplaintUrgency = z.infer<typeof complaintUrgencySchema>;
58
+ export declare const complaintStatusSchema: z.ZodEnum<{
59
+ open: "open";
60
+ "in-progress": "in-progress";
61
+ resolved: "resolved";
62
+ closed: "closed";
63
+ }>;
64
+ export type ComplaintStatus = z.infer<typeof complaintStatusSchema>;
65
+ /** Preset issue options (the UI offers these; `issue` stores the chosen text). */
66
+ export declare const GYM_ISSUES: readonly ["Equipment not working", "Hygiene / Cleanliness issue", "Crowded / Overcapacity", "Trainer / Support not available", "Membership or billing problem", "Other issue"];
67
+ export declare const APP_ISSUES: readonly ["Onboarding / Signup problem", "Payment / Subscription issue", "Workout plan not loading / error", "App Performance Issues", "Feature Not Working", "Other issue"];
68
+ export declare const createComplaintBodySchema: z.ZodObject<{
69
+ target: z.ZodEnum<{
70
+ gym: "gym";
71
+ app: "app";
72
+ }>;
73
+ issue: z.ZodString;
74
+ urgency: z.ZodDefault<z.ZodEnum<{
75
+ normal: "normal";
76
+ urgent: "urgent";
77
+ }>>;
78
+ text: z.ZodDefault<z.ZodString>;
79
+ anonymous: z.ZodDefault<z.ZodBoolean>;
80
+ mediaUrls: z.ZodDefault<z.ZodArray<z.ZodString>>;
81
+ }, z.core.$strip>;
82
+ export type CreateComplaintBody = z.infer<typeof createComplaintBodySchema>;
83
+ export declare const complaintSchema: z.ZodObject<{
84
+ id: z.ZodString;
85
+ centerId: z.ZodNullable<z.ZodString>;
86
+ userId: z.ZodNullable<z.ZodString>;
87
+ target: z.ZodEnum<{
88
+ gym: "gym";
89
+ app: "app";
90
+ }>;
91
+ issue: z.ZodString;
92
+ urgency: z.ZodEnum<{
93
+ normal: "normal";
94
+ urgent: "urgent";
95
+ }>;
96
+ text: z.ZodString;
97
+ anonymous: z.ZodBoolean;
98
+ mediaUrls: z.ZodArray<z.ZodString>;
99
+ status: z.ZodEnum<{
100
+ open: "open";
101
+ "in-progress": "in-progress";
102
+ resolved: "resolved";
103
+ closed: "closed";
104
+ }>;
105
+ createdAt: z.ZodISODateTime;
106
+ updatedAt: z.ZodISODateTime;
107
+ }, z.core.$strip>;
108
+ export type Complaint = z.infer<typeof complaintSchema>;
109
+ export declare const updateComplaintStatusBodySchema: z.ZodObject<{
110
+ status: z.ZodEnum<{
111
+ open: "open";
112
+ "in-progress": "in-progress";
113
+ resolved: "resolved";
114
+ closed: "closed";
115
+ }>;
116
+ note: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
117
+ }, z.core.$strip>;
118
+ export type UpdateComplaintStatusBody = z.infer<typeof updateComplaintStatusBodySchema>;
119
+ //# sourceMappingURL=feedback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feedback.d.ts","sourceRoot":"","sources":["../src/feedback.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,oBAAoB;;;;;;EAAsD,CAAC;AACxF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,wBAAwB;;;;;;;;;;;iBAKnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;iBAUzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAItD,eAAO,MAAM,qBAAqB;;;EAAyB,CAAC;AAC5D,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,sBAAsB;;;EAA+B,CAAC;AACnE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,qBAAqB;;;;;EAAwD,CAAC;AAC3F,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,kFAAkF;AAClF,eAAO,MAAM,UAAU,gLAOb,CAAC;AAEX,eAAO,MAAM,UAAU,8KAOb,CAAC;AAEX,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;iBAOpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;iBAa1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,+BAA+B;;;;;;;;iBAG1C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * gymmonk-schema — Feedback & complaints
3
+ * ======================================
4
+ * Member-submitted experience feedback (a rating + note) and complaints (about
5
+ * the gym or the app). Both support anonymity and optional media.
6
+ *
7
+ * @module gymmonk-schema/feedback
8
+ */
9
+ import { z } from 'zod';
10
+ import { isoDateTimeSchema, objectIdSchema, optionalTrimmedString } from './common.js';
11
+ // ─── Feedback ────────────────────────────────────────────────────────────────
12
+ export const feedbackRatingSchema = z.enum(['worst', 'bad', 'fair', 'good', 'perfect']);
13
+ export const createFeedbackBodySchema = z.object({
14
+ rating: feedbackRatingSchema,
15
+ text: z.string().trim().max(500).default(''),
16
+ anonymous: z.boolean().default(false),
17
+ mediaUrls: z.array(z.string().trim().max(2000)).max(6).default([]),
18
+ });
19
+ export const feedbackSchema = z.object({
20
+ id: objectIdSchema,
21
+ centerId: objectIdSchema.nullable(),
22
+ /** Null when submitted anonymously. */
23
+ userId: objectIdSchema.nullable(),
24
+ rating: feedbackRatingSchema,
25
+ text: z.string(),
26
+ anonymous: z.boolean(),
27
+ mediaUrls: z.array(z.string()),
28
+ createdAt: isoDateTimeSchema,
29
+ });
30
+ // ─── Complaints ──────────────────────────────────────────────────────────────
31
+ export const complaintTargetSchema = z.enum(['gym', 'app']);
32
+ export const complaintUrgencySchema = z.enum(['normal', 'urgent']);
33
+ export const complaintStatusSchema = z.enum(['open', 'in-progress', 'resolved', 'closed']);
34
+ /** Preset issue options (the UI offers these; `issue` stores the chosen text). */
35
+ export const GYM_ISSUES = [
36
+ 'Equipment not working',
37
+ 'Hygiene / Cleanliness issue',
38
+ 'Crowded / Overcapacity',
39
+ 'Trainer / Support not available',
40
+ 'Membership or billing problem',
41
+ 'Other issue',
42
+ ];
43
+ export const APP_ISSUES = [
44
+ 'Onboarding / Signup problem',
45
+ 'Payment / Subscription issue',
46
+ 'Workout plan not loading / error',
47
+ 'App Performance Issues',
48
+ 'Feature Not Working',
49
+ 'Other issue',
50
+ ];
51
+ export const createComplaintBodySchema = z.object({
52
+ target: complaintTargetSchema,
53
+ issue: z.string().trim().min(1, 'Pick an issue').max(120),
54
+ urgency: complaintUrgencySchema.default('normal'),
55
+ text: z.string().trim().max(500).default(''),
56
+ anonymous: z.boolean().default(false),
57
+ mediaUrls: z.array(z.string().trim().max(2000)).max(6).default([]),
58
+ });
59
+ export const complaintSchema = z.object({
60
+ id: objectIdSchema,
61
+ centerId: objectIdSchema.nullable(),
62
+ userId: objectIdSchema.nullable(),
63
+ target: complaintTargetSchema,
64
+ issue: z.string(),
65
+ urgency: complaintUrgencySchema,
66
+ text: z.string(),
67
+ anonymous: z.boolean(),
68
+ mediaUrls: z.array(z.string()),
69
+ status: complaintStatusSchema,
70
+ createdAt: isoDateTimeSchema,
71
+ updatedAt: isoDateTimeSchema,
72
+ });
73
+ export const updateComplaintStatusBodySchema = z.object({
74
+ status: complaintStatusSchema,
75
+ note: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S,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CACnE,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,EAAE,EAAE,cAAc;IAClB,QAAQ,EAAE,cAAc,CAAC,QAAQ,EAAE;IACnC,MAAM,EAAE,cAAc,CAAC,QAAQ,EAAE;IACjC,MAAM,EAAE,qBAAqB;IAC7B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,OAAO,EAAE,sBAAsB;IAC/B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IACtB,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC9B,MAAM,EAAE,qBAAqB;IAC7B,SAAS,EAAE,iBAAiB;IAC5B,SAAS,EAAE,iBAAiB;CAC7B,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,MAAM,EAAE,qBAAqB;IAC7B,IAAI,EAAE,qBAAqB,CAAC,GAAG,CAAC;CACjC,CAAC,CAAC","sourcesContent":["/**\n * gymmonk-schema — Feedback & complaints\n * ======================================\n * Member-submitted experience feedback (a rating + note) and complaints (about\n * the gym or the app). Both support anonymity and optional media.\n *\n * @module gymmonk-schema/feedback\n */\n\nimport { z } from 'zod';\nimport { isoDateTimeSchema, objectIdSchema, optionalTrimmedString } from './common.js';\n\n// ─── Feedback ────────────────────────────────────────────────────────────────\n\nexport const feedbackRatingSchema = z.enum(['worst', 'bad', 'fair', 'good', 'perfect']);\nexport type FeedbackRating = z.infer<typeof feedbackRatingSchema>;\n\nexport const createFeedbackBodySchema = z.object({\n rating: feedbackRatingSchema,\n text: z.string().trim().max(500).default(''),\n anonymous: z.boolean().default(false),\n mediaUrls: z.array(z.string().trim().max(2000)).max(6).default([]),\n});\nexport type CreateFeedbackBody = z.infer<typeof createFeedbackBodySchema>;\n\nexport const feedbackSchema = z.object({\n id: objectIdSchema,\n centerId: objectIdSchema.nullable(),\n /** Null when submitted anonymously. */\n userId: objectIdSchema.nullable(),\n rating: feedbackRatingSchema,\n text: z.string(),\n anonymous: z.boolean(),\n mediaUrls: z.array(z.string()),\n createdAt: isoDateTimeSchema,\n});\nexport type Feedback = z.infer<typeof feedbackSchema>;\n\n// ─── Complaints ──────────────────────────────────────────────────────────────\n\nexport const complaintTargetSchema = z.enum(['gym', 'app']);\nexport type ComplaintTarget = z.infer<typeof complaintTargetSchema>;\n\nexport const complaintUrgencySchema = z.enum(['normal', 'urgent']);\nexport type ComplaintUrgency = z.infer<typeof complaintUrgencySchema>;\n\nexport const complaintStatusSchema = z.enum(['open', 'in-progress', 'resolved', 'closed']);\nexport type ComplaintStatus = z.infer<typeof complaintStatusSchema>;\n\n/** Preset issue options (the UI offers these; `issue` stores the chosen text). */\nexport const GYM_ISSUES = [\n 'Equipment not working',\n 'Hygiene / Cleanliness issue',\n 'Crowded / Overcapacity',\n 'Trainer / Support not available',\n 'Membership or billing problem',\n 'Other issue',\n] as const;\n\nexport const APP_ISSUES = [\n 'Onboarding / Signup problem',\n 'Payment / Subscription issue',\n 'Workout plan not loading / error',\n 'App Performance Issues',\n 'Feature Not Working',\n 'Other issue',\n] as const;\n\nexport const createComplaintBodySchema = z.object({\n target: complaintTargetSchema,\n issue: z.string().trim().min(1, 'Pick an issue').max(120),\n urgency: complaintUrgencySchema.default('normal'),\n text: z.string().trim().max(500).default(''),\n anonymous: z.boolean().default(false),\n mediaUrls: z.array(z.string().trim().max(2000)).max(6).default([]),\n});\nexport type CreateComplaintBody = z.infer<typeof createComplaintBodySchema>;\n\nexport const complaintSchema = z.object({\n id: objectIdSchema,\n centerId: objectIdSchema.nullable(),\n userId: objectIdSchema.nullable(),\n target: complaintTargetSchema,\n issue: z.string(),\n urgency: complaintUrgencySchema,\n text: z.string(),\n anonymous: z.boolean(),\n mediaUrls: z.array(z.string()),\n status: complaintStatusSchema,\n createdAt: isoDateTimeSchema,\n updatedAt: isoDateTimeSchema,\n});\nexport type Complaint = z.infer<typeof complaintSchema>;\n\nexport const updateComplaintStatusBodySchema = z.object({\n status: complaintStatusSchema,\n note: optionalTrimmedString(400),\n});\nexport type UpdateComplaintStatusBody = z.infer<typeof updateComplaintStatusBodySchema>;\n"]}
package/dist/home.d.ts ADDED
@@ -0,0 +1,74 @@
1
+ /**
2
+ * gymmonk-schema — Member home dashboard
3
+ * ======================================
4
+ * The typed response for the member's home screen: whether they have a
5
+ * membership / active plan, today's plan day, and their live-session snapshot.
6
+ * The frontend can also derive this from the individual entities, but typing the
7
+ * aggregate keeps the `/home` endpoint in the SSOT.
8
+ *
9
+ * @module gymmonk-schema/home
10
+ */
11
+ import { z } from 'zod';
12
+ export declare const homeSessionSummarySchema: z.ZodObject<{
13
+ status: z.ZodEnum<{
14
+ active: "active";
15
+ idle: "idle";
16
+ completed: "completed";
17
+ }>;
18
+ completedCount: z.ZodNumber;
19
+ totalCount: z.ZodNumber;
20
+ nextExerciseName: z.ZodNullable<z.ZodString>;
21
+ elapsedSec: z.ZodNumber;
22
+ }, z.core.$strip>;
23
+ export type HomeSessionSummary = z.infer<typeof homeSessionSummarySchema>;
24
+ export declare const memberHomeSummarySchema: z.ZodObject<{
25
+ hasMembership: z.ZodBoolean;
26
+ hasActivePlan: z.ZodBoolean;
27
+ today: z.ZodNullable<z.ZodObject<{
28
+ weekday: z.ZodEnum<{
29
+ mon: "mon";
30
+ tue: "tue";
31
+ wed: "wed";
32
+ thu: "thu";
33
+ fri: "fri";
34
+ sat: "sat";
35
+ sun: "sun";
36
+ }>;
37
+ exercises: z.ZodArray<z.ZodObject<{
38
+ exerciseId: z.ZodString;
39
+ slug: z.ZodString;
40
+ name: z.ZodString;
41
+ description: z.ZodString;
42
+ thumbnailUrl: z.ZodNullable<z.ZodString>;
43
+ difficulty: z.ZodEnum<{
44
+ beginner: "beginner";
45
+ intermediate: "intermediate";
46
+ advanced: "advanced";
47
+ }>;
48
+ category: z.ZodEnum<{
49
+ cardio: "cardio";
50
+ "upper-body": "upper-body";
51
+ "lower-body": "lower-body";
52
+ core: "core";
53
+ "full-body": "full-body";
54
+ }>;
55
+ targetArea: z.ZodString;
56
+ sets: z.ZodNumber;
57
+ reps: z.ZodString;
58
+ restSec: z.ZodNumber;
59
+ }, z.core.$strip>>;
60
+ }, z.core.$strip>>;
61
+ session: z.ZodObject<{
62
+ status: z.ZodEnum<{
63
+ active: "active";
64
+ idle: "idle";
65
+ completed: "completed";
66
+ }>;
67
+ completedCount: z.ZodNumber;
68
+ totalCount: z.ZodNumber;
69
+ nextExerciseName: z.ZodNullable<z.ZodString>;
70
+ elapsedSec: z.ZodNumber;
71
+ }, z.core.$strip>;
72
+ }, z.core.$strip>;
73
+ export type MemberHomeSummary = z.infer<typeof memberHomeSummarySchema>;
74
+ //# sourceMappingURL=home.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"home.d.ts","sourceRoot":"","sources":["../src/home.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,wBAAwB;;;;;;;;;;iBAMnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
package/dist/home.js ADDED
@@ -0,0 +1,28 @@
1
+ /**
2
+ * gymmonk-schema — Member home dashboard
3
+ * ======================================
4
+ * The typed response for the member's home screen: whether they have a
5
+ * membership / active plan, today's plan day, and their live-session snapshot.
6
+ * The frontend can also derive this from the individual entities, but typing the
7
+ * aggregate keeps the `/home` endpoint in the SSOT.
8
+ *
9
+ * @module gymmonk-schema/home
10
+ */
11
+ import { z } from 'zod';
12
+ import { sessionStatusSchema } from './session.js';
13
+ import { planDaySchema } from './workout-plan.js';
14
+ export const homeSessionSummarySchema = z.object({
15
+ status: sessionStatusSchema,
16
+ completedCount: z.number().int().nonnegative(),
17
+ totalCount: z.number().int().nonnegative(),
18
+ nextExerciseName: z.string().nullable(),
19
+ elapsedSec: z.number().int().nonnegative(),
20
+ });
21
+ export const memberHomeSummarySchema = z.object({
22
+ hasMembership: z.boolean(),
23
+ hasActivePlan: z.boolean(),
24
+ /** Today's plan day (null on a rest day / when no plan is assigned). */
25
+ today: planDaySchema.nullable(),
26
+ session: homeSessionSummarySchema,
27
+ });
28
+ //# sourceMappingURL=home.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"home.js","sourceRoot":"","sources":["../src/home.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,mBAAmB;IAC3B,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC9C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC1C,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACvC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;CAC3C,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE;IAC1B,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE;IAC1B,wEAAwE;IACxE,KAAK,EAAE,aAAa,CAAC,QAAQ,EAAE;IAC/B,OAAO,EAAE,wBAAwB;CAClC,CAAC,CAAC","sourcesContent":["/**\n * gymmonk-schema — Member home dashboard\n * ======================================\n * The typed response for the member's home screen: whether they have a\n * membership / active plan, today's plan day, and their live-session snapshot.\n * The frontend can also derive this from the individual entities, but typing the\n * aggregate keeps the `/home` endpoint in the SSOT.\n *\n * @module gymmonk-schema/home\n */\n\nimport { z } from 'zod';\nimport { sessionStatusSchema } from './session.js';\nimport { planDaySchema } from './workout-plan.js';\n\nexport const homeSessionSummarySchema = z.object({\n status: sessionStatusSchema,\n completedCount: z.number().int().nonnegative(),\n totalCount: z.number().int().nonnegative(),\n nextExerciseName: z.string().nullable(),\n elapsedSec: z.number().int().nonnegative(),\n});\nexport type HomeSessionSummary = z.infer<typeof homeSessionSummarySchema>;\n\nexport const memberHomeSummarySchema = z.object({\n hasMembership: z.boolean(),\n hasActivePlan: z.boolean(),\n /** Today's plan day (null on a rest day / when no plan is assigned). */\n today: planDaySchema.nullable(),\n session: homeSessionSummarySchema,\n});\nexport type MemberHomeSummary = z.infer<typeof memberHomeSummarySchema>;\n"]}
package/dist/index.d.ts CHANGED
@@ -2,10 +2,33 @@
2
2
  * gymmonk-schema — Public API
3
3
  * ===========================
4
4
  * Shared Zod schemas, enums and domain types for GymMonk (fitness SaaS).
5
- * Single SSOT consumed by both gymmonk-backend and gymmonk-web-client.
5
+ * Single source of truth (SSOT) for data shapes, TypeScript types and
6
+ * validation, consumed by both gymmonk-backend and gymmonk-web-client.
6
7
  *
7
- * Domain modules (workouts, library, membership, check-in, …) are added here
8
- * as they land — each exported through this barrel.
8
+ * Every domain module is re-exported through this barrel. Import names are
9
+ * globally unique across modules, so `export *` composes without collisions.
9
10
  */
10
- export { emptyStringToUndefined, type ObjectIdString, objectIdSchema, optionalTrimmedString, type Pagination, paginationSchema, } from './common.js';
11
+ export * from './announcement.js';
12
+ export * from './center.js';
13
+ export * from './common.js';
14
+ export * from './equipment.js';
15
+ export * from './exercise.js';
16
+ export * from './feedback.js';
17
+ export * from './home.js';
18
+ export * from './insights.js';
19
+ export * from './member.js';
20
+ export * from './member-profile.js';
21
+ export * from './membership.js';
22
+ export * from './membership-plan.js';
23
+ export * from './notification.js';
24
+ export * from './onboarding.js';
25
+ export * from './organisation.js';
26
+ export * from './owner-profile.js';
27
+ export * from './pricing.js';
28
+ export * from './session.js';
29
+ export * from './shared.js';
30
+ export * from './staff.js';
31
+ export * from './subscription.js';
32
+ export * from './user.js';
33
+ export * from './workout-plan.js';
11
34
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EACL,sBAAsB,EACtB,KAAK,cAAc,EACnB,cAAc,EACd,qBAAqB,EACrB,KAAK,UAAU,EACf,gBAAgB,GACjB,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAE5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAE9B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,sBAAsB,CAAC;AAErC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -2,11 +2,39 @@
2
2
  * gymmonk-schema — Public API
3
3
  * ===========================
4
4
  * Shared Zod schemas, enums and domain types for GymMonk (fitness SaaS).
5
- * Single SSOT consumed by both gymmonk-backend and gymmonk-web-client.
5
+ * Single source of truth (SSOT) for data shapes, TypeScript types and
6
+ * validation, consumed by both gymmonk-backend and gymmonk-web-client.
6
7
  *
7
- * Domain modules (workouts, library, membership, check-in, …) are added here
8
- * as they land — each exported through this barrel.
8
+ * Every domain module is re-exported through this barrel. Import names are
9
+ * globally unique across modules, so `export *` composes without collisions.
9
10
  */
10
- // ─── Common helpers + primitives ─────────────────────────────────────────────
11
- export { emptyStringToUndefined, objectIdSchema, optionalTrimmedString, paginationSchema, } from './common.js';
11
+ export * from './announcement.js';
12
+ export * from './center.js';
13
+ // ─── Foundation ──────────────────────────────────────────────────────────────
14
+ export * from './common.js';
15
+ export * from './equipment.js';
16
+ // ─── Training ────────────────────────────────────────────────────────────────
17
+ export * from './exercise.js';
18
+ export * from './feedback.js';
19
+ export * from './home.js';
20
+ export * from './insights.js';
21
+ // ─── People ──────────────────────────────────────────────────────────────────
22
+ export * from './member.js';
23
+ export * from './member-profile.js';
24
+ export * from './membership.js';
25
+ // ─── Membership ──────────────────────────────────────────────────────────────
26
+ export * from './membership-plan.js';
27
+ // ─── Engagement & analytics ──────────────────────────────────────────────────
28
+ export * from './notification.js';
29
+ export * from './onboarding.js';
30
+ // ─── Gym structure & onboarding ──────────────────────────────────────────────
31
+ export * from './organisation.js';
32
+ export * from './owner-profile.js';
33
+ export * from './pricing.js';
34
+ export * from './session.js';
35
+ export * from './shared.js';
36
+ export * from './staff.js';
37
+ export * from './subscription.js';
38
+ export * from './user.js';
39
+ export * from './workout-plan.js';
12
40
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,gFAAgF;AAChF,OAAO,EACL,sBAAsB,EAEtB,cAAc,EACd,qBAAqB,EAErB,gBAAgB,GACjB,MAAM,aAAa,CAAC","sourcesContent":["/**\n * gymmonk-schema — Public API\n * ===========================\n * Shared Zod schemas, enums and domain types for GymMonk (fitness SaaS).\n * Single SSOT consumed by both gymmonk-backend and gymmonk-web-client.\n *\n * Domain modules (workouts, library, membership, check-in, …) are added here\n * as they land — each exported through this barrel.\n */\n\n// ─── Common helpers + primitives ─────────────────────────────────────────────\nexport {\n emptyStringToUndefined,\n type ObjectIdString,\n objectIdSchema,\n optionalTrimmedString,\n type Pagination,\n paginationSchema,\n} from './common.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,gFAAgF;AAChF,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,gFAAgF;AAChF,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,gFAAgF;AAChF,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,gFAAgF;AAChF,cAAc,sBAAsB,CAAC;AACrC,gFAAgF;AAChF,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,gFAAgF;AAChF,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC","sourcesContent":["/**\n * gymmonk-schema — Public API\n * ===========================\n * Shared Zod schemas, enums and domain types for GymMonk (fitness SaaS).\n * Single source of truth (SSOT) for data shapes, TypeScript types and\n * validation, consumed by both gymmonk-backend and gymmonk-web-client.\n *\n * Every domain module is re-exported through this barrel. Import names are\n * globally unique across modules, so `export *` composes without collisions.\n */\n\nexport * from './announcement.js';\nexport * from './center.js';\n// ─── Foundation ──────────────────────────────────────────────────────────────\nexport * from './common.js';\nexport * from './equipment.js';\n// ─── Training ────────────────────────────────────────────────────────────────\nexport * from './exercise.js';\nexport * from './feedback.js';\nexport * from './home.js';\nexport * from './insights.js';\n// ─── People ──────────────────────────────────────────────────────────────────\nexport * from './member.js';\nexport * from './member-profile.js';\nexport * from './membership.js';\n// ─── Membership ──────────────────────────────────────────────────────────────\nexport * from './membership-plan.js';\n// ─── Engagement & analytics ──────────────────────────────────────────────────\nexport * from './notification.js';\nexport * from './onboarding.js';\n// ─── Gym structure & onboarding ──────────────────────────────────────────────\nexport * from './organisation.js';\nexport * from './owner-profile.js';\nexport * from './pricing.js';\nexport * from './session.js';\nexport * from './shared.js';\nexport * from './staff.js';\nexport * from './subscription.js';\nexport * from './user.js';\nexport * from './workout-plan.js';\n"]}
@@ -0,0 +1,143 @@
1
+ /**
2
+ * gymmonk-schema — Owner dashboard & insights
3
+ * ============================================
4
+ * The owner home summary (KPIs, crowd load, top equipment, alert) and the
5
+ * analytics response shapes (revenue / attendance / plan-mix / demographics /
6
+ * peak-hours). Chart series carry raw numbers; the frontend renders + formats.
7
+ *
8
+ * @module gymmonk-schema/insights
9
+ */
10
+ import { z } from 'zod';
11
+ export declare const seriesPointSchema: z.ZodObject<{
12
+ label: z.ZodString;
13
+ value: z.ZodNumber;
14
+ }, z.core.$strip>;
15
+ export type SeriesPoint = z.infer<typeof seriesPointSchema>;
16
+ export declare const lineSeriesSchema: z.ZodObject<{
17
+ labels: z.ZodArray<z.ZodString>;
18
+ values: z.ZodArray<z.ZodNumber>;
19
+ }, z.core.$strip>;
20
+ export type LineSeries = z.infer<typeof lineSeriesSchema>;
21
+ export declare const donutSegmentSchema: z.ZodObject<{
22
+ label: z.ZodString;
23
+ value: z.ZodNumber;
24
+ color: z.ZodString;
25
+ }, z.core.$strip>;
26
+ export type DonutSegment = z.infer<typeof donutSegmentSchema>;
27
+ export declare const kpiIconSchema: z.ZodEnum<{
28
+ members: "members";
29
+ attendance: "attendance";
30
+ birthdays: "birthdays";
31
+ revenue: "revenue";
32
+ devices: "devices";
33
+ }>;
34
+ export type KpiIcon = z.infer<typeof kpiIconSchema>;
35
+ export declare const kpiChipSchema: z.ZodObject<{
36
+ key: z.ZodString;
37
+ icon: z.ZodEnum<{
38
+ members: "members";
39
+ attendance: "attendance";
40
+ birthdays: "birthdays";
41
+ revenue: "revenue";
42
+ devices: "devices";
43
+ }>;
44
+ label: z.ZodString;
45
+ value: z.ZodNumber;
46
+ unit: z.ZodString;
47
+ deltaPct: z.ZodNullable<z.ZodNumber>;
48
+ }, z.core.$strip>;
49
+ export type KpiChip = z.infer<typeof kpiChipSchema>;
50
+ export declare const ownerAlertSchema: z.ZodObject<{
51
+ title: z.ZodString;
52
+ body: z.ZodString;
53
+ }, z.core.$strip>;
54
+ export type OwnerAlert = z.infer<typeof ownerAlertSchema>;
55
+ export declare const equipmentLoadSchema: z.ZodObject<{
56
+ name: z.ZodString;
57
+ value: z.ZodNumber;
58
+ time: z.ZodString;
59
+ }, z.core.$strip>;
60
+ export type EquipmentLoad = z.infer<typeof equipmentLoadSchema>;
61
+ export declare const ownerHomeSummarySchema: z.ZodObject<{
62
+ ownerName: z.ZodString;
63
+ branch: z.ZodString;
64
+ kpis: z.ZodArray<z.ZodObject<{
65
+ key: z.ZodString;
66
+ icon: z.ZodEnum<{
67
+ members: "members";
68
+ attendance: "attendance";
69
+ birthdays: "birthdays";
70
+ revenue: "revenue";
71
+ devices: "devices";
72
+ }>;
73
+ label: z.ZodString;
74
+ value: z.ZodNumber;
75
+ unit: z.ZodString;
76
+ deltaPct: z.ZodNullable<z.ZodNumber>;
77
+ }, z.core.$strip>>;
78
+ alert: z.ZodNullable<z.ZodObject<{
79
+ title: z.ZodString;
80
+ body: z.ZodString;
81
+ }, z.core.$strip>>;
82
+ crowdLoad: z.ZodObject<{
83
+ labels: z.ZodArray<z.ZodString>;
84
+ values: z.ZodArray<z.ZodNumber>;
85
+ }, z.core.$strip>;
86
+ topEquipment: z.ZodArray<z.ZodObject<{
87
+ name: z.ZodString;
88
+ value: z.ZodNumber;
89
+ time: z.ZodString;
90
+ }, z.core.$strip>>;
91
+ todaysRevenueInr: z.ZodNumber;
92
+ }, z.core.$strip>;
93
+ export type OwnerHomeSummary = z.infer<typeof ownerHomeSummarySchema>;
94
+ export declare const insightCategoryOptionSchema: z.ZodObject<{
95
+ value: z.ZodString;
96
+ label: z.ZodString;
97
+ }, z.core.$strip>;
98
+ export type InsightCategoryOption = z.infer<typeof insightCategoryOptionSchema>;
99
+ export declare const ownerInsightsSchema: z.ZodObject<{
100
+ revenue: z.ZodObject<{
101
+ categories: z.ZodArray<z.ZodObject<{
102
+ value: z.ZodString;
103
+ label: z.ZodString;
104
+ }, z.core.$strip>>;
105
+ byCategory: z.ZodRecord<z.ZodString, z.ZodObject<{
106
+ labels: z.ZodArray<z.ZodString>;
107
+ values: z.ZodArray<z.ZodNumber>;
108
+ }, z.core.$strip>>;
109
+ year: z.ZodString;
110
+ }, z.core.$strip>;
111
+ attendance: z.ZodObject<{
112
+ byPeriod: z.ZodRecord<z.ZodString, z.ZodObject<{
113
+ total: z.ZodNumber;
114
+ data: z.ZodArray<z.ZodObject<{
115
+ label: z.ZodString;
116
+ value: z.ZodNumber;
117
+ }, z.core.$strip>>;
118
+ }, z.core.$strip>>;
119
+ }, z.core.$strip>;
120
+ planMix: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
121
+ label: z.ZodString;
122
+ value: z.ZodNumber;
123
+ color: z.ZodString;
124
+ }, z.core.$strip>>>;
125
+ demographics: z.ZodRecord<z.ZodString, z.ZodObject<{
126
+ center: z.ZodString;
127
+ segments: z.ZodArray<z.ZodObject<{
128
+ label: z.ZodString;
129
+ value: z.ZodNumber;
130
+ color: z.ZodString;
131
+ }, z.core.$strip>>;
132
+ }, z.core.$strip>>;
133
+ peakHours: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
134
+ label: z.ZodString;
135
+ value: z.ZodNumber;
136
+ }, z.core.$strip>>>;
137
+ }, z.core.$strip>;
138
+ export type OwnerInsights = z.infer<typeof ownerInsightsSchema>;
139
+ export declare const insightsQuerySchema: z.ZodObject<{
140
+ centerId: z.ZodOptional<z.ZodString>;
141
+ }, z.core.$strip>;
142
+ export type InsightsQuery = z.infer<typeof insightsQuerySchema>;
143
+ //# sourceMappingURL=insights.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"insights.d.ts","sourceRoot":"","sources":["../src/insights.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,iBAAiB;;;iBAG5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,gBAAgB;;;iBAG3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,kBAAkB;;;;iBAI7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CA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