@nikthegeek/dreamsforlittles-shared 0.14.0 → 0.15.1

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 (72) hide show
  1. package/dist/analysis.d.ts +152 -2
  2. package/dist/booking-enquiries.d.ts +418 -0
  3. package/dist/booking-enquiries.js +47 -0
  4. package/dist/booking-enquiries.js.map +1 -0
  5. package/dist/booking-enquiries.test.d.ts +1 -0
  6. package/dist/booking-enquiries.test.js +61 -0
  7. package/dist/booking-enquiries.test.js.map +1 -0
  8. package/dist/booking-family-email-content.d.ts +21 -0
  9. package/dist/booking-family-email-content.js +19 -0
  10. package/dist/booking-family-email-content.js.map +1 -0
  11. package/dist/booking-family-email-content.test.d.ts +1 -0
  12. package/dist/booking-family-email-content.test.js +31 -0
  13. package/dist/booking-family-email-content.test.js.map +1 -0
  14. package/dist/booking-forms.d.ts +6 -6
  15. package/dist/booking-system.d.ts +1526 -395
  16. package/dist/booking-system.js +204 -9
  17. package/dist/booking-system.js.map +1 -1
  18. package/dist/booking-system.test.js +157 -2
  19. package/dist/booking-system.test.js.map +1 -1
  20. package/dist/calendar-connections.d.ts +2 -2
  21. package/dist/client-notices.d.ts +27 -0
  22. package/dist/client-notices.js +4 -0
  23. package/dist/client-notices.js.map +1 -1
  24. package/dist/coach-activity-notifications.js +4 -1
  25. package/dist/coach-activity-notifications.js.map +1 -1
  26. package/dist/coach-activity-notifications.test.js +17 -0
  27. package/dist/coach-activity-notifications.test.js.map +1 -1
  28. package/dist/coach-family-chat.d.ts +17 -17
  29. package/dist/coach-family-chat.js +1 -1
  30. package/dist/coach-family-chat.js.map +1 -1
  31. package/dist/coach-promo-offers.d.ts +13 -0
  32. package/dist/coach-promo-offers.js +11 -0
  33. package/dist/coach-promo-offers.js.map +1 -0
  34. package/dist/coach.d.ts +2560 -144
  35. package/dist/coach.js +5 -0
  36. package/dist/coach.js.map +1 -1
  37. package/dist/enums.d.ts +1 -1
  38. package/dist/enums.js +1 -0
  39. package/dist/enums.js.map +1 -1
  40. package/dist/errors.js +4 -4
  41. package/dist/errors.js.map +1 -1
  42. package/dist/family-profile-artifacts.d.ts +28 -28
  43. package/dist/family.d.ts +3726 -79
  44. package/dist/family.js +148 -17
  45. package/dist/family.js.map +1 -1
  46. package/dist/family.test.js +70 -0
  47. package/dist/family.test.js.map +1 -1
  48. package/dist/index.d.ts +4 -0
  49. package/dist/index.js +4 -0
  50. package/dist/index.js.map +1 -1
  51. package/dist/lead-insights.d.ts +455 -0
  52. package/dist/lead-insights.js +50 -0
  53. package/dist/lead-insights.js.map +1 -0
  54. package/dist/lead-insights.test.d.ts +1 -0
  55. package/dist/lead-insights.test.js +28 -0
  56. package/dist/lead-insights.test.js.map +1 -0
  57. package/dist/lead-management.d.ts +1849 -216
  58. package/dist/lead-management.js +120 -8
  59. package/dist/lead-management.js.map +1 -1
  60. package/dist/lead-management.test.js +78 -1
  61. package/dist/lead-management.test.js.map +1 -1
  62. package/dist/product-analytics.d.ts +77 -77
  63. package/dist/product-analytics.js +5 -0
  64. package/dist/product-analytics.js.map +1 -1
  65. package/dist/questionnaire-imports.d.ts +31 -0
  66. package/dist/questionnaire-imports.js +11 -0
  67. package/dist/questionnaire-imports.js.map +1 -1
  68. package/dist/review-prompt.d.ts +3 -0
  69. package/dist/review-prompt.js +2 -1
  70. package/dist/review-prompt.js.map +1 -1
  71. package/dist/subscription-cancellation-feedback.d.ts +2 -2
  72. package/package.json +1 -1
