@nikthegeek/dreamsforlittles-shared 0.16.0 → 0.17.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/analysis-teaser.test.js +31 -1
- package/dist/analysis-teaser.test.js.map +1 -1
- package/dist/analysis.d.ts +762 -0
- package/dist/analysis.js +13 -0
- package/dist/analysis.js.map +1 -1
- package/dist/coach-sleep-plan-templates.d.ts +105 -10
- package/dist/coach-sleep-plan-templates.js +2 -2
- package/dist/coach-sleep-plan-templates.js.map +1 -1
- package/dist/coach-sleep-plans.d.ts +88 -4
- package/dist/coach.d.ts +7348 -4
- package/dist/family-profile-artifacts.d.ts +1467 -26
- package/dist/family-profile-artifacts.js +22 -2
- package/dist/family-profile-artifacts.js.map +1 -1
- package/dist/family-sleep-plan.test.js +17 -0
- package/dist/family-sleep-plan.test.js.map +1 -1
- package/dist/family.d.ts +16609 -861
- package/dist/family.js +29 -3
- package/dist/family.js.map +1 -1
- package/dist/family.test.js +43 -1
- package/dist/family.test.js.map +1 -1
- package/dist/history-export-csv.d.ts +2 -2
- package/dist/history-export-csv.js +7 -3
- package/dist/history-export-csv.js.map +1 -1
- package/dist/home-activity-context.d.ts +6396 -0
- package/dist/home-activity-context.js +97 -0
- package/dist/home-activity-context.js.map +1 -0
- package/dist/home-activity-context.test.d.ts +1 -0
- package/dist/home-activity-context.test.js +111 -0
- package/dist/home-activity-context.test.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/lead-insights.d.ts +6 -6
- package/dist/milestones.d.ts +244 -0
- package/dist/milestones.js +10 -0
- package/dist/milestones.js.map +1 -1
- package/dist/milestones.test.js +23 -1
- package/dist/milestones.test.js.map +1 -1
- package/dist/native-timer-state.d.ts +1691 -66
- package/dist/practice-insights.d.ts +2 -2
- package/dist/product-analytics.d.ts +12 -12
- package/dist/pumping.d.ts +486 -0
- package/dist/pumping.js +94 -0
- package/dist/pumping.js.map +1 -0
- package/dist/pumping.test.d.ts +1 -0
- package/dist/pumping.test.js +62 -0
- package/dist/pumping.test.js.map +1 -0
- package/dist/questionnaire-imports.d.ts +194 -2
- package/dist/sleep-average-context.d.ts +570 -0
- package/dist/sleep-average-context.js +286 -0
- package/dist/sleep-average-context.js.map +1 -0
- package/dist/sleep-average-context.test.d.ts +1 -0
- package/dist/sleep-average-context.test.js +290 -0
- package/dist/sleep-average-context.test.js.map +1 -0
- package/dist/sleep-average-summary.d.ts +46 -0
- package/dist/sleep-average-summary.js +127 -0
- package/dist/sleep-average-summary.js.map +1 -0
- package/dist/sleep-average-summary.test.d.ts +1 -0
- package/dist/sleep-average-summary.test.js +169 -0
- package/dist/sleep-average-summary.test.js.map +1 -0
- package/dist/sleep-awake-state.d.ts +8 -2
- package/dist/sleep-awake-state.js +2 -2
- package/dist/sleep-awake-state.js.map +1 -1
- package/dist/sleep-awake-state.test.js +16 -0
- package/dist/sleep-awake-state.test.js.map +1 -1
- package/dist/sleep-completed-night.d.ts +563 -0
- package/dist/subscription-cancellation-feedback.d.ts +10 -10
- package/dist/website-feedback.d.ts +4 -4
- package/package.json +1 -1
package/dist/analysis.js
CHANGED
|
@@ -2,6 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import { activityTypeSchema } from "./enums.js";
|
|
3
3
|
import { activitySchema } from "./family.js";
|
|
4
4
|
import { idSchema, isoDateStringSchema } from "./api.js";
|
|
5
|
+
import { sleepAverageContextResultSchema } from "./sleep-average-context.js";
|
|
5
6
|
export const analysisActivitiesQuerySchema = z.object({
|
|
6
7
|
familyUserId: idSchema.optional(),
|
|
7
8
|
babyId: idSchema,
|
|
@@ -27,4 +28,16 @@ export const analysisTeaserResponseSchema = z.object({
|
|
|
27
28
|
averageSleepMinutes: z.number().int().nonnegative().nullable(),
|
|
28
29
|
dayLevels: z.array(z.number().int().min(0).max(3)).length(7)
|
|
29
30
|
}).strict();
|
|
31
|
+
/** Explicit opt-in: released strict teaser clients retain their exact default response. */
|
|
32
|
+
export const analysisCompletedDayTeaserQuerySchema = z.object({
|
|
33
|
+
babyId: idSchema, basis: z.literal("completed-days")
|
|
34
|
+
}).strict();
|
|
35
|
+
export const analysisCompletedDayTeaserResponseSchema = analysisTeaserResponseSchema.omit({ averageSleepMinutes: true }).extend({
|
|
36
|
+
basis: z.literal("completed-days"),
|
|
37
|
+
sleep: sleepAverageContextResultSchema.pick({ modelVersion: true, recordedTimeZone: true,
|
|
38
|
+
openingDates: true, sourceRevision: true, asOf: true, sampleCount: true, excludedCount: true,
|
|
39
|
+
unknownCount: true, excluded: true, unknown: true }).extend({
|
|
40
|
+
totalSleepMs: z.number().finite().nonnegative(), averageSleepMs: z.number().finite().nonnegative().nullable()
|
|
41
|
+
}).strict()
|
|
42
|
+
}).strict();
|
|
30
43
|
//# sourceMappingURL=analysis.js.map
|
package/dist/analysis.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analysis.js","sourceRoot":"","sources":["../src/analysis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"analysis.js","sourceRoot":"","sources":["../src/analysis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EAAE,+BAA+B,EAAE,MAAM,4BAA4B,CAAC;AAE7E,MAAM,CAAC,MAAM,6B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|
5
5
|
} & {
|
|
6
|
-
blocks: z.ZodArray<z.ZodObject<{
|
|
6
|
+
blocks: z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
7
7
|
id: z.ZodString;
|
|
8
8
|
type: z.ZodEnum<["paragraph", "bullet"]>;
|
|
9
9
|
text: z.ZodString;
|
|
10
|
+
presentation: z.ZodOptional<z.ZodNullable<z.ZodLiteral<"tip">>>;
|
|
10
11
|
}, "strip", z.ZodTypeAny, {
|
|
11
12
|
type: "paragraph" | "bullet";
|
|
12
13
|
id: string;
|
|
13
14
|
text: string;
|
|
15
|
+
presentation?: "tip" | null | undefined;
|
|
14
16
|
}, {
|
|
15
17
|
type: "paragraph" | "bullet";
|
|
16
18
|
id: string;
|
|
17
19
|
text: string;
|
|
18
|
-
|
|
20
|
+
presentation?: "tip" | null | undefined;
|
|
21
|
+
}>, "many">, {
|
|
22
|
+
type: "paragraph" | "bullet";
|
|
23
|
+
id: string;
|
|
24
|
+
text: string;
|
|
25
|
+
presentation?: "tip" | null | undefined;
|
|
26
|
+
}[], {
|
|
27
|
+
type: "paragraph" | "bullet";
|
|
28
|
+
id: string;
|
|
29
|
+
text: string;
|
|
30
|
+
presentation?: "tip" | null | undefined;
|
|
31
|
+
}[]>;
|
|
19
32
|
}, "strict", z.ZodTypeAny, {
|
|
20
33
|
id: string;
|
|
21
34
|
title: string;
|
|
@@ -23,6 +36,7 @@ export declare const coachSleepPlanTemplateSectionSchema: z.ZodObject<{
|
|
|
23
36
|
type: "paragraph" | "bullet";
|
|
24
37
|
id: string;
|
|
25
38
|
text: string;
|
|
39
|
+
presentation?: "tip" | null | undefined;
|
|
26
40
|
}[];
|
|
27
41
|
}, {
|
|
28
42
|
id: string;
|
|
@@ -31,6 +45,7 @@ export declare const coachSleepPlanTemplateSectionSchema: z.ZodObject<{
|
|
|
31
45
|
type: "paragraph" | "bullet";
|
|
32
46
|
id: string;
|
|
33
47
|
text: string;
|
|
48
|
+
presentation?: "tip" | null | undefined;
|
|
34
49
|
}[];
|
|
35
50
|
}>;
|
|
36
51
|
export declare const coachSleepPlanTemplateSchema: z.ZodObject<{
|
|
@@ -43,19 +58,32 @@ export declare const coachSleepPlanTemplateSchema: z.ZodObject<{
|
|
|
43
58
|
id: z.ZodString;
|
|
44
59
|
title: z.ZodString;
|
|
45
60
|
} & {
|
|
46
|
-
blocks: z.ZodArray<z.ZodObject<{
|
|
61
|
+
blocks: z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
47
62
|
id: z.ZodString;
|
|
48
63
|
type: z.ZodEnum<["paragraph", "bullet"]>;
|
|
49
64
|
text: z.ZodString;
|
|
65
|
+
presentation: z.ZodOptional<z.ZodNullable<z.ZodLiteral<"tip">>>;
|
|
50
66
|
}, "strip", z.ZodTypeAny, {
|
|
51
67
|
type: "paragraph" | "bullet";
|
|
52
68
|
id: string;
|
|
53
69
|
text: string;
|
|
70
|
+
presentation?: "tip" | null | undefined;
|
|
54
71
|
}, {
|
|
55
72
|
type: "paragraph" | "bullet";
|
|
56
73
|
id: string;
|
|
57
74
|
text: string;
|
|
58
|
-
|
|
75
|
+
presentation?: "tip" | null | undefined;
|
|
76
|
+
}>, "many">, {
|
|
77
|
+
type: "paragraph" | "bullet";
|
|
78
|
+
id: string;
|
|
79
|
+
text: string;
|
|
80
|
+
presentation?: "tip" | null | undefined;
|
|
81
|
+
}[], {
|
|
82
|
+
type: "paragraph" | "bullet";
|
|
83
|
+
id: string;
|
|
84
|
+
text: string;
|
|
85
|
+
presentation?: "tip" | null | undefined;
|
|
86
|
+
}[]>;
|
|
59
87
|
}, "strict", z.ZodTypeAny, {
|
|
60
88
|
id: string;
|
|
61
89
|
title: string;
|
|
@@ -63,6 +91,7 @@ export declare const coachSleepPlanTemplateSchema: z.ZodObject<{
|
|
|
63
91
|
type: "paragraph" | "bullet";
|
|
64
92
|
id: string;
|
|
65
93
|
text: string;
|
|
94
|
+
presentation?: "tip" | null | undefined;
|
|
66
95
|
}[];
|
|
67
96
|
}, {
|
|
68
97
|
id: string;
|
|
@@ -71,6 +100,7 @@ export declare const coachSleepPlanTemplateSchema: z.ZodObject<{
|
|
|
71
100
|
type: "paragraph" | "bullet";
|
|
72
101
|
id: string;
|
|
73
102
|
text: string;
|
|
103
|
+
presentation?: "tip" | null | undefined;
|
|
74
104
|
}[];
|
|
75
105
|
}>, "many">, {
|
|
76
106
|
id: string;
|
|
@@ -79,6 +109,7 @@ export declare const coachSleepPlanTemplateSchema: z.ZodObject<{
|
|
|
79
109
|
type: "paragraph" | "bullet";
|
|
80
110
|
id: string;
|
|
81
111
|
text: string;
|
|
112
|
+
presentation?: "tip" | null | undefined;
|
|
82
113
|
}[];
|
|
83
114
|
}[], {
|
|
84
115
|
id: string;
|
|
@@ -87,6 +118,7 @@ export declare const coachSleepPlanTemplateSchema: z.ZodObject<{
|
|
|
87
118
|
type: "paragraph" | "bullet";
|
|
88
119
|
id: string;
|
|
89
120
|
text: string;
|
|
121
|
+
presentation?: "tip" | null | undefined;
|
|
90
122
|
}[];
|
|
91
123
|
}[]>, {
|
|
92
124
|
id: string;
|
|
@@ -95,6 +127,7 @@ export declare const coachSleepPlanTemplateSchema: z.ZodObject<{
|
|
|
95
127
|
type: "paragraph" | "bullet";
|
|
96
128
|
id: string;
|
|
97
129
|
text: string;
|
|
130
|
+
presentation?: "tip" | null | undefined;
|
|
98
131
|
}[];
|
|
99
132
|
}[], {
|
|
100
133
|
id: string;
|
|
@@ -103,6 +136,7 @@ export declare const coachSleepPlanTemplateSchema: z.ZodObject<{
|
|
|
103
136
|
type: "paragraph" | "bullet";
|
|
104
137
|
id: string;
|
|
105
138
|
text: string;
|
|
139
|
+
presentation?: "tip" | null | undefined;
|
|
106
140
|
}[];
|
|
107
141
|
}[]>;
|
|
108
142
|
id: z.ZodString;
|
|
@@ -124,6 +158,7 @@ export declare const coachSleepPlanTemplateSchema: z.ZodObject<{
|
|
|
124
158
|
type: "paragraph" | "bullet";
|
|
125
159
|
id: string;
|
|
126
160
|
text: string;
|
|
161
|
+
presentation?: "tip" | null | undefined;
|
|
127
162
|
}[];
|
|
128
163
|
}[];
|
|
129
164
|
}, {
|
|
@@ -142,6 +177,7 @@ export declare const coachSleepPlanTemplateSchema: z.ZodObject<{
|
|
|
142
177
|
type: "paragraph" | "bullet";
|
|
143
178
|
id: string;
|
|
144
179
|
text: string;
|
|
180
|
+
presentation?: "tip" | null | undefined;
|
|
145
181
|
}[];
|
|
146
182
|
}[];
|
|
147
183
|
}>;
|
|
@@ -155,19 +191,32 @@ export declare const coachSleepPlanTemplateSummarySchema: z.ZodObject<Omit<{
|
|
|
155
191
|
id: z.ZodString;
|
|
156
192
|
title: z.ZodString;
|
|
157
193
|
} & {
|
|
158
|
-
blocks: z.ZodArray<z.ZodObject<{
|
|
194
|
+
blocks: z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
159
195
|
id: z.ZodString;
|
|
160
196
|
type: z.ZodEnum<["paragraph", "bullet"]>;
|
|
161
197
|
text: z.ZodString;
|
|
198
|
+
presentation: z.ZodOptional<z.ZodNullable<z.ZodLiteral<"tip">>>;
|
|
162
199
|
}, "strip", z.ZodTypeAny, {
|
|
163
200
|
type: "paragraph" | "bullet";
|
|
164
201
|
id: string;
|
|
165
202
|
text: string;
|
|
203
|
+
presentation?: "tip" | null | undefined;
|
|
166
204
|
}, {
|
|
167
205
|
type: "paragraph" | "bullet";
|
|
168
206
|
id: string;
|
|
169
207
|
text: string;
|
|
170
|
-
|
|
208
|
+
presentation?: "tip" | null | undefined;
|
|
209
|
+
}>, "many">, {
|
|
210
|
+
type: "paragraph" | "bullet";
|
|
211
|
+
id: string;
|
|
212
|
+
text: string;
|
|
213
|
+
presentation?: "tip" | null | undefined;
|
|
214
|
+
}[], {
|
|
215
|
+
type: "paragraph" | "bullet";
|
|
216
|
+
id: string;
|
|
217
|
+
text: string;
|
|
218
|
+
presentation?: "tip" | null | undefined;
|
|
219
|
+
}[]>;
|
|
171
220
|
}, "strict", z.ZodTypeAny, {
|
|
172
221
|
id: string;
|
|
173
222
|
title: string;
|
|
@@ -175,6 +224,7 @@ export declare const coachSleepPlanTemplateSummarySchema: z.ZodObject<Omit<{
|
|
|
175
224
|
type: "paragraph" | "bullet";
|
|
176
225
|
id: string;
|
|
177
226
|
text: string;
|
|
227
|
+
presentation?: "tip" | null | undefined;
|
|
178
228
|
}[];
|
|
179
229
|
}, {
|
|
180
230
|
id: string;
|
|
@@ -183,6 +233,7 @@ export declare const coachSleepPlanTemplateSummarySchema: z.ZodObject<Omit<{
|
|
|
183
233
|
type: "paragraph" | "bullet";
|
|
184
234
|
id: string;
|
|
185
235
|
text: string;
|
|
236
|
+
presentation?: "tip" | null | undefined;
|
|
186
237
|
}[];
|
|
187
238
|
}>, "many">, {
|
|
188
239
|
id: string;
|
|
@@ -191,6 +242,7 @@ export declare const coachSleepPlanTemplateSummarySchema: z.ZodObject<Omit<{
|
|
|
191
242
|
type: "paragraph" | "bullet";
|
|
192
243
|
id: string;
|
|
193
244
|
text: string;
|
|
245
|
+
presentation?: "tip" | null | undefined;
|
|
194
246
|
}[];
|
|
195
247
|
}[], {
|
|
196
248
|
id: string;
|
|
@@ -199,6 +251,7 @@ export declare const coachSleepPlanTemplateSummarySchema: z.ZodObject<Omit<{
|
|
|
199
251
|
type: "paragraph" | "bullet";
|
|
200
252
|
id: string;
|
|
201
253
|
text: string;
|
|
254
|
+
presentation?: "tip" | null | undefined;
|
|
202
255
|
}[];
|
|
203
256
|
}[]>, {
|
|
204
257
|
id: string;
|
|
@@ -207,6 +260,7 @@ export declare const coachSleepPlanTemplateSummarySchema: z.ZodObject<Omit<{
|
|
|
207
260
|
type: "paragraph" | "bullet";
|
|
208
261
|
id: string;
|
|
209
262
|
text: string;
|
|
263
|
+
presentation?: "tip" | null | undefined;
|
|
210
264
|
}[];
|
|
211
265
|
}[], {
|
|
212
266
|
id: string;
|
|
@@ -215,6 +269,7 @@ export declare const coachSleepPlanTemplateSummarySchema: z.ZodObject<Omit<{
|
|
|
215
269
|
type: "paragraph" | "bullet";
|
|
216
270
|
id: string;
|
|
217
271
|
text: string;
|
|
272
|
+
presentation?: "tip" | null | undefined;
|
|
218
273
|
}[];
|
|
219
274
|
}[]>;
|
|
220
275
|
id: z.ZodString;
|
|
@@ -254,19 +309,32 @@ export declare const coachSleepPlanTemplateListSchema: z.ZodObject<{
|
|
|
254
309
|
id: z.ZodString;
|
|
255
310
|
title: z.ZodString;
|
|
256
311
|
} & {
|
|
257
|
-
blocks: z.ZodArray<z.ZodObject<{
|
|
312
|
+
blocks: z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
258
313
|
id: z.ZodString;
|
|
259
314
|
type: z.ZodEnum<["paragraph", "bullet"]>;
|
|
260
315
|
text: z.ZodString;
|
|
316
|
+
presentation: z.ZodOptional<z.ZodNullable<z.ZodLiteral<"tip">>>;
|
|
261
317
|
}, "strip", z.ZodTypeAny, {
|
|
262
318
|
type: "paragraph" | "bullet";
|
|
263
319
|
id: string;
|
|
264
320
|
text: string;
|
|
321
|
+
presentation?: "tip" | null | undefined;
|
|
265
322
|
}, {
|
|
266
323
|
type: "paragraph" | "bullet";
|
|
267
324
|
id: string;
|
|
268
325
|
text: string;
|
|
269
|
-
|
|
326
|
+
presentation?: "tip" | null | undefined;
|
|
327
|
+
}>, "many">, {
|
|
328
|
+
type: "paragraph" | "bullet";
|
|
329
|
+
id: string;
|
|
330
|
+
text: string;
|
|
331
|
+
presentation?: "tip" | null | undefined;
|
|
332
|
+
}[], {
|
|
333
|
+
type: "paragraph" | "bullet";
|
|
334
|
+
id: string;
|
|
335
|
+
text: string;
|
|
336
|
+
presentation?: "tip" | null | undefined;
|
|
337
|
+
}[]>;
|
|
270
338
|
}, "strict", z.ZodTypeAny, {
|
|
271
339
|
id: string;
|
|
272
340
|
title: string;
|
|
@@ -274,6 +342,7 @@ export declare const coachSleepPlanTemplateListSchema: z.ZodObject<{
|
|
|
274
342
|
type: "paragraph" | "bullet";
|
|
275
343
|
id: string;
|
|
276
344
|
text: string;
|
|
345
|
+
presentation?: "tip" | null | undefined;
|
|
277
346
|
}[];
|
|
278
347
|
}, {
|
|
279
348
|
id: string;
|
|
@@ -282,6 +351,7 @@ export declare const coachSleepPlanTemplateListSchema: z.ZodObject<{
|
|
|
282
351
|
type: "paragraph" | "bullet";
|
|
283
352
|
id: string;
|
|
284
353
|
text: string;
|
|
354
|
+
presentation?: "tip" | null | undefined;
|
|
285
355
|
}[];
|
|
286
356
|
}>, "many">, {
|
|
287
357
|
id: string;
|
|
@@ -290,6 +360,7 @@ export declare const coachSleepPlanTemplateListSchema: z.ZodObject<{
|
|
|
290
360
|
type: "paragraph" | "bullet";
|
|
291
361
|
id: string;
|
|
292
362
|
text: string;
|
|
363
|
+
presentation?: "tip" | null | undefined;
|
|
293
364
|
}[];
|
|
294
365
|
}[], {
|
|
295
366
|
id: string;
|
|
@@ -298,6 +369,7 @@ export declare const coachSleepPlanTemplateListSchema: z.ZodObject<{
|
|
|
298
369
|
type: "paragraph" | "bullet";
|
|
299
370
|
id: string;
|
|
300
371
|
text: string;
|
|
372
|
+
presentation?: "tip" | null | undefined;
|
|
301
373
|
}[];
|
|
302
374
|
}[]>, {
|
|
303
375
|
id: string;
|
|
@@ -306,6 +378,7 @@ export declare const coachSleepPlanTemplateListSchema: z.ZodObject<{
|
|
|
306
378
|
type: "paragraph" | "bullet";
|
|
307
379
|
id: string;
|
|
308
380
|
text: string;
|
|
381
|
+
presentation?: "tip" | null | undefined;
|
|
309
382
|
}[];
|
|
310
383
|
}[], {
|
|
311
384
|
id: string;
|
|
@@ -314,6 +387,7 @@ export declare const coachSleepPlanTemplateListSchema: z.ZodObject<{
|
|
|
314
387
|
type: "paragraph" | "bullet";
|
|
315
388
|
id: string;
|
|
316
389
|
text: string;
|
|
390
|
+
presentation?: "tip" | null | undefined;
|
|
317
391
|
}[];
|
|
318
392
|
}[]>;
|
|
319
393
|
id: z.ZodString;
|
|
@@ -375,19 +449,32 @@ export declare const coachSleepPlanTemplateWriteSchema: z.ZodObject<{
|
|
|
375
449
|
id: z.ZodString;
|
|
376
450
|
title: z.ZodString;
|
|
377
451
|
} & {
|
|
378
|
-
blocks: z.ZodArray<z.ZodObject<{
|
|
452
|
+
blocks: z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
379
453
|
id: z.ZodString;
|
|
380
454
|
type: z.ZodEnum<["paragraph", "bullet"]>;
|
|
381
455
|
text: z.ZodString;
|
|
456
|
+
presentation: z.ZodOptional<z.ZodNullable<z.ZodLiteral<"tip">>>;
|
|
382
457
|
}, "strip", z.ZodTypeAny, {
|
|
383
458
|
type: "paragraph" | "bullet";
|
|
384
459
|
id: string;
|
|
385
460
|
text: string;
|
|
461
|
+
presentation?: "tip" | null | undefined;
|
|
386
462
|
}, {
|
|
387
463
|
type: "paragraph" | "bullet";
|
|
388
464
|
id: string;
|
|
389
465
|
text: string;
|
|
390
|
-
|
|
466
|
+
presentation?: "tip" | null | undefined;
|
|
467
|
+
}>, "many">, {
|
|
468
|
+
type: "paragraph" | "bullet";
|
|
469
|
+
id: string;
|
|
470
|
+
text: string;
|
|
471
|
+
presentation?: "tip" | null | undefined;
|
|
472
|
+
}[], {
|
|
473
|
+
type: "paragraph" | "bullet";
|
|
474
|
+
id: string;
|
|
475
|
+
text: string;
|
|
476
|
+
presentation?: "tip" | null | undefined;
|
|
477
|
+
}[]>;
|
|
391
478
|
}, "strict", z.ZodTypeAny, {
|
|
392
479
|
id: string;
|
|
393
480
|
title: string;
|
|
@@ -395,6 +482,7 @@ export declare const coachSleepPlanTemplateWriteSchema: z.ZodObject<{
|
|
|
395
482
|
type: "paragraph" | "bullet";
|
|
396
483
|
id: string;
|
|
397
484
|
text: string;
|
|
485
|
+
presentation?: "tip" | null | undefined;
|
|
398
486
|
}[];
|
|
399
487
|
}, {
|
|
400
488
|
id: string;
|
|
@@ -403,6 +491,7 @@ export declare const coachSleepPlanTemplateWriteSchema: z.ZodObject<{
|
|
|
403
491
|
type: "paragraph" | "bullet";
|
|
404
492
|
id: string;
|
|
405
493
|
text: string;
|
|
494
|
+
presentation?: "tip" | null | undefined;
|
|
406
495
|
}[];
|
|
407
496
|
}>, "many">, {
|
|
408
497
|
id: string;
|
|
@@ -411,6 +500,7 @@ export declare const coachSleepPlanTemplateWriteSchema: z.ZodObject<{
|
|
|
411
500
|
type: "paragraph" | "bullet";
|
|
412
501
|
id: string;
|
|
413
502
|
text: string;
|
|
503
|
+
presentation?: "tip" | null | undefined;
|
|
414
504
|
}[];
|
|
415
505
|
}[], {
|
|
416
506
|
id: string;
|
|
@@ -419,6 +509,7 @@ export declare const coachSleepPlanTemplateWriteSchema: z.ZodObject<{
|
|
|
419
509
|
type: "paragraph" | "bullet";
|
|
420
510
|
id: string;
|
|
421
511
|
text: string;
|
|
512
|
+
presentation?: "tip" | null | undefined;
|
|
422
513
|
}[];
|
|
423
514
|
}[]>, {
|
|
424
515
|
id: string;
|
|
@@ -427,6 +518,7 @@ export declare const coachSleepPlanTemplateWriteSchema: z.ZodObject<{
|
|
|
427
518
|
type: "paragraph" | "bullet";
|
|
428
519
|
id: string;
|
|
429
520
|
text: string;
|
|
521
|
+
presentation?: "tip" | null | undefined;
|
|
430
522
|
}[];
|
|
431
523
|
}[], {
|
|
432
524
|
id: string;
|
|
@@ -435,6 +527,7 @@ export declare const coachSleepPlanTemplateWriteSchema: z.ZodObject<{
|
|
|
435
527
|
type: "paragraph" | "bullet";
|
|
436
528
|
id: string;
|
|
437
529
|
text: string;
|
|
530
|
+
presentation?: "tip" | null | undefined;
|
|
438
531
|
}[];
|
|
439
532
|
}[]>;
|
|
440
533
|
id: z.ZodString;
|
|
@@ -450,6 +543,7 @@ export declare const coachSleepPlanTemplateWriteSchema: z.ZodObject<{
|
|
|
450
543
|
type: "paragraph" | "bullet";
|
|
451
544
|
id: string;
|
|
452
545
|
text: string;
|
|
546
|
+
presentation?: "tip" | null | undefined;
|
|
453
547
|
}[];
|
|
454
548
|
}[];
|
|
455
549
|
}, {
|
|
@@ -464,6 +558,7 @@ export declare const coachSleepPlanTemplateWriteSchema: z.ZodObject<{
|
|
|
464
558
|
type: "paragraph" | "bullet";
|
|
465
559
|
id: string;
|
|
466
560
|
text: string;
|
|
561
|
+
presentation?: "tip" | null | undefined;
|
|
467
562
|
}[];
|
|
468
563
|
}[];
|
|
469
564
|
}>;
|
|
@@ -3,8 +3,8 @@ import { idSchema, isoDateStringSchema } from "./api.js";
|
|
|
3
3
|
import { sleepPlanSectionSchema, textBlockSchema } from "./family-profile-artifacts.js";
|
|
4
4
|
// D311 local call: reusable guidance is text-only. Family images/PDFs stay in
|
|
5
5
|
// each independently edited child plan; no family asset is promoted to a library.
|
|
6
|
-
export const coachSleepPlanTemplateSectionSchema = sleepPlanSectionSchema.extend({
|
|
7
|
-
blocks: z.array(textBlockSchema).max(80)
|
|
6
|
+
export const coachSleepPlanTemplateSectionSchema = sleepPlanSectionSchema.omit({ changeSummary: true }).extend({
|
|
7
|
+
blocks: z.array(textBlockSchema).max(80).refine(blocks => blocks.every(block => !block.presentation || block.type === "paragraph"), "Only paragraphs can be coach tips.")
|
|
8
8
|
}).strict();
|
|
9
9
|
const sections = z.array(coachSleepPlanTemplateSectionSchema).min(1).max(30)
|
|
10
10
|
.refine(items => new Set(items.map(item => item.id)).size === items.length, "Use distinct section IDs.")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coach-sleep-plan-templates.js","sourceRoot":"","sources":["../src/coach-sleep-plan-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAExF,8EAA8E;AAC9E,kFAAkF;AAClF,MAAM,CAAC,MAAM,mCAAmC,GAAG,sBAAsB,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"coach-sleep-plan-templates.js","sourceRoot":"","sources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