@nikthegeek/dreamsforlittles-shared 0.1.0 → 0.1.2
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/access.d.ts +2450 -30
- package/dist/access.js +63 -4
- package/dist/access.js.map +1 -1
- package/dist/admin.d.ts +12635 -1041
- package/dist/admin.js +554 -4
- package/dist/admin.js.map +1 -1
- package/dist/allergy-ladders.d.ts +563 -80
- package/dist/allergy-ladders.js +40 -0
- package/dist/allergy-ladders.js.map +1 -1
- package/dist/analysis.d.ts +68 -46
- package/dist/analysis.js +10 -2
- package/dist/analysis.js.map +1 -1
- package/dist/api.d.ts +12 -5
- package/dist/api.js +12 -0
- package/dist/api.js.map +1 -1
- package/dist/app-feedback.d.ts +322 -0
- package/dist/app-feedback.js +58 -0
- package/dist/app-feedback.js.map +1 -0
- package/dist/auth.d.ts +684 -0
- package/dist/auth.js +45 -4
- package/dist/auth.js.map +1 -1
- package/dist/billing.d.ts +47 -2
- package/dist/billing.js +56 -29
- package/dist/billing.js.map +1 -1
- package/dist/client-notices.d.ts +6114 -0
- package/dist/client-notices.js +455 -0
- package/dist/client-notices.js.map +1 -0
- package/dist/coach.d.ts +20178 -206
- package/dist/coach.js +329 -18
- package/dist/coach.js.map +1 -1
- package/dist/communication-preferences.d.ts +61 -0
- package/dist/communication-preferences.js +30 -0
- package/dist/communication-preferences.js.map +1 -0
- package/dist/enums.d.ts +6 -2
- package/dist/enums.js +27 -1
- package/dist/enums.js.map +1 -1
- package/dist/errors.d.ts +9 -4
- package/dist/errors.js +9 -2
- package/dist/errors.js.map +1 -1
- package/dist/family-invitations.d.ts +2289 -0
- package/dist/family-invitations.js +77 -0
- package/dist/family-invitations.js.map +1 -0
- package/dist/family-profile-artifacts.d.ts +4433 -0
- package/dist/family-profile-artifacts.js +192 -0
- package/dist/family-profile-artifacts.js.map +1 -0
- package/dist/family.d.ts +7902 -294
- package/dist/family.js +170 -5
- package/dist/family.js.map +1 -1
- package/dist/files.d.ts +17 -14
- package/dist/files.js +5 -1
- package/dist/files.js.map +1 -1
- package/dist/getting-started-guides.d.ts +117 -0
- package/dist/getting-started-guides.js +25 -0
- package/dist/getting-started-guides.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/invites.d.ts +252 -0
- package/dist/invites.js +2 -0
- package/dist/invites.js.map +1 -1
- package/dist/mobile-web-releases.d.ts +389 -0
- package/dist/mobile-web-releases.js +71 -0
- package/dist/mobile-web-releases.js.map +1 -0
- package/dist/notification-banners.d.ts +694 -0
- package/dist/notification-banners.js +132 -0
- package/dist/notification-banners.js.map +1 -0
- package/dist/product-analytics.d.ts +5984 -0
- package/dist/product-analytics.js +791 -0
- package/dist/product-analytics.js.map +1 -0
- package/dist/push-devices.d.ts +175 -0
- package/dist/push-devices.js +56 -0
- package/dist/push-devices.js.map +1 -0
- package/dist/realtime.d.ts +604 -0
- package/dist/realtime.js +152 -0
- package/dist/realtime.js.map +1 -0
- package/dist/review-prompt.d.ts +192 -0
- package/dist/review-prompt.js +72 -0
- package/dist/review-prompt.js.map +1 -0
- package/dist/support-faqs.d.ts +103 -0
- package/dist/support-faqs.js +24 -0
- package/dist/support-faqs.js.map +1 -0
- package/dist/support-tickets.d.ts +605 -0
- package/dist/support-tickets.js +100 -0
- package/dist/support-tickets.js.map +1 -0
- package/package.json +6 -1
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const APP_FEEDBACK_CATEGORIES: readonly [{
|
|
3
|
+
readonly key: "general";
|
|
4
|
+
readonly label: "General";
|
|
5
|
+
}, {
|
|
6
|
+
readonly key: "bug";
|
|
7
|
+
readonly label: "Bug";
|
|
8
|
+
}, {
|
|
9
|
+
readonly key: "feature";
|
|
10
|
+
readonly label: "Feature";
|
|
11
|
+
}, {
|
|
12
|
+
readonly key: "content";
|
|
13
|
+
readonly label: "Content";
|
|
14
|
+
}];
|
|
15
|
+
export declare const DEFAULT_APP_FEEDBACK_CATEGORY = "general";
|
|
16
|
+
export declare const MIN_APP_FEEDBACK_MESSAGE_LENGTH = 5;
|
|
17
|
+
export declare const MAX_APP_FEEDBACK_MESSAGE_LENGTH = 2000;
|
|
18
|
+
export declare const appFeedbackCategorySchema: z.ZodEnum<["general", "bug", "feature", "content"]>;
|
|
19
|
+
export declare const appFeedbackStatusSchema: z.ZodEnum<["new", "inReview", "resolved", "archived"]>;
|
|
20
|
+
export declare const appFeedbackSourceRoleSchema: z.ZodEnum<["family", "coach"]>;
|
|
21
|
+
export declare const normalizeAppFeedbackMessage: (message: string) => string;
|
|
22
|
+
export declare const appFeedbackCreateRequestSchema: z.ZodObject<{
|
|
23
|
+
category: z.ZodEnum<["general", "bug", "feature", "content"]>;
|
|
24
|
+
message: z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodString>;
|
|
25
|
+
contactAllowed: z.ZodBoolean;
|
|
26
|
+
devicePlatform: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
27
|
+
appVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
28
|
+
}, "strict", z.ZodTypeAny, {
|
|
29
|
+
message: string;
|
|
30
|
+
category: "content" | "general" | "bug" | "feature";
|
|
31
|
+
contactAllowed: boolean;
|
|
32
|
+
devicePlatform?: string | null | undefined;
|
|
33
|
+
appVersion?: string | null | undefined;
|
|
34
|
+
}, {
|
|
35
|
+
message: string;
|
|
36
|
+
category: "content" | "general" | "bug" | "feature";
|
|
37
|
+
contactAllowed: boolean;
|
|
38
|
+
devicePlatform?: string | null | undefined;
|
|
39
|
+
appVersion?: string | null | undefined;
|
|
40
|
+
}>;
|
|
41
|
+
export declare const appFeedbackSchema: z.ZodObject<{
|
|
42
|
+
id: z.ZodString;
|
|
43
|
+
category: z.ZodEnum<["general", "bug", "feature", "content"]>;
|
|
44
|
+
message: z.ZodString;
|
|
45
|
+
contactAllowed: z.ZodBoolean;
|
|
46
|
+
status: z.ZodEnum<["new", "inReview", "resolved", "archived"]>;
|
|
47
|
+
sourceRole: z.ZodEnum<["family", "coach"]>;
|
|
48
|
+
userId: z.ZodString;
|
|
49
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
50
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
51
|
+
selectedBabyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
52
|
+
devicePlatform: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
53
|
+
appVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
54
|
+
createdAt: z.ZodString;
|
|
55
|
+
updatedAt: z.ZodString;
|
|
56
|
+
reviewedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
57
|
+
resolvedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
58
|
+
archivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
59
|
+
adminNotes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
60
|
+
updatedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
61
|
+
}, "strip", z.ZodTypeAny, {
|
|
62
|
+
message: string;
|
|
63
|
+
status: "archived" | "new" | "inReview" | "resolved";
|
|
64
|
+
id: string;
|
|
65
|
+
createdAt: string;
|
|
66
|
+
updatedAt: string;
|
|
67
|
+
category: "content" | "general" | "bug" | "feature";
|
|
68
|
+
contactAllowed: boolean;
|
|
69
|
+
sourceRole: "family" | "coach";
|
|
70
|
+
userId: string;
|
|
71
|
+
email?: string | null | undefined;
|
|
72
|
+
name?: string | null | undefined;
|
|
73
|
+
devicePlatform?: string | null | undefined;
|
|
74
|
+
appVersion?: string | null | undefined;
|
|
75
|
+
selectedBabyId?: string | null | undefined;
|
|
76
|
+
reviewedAt?: string | null | undefined;
|
|
77
|
+
resolvedAt?: string | null | undefined;
|
|
78
|
+
archivedAt?: string | null | undefined;
|
|
79
|
+
adminNotes?: string | null | undefined;
|
|
80
|
+
updatedBy?: string | null | undefined;
|
|
81
|
+
}, {
|
|
82
|
+
message: string;
|
|
83
|
+
status: "archived" | "new" | "inReview" | "resolved";
|
|
84
|
+
id: string;
|
|
85
|
+
createdAt: string;
|
|
86
|
+
updatedAt: string;
|
|
87
|
+
category: "content" | "general" | "bug" | "feature";
|
|
88
|
+
contactAllowed: boolean;
|
|
89
|
+
sourceRole: "family" | "coach";
|
|
90
|
+
userId: string;
|
|
91
|
+
email?: string | null | undefined;
|
|
92
|
+
name?: string | null | undefined;
|
|
93
|
+
devicePlatform?: string | null | undefined;
|
|
94
|
+
appVersion?: string | null | undefined;
|
|
95
|
+
selectedBabyId?: string | null | undefined;
|
|
96
|
+
reviewedAt?: string | null | undefined;
|
|
97
|
+
resolvedAt?: string | null | undefined;
|
|
98
|
+
archivedAt?: string | null | undefined;
|
|
99
|
+
adminNotes?: string | null | undefined;
|
|
100
|
+
updatedBy?: string | null | undefined;
|
|
101
|
+
}>;
|
|
102
|
+
export declare const appFeedbackResponseSchema: z.ZodObject<{
|
|
103
|
+
feedback: z.ZodObject<{
|
|
104
|
+
id: z.ZodString;
|
|
105
|
+
category: z.ZodEnum<["general", "bug", "feature", "content"]>;
|
|
106
|
+
message: z.ZodString;
|
|
107
|
+
contactAllowed: z.ZodBoolean;
|
|
108
|
+
status: z.ZodEnum<["new", "inReview", "resolved", "archived"]>;
|
|
109
|
+
sourceRole: z.ZodEnum<["family", "coach"]>;
|
|
110
|
+
userId: z.ZodString;
|
|
111
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
112
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
113
|
+
selectedBabyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
114
|
+
devicePlatform: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
115
|
+
appVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
116
|
+
createdAt: z.ZodString;
|
|
117
|
+
updatedAt: z.ZodString;
|
|
118
|
+
reviewedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
119
|
+
resolvedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
120
|
+
archivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
121
|
+
adminNotes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
122
|
+
updatedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
123
|
+
}, "strip", z.ZodTypeAny, {
|
|
124
|
+
message: string;
|
|
125
|
+
status: "archived" | "new" | "inReview" | "resolved";
|
|
126
|
+
id: string;
|
|
127
|
+
createdAt: string;
|
|
128
|
+
updatedAt: string;
|
|
129
|
+
category: "content" | "general" | "bug" | "feature";
|
|
130
|
+
contactAllowed: boolean;
|
|
131
|
+
sourceRole: "family" | "coach";
|
|
132
|
+
userId: string;
|
|
133
|
+
email?: string | null | undefined;
|
|
134
|
+
name?: string | null | undefined;
|
|
135
|
+
devicePlatform?: string | null | undefined;
|
|
136
|
+
appVersion?: string | null | undefined;
|
|
137
|
+
selectedBabyId?: string | null | undefined;
|
|
138
|
+
reviewedAt?: string | null | undefined;
|
|
139
|
+
resolvedAt?: string | null | undefined;
|
|
140
|
+
archivedAt?: string | null | undefined;
|
|
141
|
+
adminNotes?: string | null | undefined;
|
|
142
|
+
updatedBy?: string | null | undefined;
|
|
143
|
+
}, {
|
|
144
|
+
message: string;
|
|
145
|
+
status: "archived" | "new" | "inReview" | "resolved";
|
|
146
|
+
id: string;
|
|
147
|
+
createdAt: string;
|
|
148
|
+
updatedAt: string;
|
|
149
|
+
category: "content" | "general" | "bug" | "feature";
|
|
150
|
+
contactAllowed: boolean;
|
|
151
|
+
sourceRole: "family" | "coach";
|
|
152
|
+
userId: string;
|
|
153
|
+
email?: string | null | undefined;
|
|
154
|
+
name?: string | null | undefined;
|
|
155
|
+
devicePlatform?: string | null | undefined;
|
|
156
|
+
appVersion?: string | null | undefined;
|
|
157
|
+
selectedBabyId?: string | null | undefined;
|
|
158
|
+
reviewedAt?: string | null | undefined;
|
|
159
|
+
resolvedAt?: string | null | undefined;
|
|
160
|
+
archivedAt?: string | null | undefined;
|
|
161
|
+
adminNotes?: string | null | undefined;
|
|
162
|
+
updatedBy?: string | null | undefined;
|
|
163
|
+
}>;
|
|
164
|
+
}, "strip", z.ZodTypeAny, {
|
|
165
|
+
feedback: {
|
|
166
|
+
message: string;
|
|
167
|
+
status: "archived" | "new" | "inReview" | "resolved";
|
|
168
|
+
id: string;
|
|
169
|
+
createdAt: string;
|
|
170
|
+
updatedAt: string;
|
|
171
|
+
category: "content" | "general" | "bug" | "feature";
|
|
172
|
+
contactAllowed: boolean;
|
|
173
|
+
sourceRole: "family" | "coach";
|
|
174
|
+
userId: string;
|
|
175
|
+
email?: string | null | undefined;
|
|
176
|
+
name?: string | null | undefined;
|
|
177
|
+
devicePlatform?: string | null | undefined;
|
|
178
|
+
appVersion?: string | null | undefined;
|
|
179
|
+
selectedBabyId?: string | null | undefined;
|
|
180
|
+
reviewedAt?: string | null | undefined;
|
|
181
|
+
resolvedAt?: string | null | undefined;
|
|
182
|
+
archivedAt?: string | null | undefined;
|
|
183
|
+
adminNotes?: string | null | undefined;
|
|
184
|
+
updatedBy?: string | null | undefined;
|
|
185
|
+
};
|
|
186
|
+
}, {
|
|
187
|
+
feedback: {
|
|
188
|
+
message: string;
|
|
189
|
+
status: "archived" | "new" | "inReview" | "resolved";
|
|
190
|
+
id: string;
|
|
191
|
+
createdAt: string;
|
|
192
|
+
updatedAt: string;
|
|
193
|
+
category: "content" | "general" | "bug" | "feature";
|
|
194
|
+
contactAllowed: boolean;
|
|
195
|
+
sourceRole: "family" | "coach";
|
|
196
|
+
userId: string;
|
|
197
|
+
email?: string | null | undefined;
|
|
198
|
+
name?: string | null | undefined;
|
|
199
|
+
devicePlatform?: string | null | undefined;
|
|
200
|
+
appVersion?: string | null | undefined;
|
|
201
|
+
selectedBabyId?: string | null | undefined;
|
|
202
|
+
reviewedAt?: string | null | undefined;
|
|
203
|
+
resolvedAt?: string | null | undefined;
|
|
204
|
+
archivedAt?: string | null | undefined;
|
|
205
|
+
adminNotes?: string | null | undefined;
|
|
206
|
+
updatedBy?: string | null | undefined;
|
|
207
|
+
};
|
|
208
|
+
}>;
|
|
209
|
+
export declare const adminAppFeedbackResponseSchema: z.ZodObject<{
|
|
210
|
+
feedback: z.ZodArray<z.ZodObject<{
|
|
211
|
+
id: z.ZodString;
|
|
212
|
+
category: z.ZodEnum<["general", "bug", "feature", "content"]>;
|
|
213
|
+
message: z.ZodString;
|
|
214
|
+
contactAllowed: z.ZodBoolean;
|
|
215
|
+
status: z.ZodEnum<["new", "inReview", "resolved", "archived"]>;
|
|
216
|
+
sourceRole: z.ZodEnum<["family", "coach"]>;
|
|
217
|
+
userId: z.ZodString;
|
|
218
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
219
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
220
|
+
selectedBabyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
221
|
+
devicePlatform: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
222
|
+
appVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
223
|
+
createdAt: z.ZodString;
|
|
224
|
+
updatedAt: z.ZodString;
|
|
225
|
+
reviewedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
226
|
+
resolvedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
227
|
+
archivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
228
|
+
adminNotes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
229
|
+
updatedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
230
|
+
}, "strip", z.ZodTypeAny, {
|
|
231
|
+
message: string;
|
|
232
|
+
status: "archived" | "new" | "inReview" | "resolved";
|
|
233
|
+
id: string;
|
|
234
|
+
createdAt: string;
|
|
235
|
+
updatedAt: string;
|
|
236
|
+
category: "content" | "general" | "bug" | "feature";
|
|
237
|
+
contactAllowed: boolean;
|
|
238
|
+
sourceRole: "family" | "coach";
|
|
239
|
+
userId: string;
|
|
240
|
+
email?: string | null | undefined;
|
|
241
|
+
name?: string | null | undefined;
|
|
242
|
+
devicePlatform?: string | null | undefined;
|
|
243
|
+
appVersion?: string | null | undefined;
|
|
244
|
+
selectedBabyId?: string | null | undefined;
|
|
245
|
+
reviewedAt?: string | null | undefined;
|
|
246
|
+
resolvedAt?: string | null | undefined;
|
|
247
|
+
archivedAt?: string | null | undefined;
|
|
248
|
+
adminNotes?: string | null | undefined;
|
|
249
|
+
updatedBy?: string | null | undefined;
|
|
250
|
+
}, {
|
|
251
|
+
message: string;
|
|
252
|
+
status: "archived" | "new" | "inReview" | "resolved";
|
|
253
|
+
id: string;
|
|
254
|
+
createdAt: string;
|
|
255
|
+
updatedAt: string;
|
|
256
|
+
category: "content" | "general" | "bug" | "feature";
|
|
257
|
+
contactAllowed: boolean;
|
|
258
|
+
sourceRole: "family" | "coach";
|
|
259
|
+
userId: string;
|
|
260
|
+
email?: string | null | undefined;
|
|
261
|
+
name?: string | null | undefined;
|
|
262
|
+
devicePlatform?: string | null | undefined;
|
|
263
|
+
appVersion?: string | null | undefined;
|
|
264
|
+
selectedBabyId?: string | null | undefined;
|
|
265
|
+
reviewedAt?: string | null | undefined;
|
|
266
|
+
resolvedAt?: string | null | undefined;
|
|
267
|
+
archivedAt?: string | null | undefined;
|
|
268
|
+
adminNotes?: string | null | undefined;
|
|
269
|
+
updatedBy?: string | null | undefined;
|
|
270
|
+
}>, "many">;
|
|
271
|
+
}, "strip", z.ZodTypeAny, {
|
|
272
|
+
feedback: {
|
|
273
|
+
message: string;
|
|
274
|
+
status: "archived" | "new" | "inReview" | "resolved";
|
|
275
|
+
id: string;
|
|
276
|
+
createdAt: string;
|
|
277
|
+
updatedAt: string;
|
|
278
|
+
category: "content" | "general" | "bug" | "feature";
|
|
279
|
+
contactAllowed: boolean;
|
|
280
|
+
sourceRole: "family" | "coach";
|
|
281
|
+
userId: string;
|
|
282
|
+
email?: string | null | undefined;
|
|
283
|
+
name?: string | null | undefined;
|
|
284
|
+
devicePlatform?: string | null | undefined;
|
|
285
|
+
appVersion?: string | null | undefined;
|
|
286
|
+
selectedBabyId?: string | null | undefined;
|
|
287
|
+
reviewedAt?: string | null | undefined;
|
|
288
|
+
resolvedAt?: string | null | undefined;
|
|
289
|
+
archivedAt?: string | null | undefined;
|
|
290
|
+
adminNotes?: string | null | undefined;
|
|
291
|
+
updatedBy?: string | null | undefined;
|
|
292
|
+
}[];
|
|
293
|
+
}, {
|
|
294
|
+
feedback: {
|
|
295
|
+
message: string;
|
|
296
|
+
status: "archived" | "new" | "inReview" | "resolved";
|
|
297
|
+
id: string;
|
|
298
|
+
createdAt: string;
|
|
299
|
+
updatedAt: string;
|
|
300
|
+
category: "content" | "general" | "bug" | "feature";
|
|
301
|
+
contactAllowed: boolean;
|
|
302
|
+
sourceRole: "family" | "coach";
|
|
303
|
+
userId: string;
|
|
304
|
+
email?: string | null | undefined;
|
|
305
|
+
name?: string | null | undefined;
|
|
306
|
+
devicePlatform?: string | null | undefined;
|
|
307
|
+
appVersion?: string | null | undefined;
|
|
308
|
+
selectedBabyId?: string | null | undefined;
|
|
309
|
+
reviewedAt?: string | null | undefined;
|
|
310
|
+
resolvedAt?: string | null | undefined;
|
|
311
|
+
archivedAt?: string | null | undefined;
|
|
312
|
+
adminNotes?: string | null | undefined;
|
|
313
|
+
updatedBy?: string | null | undefined;
|
|
314
|
+
}[];
|
|
315
|
+
}>;
|
|
316
|
+
export type AppFeedbackCategory = z.infer<typeof appFeedbackCategorySchema>;
|
|
317
|
+
export type AppFeedbackStatus = z.infer<typeof appFeedbackStatusSchema>;
|
|
318
|
+
export type AppFeedbackSourceRole = z.infer<typeof appFeedbackSourceRoleSchema>;
|
|
319
|
+
export type AppFeedbackCreateRequest = z.infer<typeof appFeedbackCreateRequestSchema>;
|
|
320
|
+
export type AppFeedback = z.infer<typeof appFeedbackSchema>;
|
|
321
|
+
export type AppFeedbackResponse = z.infer<typeof appFeedbackResponseSchema>;
|
|
322
|
+
export type AdminAppFeedbackResponse = z.infer<typeof adminAppFeedbackResponseSchema>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { idSchema, isoDateStringSchema, nullableIsoDateStringSchema } from "./api.js";
|
|
3
|
+
export const APP_FEEDBACK_CATEGORIES = [
|
|
4
|
+
{ key: "general", label: "General" },
|
|
5
|
+
{ key: "bug", label: "Bug" },
|
|
6
|
+
{ key: "feature", label: "Feature" },
|
|
7
|
+
{ key: "content", label: "Content" }
|
|
8
|
+
];
|
|
9
|
+
export const DEFAULT_APP_FEEDBACK_CATEGORY = "general";
|
|
10
|
+
export const MIN_APP_FEEDBACK_MESSAGE_LENGTH = 5;
|
|
11
|
+
export const MAX_APP_FEEDBACK_MESSAGE_LENGTH = 2000;
|
|
12
|
+
export const appFeedbackCategorySchema = z.enum(["general", "bug", "feature", "content"]);
|
|
13
|
+
export const appFeedbackStatusSchema = z.enum(["new", "inReview", "resolved", "archived"]);
|
|
14
|
+
export const appFeedbackSourceRoleSchema = z.enum(["family", "coach"]);
|
|
15
|
+
export const normalizeAppFeedbackMessage = (message) => message.trim();
|
|
16
|
+
export const appFeedbackCreateRequestSchema = z
|
|
17
|
+
.object({
|
|
18
|
+
category: appFeedbackCategorySchema,
|
|
19
|
+
message: z
|
|
20
|
+
.string()
|
|
21
|
+
.transform(normalizeAppFeedbackMessage)
|
|
22
|
+
.pipe(z
|
|
23
|
+
.string()
|
|
24
|
+
.min(MIN_APP_FEEDBACK_MESSAGE_LENGTH)
|
|
25
|
+
.max(MAX_APP_FEEDBACK_MESSAGE_LENGTH)),
|
|
26
|
+
contactAllowed: z.boolean(),
|
|
27
|
+
devicePlatform: z.string().min(1).nullable().optional(),
|
|
28
|
+
appVersion: z.string().min(1).nullable().optional()
|
|
29
|
+
})
|
|
30
|
+
.strict();
|
|
31
|
+
export const appFeedbackSchema = z.object({
|
|
32
|
+
id: idSchema,
|
|
33
|
+
category: appFeedbackCategorySchema,
|
|
34
|
+
message: z.string().min(1),
|
|
35
|
+
contactAllowed: z.boolean(),
|
|
36
|
+
status: appFeedbackStatusSchema,
|
|
37
|
+
sourceRole: appFeedbackSourceRoleSchema,
|
|
38
|
+
userId: idSchema,
|
|
39
|
+
email: z.string().email().nullable().optional(),
|
|
40
|
+
name: z.string().nullable().optional(),
|
|
41
|
+
selectedBabyId: idSchema.nullable().optional(),
|
|
42
|
+
devicePlatform: z.string().nullable().optional(),
|
|
43
|
+
appVersion: z.string().nullable().optional(),
|
|
44
|
+
createdAt: isoDateStringSchema,
|
|
45
|
+
updatedAt: isoDateStringSchema,
|
|
46
|
+
reviewedAt: nullableIsoDateStringSchema.optional(),
|
|
47
|
+
resolvedAt: nullableIsoDateStringSchema.optional(),
|
|
48
|
+
archivedAt: nullableIsoDateStringSchema.optional(),
|
|
49
|
+
adminNotes: z.string().nullable().optional(),
|
|
50
|
+
updatedBy: idSchema.nullable().optional()
|
|
51
|
+
});
|
|
52
|
+
export const appFeedbackResponseSchema = z.object({
|
|
53
|
+
feedback: appFeedbackSchema
|
|
54
|
+
});
|
|
55
|
+
export const adminAppFeedbackResponseSchema = z.object({
|
|
56
|
+
feedback: z.array(appFeedbackSchema)
|
|
57
|
+
});
|
|
58
|
+
//# sourceMappingURL=app-feedback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-feedback.js","sourceRoot":"","sources":["../src/app-feedback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAEtF,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK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