@@ -170,7 +170,7 @@ export declare const analysisActivitiesResponseSchema: z.ZodObject<{
170
170
  ladderId?: string | null | undefined;
171
171
  ladderStageId?: string | null | undefined;
172
172
  }>]>;
173
- breastfeedSession: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodObject<{
173
+ breastfeedSession: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
174
174
  schemaVersion: z.ZodLiteral<1>;
175
175
  segments: z.ZodArray<z.ZodObject<{
176
176
  side: z.ZodEnum<["left", "right"]>;
@@ -213,7 +213,85 @@ export declare const analysisActivitiesResponseSchema: z.ZodObject<{
213
213
  end: string;
214
214
  side: "left" | "right";
215
215
  }[];
216
- }>>>;
216
+ }>, z.ZodEffects<z.ZodObject<{
217
+ schemaVersion: z.ZodLiteral<2>;
218
+ phases: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
219
+ kind: z.ZodLiteral<"feeding">;
220
+ side: z.ZodEnum<["left", "right"]>;
221
+ start: z.ZodString;
222
+ end: z.ZodString;
223
+ }, "strict", z.ZodTypeAny, {
224
+ kind: "feeding";
225
+ start: string;
226
+ end: string;
227
+ side: "left" | "right";
228
+ }, {
229
+ kind: "feeding";
230
+ start: string;
231
+ end: string;
232
+ side: "left" | "right";
233
+ }>, z.ZodObject<{
234
+ kind: z.ZodLiteral<"pause">;
235
+ start: z.ZodString;
236
+ end: z.ZodString;
237
+ }, "strict", z.ZodTypeAny, {
238
+ kind: "pause";
239
+ start: string;
240
+ end: string;
241
+ }, {
242
+ kind: "pause";
243
+ start: string;
244
+ end: string;
245
+ }>]>, "many">;
246
+ }, "strict", z.ZodTypeAny, {
247
+ schemaVersion: 2;
248
+ phases: ({
249
+ kind: "feeding";
250
+ start: string;
251
+ end: string;
252
+ side: "left" | "right";
253
+ } | {
254
+ kind: "pause";
255
+ start: string;
256
+ end: string;
257
+ })[];
258
+ }, {
259
+ schemaVersion: 2;
260
+ phases: ({
261
+ kind: "feeding";
262
+ start: string;
263
+ end: string;
264
+ side: "left" | "right";
265
+ } | {
266
+ kind: "pause";
267
+ start: string;
268
+ end: string;
269
+ })[];
270
+ }>, {
271
+ schemaVersion: 2;
272
+ phases: ({
273
+ kind: "feeding";
274
+ start: string;
275
+ end: string;
276
+ side: "left" | "right";
277
+ } | {
278
+ kind: "pause";
279
+ start: string;
280
+ end: string;
281
+ })[];
282
+ }, {
283
+ schemaVersion: 2;
284
+ phases: ({
285
+ kind: "feeding";
286
+ start: string;
287
+ end: string;
288
+ side: "left" | "right";
289
+ } | {
290
+ kind: "pause";
291
+ start: string;
292
+ end: string;
293
+ })[];
294
+ }>]>>>;
217
295
  allergenIds: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodEnum<["milk" | "egg" | "soya" | "peanut" | "almond" | "brazil_nut" | "cashew" | "hazelnut" | "macadamia" | "pecan" | "pistachio" | "walnut" | "wheat" | "barley" | "rye" | "oats" | "sesame" | "fish" | "crustacean" | "mollusc" | "celery" | "mustard" | "lupin" | "sulphites" | "other_food", ...("milk" | "egg" | "soya" | "peanut" | "almond" | "brazil_nut" | "cashew" | "hazelnut" | "macadamia" | "pecan" | "pistachio" | "walnut" | "wheat" | "barley" | "rye" | "oats" | "sesame" | "fish" | "crustacean" | "mollusc" | "celery" | "mustard" | "lupin" | "sulphites" | "other_food")[]]>, "many">, ("milk" | "egg" | "soya" | "peanut" | "almond" | "brazil_nut" | "cashew" | "hazelnut" | "macadamia" | "pecan" | "pistachio" | "walnut" | "wheat" | "barley" | "rye" | "oats" | "sesame" | "fish" | "crustacean" | "mollusc" | "celery" | "mustard" | "lupin" | "sulphites" | "other_food")[], ("milk" | "egg" | "soya" | "peanut" | "almond" | "brazil_nut" | "cashew" | "hazelnut" | "macadamia" | "pecan" | "pistachio" | "walnut" | "wheat" | "barley" | "rye" | "oats" | "sesame" | "fish" | "crustacean" | "mollusc" | "celery" | "mustard" | "lupin" | "sulphites" | "other_food")[]>, ("milk" | "egg" | "soya" | "peanut" | "almond" | "brazil_nut" | "cashew" | "hazelnut" | "macadamia" | "pecan" | "pistachio" | "walnut" | "wheat" | "barley" | "rye" | "oats" | "sesame" | "fish" | "crustacean" | "mollusc" | "celery" | "mustard" | "lupin" | "sulphites" | "other_food")[], ("milk" | "egg" | "soya" | "peanut" | "almond" | "brazil_nut" | "cashew" | "hazelnut" | "macadamia" | "pecan" | "pistachio" | "walnut" | "wheat" | "barley" | "rye" | "oats" | "sesame" | "fish" | "crustacean" | "mollusc" | "celery" | "mustard" | "lupin" | "sulphites" | "other_food")[]>>;
