@nikthegeek/dreamsforlittles-shared 0.18.12 → 0.18.14

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/index.d.ts CHANGED
@@ -99,3 +99,5 @@ export * from "./sleep-nap.js";
99
99
  export * from "./admin-income.js";
100
100
  export * from "./income-imports.js";
101
101
  export * from "./owner-growth.js";
102
+ export * from "./owner-families.js";
103
+ export * from "./owner-coaches.js";
package/dist/index.js CHANGED
@@ -99,4 +99,6 @@ export * from "./sleep-nap.js";
99
99
  export * from "./admin-income.js";
100
100
  export * from "./income-imports.js";
101
101
  export * from "./owner-growth.js";
102
+ export * from "./owner-families.js";
103
+ export * from "./owner-coaches.js";
102
104
  //# 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,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AACl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.ZodTypeAny, {}, {}>;
3
+ export declare const ownerCoachProfileQuerySchema: z.ZodObject<{
4
+ organizationId: z.ZodString;
5
+ }, "strict", z.ZodTypeAny, {
6
+ organizationId: string;
7
+ }, {
8
+ organizationId: string;
9
+ }>;
10
+ export declare const ownerCoachParamsSchema: z.ZodObject<{
11
+ id: z.ZodString;
12
+ }, "strict", z.ZodTypeAny, {
13
+ id: string;
14
+ }, {
15
+ id: string;
16
+ }>;
17
+ export declare const ownerCoachDirectoryItemSchema: z.ZodObject<{
18
+ coachId: z.ZodString;
19
+ organizationId: z.ZodString;
20
+ countryCode: z.ZodNullable<z.ZodString>;
21
+ linkedNow: z.ZodNumber;
22
+ familiesTotal: z.ZodNumber;
23
+ paidPlan: z.ZodBoolean;
24
+ trial: z.ZodBoolean;
25
+ }, "strict", z.ZodTypeAny, {
26
+ organizationId: string;
27
+ countryCode: string | null;
28
+ coachId: string;
29
+ linkedNow: number;
30
+ familiesTotal: number;
31
+ paidPlan: boolean;
32
+ trial: boolean;
33
+ }, {
34
+ organizationId: string;
35
+ countryCode: string | null;
36
+ coachId: string;
37
+ linkedNow: number;
38
+ familiesTotal: number;
39
+ paidPlan: boolean;
40
+ trial: boolean;
41
+ }>;
42
+ export declare const ownerCoachDirectorySchema: z.ZodObject<{
43
+ generatedAt: z.ZodString;
44
+ coaches: z.ZodArray<z.ZodObject<{
45
+ coachId: z.ZodString;
46
+ organizationId: z.ZodString;
47
+ countryCode: z.ZodNullable<z.ZodString>;
48
+ linkedNow: z.ZodNumber;
49
+ familiesTotal: z.ZodNumber;
50
+ paidPlan: z.ZodBoolean;
51
+ trial: z.ZodBoolean;
52
+ }, "strict", z.ZodTypeAny, {
53
+ organizationId: string;
54
+ countryCode: string | null;
55
+ coachId: string;
56
+ linkedNow: number;
57
+ familiesTotal: number;
58
+ paidPlan: boolean;
59
+ trial: boolean;
60
+ }, {
61
+ organizationId: string;
62
+ countryCode: string | null;
63
+ coachId: string;
64
+ linkedNow: number;
65
+ familiesTotal: number;
66
+ paidPlan: boolean;
67
+ trial: boolean;
68
+ }>, "many">;
69
+ countryCoverage: z.ZodLiteral<"recordedBusinessCountry">;
70
+ }, "strict", z.ZodTypeAny, {
71
+ coaches: {
72
+ organizationId: string;
73
+ countryCode: string | null;
74
+ coachId: string;
75
+ linkedNow: number;
76
+ familiesTotal: number;
77
+ paidPlan: boolean;
78
+ trial: boolean;
79
+ }[];
80
+ generatedAt: string;
81
+ countryCoverage: "recordedBusinessCountry";
82
+ }, {
83
+ coaches: {
84
+ organizationId: string;
85
+ countryCode: string | null;
86
+ coachId: string;
87
+ linkedNow: number;
88
+ familiesTotal: number;
89
+ paidPlan: boolean;
90
+ trial: boolean;
91
+ }[];
92
+ generatedAt: string;
93
+ countryCoverage: "recordedBusinessCountry";
94
+ }>;
95
+ export declare const ownerCoachFamilySchema: z.ZodObject<{
96
+ familyId: z.ZodString;
97
+ name: z.ZodString;
98
+ assignmentStatus: z.ZodString;
99
+ supportStatus: z.ZodString;
100
+ assignedAt: z.ZodString;
101
+ startsAt: z.ZodNullable<z.ZodString>;
102
+ endsAt: z.ZodNullable<z.ZodString>;
103
+ timeZone: z.ZodNullable<z.ZodString>;
104
+ lastLogAt: z.ZodNullable<z.ZodString>;
105
+ children: z.ZodArray<z.ZodObject<{
106
+ id: z.ZodString;
107
+ name: z.ZodString;
108
+ birthday: z.ZodString;
109
+ }, "strict", z.ZodTypeAny, {
110
+ id: string;
111
+ name: string;
112
+ birthday: string;
113
+ }, {
114
+ id: string;
115
+ name: string;
116
+ birthday: string;
117
+ }>, "many">;
118
+ }, "strict", z.ZodTypeAny, {
119
+ name: string;
120
+ timeZone: string | null;
121
+ startsAt: string | null;
122
+ endsAt: string | null;
123
+ children: {
124
+ id: string;
125
+ name: string;
126
+ birthday: string;
127
+ }[];
128
+ familyId: string;
129
+ assignedAt: string;
130
+ supportStatus: string;
131
+ assignmentStatus: string;
132
+ lastLogAt: string | null;
133
+ }, {
134
+ name: string;
135
+ timeZone: string | null;
136
+ startsAt: string | null;
137
+ endsAt: string | null;
138
+ children: {
139
+ id: string;
140
+ name: string;
141
+ birthday: string;
142
+ }[];
143
+ familyId: string;
144
+ assignedAt: string;
145
+ supportStatus: string;
146
+ assignmentStatus: string;
147
+ lastLogAt: string | null;
148
+ }>;
149
+ export declare const ownerCoachProfileSchema: z.ZodObject<{
150
+ generatedAt: z.ZodString;
151
+ coachId: z.ZodString;
152
+ organizationId: z.ZodString;
153
+ countryCode: z.ZodNullable<z.ZodString>;
154
+ team: z.ZodArray<z.ZodObject<{
155
+ id: z.ZodString;
156
+ name: z.ZodString;
157
+ }, "strict", z.ZodTypeAny, {
158
+ id: string;
159
+ name: string;
160
+ }, {
161
+ id: string;
162
+ name: string;
163
+ }>, "many">;
164
+ families: z.ZodArray<z.ZodObject<{
165
+ familyId: z.ZodString;
166
+ name: z.ZodString;
167
+ assignmentStatus: z.ZodString;
168
+ supportStatus: z.ZodString;
169
+ assignedAt: z.ZodString;
170
+ startsAt: z.ZodNullable<z.ZodString>;
171
+ endsAt: z.ZodNullable<z.ZodString>;
172
+ timeZone: z.ZodNullable<z.ZodString>;
173
+ lastLogAt: z.ZodNullable<z.ZodString>;
174
+ children: z.ZodArray<z.ZodObject<{
175
+ id: z.ZodString;
176
+ name: z.ZodString;
177
+ birthday: z.ZodString;
178
+ }, "strict", z.ZodTypeAny, {
179
+ id: string;
180
+ name: string;
181
+ birthday: string;
182
+ }, {
183
+ id: string;
184
+ name: string;
185
+ birthday: string;
186
+ }>, "many">;
187
+ }, "strict", z.ZodTypeAny, {
188
+ name: string;
189
+ timeZone: string | null;
190
+ startsAt: string | null;
191
+ endsAt: string | null;
192
+ children: {
193
+ id: string;
194
+ name: string;
195
+ birthday: string;
196
+ }[];
197
+ familyId: string;
198
+ assignedAt: string;
199
+ supportStatus: string;
200
+ assignmentStatus: string;
201
+ lastLogAt: string | null;
202
+ }, {
203
+ name: string;
204
+ timeZone: string | null;
205
+ startsAt: string | null;
206
+ endsAt: string | null;
207
+ children: {
208
+ id: string;
209
+ name: string;
210
+ birthday: string;
211
+ }[];
212
+ familyId: string;
213
+ assignedAt: string;
214
+ supportStatus: string;
215
+ assignmentStatus: string;
216
+ lastLogAt: string | null;
217
+ }>, "many">;
218
+ familiesTotal: z.ZodNumber;
219
+ currentSupport: z.ZodNumber;
220
+ newFamiliesThisMonth: z.ZodNumber;
221
+ previousMonthFamilies: z.ZodNumber;
222
+ monthSince: z.ZodString;
223
+ invitations: z.ZodArray<z.ZodObject<{
224
+ id: z.ZodString;
225
+ email: z.ZodNullable<z.ZodString>;
226
+ method: z.ZodString;
227
+ createdAt: z.ZodString;
228
+ expiresAt: z.ZodNullable<z.ZodString>;
229
+ }, "strict", z.ZodTypeAny, {
230
+ id: string;
231
+ email: string | null;
232
+ createdAt: string;
233
+ expiresAt: string | null;
234
+ method: string;
235
+ }, {
236
+ id: string;
237
+ email: string | null;
238
+ createdAt: string;
239
+ expiresAt: string | null;
240
+ method: string;
241
+ }>, "many">;
242
+ usage: z.ZodObject<{
243
+ questionnairesAssigned: z.ZodNumber;
244
+ publishedPlans: z.ZodNumber;
245
+ callsBooked: z.ZodNumber;
246
+ messagesThisMonth: z.ZodNumber;
247
+ }, "strict", z.ZodTypeAny, {
248
+ questionnairesAssigned: number;
249
+ publishedPlans: number;
250
+ callsBooked: number;
251
+ messagesThisMonth: number;
252
+ }, {
253
+ questionnairesAssigned: number;
254
+ publishedPlans: number;
255
+ callsBooked: number;
256
+ messagesThisMonth: number;
257
+ }>;
258
+ messagingFamilies: z.ZodNumber;
259
+ familyCountryCoverage: z.ZodLiteral<"notCollected">;
260
+ ownerNotesCoverage: z.ZodLiteral<"notCollected">;
261
+ }, "strict", z.ZodTypeAny, {
262
+ organizationId: string;
263
+ families: {
264
+ name: string;
265
+ timeZone: string | null;
266
+ startsAt: string | null;
267
+ endsAt: string | null;
268
+ children: {
269
+ id: string;
270
+ name: string;
271
+ birthday: string;
272
+ }[];
273
+ familyId: string;
274
+ assignedAt: string;
275
+ supportStatus: string;
276
+ assignmentStatus: string;
277
+ lastLogAt: string | null;
278
+ }[];
279
+ generatedAt: string;
280
+ invitations: {
281
+ id: string;
282
+ email: string | null;
283
+ createdAt: string;
284
+ expiresAt: string | null;
285
+ method: string;
286
+ }[];
287
+ countryCode: string | null;
288
+ coachId: string;
289
+ familiesTotal: number;
290
+ team: {
291
+ id: string;
292
+ name: string;
293
+ }[];
294
+ currentSupport: number;
295
+ newFamiliesThisMonth: number;
296
+ previousMonthFamilies: number;
297
+ monthSince: string;
298
+ usage: {
299
+ questionnairesAssigned: number;
300
+ publishedPlans: number;
301
+ callsBooked: number;
302
+ messagesThisMonth: number;
303
+ };
304
+ messagingFamilies: number;
305
+ familyCountryCoverage: "notCollected";
306
+ ownerNotesCoverage: "notCollected";
307
+ }, {
308
+ organizationId: string;
309
+ families: {
310
+ name: string;
311
+ timeZone: string | null;
312
+ startsAt: string | null;
313
+ endsAt: string | null;
314
+ children: {
315
+ id: string;
316
+ name: string;
317
+ birthday: string;
318
+ }[];
319
+ familyId: string;
320
+ assignedAt: string;
321
+ supportStatus: string;
322
+ assignmentStatus: string;
323
+ lastLogAt: string | null;
324
+ }[];
325
+ generatedAt: string;
326
+ invitations: {
327
+ id: string;
328
+ email: string | null;
329
+ createdAt: string;
330
+ expiresAt: string | null;
331
+ method: string;
332
+ }[];
333
+ countryCode: string | null;
334
+ coachId: string;
335
+ familiesTotal: number;
336
+ team: {
337
+ id: string;
338
+ name: string;
339
+ }[];
340
+ currentSupport: number;
341
+ newFamiliesThisMonth: number;
342
+ previousMonthFamilies: number;
343
+ monthSince: string;
344
+ usage: {
345
+ questionnairesAssigned: number;
346
+ publishedPlans: number;
347
+ callsBooked: number;
348
+ messagesThisMonth: number;
349
+ };
350
+ messagingFamilies: number;
351
+ familyCountryCoverage: "notCollected";
352
+ ownerNotesCoverage: "notCollected";
353
+ }>;
354
+ export type OwnerCoachDirectory = z.infer<typeof ownerCoachDirectorySchema>;
355
+ export type OwnerCoachProfile = z.infer<typeof ownerCoachProfileSchema>;
@@ -0,0 +1,30 @@
1
+ import { z } from "zod";
2
+ import { idSchema, isoDateStringSchema } from "./api.js";
3
+ const count = z.number().int().nonnegative().safe();
4
+ const country = z.string().regex(/^[A-Z]{2}$/).nullable();
5
+ export const ownerCoachDirectoryQuerySchema = z.object({}).strict();
6
+ export const ownerCoachProfileQuerySchema = z.object({ organizationId: idSchema.max(200) }).strict();
7
+ export const ownerCoachParamsSchema = z.object({ id: idSchema.max(200) }).strict();
8
+ export const ownerCoachDirectoryItemSchema = z.object({
9
+ coachId: idSchema, organizationId: idSchema, countryCode: country,
10
+ linkedNow: count, familiesTotal: count, paidPlan: z.boolean(), trial: z.boolean()
11
+ }).strict();
12
+ export const ownerCoachDirectorySchema = z.object({ generatedAt: isoDateStringSchema,
13
+ coaches: z.array(ownerCoachDirectoryItemSchema), countryCoverage: z.literal("recordedBusinessCountry") }).strict();
14
+ export const ownerCoachFamilySchema = z.object({
15
+ familyId: idSchema, name: z.string(), assignmentStatus: z.string(), supportStatus: z.string(),
16
+ assignedAt: isoDateStringSchema, startsAt: isoDateStringSchema.nullable(), endsAt: isoDateStringSchema.nullable(),
17
+ timeZone: z.string().nullable(), lastLogAt: isoDateStringSchema.nullable(),
18
+ children: z.array(z.object({ id: idSchema, name: z.string(), birthday: z.string().regex(/^\d{4}-\d{2}-\d{2}$/) }).strict())
19
+ }).strict();
20
+ export const ownerCoachProfileSchema = z.object({
21
+ generatedAt: isoDateStringSchema, coachId: idSchema, organizationId: idSchema, countryCode: country,
22
+ team: z.array(z.object({ id: idSchema, name: z.string() }).strict()),
23
+ families: z.array(ownerCoachFamilySchema), familiesTotal: count, currentSupport: count,
24
+ newFamiliesThisMonth: count, previousMonthFamilies: count, monthSince: isoDateStringSchema,
25
+ invitations: z.array(z.object({ id: idSchema, email: z.string().nullable(), method: z.string(),
26
+ createdAt: isoDateStringSchema, expiresAt: isoDateStringSchema.nullable() }).strict()),
27
+ usage: z.object({ questionnairesAssigned: count, publishedPlans: count, callsBooked: count, messagesThisMonth: count }).strict(),
28
+ messagingFamilies: count, familyCountryCoverage: z.literal("notCollected"), ownerNotesCoverage: z.literal("notCollected")
29
+ }).strict();
30
+ //# sourceMappingURL=owner-coaches.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"owner-coaches.js","sourceRoot":"","sources":["../src/owner-coaches.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACzD,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;AACpD,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE,CAAC;AAC1D,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AACpE,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,cAAc,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AACrG,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AACnF,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO;IACjE,SAAS,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,KAAK,EAA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K,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;IACpE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK;IACtF,oBAAoB,EAAE,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAE,UAAU,EAAE,mBAAmB;IAC1F,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;QAC5F,SAAS,EAAE,mBAAmB,EAAE,SAAS,EAAE,mBAAmB,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;IACxF,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,sBAAsB,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IAChI,iBAAiB,EAAE,KAAK,EAAE,qBAAqB,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;CAC1H,CAAC,CAAC,MAAM,EAAE,CAAC"}
@@ -0,0 +1,574 @@
1
+ import { z } from "zod";
2
+ export declare const ownerFamilyProfileQuerySchema: z.ZodObject<{
3
+ paymentPage: z.ZodDefault<z.ZodNumber>;
4
+ supportPage: z.ZodDefault<z.ZodNumber>;
5
+ }, "strict", z.ZodTypeAny, {
6
+ paymentPage: number;
7
+ supportPage: number;
8
+ }, {
9
+ paymentPage?: number | undefined;
10
+ supportPage?: number | undefined;
11
+ }>;
12
+ export declare const ownerFamilyDirectoryQuerySchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
13
+ export declare const ownerFamilyParamsSchema: z.ZodObject<{
14
+ id: z.ZodString;
15
+ }, "strict", z.ZodTypeAny, {
16
+ id: string;
17
+ }, {
18
+ id: string;
19
+ }>;
20
+ export declare const ownerFamilyChildSchema: z.ZodObject<{
21
+ id: z.ZodString;
22
+ name: z.ZodString;
23
+ birthday: z.ZodString;
24
+ }, "strict", z.ZodTypeAny, {
25
+ id: string;
26
+ name: string;
27
+ birthday: string;
28
+ }, {
29
+ id: string;
30
+ name: string;
31
+ birthday: string;
32
+ }>;
33
+ export declare const ownerFamilyMetadataSchema: z.ZodObject<{
34
+ familyId: z.ZodString;
35
+ children: z.ZodArray<z.ZodObject<{
36
+ id: z.ZodString;
37
+ name: z.ZodString;
38
+ birthday: z.ZodString;
39
+ }, "strict", z.ZodTypeAny, {
40
+ id: string;
41
+ name: string;
42
+ birthday: string;
43
+ }, {
44
+ id: string;
45
+ name: string;
46
+ birthday: string;
47
+ }>, "many">;
48
+ countryCode: z.ZodNullable<z.ZodString>;
49
+ region: z.ZodNullable<z.ZodString>;
50
+ familyCode: z.ZodNullable<z.ZodString>;
51
+ }, "strict", z.ZodTypeAny, {
52
+ children: {
53
+ id: string;
54
+ name: string;
55
+ birthday: string;
56
+ }[];
57
+ familyId: string;
58
+ region: string | null;
59
+ countryCode: string | null;
60
+ familyCode: string | null;
61
+ }, {
62
+ children: {
63
+ id: string;
64
+ name: string;
65
+ birthday: string;
66
+ }[];
67
+ familyId: string;
68
+ region: string | null;
69
+ countryCode: string | null;
70
+ familyCode: string | null;
71
+ }>;
72
+ export declare const ownerFamilyDirectorySchema: z.ZodObject<{
73
+ generatedAt: z.ZodString;
74
+ families: z.ZodArray<z.ZodObject<{
75
+ familyId: z.ZodString;
76
+ children: z.ZodArray<z.ZodObject<{
77
+ id: z.ZodString;
78
+ name: z.ZodString;
79
+ birthday: z.ZodString;
80
+ }, "strict", z.ZodTypeAny, {
81
+ id: string;
82
+ name: string;
83
+ birthday: string;
84
+ }, {
85
+ id: string;
86
+ name: string;
87
+ birthday: string;
88
+ }>, "many">;
89
+ countryCode: z.ZodNullable<z.ZodString>;
90
+ region: z.ZodNullable<z.ZodString>;
91
+ familyCode: z.ZodNullable<z.ZodString>;
92
+ }, "strict", z.ZodTypeAny, {
93
+ children: {
94
+ id: string;
95
+ name: string;
96
+ birthday: string;
97
+ }[];
98
+ familyId: string;
99
+ region: string | null;
100
+ countryCode: string | null;
101
+ familyCode: string | null;
102
+ }, {
103
+ children: {
104
+ id: string;
105
+ name: string;
106
+ birthday: string;
107
+ }[];
108
+ familyId: string;
109
+ region: string | null;
110
+ countryCode: string | null;
111
+ familyCode: string | null;
112
+ }>, "many">;
113
+ locationCoverage: z.ZodLiteral<"notCollected">;
114
+ familyCodeCoverage: z.ZodLiteral<"notCollected">;
115
+ }, "strict", z.ZodTypeAny, {
116
+ families: {
117
+ children: {
118
+ id: string;
119
+ name: string;
120
+ birthday: string;
121
+ }[];
122
+ familyId: string;
123
+ region: string | null;
124
+ countryCode: string | null;
125
+ familyCode: string | null;
126
+ }[];
127
+ generatedAt: string;
128
+ locationCoverage: "notCollected";
129
+ familyCodeCoverage: "notCollected";
130
+ }, {
131
+ families: {
132
+ children: {
133
+ id: string;
134
+ name: string;
135
+ birthday: string;
136
+ }[];
137
+ familyId: string;
138
+ region: string | null;
139
+ countryCode: string | null;
140
+ familyCode: string | null;
141
+ }[];
142
+ generatedAt: string;
143
+ locationCoverage: "notCollected";
144
+ familyCodeCoverage: "notCollected";
145
+ }>;
146
+ export declare const ownerFamilyProfileSchema: z.ZodObject<{
147
+ generatedAt: z.ZodString;
148
+ familyId: z.ZodString;
149
+ children: z.ZodArray<z.ZodObject<{
150
+ id: z.ZodString;
151
+ name: z.ZodString;
152
+ birthday: z.ZodString;
153
+ } & {
154
+ ladders: z.ZodArray<z.ZodObject<{
155
+ id: z.ZodString;
156
+ title: z.ZodString;
157
+ stage: z.ZodNullable<z.ZodNumber>;
158
+ totalStages: z.ZodNumber;
159
+ archived: z.ZodBoolean;
160
+ }, "strict", z.ZodTypeAny, {
161
+ id: string;
162
+ archived: boolean;
163
+ stage: number | null;
164
+ title: string;
165
+ totalStages: number;
166
+ }, {
167
+ id: string;
168
+ archived: boolean;
169
+ stage: number | null;
170
+ title: string;
171
+ totalStages: number;
172
+ }>, "many">;
173
+ }, "strict", z.ZodTypeAny, {
174
+ id: string;
175
+ name: string;
176
+ ladders: {
177
+ id: string;
178
+ archived: boolean;
179
+ stage: number | null;
180
+ title: string;
181
+ totalStages: number;
182
+ }[];
183
+ birthday: string;
184
+ }, {
185
+ id: string;
186
+ name: string;
187
+ ladders: {
188
+ id: string;
189
+ archived: boolean;
190
+ stage: number | null;
191
+ title: string;
192
+ totalStages: number;
193
+ }[];
194
+ birthday: string;
195
+ }>, "many">;
196
+ location: z.ZodObject<{
197
+ countryCode: z.ZodNullable<z.ZodString>;
198
+ region: z.ZodNullable<z.ZodString>;
199
+ coverage: z.ZodLiteral<"notCollected">;
200
+ }, "strict", z.ZodTypeAny, {
201
+ coverage: "notCollected";
202
+ region: string | null;
203
+ countryCode: string | null;
204
+ }, {
205
+ coverage: "notCollected";
206
+ region: string | null;
207
+ countryCode: string | null;
208
+ }>;
209
+ familyCode: z.ZodNullable<z.ZodString>;
210
+ activity: z.ZodObject<{
211
+ sinceLocalDate: z.ZodString;
212
+ throughLocalDate: z.ZodString;
213
+ timeZone: z.ZodString;
214
+ timeZoneFallback: z.ZodBoolean;
215
+ logsThisWeek: z.ZodNumber;
216
+ consecutiveDays: z.ZodNumber;
217
+ streakSince: z.ZodNullable<z.ZodString>;
218
+ trackerTypes: z.ZodArray<z.ZodString, "many">;
219
+ recordedThrough: z.ZodString;
220
+ }, "strict", z.ZodTypeAny, {
221
+ timeZone: string;
222
+ sinceLocalDate: string;
223
+ throughLocalDate: string;
224
+ timeZoneFallback: boolean;
225
+ logsThisWeek: number;
226
+ consecutiveDays: number;
227
+ streakSince: string | null;
228
+ trackerTypes: string[];
229
+ recordedThrough: string;
230
+ }, {
231
+ timeZone: string;
232
+ sinceLocalDate: string;
233
+ throughLocalDate: string;
234
+ timeZoneFallback: boolean;
235
+ logsThisWeek: number;
236
+ consecutiveDays: number;
237
+ streakSince: string | null;
238
+ trackerTypes: string[];
239
+ recordedThrough: string;
240
+ }>;
241
+ sharing: z.ZodObject<{
242
+ otherCarers: z.ZodNullable<z.ZodNumber>;
243
+ coverage: z.ZodLiteral<"notCollected">;
244
+ }, "strict", z.ZodTypeAny, {
245
+ coverage: "notCollected";
246
+ otherCarers: number | null;
247
+ }, {
248
+ coverage: "notCollected";
249
+ otherCarers: number | null;
250
+ }>;
251
+ payments: z.ZodObject<{
252
+ page: z.ZodNumber;
253
+ pageSize: z.ZodNumber;
254
+ total: z.ZodNumber;
255
+ } & {
256
+ rows: z.ZodArray<z.ZodObject<{
257
+ id: z.ZodString;
258
+ occurredAt: z.ZodString;
259
+ provider: z.ZodEnum<["appleAppStore", "googlePlay"]>;
260
+ eventKind: z.ZodString;
261
+ amount: z.ZodNullable<z.ZodString>;
262
+ amountUnit: z.ZodNullable<z.ZodEnum<["major", "minor"]>>;
263
+ currency: z.ZodNullable<z.ZodString>;
264
+ }, "strict", z.ZodTypeAny, {
265
+ id: string;
266
+ provider: "appleAppStore" | "googlePlay";
267
+ currency: string | null;
268
+ occurredAt: string;
269
+ amount: string | null;
270
+ eventKind: string;
271
+ amountUnit: "major" | "minor" | null;
272
+ }, {
273
+ id: string;
274
+ provider: "appleAppStore" | "googlePlay";
275
+ currency: string | null;
276
+ occurredAt: string;
277
+ amount: string | null;
278
+ eventKind: string;
279
+ amountUnit: "major" | "minor" | null;
280
+ }>, "many">;
281
+ coverage: z.ZodLiteral<"retainedProductionRecords">;
282
+ }, "strict", z.ZodTypeAny, {
283
+ total: number;
284
+ rows: {
285
+ id: string;
286
+ provider: "appleAppStore" | "googlePlay";
287
+ currency: string | null;
288
+ occurredAt: string;
289
+ amount: string | null;
290
+ eventKind: string;
291
+ amountUnit: "major" | "minor" | null;
292
+ }[];
293
+ coverage: "retainedProductionRecords";
294
+ page: number;
295
+ pageSize: number;
296
+ }, {
297
+ total: number;
298
+ rows: {
299
+ id: string;
300
+ provider: "appleAppStore" | "googlePlay";
301
+ currency: string | null;
302
+ occurredAt: string;
303
+ amount: string | null;
304
+ eventKind: string;
305
+ amountUnit: "major" | "minor" | null;
306
+ }[];
307
+ coverage: "retainedProductionRecords";
308
+ page: number;
309
+ pageSize: number;
310
+ }>;
311
+ support: z.ZodObject<{
312
+ page: z.ZodNumber;
313
+ pageSize: z.ZodNumber;
314
+ total: z.ZodNumber;
315
+ } & {
316
+ rows: z.ZodArray<z.ZodObject<{
317
+ id: z.ZodString;
318
+ subject: z.ZodString;
319
+ status: z.ZodString;
320
+ createdAt: z.ZodString;
321
+ lastMessageAt: z.ZodString;
322
+ }, "strict", z.ZodTypeAny, {
323
+ status: string;
324
+ id: string;
325
+ createdAt: string;
326
+ subject: string;
327
+ lastMessageAt: string;
328
+ }, {
329
+ status: string;
330
+ id: string;
331
+ createdAt: string;
332
+ subject: string;
333
+ lastMessageAt: string;
334
+ }>, "many">;
335
+ coverage: z.ZodLiteral<"retainedFamilyTickets">;
336
+ }, "strict", z.ZodTypeAny, {
337
+ total: number;
338
+ rows: {
339
+ status: string;
340
+ id: string;
341
+ createdAt: string;
342
+ subject: string;
343
+ lastMessageAt: string;
344
+ }[];
345
+ coverage: "retainedFamilyTickets";
346
+ page: number;
347
+ pageSize: number;
348
+ }, {
349
+ total: number;
350
+ rows: {
351
+ status: string;
352
+ id: string;
353
+ createdAt: string;
354
+ subject: string;
355
+ lastMessageAt: string;
356
+ }[];
357
+ coverage: "retainedFamilyTickets";
358
+ page: number;
359
+ pageSize: number;
360
+ }>;
361
+ installations: z.ZodArray<z.ZodObject<{
362
+ label: z.ZodString;
363
+ platform: z.ZodString;
364
+ wrapperVersion: z.ZodNullable<z.ZodString>;
365
+ webReleaseVersion: z.ZodNullable<z.ZodString>;
366
+ lastSeenAt: z.ZodString;
367
+ updateAvailable: z.ZodNullable<z.ZodBoolean>;
368
+ }, "strict", z.ZodTypeAny, {
369
+ webReleaseVersion: string | null;
370
+ wrapperVersion: string | null;
371
+ label: string;
372
+ updateAvailable: boolean | null;
373
+ platform: string;
374
+ lastSeenAt: string;
375
+ }, {
376
+ webReleaseVersion: string | null;
377
+ wrapperVersion: string | null;
378
+ label: string;
379
+ updateAvailable: boolean | null;
380
+ platform: string;
381
+ lastSeenAt: string;
382
+ }>, "many">;
383
+ pushRegistrations: z.ZodArray<z.ZodObject<{
384
+ platform: z.ZodString;
385
+ permission: z.ZodString;
386
+ reportedAt: z.ZodString;
387
+ }, "strict", z.ZodTypeAny, {
388
+ platform: string;
389
+ permission: string;
390
+ reportedAt: string;
391
+ }, {
392
+ platform: string;
393
+ permission: string;
394
+ reportedAt: string;
395
+ }>, "many">;
396
+ messaging: z.ZodObject<{
397
+ state: z.ZodEnum<["open", "paused", "closed", "notRecorded"]>;
398
+ observedAt: z.ZodString;
399
+ }, "strict", z.ZodTypeAny, {
400
+ state: "paused" | "open" | "closed" | "notRecorded";
401
+ observedAt: string;
402
+ }, {
403
+ state: "paused" | "open" | "closed" | "notRecorded";
404
+ observedAt: string;
405
+ }>;
406
+ deviceCoverage: z.ZodLiteral<"recordedSignalsNotSync">;
407
+ }, "strict", z.ZodTypeAny, {
408
+ generatedAt: string;
409
+ installations: {
410
+ webReleaseVersion: string | null;
411
+ wrapperVersion: string | null;
412
+ label: string;
413
+ updateAvailable: boolean | null;
414
+ platform: string;
415
+ lastSeenAt: string;
416
+ }[];
417
+ children: {
418
+ id: string;
419
+ name: string;
420
+ ladders: {
421
+ id: string;
422
+ archived: boolean;
423
+ stage: number | null;
424
+ title: string;
425
+ totalStages: number;
426
+ }[];
427
+ birthday: string;
428
+ }[];
429
+ familyId: string;
430
+ activity: {
431
+ timeZone: string;
432
+ sinceLocalDate: string;
433
+ throughLocalDate: string;
434
+ timeZoneFallback: boolean;
435
+ logsThisWeek: number;
436
+ consecutiveDays: number;
437
+ streakSince: string | null;
438
+ trackerTypes: string[];
439
+ recordedThrough: string;
440
+ };
441
+ location: {
442
+ coverage: "notCollected";
443
+ region: string | null;
444
+ countryCode: string | null;
445
+ };
446
+ support: {
447
+ total: number;
448
+ rows: {
449
+ status: string;
450
+ id: string;
451
+ createdAt: string;
452
+ subject: string;
453
+ lastMessageAt: string;
454
+ }[];
455
+ coverage: "retainedFamilyTickets";
456
+ page: number;
457
+ pageSize: number;
458
+ };
459
+ familyCode: string | null;
460
+ sharing: {
461
+ coverage: "notCollected";
462
+ otherCarers: number | null;
463
+ };
464
+ payments: {
465
+ total: number;
466
+ rows: {
467
+ id: string;
468
+ provider: "appleAppStore" | "googlePlay";
469
+ currency: string | null;
470
+ occurredAt: string;
471
+ amount: string | null;
472
+ eventKind: string;
473
+ amountUnit: "major" | "minor" | null;
474
+ }[];
475
+ coverage: "retainedProductionRecords";
476
+ page: number;
477
+ pageSize: number;
478
+ };
479
+ pushRegistrations: {
480
+ platform: string;
481
+ permission: string;
482
+ reportedAt: string;
483
+ }[];
484
+ messaging: {
485
+ state: "paused" | "open" | "closed" | "notRecorded";
486
+ observedAt: string;
487
+ };
488
+ deviceCoverage: "recordedSignalsNotSync";
489
+ }, {
490
+ generatedAt: string;
491
+ installations: {
492
+ webReleaseVersion: string | null;
493
+ wrapperVersion: string | null;
494
+ label: string;
495
+ updateAvailable: boolean | null;
496
+ platform: string;
497
+ lastSeenAt: string;
498
+ }[];
499
+ children: {
500
+ id: string;
501
+ name: string;
502
+ ladders: {
503
+ id: string;
504
+ archived: boolean;
505
+ stage: number | null;
506
+ title: string;
507
+ totalStages: number;
508
+ }[];
509
+ birthday: string;
510
+ }[];
511
+ familyId: string;
512
+ activity: {
513
+ timeZone: string;
514
+ sinceLocalDate: string;
515
+ throughLocalDate: string;
516
+ timeZoneFallback: boolean;
517
+ logsThisWeek: number;
518
+ consecutiveDays: number;
519
+ streakSince: string | null;
520
+ trackerTypes: string[];
521
+ recordedThrough: string;
522
+ };
523
+ location: {
524
+ coverage: "notCollected";
525
+ region: string | null;
526
+ countryCode: string | null;
527
+ };
528
+ support: {
529
+ total: number;
530
+ rows: {
531
+ status: string;
532
+ id: string;
533
+ createdAt: string;
534
+ subject: string;
535
+ lastMessageAt: string;
536
+ }[];
537
+ coverage: "retainedFamilyTickets";
538
+ page: number;
539
+ pageSize: number;
540
+ };
541
+ familyCode: string | null;
542
+ sharing: {
543
+ coverage: "notCollected";
544
+ otherCarers: number | null;
545
+ };
546
+ payments: {
547
+ total: number;
548
+ rows: {
549
+ id: string;
550
+ provider: "appleAppStore" | "googlePlay";
551
+ currency: string | null;
552
+ occurredAt: string;
553
+ amount: string | null;
554
+ eventKind: string;
555
+ amountUnit: "major" | "minor" | null;
556
+ }[];
557
+ coverage: "retainedProductionRecords";
558
+ page: number;
559
+ pageSize: number;
560
+ };
561
+ pushRegistrations: {
562
+ platform: string;
563
+ permission: string;
564
+ reportedAt: string;
565
+ }[];
566
+ messaging: {
567
+ state: "paused" | "open" | "closed" | "notRecorded";
568
+ observedAt: string;
569
+ };
570
+ deviceCoverage: "recordedSignalsNotSync";
571
+ }>;
572
+ export type OwnerFamilyDirectory = z.infer<typeof ownerFamilyDirectorySchema>;
573
+ export type OwnerFamilyProfile = z.infer<typeof ownerFamilyProfileSchema>;
574
+ export type OwnerFamilyProfileQuery = z.infer<typeof ownerFamilyProfileQuerySchema>;
@@ -0,0 +1,52 @@
1
+ import { z } from "zod";
2
+ import { idSchema, isoDateStringSchema } from "./api.js";
3
+ const day = z.string().regex(/^\d{4}-\d{2}-\d{2}$/);
4
+ const count = z.number().int().nonnegative().safe();
5
+ export const ownerFamilyProfileQuerySchema = z.object({
6
+ paymentPage: z.coerce.number().int().min(1).max(10000).default(1),
7
+ supportPage: z.coerce.number().int().min(1).max(10000).default(1)
8
+ }).strict();
9
+ export const ownerFamilyDirectoryQuerySchema = z.object({}).strict();
10
+ export const ownerFamilyParamsSchema = z.object({ id: idSchema.max(200) }).strict();
11
+ export const ownerFamilyChildSchema = z.object({ id: idSchema, name: z.string(), birthday: day }).strict();
12
+ export const ownerFamilyMetadataSchema = z.object({
13
+ familyId: idSchema, children: z.array(ownerFamilyChildSchema),
14
+ countryCode: z.string().regex(/^[A-Z]{2}$/).nullable(), region: z.string().nullable(), familyCode: z.string().nullable()
15
+ }).strict();
16
+ export const ownerFamilyDirectorySchema = z.object({
17
+ generatedAt: isoDateStringSchema, families: z.array(ownerFamilyMetadataSchema),
18
+ locationCoverage: z.literal("notCollected"), familyCodeCoverage: z.literal("notCollected")
19
+ }).strict();
20
+ const page = z.object({ page: count.min(1), pageSize: count.min(1), total: count }).strict();
21
+ export const ownerFamilyProfileSchema = z.object({
22
+ generatedAt: isoDateStringSchema, familyId: idSchema,
23
+ children: z.array(ownerFamilyChildSchema.extend({ ladders: z.array(z.object({
24
+ id: idSchema, title: z.string(), stage: count.min(1).nullable(), totalStages: count,
25
+ archived: z.boolean()
26
+ }).strict()) }).strict()),
27
+ location: z.object({ countryCode: z.string().nullable(), region: z.string().nullable(), coverage: z.literal("notCollected") }).strict(),
28
+ familyCode: z.string().nullable(),
29
+ activity: z.object({
30
+ sinceLocalDate: day, throughLocalDate: day, timeZone: z.string(), timeZoneFallback: z.boolean(),
31
+ logsThisWeek: count, consecutiveDays: count, streakSince: day.nullable(),
32
+ trackerTypes: z.array(z.string()), recordedThrough: isoDateStringSchema
33
+ }).strict(),
34
+ sharing: z.object({ otherCarers: count.nullable(), coverage: z.literal("notCollected") }).strict(),
35
+ payments: page.extend({ rows: z.array(z.object({
36
+ id: idSchema, occurredAt: isoDateStringSchema, provider: z.enum(["appleAppStore", "googlePlay"]),
37
+ eventKind: z.string(), amount: z.string().nullable(), amountUnit: z.enum(["major", "minor"]).nullable(),
38
+ currency: z.string().nullable()
39
+ }).strict()), coverage: z.literal("retainedProductionRecords") }).strict(),
40
+ support: page.extend({ rows: z.array(z.object({
41
+ id: idSchema, subject: z.string(), status: z.string(), createdAt: isoDateStringSchema,
42
+ lastMessageAt: isoDateStringSchema
43
+ }).strict()), coverage: z.literal("retainedFamilyTickets") }).strict(),
44
+ installations: z.array(z.object({
45
+ label: z.string(), platform: z.string(), wrapperVersion: z.string().nullable(), webReleaseVersion: z.string().nullable(),
46
+ lastSeenAt: isoDateStringSchema, updateAvailable: z.boolean().nullable()
47
+ }).strict()),
48
+ pushRegistrations: z.array(z.object({ platform: z.string(), permission: z.string(), reportedAt: isoDateStringSchema }).strict()),
49
+ messaging: z.object({ state: z.enum(["open", "paused", "closed", "notRecorded"]), observedAt: isoDateStringSchema }).strict(),
50
+ deviceCoverage: z.literal("recordedSignalsNotSync")
51
+ }).strict();
52
+ //# sourceMappingURL=owner-families.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"owner-families.js","sourceRoot":"","sources":["../src/owner-families.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEzD,MAAM,GAAG,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;AACpD,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;AACpD,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACjE,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAA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- "version": "0.18.12",
4
+ "version": "0.18.14",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",