@nikthegeek/dreamsforlittles-shared 0.1.2 → 0.4.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.
- package/dist/access.d.ts +360 -12
- package/dist/access.js +9 -2
- package/dist/access.js.map +1 -1
- package/dist/admin.d.ts +821 -169
- package/dist/admin.js +33 -2
- package/dist/admin.js.map +1 -1
- package/dist/analysis.d.ts +12 -12
- package/dist/api.d.ts +5 -5
- package/dist/app-runtime-users.d.ts +464 -0
- package/dist/app-runtime-users.js +64 -0
- package/dist/app-runtime-users.js.map +1 -0
- package/dist/auth.d.ts +20 -2
- package/dist/auth.js +7 -2
- package/dist/auth.js.map +1 -1
- package/dist/client-notices.d.ts +585 -585
- package/dist/coach-acquisition.d.ts +47 -0
- package/dist/coach-acquisition.js +45 -0
- package/dist/coach-acquisition.js.map +1 -0
- package/dist/coach-activity-notifications.d.ts +610 -0
- package/dist/coach-activity-notifications.js +179 -0
- package/dist/coach-activity-notifications.js.map +1 -0
- package/dist/coach-family-chat.d.ts +1658 -0
- package/dist/coach-family-chat.js +342 -0
- package/dist/coach-family-chat.js.map +1 -0
- package/dist/coach-family-chat.test.d.ts +1 -0
- package/dist/coach-family-chat.test.js +129 -0
- package/dist/coach-family-chat.test.js.map +1 -0
- package/dist/coach-growth.d.ts +706 -0
- package/dist/coach-growth.js +191 -0
- package/dist/coach-growth.js.map +1 -0
- package/dist/coach-growth.test.d.ts +1 -0
- package/dist/coach-growth.test.js +109 -0
- package/dist/coach-growth.test.js.map +1 -0
- package/dist/coach-private-notes.d.ts +169 -0
- package/dist/coach-private-notes.js +28 -0
- package/dist/coach-private-notes.js.map +1 -0
- package/dist/coach.d.ts +395 -374
- package/dist/coach.js +6 -1
- package/dist/coach.js.map +1 -1
- package/dist/enums.d.ts +1 -1
- package/dist/enums.js +14 -1
- package/dist/enums.js.map +1 -1
- package/dist/errors.d.ts +18 -4
- package/dist/errors.js +42 -0
- package/dist/errors.js.map +1 -1
- package/dist/family-invitations.d.ts +2 -2
- package/dist/family-profile-artifacts.d.ts +43 -31
- package/dist/family-profile-artifacts.js +4 -1
- package/dist/family-profile-artifacts.js.map +1 -1
- package/dist/family.d.ts +3152 -1499
- package/dist/family.js +30 -1
- package/dist/family.js.map +1 -1
- package/dist/geography.d.ts +15 -0
- package/dist/geography.js +45 -0
- package/dist/geography.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/invites.d.ts +6 -6
- package/dist/mobile-web-releases.d.ts +14 -14
- package/dist/native-app-updates.d.ts +339 -0
- package/dist/native-app-updates.js +106 -0
- package/dist/native-app-updates.js.map +1 -0
- package/dist/notification-banners.d.ts +28 -28
- package/dist/product-analytics.d.ts +181 -181
- package/dist/product-analytics.js +1 -0
- package/dist/product-analytics.js.map +1 -1
- package/dist/push-devices.d.ts +6 -6
- package/dist/realtime.d.ts +12 -12
- package/dist/support-tickets.d.ts +28 -28
- package/fixtures/coach-family-chat-push-v1.json +104 -0
- package/fixtures/coach-family-chat-push-v1.sha256 +1 -0
- package/package.json +5 -3
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const coachAcquisitionSourceSchema: z.ZodEnum<["searchEngine", "socialMedia", "referral", "trainingOrEvent", "partner", "advertisement", "other", "preferNotToSay"]>;
|
|
3
|
+
export declare const coachAcquisitionSourceOptions: readonly [{
|
|
4
|
+
readonly value: "searchEngine";
|
|
5
|
+
readonly label: "Online search";
|
|
6
|
+
}, {
|
|
7
|
+
readonly value: "socialMedia";
|
|
8
|
+
readonly label: "Social media";
|
|
9
|
+
}, {
|
|
10
|
+
readonly value: "referral";
|
|
11
|
+
readonly label: "Recommendation or referral";
|
|
12
|
+
}, {
|
|
13
|
+
readonly value: "trainingOrEvent";
|
|
14
|
+
readonly label: "Event, course, or training";
|
|
15
|
+
}, {
|
|
16
|
+
readonly value: "partner";
|
|
17
|
+
readonly label: "Partner organisation or professional community";
|
|
18
|
+
}, {
|
|
19
|
+
readonly value: "advertisement";
|
|
20
|
+
readonly label: "Advertisement";
|
|
21
|
+
}, {
|
|
22
|
+
readonly value: "other";
|
|
23
|
+
readonly label: "Other";
|
|
24
|
+
}, {
|
|
25
|
+
readonly value: "preferNotToSay";
|
|
26
|
+
readonly label: "Prefer not to say";
|
|
27
|
+
}];
|
|
28
|
+
export declare const normalizeCoachAcquisitionSourceOtherText: (value: string) => string;
|
|
29
|
+
export declare const coachAcquisitionSourceOtherTextSchema: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
30
|
+
export declare const coachAcquisitionSourceFieldsSchema: z.ZodEffects<z.ZodObject<{
|
|
31
|
+
acquisitionSource: z.ZodOptional<z.ZodNullable<z.ZodEnum<["searchEngine", "socialMedia", "referral", "trainingOrEvent", "partner", "advertisement", "other", "preferNotToSay"]>>>;
|
|
32
|
+
acquisitionSourceOtherText: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
acquisitionSource?: "other" | "partner" | "searchEngine" | "socialMedia" | "referral" | "trainingOrEvent" | "advertisement" | "preferNotToSay" | null | undefined;
|
|
35
|
+
acquisitionSourceOtherText?: string | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
acquisitionSource?: "other" | "partner" | "searchEngine" | "socialMedia" | "referral" | "trainingOrEvent" | "advertisement" | "preferNotToSay" | null | undefined;
|
|
38
|
+
acquisitionSourceOtherText?: unknown;
|
|
39
|
+
}>, {
|
|
40
|
+
acquisitionSource?: "other" | "partner" | "searchEngine" | "socialMedia" | "referral" | "trainingOrEvent" | "advertisement" | "preferNotToSay" | null | undefined;
|
|
41
|
+
acquisitionSourceOtherText?: string | undefined;
|
|
42
|
+
}, {
|
|
43
|
+
acquisitionSource?: "other" | "partner" | "searchEngine" | "socialMedia" | "referral" | "trainingOrEvent" | "advertisement" | "preferNotToSay" | null | undefined;
|
|
44
|
+
acquisitionSourceOtherText?: unknown;
|
|
45
|
+
}>;
|
|
46
|
+
export type CoachAcquisitionSource = z.infer<typeof coachAcquisitionSourceSchema>;
|
|
47
|
+
export type CoachAcquisitionSourceFields = z.infer<typeof coachAcquisitionSourceFieldsSchema>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const coachAcquisitionSourceSchema = z.enum([
|
|
3
|
+
"searchEngine",
|
|
4
|
+
"socialMedia",
|
|
5
|
+
"referral",
|
|
6
|
+
"trainingOrEvent",
|
|
7
|
+
"partner",
|
|
8
|
+
"advertisement",
|
|
9
|
+
"other",
|
|
10
|
+
"preferNotToSay"
|
|
11
|
+
]);
|
|
12
|
+
export const coachAcquisitionSourceOptions = [
|
|
13
|
+
{ value: "searchEngine", label: "Online search" },
|
|
14
|
+
{ value: "socialMedia", label: "Social media" },
|
|
15
|
+
{ value: "referral", label: "Recommendation or referral" },
|
|
16
|
+
{ value: "trainingOrEvent", label: "Event, course, or training" },
|
|
17
|
+
{ value: "partner", label: "Partner organisation or professional community" },
|
|
18
|
+
{ value: "advertisement", label: "Advertisement" },
|
|
19
|
+
{ value: "other", label: "Other" },
|
|
20
|
+
{ value: "preferNotToSay", label: "Prefer not to say" }
|
|
21
|
+
];
|
|
22
|
+
export const normalizeCoachAcquisitionSourceOtherText = (value) => value.trim().replace(/\s+/g, " ");
|
|
23
|
+
export const coachAcquisitionSourceOtherTextSchema = z.preprocess((value) => {
|
|
24
|
+
if (value === null || value === undefined)
|
|
25
|
+
return undefined;
|
|
26
|
+
if (typeof value !== "string")
|
|
27
|
+
return value;
|
|
28
|
+
const normalized = normalizeCoachAcquisitionSourceOtherText(value);
|
|
29
|
+
return normalized.length === 0 ? undefined : normalized;
|
|
30
|
+
}, z.string().min(2).max(120).optional());
|
|
31
|
+
export const coachAcquisitionSourceFieldsSchema = z
|
|
32
|
+
.object({
|
|
33
|
+
acquisitionSource: coachAcquisitionSourceSchema.nullable().optional(),
|
|
34
|
+
acquisitionSourceOtherText: coachAcquisitionSourceOtherTextSchema
|
|
35
|
+
})
|
|
36
|
+
.superRefine((value, context) => {
|
|
37
|
+
if (value.acquisitionSource !== "other" && value.acquisitionSourceOtherText !== undefined) {
|
|
38
|
+
context.addIssue({
|
|
39
|
+
code: z.ZodIssueCode.custom,
|
|
40
|
+
path: ["acquisitionSourceOtherText"],
|
|
41
|
+
message: "Please specify is only accepted when acquisitionSource is other."
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=coach-acquisition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coach-acquisition.js","sourceRoot":"","sources":["../src/coach-acquisition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,IAAI,CAAC;IACjD,cAAc;IACd,aAAa;IACb,UAAU;IACV,iBAAiB;IACjB,SAAS;IACT,eAAe;IACf,OAAO;IACP,gBAAgB;CACjB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,eAAe,EAAE;IACjD,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,cAAc,EAAE;IAC/C,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,4BAA4B,EAAE;IAC1D,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,4BAA4B,EAAE;IACjE,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,gDAAgD,EAAE;IAC7E,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAAE;IAClD,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK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