218
296
  occurredAt: z.ZodString;
219
297
  timeZone: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
@@ -287,6 +365,18 @@ export declare const analysisActivitiesResponseSchema: z.ZodObject<{
287
365
  end: string;
288
366
  side: "left" | "right";
289
367
  }[];
368
+ } | {
369
+ schemaVersion: 2;
370
+ phases: ({
371
+ kind: "feeding";
372
+ start: string;
373
+ end: string;
374
+ side: "left" | "right";
375
+ } | {
376
+ kind: "pause";
377
+ start: string;
378
+ end: string;
379
+ })[];
290
380
  } | null | undefined;
291
381
  allergenIds?: ("milk" | "egg" | "soya" | "peanut" | "almond" | "brazil_nut" | "cashew" | "hazelnut" | "macadamia" | "pecan" | "pistachio" | "walnut" | "wheat" | "barley" | "rye" | "oats" | "sesame" | "fish" | "crustacean" | "mollusc" | "celery" | "mustard" | "lupin" | "sulphites" | "other_food")[] | undefined;
292
382
  }, {
@@ -354,6 +444,18 @@ export declare const analysisActivitiesResponseSchema: z.ZodObject<{
354
444
  end: string;
355
445
  side: "left" | "right";
356
446
  }[];
447
+ } | {
448
+ schemaVersion: 2;
449
+ phases: ({
450
+ kind: "feeding";
451
+ start: string;
452
+ end: string;
453
+ side: "left" | "right";
454
+ } | {
455
+ kind: "pause";
456
+ start: string;
457
+ end: string;
458
+ })[];
357
459
  } | null | undefined;
358
460
  allergenIds?: ("milk" | "egg" | "soya" | "peanut" | "almond" | "brazil_nut" | "cashew" | "hazelnut" | "macadamia" | "pecan" | "pistachio" | "walnut" | "wheat" | "barley" | "rye" | "oats" | "sesame" | "fish" | "crustacean" | "mollusc" | "celery" | "mustard" | "lupin" | "sulphites" | "other_food")[] | undefined;
359
461
  }>, {
@@ -421,6 +523,18 @@ export declare const analysisActivitiesResponseSchema: z.ZodObject<{
421
523
  end: string;
422
524
  side: "left" | "right";
423
525
  }[];
526
+ } | {
527
+ schemaVersion: 2;
528
+ phases: ({
529
+ kind: "feeding";
530
+ start: string;
531
+ end: string;
532
+ side: "left" | "right";
533
+ } | {
534
+ kind: "pause";
535
+ start: string;
536
+ end: string;
537
+ })[];
424
538
  } | null | undefined;
425
539
  allergenIds?: ("milk" | "egg" | "soya" | "peanut" | "almond" | "brazil_nut" | "cashew" | "hazelnut" | "macadamia" | "pecan" | "pistachio" | "walnut" | "wheat" | "barley" | "rye" | "oats" | "sesame" | "fish" | "crustacean" | "mollusc" | "celery" | "mustard" | "lupin" | "sulphites" | "other_food")[] | undefined;
426
540
  }, {
@@ -488,6 +602,18 @@ export declare const analysisActivitiesResponseSchema: z.ZodObject<{
488
602
  end: string;
489
603
  side: "left" | "right";
490
604
  }[];
605
+ } | {
606
+ schemaVersion: 2;
607
+ phases: ({
608
+ kind: "feeding";
609
+ start: string;
610
+ end: string;
611
+ side: "left" | "right";
612
+ } | {
613
+ kind: "pause";
614
+ start: string;
615
+ end: string;
616
+ })[];
491
617
  } | null | undefined;
492
618
  allergenIds?: ("milk" | "egg" | "soya" | "peanut" | "almond" | "brazil_nut" | "cashew" | "hazelnut" | "macadamia" | "pecan" | "pistachio" | "walnut" | "wheat" | "barley" | "rye" | "oats" | "sesame" | "fish" | "crustacean" | "mollusc" | "celery" | "mustard" | "lupin" | "sulphites" | "other_food")[] | undefined;
493
619
  }>, "many">;
@@ -557,6 +683,18 @@ export declare const analysisActivitiesResponseSchema: z.ZodObject<{
557
683
  end: string;
558
684
  side: "left" | "right";
559
685
  }[];
686
+ } | {
687
+ schemaVersion: 2;
688
+ phases: ({
689
+ kind: "feeding";
690
+ start: string;
691
+ end: string;
692
+ side: "left" | "right";
693
+ } | {
694
+ kind: "pause";
695
+ start: string;
696
+ end: string;
697
+ })[];
560
698
  } | null | undefined;
561
699
  allergenIds?: ("milk" | "egg" | "soya" | "peanut" | "almond" | "brazil_nut" | "cashew" | "hazelnut" | "macadamia" | "pecan" | "pistachio" | "walnut" | "wheat" | "barley" | "rye" | "oats" | "sesame" | "fish" | "crustacean" | "mollusc" | "celery" | "mustard" | "lupin" | "sulphites" | "other_food")[] | undefined;
562
700
  }[];
@@ -626,6 +764,18 @@ export declare const analysisActivitiesResponseSchema: z.ZodObject<{
626
764
  end: string;
627
765
  side: "left" | "right";
628
766
  }[];
767
+ } | {
768
+ schemaVersion: 2;
769
+ phases: ({
770
+ kind: "feeding";
771
+ start: string;
772
+ end: string;
773
+ side: "left" | "right";
774
+ } | {
775
+ kind: "pause";
776
+ start: string;
777
+ end: string;
778
+ })[];
629
779
  } | null | undefined;
630
780
  allergenIds?: ("milk" | "egg" | "soya" | "peanut" | "almond" | "brazil_nut" | "cashew" | "hazelnut" | "macadamia" | "pecan" | "pistachio" | "walnut" | "wheat" | "barley" | "rye" | "oats" | "sesame" | "fish" | "crustacean" | "mollusc" | "celery" | "mustard" | "lupin" | "sulphites" | "other_food")[] | undefined;
631
781
  }[];
@@ -0,0 +1,418 @@
1
+ import { z } from "zod";
2
+ export declare const enquiryTargetSchema: z.ZodObject<{
3
+ organizationId: z.ZodString;
4
+ coachUserId: z.ZodString;
5
+ }, "strict", z.ZodTypeAny, {
6
+ organizationId: string;
7
+ coachUserId: string;
8
+ }, {
9
+ organizationId: string;
10
+ coachUserId: string;
11
+ }>;
12
+ export declare const enquiryWriteSchema: z.ZodObject<{
13
+ organizationId: z.ZodString;
14
+ coachUserId: z.ZodString;
15
+ } & {
16
+ enabled: z.ZodBoolean;
17
+ introduction: z.ZodString;
18
+ questions: z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodObject<{
19
+ id: z.ZodString;
20
+ type: z.ZodEnum<["shortText", "longText", "singleChoice", "multipleChoice", "yesNo"]>;
21
+ label: z.ZodString;
22
+ helpText: z.ZodNullable<z.ZodString>;
23
+ required: z.ZodBoolean;
24
+ enabled: z.ZodBoolean;
25
+ choices: z.ZodArray<z.ZodObject<{
26
+ id: z.ZodString;
27
+ label: z.ZodString;
28
+ }, "strict", z.ZodTypeAny, {
29
+ id: string;
30
+ label: string;
31
+ }, {
32
+ id: string;
33
+ label: string;
34
+ }>, "many">;
35
+ }, "strict", z.ZodTypeAny, {
36
+ type: "shortText" | "longText" | "singleChoice" | "multipleChoice" | "yesNo";
37
+ id: string;
38
+ enabled: boolean;
39
+ label: string;
40
+ helpText: string | null;
41
+ required: boolean;
42
+ choices: {
43
+ id: string;
44
+ label: string;
45
+ }[];
46
+ }, {
47
+ type: "shortText" | "longText" | "singleChoice" | "multipleChoice" | "yesNo";
48
+ id: string;
49
+ enabled: boolean;
50
+ label: string;
51
+ helpText: string | null;
52
+ required: boolean;
53
+ choices: {
54
+ id: string;
55
+ label: string;
56
+ }[];
57
+ }>, {
58
+ type: "shortText" | "longText" | "singleChoice" | "multipleChoice" | "yesNo";
59
+ id: string;
60
+ enabled: boolean;
61
+ label: string;
62
+ helpText: string | null;
63
+ required: boolean;
64
+ choices: {
65
+ id: string;
66
+ label: string;
67
+ }[];
68
+ }, {
69
+ type: "shortText" | "longText" | "singleChoice" | "multipleChoice" | "yesNo";
70
+ id: string;
71
+ enabled: boolean;
72
+ label: string;
73
+ helpText: string | null;
74
+ required: boolean;
75
+ choices: {
76
+ id: string;
77
+ label: string;
78
+ }[];
79
+ }>, "many">, {
80
+ type: "shortText" | "longText" | "singleChoice" | "multipleChoice" | "yesNo";
81
+ id: string;
82
+ enabled: boolean;
83
+ label: string;
84
+ helpText: string | null;
85
+ required: boolean;
86
+ choices: {
87
+ id: string;
88
+ label: string;
89
+ }[];
90
+ }[], {
91
+ type: "shortText" | "longText" | "singleChoice" | "multipleChoice" | "yesNo";
92
+ id: string;
93
+ enabled: boolean;
94
+ label: string;
95
+ helpText: string | null;
96
+ required: boolean;
97
+ choices: {
98
+ id: string;
99
+ label: string;
100
+ }[];
101
+ }[]>, {
102
+ type: "shortText" | "longText" | "singleChoice" | "multipleChoice" | "yesNo";
103
+ id: string;
104
+ enabled: boolean;
105
+ label: string;
106
+ helpText: string | null;
107
+ required: boolean;
108
+ choices: {
109
+ id: string;
110
+ label: string;
111
+ }[];
112
+ }[], {
113
+ type: "shortText" | "longText" | "singleChoice" | "multipleChoice" | "yesNo";
114
+ id: string;
115
+ enabled: boolean;
116
+ label: string;
117
+ helpText: string | null;
118
+ required: boolean;
119
+ choices: {
120
+ id: string;
121
+ label: string;
122
+ }[];
123
+ }[]>;
124
+ expectedRevision: z.ZodString;
125
+ }, "strict", z.ZodTypeAny, {
126
+ enabled: boolean;
127
+ organizationId: string;
128
+ coachUserId: string;
129
+ introduction: string;
130
+ questions: {
131
+ type: "shortText" | "longText" | "singleChoice" | "multipleChoice" | "yesNo";
132
+ id: string;
133
+ enabled: boolean;
134
+ label: string;
135
+ helpText: string | null;
136
+ required: boolean;
137
+ choices: {
138
+ id: string;
139
+ label: string;
140
+ }[];
141
+ }[];
142
+ expectedRevision: string;
143
+ }, {
144
+ enabled: boolean;
145
+ organizationId: string;
146
+ coachUserId: string;
147
+ introduction: string;
148
+ questions: {
149
+ type: "shortText" | "longText" | "singleChoice" | "multipleChoice" | "yesNo";
150
+ id: string;
151
+ enabled: boolean;
152
+ label: string;
153
+ helpText: string | null;
154
+ required: boolean;
155
+ choices: {
156
+ id: string;
157
+ label: string;
158
+ }[];
159
+ }[];
160
+ expectedRevision: string;
161
+ }>;
162
+ export declare const publicEnquirySubmitSchema: z.ZodObject<{
163
+ firstName: z.ZodString;
164
+ surname: z.ZodString;
165
+ caregiverEmail: z.ZodEffects<z.ZodString, string, string>;
166
+ caregiverPhone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
167
+ childFirstName: z.ZodString;
168
+ childAgeText: z.ZodString;
169
+ challenge: z.ZodString;
170
+ privacyAccepted: z.ZodLiteral<true>;
171
+ privacyNoticeVersion: z.ZodString;
172
+ privacyNoticeUrl: z.ZodString;
173
+ revision: z.ZodString;
174
+ familyReportedSourceRevision: z.ZodString;
175
+ familyReportedSourceOptionId: z.ZodString;
176
+ familyReportedSourceDetail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
177
+ bookingForm: z.ZodOptional<z.ZodObject<{
178
+ revision: z.ZodString;
179
+ answers: z.ZodEffects<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
180
+ questionId: z.ZodString;
181
+ } & {
182
+ type: z.ZodLiteral<"shortText">;
183
+ value: z.ZodString;
184
+ }, "strict", z.ZodTypeAny, {
185
+ value: string;
186
+ type: "shortText";
187
+ questionId: string;
188
+ }, {
189
+ value: string;
190
+ type: "shortText";
191
+ questionId: string;
192
+ }>, z.ZodObject<{
193
+ questionId: z.ZodString;
194
+ } & {
195
+ type: z.ZodLiteral<"longText">;
196
+ value: z.ZodString;
197
+ }, "strict", z.ZodTypeAny, {
198
+ value: string;
199
+ type: "longText";
200
+ questionId: string;
201
+ }, {
202
+ value: string;
203
+ type: "longText";
204
+ questionId: string;
205
+ }>, z.ZodObject<{
206
+ questionId: z.ZodString;
207
+ } & {
208
+ type: z.ZodLiteral<"singleChoice">;
209
+ value: z.ZodString;
210
+ }, "strict", z.ZodTypeAny, {
211
+ value: string;
212
+ type: "singleChoice";
213
+ questionId: string;
214
+ }, {
215
+ value: string;
216
+ type: "singleChoice";
217
+ questionId: string;
218
+ }>, z.ZodObject<{
219
+ questionId: z.ZodString;
220
+ } & {
221
+ type: z.ZodLiteral<"multipleChoice">;
222
+ value: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
223
+ }, "strict", z.ZodTypeAny, {
224
+ value: string[];
225
+ type: "multipleChoice";
226
+ questionId: string;
227
+ }, {
228
+ value: string[];
229
+ type: "multipleChoice";
230
+ questionId: string;
231
+ }>, z.ZodObject<{
232
+ questionId: z.ZodString;
233
+ } & {
234
+ type: z.ZodLiteral<"yesNo">;
235
+ value: z.ZodBoolean;
236
+ }, "strict", z.ZodTypeAny, {
237
+ value: boolean;
238
+ type: "yesNo";
239
+ questionId: string;
240
+ }, {
241
+ value: boolean;
242
+ type: "yesNo";
243
+ questionId: string;
244
+ }>]>, "many">, ({
245
+ value: string;
246
+ type: "shortText";
247
+ questionId: string;
248
+ } | {
249
+ value: string;
250
+ type: "longText";
251
+ questionId: string;
252
+ } | {
253
+ value: string;
254
+ type: "singleChoice";
255
+ questionId: string;
256
+ } | {
257
+ value: string[];
258
+ type: "multipleChoice";
259
+ questionId: string;
260
+ } | {
261
+ value: boolean;
262
+ type: "yesNo";
263
+ questionId: string;
264
+ })[], ({
265
+ value: string;
266
+ type: "shortText";
267
+ questionId: string;
268
+ } | {
269
+ value: string;
270
+ type: "longText";
271
+ questionId: string;
272
+ } | {
273
+ value: string;
274
+ type: "singleChoice";
275
+ questionId: string;
276
+ } | {
277
+ value: string[];
278
+ type: "multipleChoice";
279
+ questionId: string;
280
+ } | {
281
+ value: boolean;
282
+ type: "yesNo";
283
+ questionId: string;
284
+ })[]>;
285
+ }, "strict", z.ZodTypeAny, {
286
+ revision: string;
287
+ answers: ({
288
+ value: string;
289
+ type: "shortText";
290
+ questionId: string;
291
+ } | {
292
+ value: string;
293
+ type: "longText";
294
+ questionId: string;
295
+ } | {
296
+ value: string;
297
+ type: "singleChoice";
298
+ questionId: string;
299
+ } | {
300
+ value: string[];
301
+ type: "multipleChoice";
302
+ questionId: string;
303
+ } | {
304
+ value: boolean;
305
+ type: "yesNo";
306
+ questionId: string;
307
+ })[];
308
+ }, {
309
+ revision: string;
310
+ answers: ({
311
+ value: string;
312
+ type: "shortText";
313
+ questionId: string;
314
+ } | {
315
+ value: string;
316
+ type: "longText";
317
+ questionId: string;
318
+ } | {
319
+ value: string;
320
+ type: "singleChoice";
321
+ questionId: string;
322
+ } | {
323
+ value: string[];
324
+ type: "multipleChoice";
325
+ questionId: string;
326
+ } | {
327
+ value: boolean;
328
+ type: "yesNo";
329
+ questionId: string;
330
+ })[];
331
+ }>>;
332
+ idempotencyKey: z.ZodString;
333
+ challengeToken: z.ZodString;
334
+ }, "strict", z.ZodTypeAny, {
335
+ firstName: string;
336
+ surname: string;
337
+ caregiverEmail: string;
338
+ childFirstName: string;
339
+ childAgeText: string;
340
+ challenge: string;
341
+ privacyAccepted: true;
342
+ privacyNoticeVersion: string;
343
+ privacyNoticeUrl: string;
344
+ revision: string;
345
+ familyReportedSourceRevision: string;
346
+ familyReportedSourceOptionId: string;
347
+ idempotencyKey: string;
348
+ challengeToken: string;
349
+ caregiverPhone?: string | null | undefined;
350
+ familyReportedSourceDetail?: string | null | undefined;
351
+ bookingForm?: {
352
+ revision: string;
353
+ answers: ({
354
+ value: string;
355
+ type: "shortText";
356
+ questionId: string;
357
+ } | {
358
+ value: string;
359
+ type: "longText";
360
+ questionId: string;
361
+ } | {
362
+ value: string;
363
+ type: "singleChoice";
364
+ questionId: string;
365
+ } | {
366
+ value: string[];
367
+ type: "multipleChoice";
368
+ questionId: string;
369
+ } | {
370
+ value: boolean;
371
+ type: "yesNo";
372
+ questionId: string;
373
+ })[];
374
+ } | undefined;
375
+ }, {
376
+ firstName: string;
377
+ surname: string;
378
+ caregiverEmail: string;
379
+ childFirstName: string;
380
+ childAgeText: string;
381
+ challenge: string;
382
+ privacyAccepted: true;
383
+ privacyNoticeVersion: string;
384
+ privacyNoticeUrl: string;
385
+ revision: string;
386
+ familyReportedSourceRevision: string;
387
+ familyReportedSourceOptionId: string;
388
+ idempotencyKey: string;
389
+ challengeToken: string;
390
+ caregiverPhone?: string | null | undefined;
391
+ familyReportedSourceDetail?: string | null | undefined;
392
+ bookingForm?: {
393
+ revision: string;
394
+ answers: ({
395
+ value: string;
396
+ type: "shortText";
397
+ questionId: string;
398
+ } | {
399
+ value: string;
400
+ type: "longText";
401
+ questionId: string;
402
+ } | {
403
+ value: string;
404
+ type: "singleChoice";
405
+ questionId: string;
406
+ } | {
407
+ value: string[];
408
+ type: "multipleChoice";
409
+ questionId: string;
410
+ } | {
411
+ value: boolean;
412
+ type: "yesNo";
413
+ questionId: string;
414
+ })[];
415
+ } | undefined;
416
+ }>;
417
+ export type EnquiryWrite = z.infer<typeof enquiryWriteSchema>;
418
+ export type PublicEnquirySubmit = z.infer<typeof publicEnquirySubmitSchema>;
@@ -0,0 +1,47 @@
1
+ import { z } from "zod";
2
+ import { idSchema } from "./api.js";
3
+ import { bookingFormQuestionsWriteSchema, bookingFormSubmissionSchema, } from "./booking-forms.js";
4
+ const revision = z.string().regex(/^form-[a-f0-9]{32}$/);
5
+ export const enquiryTargetSchema = z
6
+ .object({ organizationId: idSchema, coachUserId: idSchema })
7
+ .strict();
8
+ export const enquiryWriteSchema = enquiryTargetSchema
9
+ .extend({
10
+ enabled: z.boolean(),
11
+ introduction: z.string().trim().max(1000),
12
+ questions: bookingFormQuestionsWriteSchema,
13
+ expectedRevision: revision,
14
+ })
15
+ .strict();
16
+ export const publicEnquirySubmitSchema = z
17
+ .object({
18
+ firstName: z.string().trim().min(1).max(59),
19
+ surname: z.string().trim().min(1).max(60),
20
+ caregiverEmail: z
21
+ .string()
22
+ .trim()
23
+ .email()
24
+ .max(254)
25
+ .transform((value) => value.toLowerCase()),
26
+ caregiverPhone: z.string().trim().max(40).nullable().optional(),
27
+ childFirstName: z.string().trim().min(1).max(80),
28
+ childAgeText: z.string().trim().min(1).max(80),
29
+ challenge: z.string().trim().min(1).max(2000),
30
+ privacyAccepted: z.literal(true),
31
+ privacyNoticeVersion: z.string().min(1).max(100),
32
+ privacyNoticeUrl: z.string().url().max(2000),
33
+ revision,
34
+ familyReportedSourceRevision: z.string().min(1).max(100),
35
+ familyReportedSourceOptionId: z.string().min(1).max(100),
36
+ familyReportedSourceDetail: z
37
+ .string()
38
+ .trim()
39
+ .max(120)
40
+ .nullable()
41
+ .optional(),
42
+ bookingForm: bookingFormSubmissionSchema.optional(),
43
+ idempotencyKey: z.string().uuid(),
44
+ challengeToken: z.string().min(1).max(2048),
45
+ })
46
+ .strict();
47
+ //# sourceMappingURL=booking-enquiries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"booking-enquiries.js","sourceRoot":"","sources":["../src/booking-enquiries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,O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