@nikthegeek/dreamsforlittles-shared 0.18.10 → 0.18.12
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/admin-income.d.ts +76 -0
- package/dist/admin-income.js +13 -0
- package/dist/admin-income.js.map +1 -0
- package/dist/admin.d.ts +49 -49
- package/dist/booking-system.d.ts +16 -2
- package/dist/booking-system.js +8 -1
- package/dist/booking-system.js.map +1 -1
- package/dist/booking-system.test.js +10 -0
- package/dist/booking-system.test.js.map +1 -1
- package/dist/coach-engagement.d.ts +16 -16
- package/dist/coach-growth.d.ts +10 -10
- package/dist/coach.d.ts +6 -6
- package/dist/family-profile-artifacts.d.ts +22 -0
- package/dist/family-profile-artifacts.js +3 -1
- package/dist/family-profile-artifacts.js.map +1 -1
- package/dist/income-imports.d.ts +84 -0
- package/dist/income-imports.js +33 -0
- package/dist/income-imports.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/owner-growth.d.ts +64 -0
- package/dist/owner-growth.js +4 -0
- package/dist/owner-growth.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const adminIncomeQuerySchema: z.ZodEffects<z.ZodObject<{
|
|
3
|
+
from: z.ZodString;
|
|
4
|
+
to: z.ZodString;
|
|
5
|
+
}, "strict", z.ZodTypeAny, {
|
|
6
|
+
from: string;
|
|
7
|
+
to: string;
|
|
8
|
+
}, {
|
|
9
|
+
from: string;
|
|
10
|
+
to: string;
|
|
11
|
+
}>, {
|
|
12
|
+
from: string;
|
|
13
|
+
to: string;
|
|
14
|
+
}, {
|
|
15
|
+
from: string;
|
|
16
|
+
to: string;
|
|
17
|
+
}>;
|
|
18
|
+
export type AdminIncomeQuery = z.infer<typeof adminIncomeQuerySchema>;
|
|
19
|
+
/** Recorded ledger facts only. Null means no authoritative source, never zero. */
|
|
20
|
+
export type AdminIncomeAmount = {
|
|
21
|
+
currency: string;
|
|
22
|
+
familyPaidMinor: number;
|
|
23
|
+
familyRefundsMinor: number;
|
|
24
|
+
coachPaidMinor: number;
|
|
25
|
+
coachFeesMinor: number;
|
|
26
|
+
coachNetMinor: number;
|
|
27
|
+
familyFeesMinor?: number | null;
|
|
28
|
+
familyNetMinor?: number | null;
|
|
29
|
+
familyReportedNetMinor?: number;
|
|
30
|
+
coachRefundsMinor?: number | null;
|
|
31
|
+
totalKeptMinor?: number | null;
|
|
32
|
+
familyComplete?: boolean;
|
|
33
|
+
coachComplete?: boolean;
|
|
34
|
+
};
|
|
35
|
+
export type AdminIncomeResponse = {
|
|
36
|
+
generatedAt: string;
|
|
37
|
+
query: AdminIncomeQuery;
|
|
38
|
+
currencies: AdminIncomeAmount[];
|
|
39
|
+
previous: AdminIncomeAmount[];
|
|
40
|
+
months: Array<{
|
|
41
|
+
month: string;
|
|
42
|
+
currencies: AdminIncomeAmount[];
|
|
43
|
+
}>;
|
|
44
|
+
breakdown: Array<{
|
|
45
|
+
source: "families" | "coaches";
|
|
46
|
+
provider: "appleAppStore" | "googlePlay" | "stripe";
|
|
47
|
+
currency: string;
|
|
48
|
+
product: string | null;
|
|
49
|
+
count: number;
|
|
50
|
+
eachMinor: number | null;
|
|
51
|
+
paidMinor: number;
|
|
52
|
+
feesMinor: number | null;
|
|
53
|
+
keptMinor: number | null;
|
|
54
|
+
}>;
|
|
55
|
+
coverage: {
|
|
56
|
+
familyPaymentCount: number;
|
|
57
|
+
missingFamilyAmounts: number;
|
|
58
|
+
familyFeesAvailable: boolean;
|
|
59
|
+
coachRefundsAvailable: boolean;
|
|
60
|
+
historyFrom: string;
|
|
61
|
+
};
|
|
62
|
+
reporting?: {
|
|
63
|
+
sources: Array<{
|
|
64
|
+
source: string;
|
|
65
|
+
complete: boolean;
|
|
66
|
+
periods: Array<{
|
|
67
|
+
from: string;
|
|
68
|
+
to: string;
|
|
69
|
+
}>;
|
|
70
|
+
warnings: string[];
|
|
71
|
+
}>;
|
|
72
|
+
provisionalStoreEventsReplaced: number;
|
|
73
|
+
unreconciledCoachPayments: number;
|
|
74
|
+
basis: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const adminIncomeQuerySchema = z.object({
|
|
3
|
+
from: z.string().datetime(),
|
|
4
|
+
to: z.string().datetime()
|
|
5
|
+
}).strict().superRefine((value, context) => {
|
|
6
|
+
if (Date.parse(value.from) >= Date.parse(value.to))
|
|
7
|
+
context.addIssue({
|
|
8
|
+
code: z.ZodIssueCode.custom, path: ["to"], message: "Choose an end after the start."
|
|
9
|
+
});
|
|
10
|
+
if (Date.parse(value.to) - Date.parse(value.from) > 366 * 86400000)
|
|
11
|
+
context.addIssue({ code: z.ZodIssueCode.custom, path: ["to"], message: "Choose a reporting range of at most 366 days." });
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=admin-income.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-income.js","sourceRoot":"","sources":["../src/admin-income.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC1B,CAAC,CAAC,MAAM,EAAE,CAAC,WAAW,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;IACzC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;QAAE,OAAO,CAAC,QAAQ,CAAC;YACnE,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,gCAAgC;SACrF,CAAC,CAAC;IACH,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,GAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAC,GAAG,GAAC,QAAQ;QAAE,OAAO,CAAC,QAAQ,CAAC,EAAC,IAAI,EAAC,CAAC,CAAC,YAAY,CAAC,MAAM,EAAC,IAAI,EAAC,CAAC,IAAI,CAAC,EAAC,OAAO,EAAC,+CAA+C,EAAC,CAAC,CAAC;AACnL,CAAC,CAAC,CAAC"}
|
package/dist/admin.d.ts
CHANGED
|
@@ -1557,12 +1557,6 @@ export declare const adminCoachActivityResponseSchema: z.ZodObject<{
|
|
|
1557
1557
|
} | undefined;
|
|
1558
1558
|
}>, "many">;
|
|
1559
1559
|
}, "strip", z.ZodTypeAny, {
|
|
1560
|
-
assignedFamilyCount: number;
|
|
1561
|
-
currentClientCount: number;
|
|
1562
|
-
activeFamilyCount: number;
|
|
1563
|
-
totalActivityLogs: number;
|
|
1564
|
-
totalAppEvents: number;
|
|
1565
|
-
totalCoachViewEvents: number;
|
|
1566
1560
|
families: {
|
|
1567
1561
|
family: {
|
|
1568
1562
|
id: string;
|
|
@@ -1632,15 +1626,15 @@ export declare const adminCoachActivityResponseSchema: z.ZodObject<{
|
|
|
1632
1626
|
isLikelyLegacyApp: boolean;
|
|
1633
1627
|
} | undefined;
|
|
1634
1628
|
}[];
|
|
1635
|
-
latestActivityAt?: string | null | undefined;
|
|
1636
|
-
latestAppEventAt?: string | null | undefined;
|
|
1637
|
-
}, {
|
|
1638
1629
|
assignedFamilyCount: number;
|
|
1639
1630
|
currentClientCount: number;
|
|
1640
1631
|
activeFamilyCount: number;
|
|
1641
1632
|
totalActivityLogs: number;
|
|
1642
1633
|
totalAppEvents: number;
|
|
1643
1634
|
totalCoachViewEvents: number;
|
|
1635
|
+
latestActivityAt?: string | null | undefined;
|
|
1636
|
+
latestAppEventAt?: string | null | undefined;
|
|
1637
|
+
}, {
|
|
1644
1638
|
families: {
|
|
1645
1639
|
family: {
|
|
1646
1640
|
id: string;
|
|
@@ -1710,6 +1704,12 @@ export declare const adminCoachActivityResponseSchema: z.ZodObject<{
|
|
|
1710
1704
|
isLikelyLegacyApp: boolean;
|
|
1711
1705
|
} | undefined;
|
|
1712
1706
|
}[];
|
|
1707
|
+
assignedFamilyCount: number;
|
|
1708
|
+
currentClientCount: number;
|
|
1709
|
+
activeFamilyCount: number;
|
|
1710
|
+
totalActivityLogs: number;
|
|
1711
|
+
totalAppEvents: number;
|
|
1712
|
+
totalCoachViewEvents: number;
|
|
1713
1713
|
latestActivityAt?: string | null | undefined;
|
|
1714
1714
|
latestAppEventAt?: string | null | undefined;
|
|
1715
1715
|
}>;
|
|
@@ -1813,12 +1813,6 @@ export declare const adminCoachActivityResponseSchema: z.ZodObject<{
|
|
|
1813
1813
|
latestEventAt?: string | null | undefined;
|
|
1814
1814
|
};
|
|
1815
1815
|
familyUsage: {
|
|
1816
|
-
assignedFamilyCount: number;
|
|
1817
|
-
currentClientCount: number;
|
|
1818
|
-
activeFamilyCount: number;
|
|
1819
|
-
totalActivityLogs: number;
|
|
1820
|
-
totalAppEvents: number;
|
|
1821
|
-
totalCoachViewEvents: number;
|
|
1822
1816
|
families: {
|
|
1823
1817
|
family: {
|
|
1824
1818
|
id: string;
|
|
@@ -1888,6 +1882,12 @@ export declare const adminCoachActivityResponseSchema: z.ZodObject<{
|
|
|
1888
1882
|
isLikelyLegacyApp: boolean;
|
|
1889
1883
|
} | undefined;
|
|
1890
1884
|
}[];
|
|
1885
|
+
assignedFamilyCount: number;
|
|
1886
|
+
currentClientCount: number;
|
|
1887
|
+
activeFamilyCount: number;
|
|
1888
|
+
totalActivityLogs: number;
|
|
1889
|
+
totalAppEvents: number;
|
|
1890
|
+
totalCoachViewEvents: number;
|
|
1891
1891
|
latestActivityAt?: string | null | undefined;
|
|
1892
1892
|
latestAppEventAt?: string | null | undefined;
|
|
1893
1893
|
};
|
|
@@ -1997,12 +1997,6 @@ export declare const adminCoachActivityResponseSchema: z.ZodObject<{
|
|
|
1997
1997
|
latestEventAt?: string | null | undefined;
|
|
1998
1998
|
};
|
|
1999
1999
|
familyUsage: {
|
|
2000
|
-
assignedFamilyCount: number;
|
|
2001
|
-
currentClientCount: number;
|
|
2002
|
-
activeFamilyCount: number;
|
|
2003
|
-
totalActivityLogs: number;
|
|
2004
|
-
totalAppEvents: number;
|
|
2005
|
-
totalCoachViewEvents: number;
|
|
2006
2000
|
families: {
|
|
2007
2001
|
family: {
|
|
2008
2002
|
id: string;
|
|
@@ -2072,6 +2066,12 @@ export declare const adminCoachActivityResponseSchema: z.ZodObject<{
|
|
|
2072
2066
|
isLikelyLegacyApp: boolean;
|
|
2073
2067
|
} | undefined;
|
|
2074
2068
|
}[];
|
|
2069
|
+
assignedFamilyCount: number;
|
|
2070
|
+
currentClientCount: number;
|
|
2071
|
+
activeFamilyCount: number;
|
|
2072
|
+
totalActivityLogs: number;
|
|
2073
|
+
totalAppEvents: number;
|
|
2074
|
+
totalCoachViewEvents: number;
|
|
2075
2075
|
latestActivityAt?: string | null | undefined;
|
|
2076
2076
|
latestAppEventAt?: string | null | undefined;
|
|
2077
2077
|
};
|
|
@@ -3854,7 +3854,7 @@ export declare const adminCoachSubscriptionManagementSchema: z.ZodObject<{
|
|
|
3854
3854
|
organizationId: string;
|
|
3855
3855
|
coachUserId: string;
|
|
3856
3856
|
maxFamilies: number;
|
|
3857
|
-
provider: "
|
|
3857
|
+
provider: "stripe" | "manual";
|
|
3858
3858
|
cadence?: "monthly" | "sixMonthly" | "yearly" | null | undefined;
|
|
3859
3859
|
stripeCustomerId?: string | null | undefined;
|
|
3860
3860
|
stripeSubscriptionId?: string | null | undefined;
|
|
@@ -3873,7 +3873,7 @@ export declare const adminCoachSubscriptionManagementSchema: z.ZodObject<{
|
|
|
3873
3873
|
organizationId: string;
|
|
3874
3874
|
coachUserId: string;
|
|
3875
3875
|
maxFamilies: number;
|
|
3876
|
-
provider: "
|
|
3876
|
+
provider: "stripe" | "manual";
|
|
3877
3877
|
cadence?: "monthly" | "sixMonthly" | "yearly" | null | undefined;
|
|
3878
3878
|
stripeCustomerId?: string | null | undefined;
|
|
3879
3879
|
stripeSubscriptionId?: string | null | undefined;
|
|
@@ -4251,7 +4251,7 @@ export declare const adminCoachSubscriptionResponseSchema: z.ZodObject<{
|
|
|
4251
4251
|
organizationId: string;
|
|
4252
4252
|
coachUserId: string;
|
|
4253
4253
|
maxFamilies: number;
|
|
4254
|
-
provider: "
|
|
4254
|
+
provider: "stripe" | "manual";
|
|
4255
4255
|
cadence?: "monthly" | "sixMonthly" | "yearly" | null | undefined;
|
|
4256
4256
|
stripeCustomerId?: string | null | undefined;
|
|
4257
4257
|
stripeSubscriptionId?: string | null | undefined;
|
|
@@ -4270,7 +4270,7 @@ export declare const adminCoachSubscriptionResponseSchema: z.ZodObject<{
|
|
|
4270
4270
|
organizationId: string;
|
|
4271
4271
|
coachUserId: string;
|
|
4272
4272
|
maxFamilies: number;
|
|
4273
|
-
provider: "
|
|
4273
|
+
provider: "stripe" | "manual";
|
|
4274
4274
|
cadence?: "monthly" | "sixMonthly" | "yearly" | null | undefined;
|
|
4275
4275
|
stripeCustomerId?: string | null | undefined;
|
|
4276
4276
|
stripeSubscriptionId?: string | null | undefined;
|
|
@@ -4356,7 +4356,7 @@ export declare const adminCoachSubscriptionResponseSchema: z.ZodObject<{
|
|
|
4356
4356
|
organizationId: string;
|
|
4357
4357
|
coachUserId: string;
|
|
4358
4358
|
maxFamilies: number;
|
|
4359
|
-
provider: "
|
|
4359
|
+
provider: "stripe" | "manual";
|
|
4360
4360
|
cadence?: "monthly" | "sixMonthly" | "yearly" | null | undefined;
|
|
4361
4361
|
stripeCustomerId?: string | null | undefined;
|
|
4362
4362
|
stripeSubscriptionId?: string | null | undefined;
|
|
@@ -4442,7 +4442,7 @@ export declare const adminCoachSubscriptionResponseSchema: z.ZodObject<{
|
|
|
4442
4442
|
organizationId: string;
|
|
4443
4443
|
coachUserId: string;
|
|
4444
4444
|
maxFamilies: number;
|
|
4445
|
-
provider: "
|
|
4445
|
+
provider: "stripe" | "manual";
|
|
4446
4446
|
cadence?: "monthly" | "sixMonthly" | "yearly" | null | undefined;
|
|
4447
4447
|
stripeCustomerId?: string | null | undefined;
|
|
4448
4448
|
stripeSubscriptionId?: string | null | undefined;
|
|
@@ -10549,7 +10549,7 @@ export declare const adminBillingCoachSubscriptionSchema: z.ZodObject<{
|
|
|
10549
10549
|
id: string;
|
|
10550
10550
|
updatedAt: string;
|
|
10551
10551
|
maxFamilies: number;
|
|
10552
|
-
provider: "
|
|
10552
|
+
provider: "stripe" | "manual";
|
|
10553
10553
|
membership: {
|
|
10554
10554
|
hasAccess: boolean;
|
|
10555
10555
|
sourcePlanId: string | null;
|
|
@@ -10596,7 +10596,7 @@ export declare const adminBillingCoachSubscriptionSchema: z.ZodObject<{
|
|
|
10596
10596
|
id: string;
|
|
10597
10597
|
updatedAt: string;
|
|
10598
10598
|
maxFamilies: number;
|
|
10599
|
-
provider: "
|
|
10599
|
+
provider: "stripe" | "manual";
|
|
10600
10600
|
membership: {
|
|
10601
10601
|
hasAccess: boolean;
|
|
10602
10602
|
sourcePlanId: string | null;
|
|
@@ -11150,7 +11150,7 @@ export declare const adminBillingCoachRowSchema: z.ZodObject<{
|
|
|
11150
11150
|
id: string;
|
|
11151
11151
|
updatedAt: string;
|
|
11152
11152
|
maxFamilies: number;
|
|
11153
|
-
provider: "
|
|
11153
|
+
provider: "stripe" | "manual";
|
|
11154
11154
|
membership: {
|
|
11155
11155
|
hasAccess: boolean;
|
|
11156
11156
|
sourcePlanId: string | null;
|
|
@@ -11197,7 +11197,7 @@ export declare const adminBillingCoachRowSchema: z.ZodObject<{
|
|
|
11197
11197
|
id: string;
|
|
11198
11198
|
updatedAt: string;
|
|
11199
11199
|
maxFamilies: number;
|
|
11200
|
-
provider: "
|
|
11200
|
+
provider: "stripe" | "manual";
|
|
11201
11201
|
membership: {
|
|
11202
11202
|
hasAccess: boolean;
|
|
11203
11203
|
sourcePlanId: string | null;
|
|
@@ -11313,7 +11313,7 @@ export declare const adminBillingCoachRowSchema: z.ZodObject<{
|
|
|
11313
11313
|
id: string;
|
|
11314
11314
|
updatedAt: string;
|
|
11315
11315
|
maxFamilies: number;
|
|
11316
|
-
provider: "
|
|
11316
|
+
provider: "stripe" | "manual";
|
|
11317
11317
|
membership: {
|
|
11318
11318
|
hasAccess: boolean;
|
|
11319
11319
|
sourcePlanId: string | null;
|
|
@@ -11428,7 +11428,7 @@ export declare const adminBillingCoachRowSchema: z.ZodObject<{
|
|
|
11428
11428
|
id: string;
|
|
11429
11429
|
updatedAt: string;
|
|
11430
11430
|
maxFamilies: number;
|
|
11431
|
-
provider: "
|
|
11431
|
+
provider: "stripe" | "manual";
|
|
11432
11432
|
membership: {
|
|
11433
11433
|
hasAccess: boolean;
|
|
11434
11434
|
sourcePlanId: string | null;
|
|
@@ -17785,11 +17785,11 @@ export declare const adminBillingSummaryResponseSchema: z.ZodObject<{
|
|
|
17785
17785
|
manual: z.ZodNumber;
|
|
17786
17786
|
stripe: z.ZodNumber;
|
|
17787
17787
|
}, "strip", z.ZodTypeAny, {
|
|
17788
|
-
manual: number;
|
|
17789
17788
|
stripe: number;
|
|
17790
|
-
}, {
|
|
17791
17789
|
manual: number;
|
|
17790
|
+
}, {
|
|
17792
17791
|
stripe: number;
|
|
17792
|
+
manual: number;
|
|
17793
17793
|
}>;
|
|
17794
17794
|
introductoryOffers: z.ZodObject<{
|
|
17795
17795
|
active: z.ZodNumber;
|
|
@@ -18275,7 +18275,7 @@ export declare const adminBillingSummaryResponseSchema: z.ZodObject<{
|
|
|
18275
18275
|
id: string;
|
|
18276
18276
|
updatedAt: string;
|
|
18277
18277
|
maxFamilies: number;
|
|
18278
|
-
provider: "
|
|
18278
|
+
provider: "stripe" | "manual";
|
|
18279
18279
|
membership: {
|
|
18280
18280
|
hasAccess: boolean;
|
|
18281
18281
|
sourcePlanId: string | null;
|
|
@@ -18322,7 +18322,7 @@ export declare const adminBillingSummaryResponseSchema: z.ZodObject<{
|
|
|
18322
18322
|
id: string;
|
|
18323
18323
|
updatedAt: string;
|
|
18324
18324
|
maxFamilies: number;
|
|
18325
|
-
provider: "
|
|
18325
|
+
provider: "stripe" | "manual";
|
|
18326
18326
|
membership: {
|
|
18327
18327
|
hasAccess: boolean;
|
|
18328
18328
|
sourcePlanId: string | null;
|
|
@@ -18438,7 +18438,7 @@ export declare const adminBillingSummaryResponseSchema: z.ZodObject<{
|
|
|
18438
18438
|
id: string;
|
|
18439
18439
|
updatedAt: string;
|
|
18440
18440
|
maxFamilies: number;
|
|
18441
|
-
provider: "
|
|
18441
|
+
provider: "stripe" | "manual";
|
|
18442
18442
|
membership: {
|
|
18443
18443
|
hasAccess: boolean;
|
|
18444
18444
|
sourcePlanId: string | null;
|
|
@@ -18553,7 +18553,7 @@ export declare const adminBillingSummaryResponseSchema: z.ZodObject<{
|
|
|
18553
18553
|
id: string;
|
|
18554
18554
|
updatedAt: string;
|
|
18555
18555
|
maxFamilies: number;
|
|
18556
|
-
provider: "
|
|
18556
|
+
provider: "stripe" | "manual";
|
|
18557
18557
|
membership: {
|
|
18558
18558
|
hasAccess: boolean;
|
|
18559
18559
|
sourcePlanId: string | null;
|
|
@@ -18671,7 +18671,7 @@ export declare const adminBillingSummaryResponseSchema: z.ZodObject<{
|
|
|
18671
18671
|
id: string;
|
|
18672
18672
|
updatedAt: string;
|
|
18673
18673
|
maxFamilies: number;
|
|
18674
|
-
provider: "
|
|
18674
|
+
provider: "stripe" | "manual";
|
|
18675
18675
|
membership: {
|
|
18676
18676
|
hasAccess: boolean;
|
|
18677
18677
|
sourcePlanId: string | null;
|
|
@@ -18730,8 +18730,8 @@ export declare const adminBillingSummaryResponseSchema: z.ZodObject<{
|
|
|
18730
18730
|
yearly: number;
|
|
18731
18731
|
};
|
|
18732
18732
|
byProvider: {
|
|
18733
|
-
manual: number;
|
|
18734
18733
|
stripe: number;
|
|
18734
|
+
manual: number;
|
|
18735
18735
|
};
|
|
18736
18736
|
introductoryOffers: {
|
|
18737
18737
|
active: number;
|
|
@@ -18815,7 +18815,7 @@ export declare const adminBillingSummaryResponseSchema: z.ZodObject<{
|
|
|
18815
18815
|
id: string;
|
|
18816
18816
|
updatedAt: string;
|
|
18817
18817
|
maxFamilies: number;
|
|
18818
|
-
provider: "
|
|
18818
|
+
provider: "stripe" | "manual";
|
|
18819
18819
|
membership: {
|
|
18820
18820
|
hasAccess: boolean;
|
|
18821
18821
|
sourcePlanId: string | null;
|
|
@@ -18874,8 +18874,8 @@ export declare const adminBillingSummaryResponseSchema: z.ZodObject<{
|
|
|
18874
18874
|
yearly: number;
|
|
18875
18875
|
};
|
|
18876
18876
|
byProvider: {
|
|
18877
|
-
manual: number;
|
|
18878
18877
|
stripe: number;
|
|
18878
|
+
manual: number;
|
|
18879
18879
|
};
|
|
18880
18880
|
introductoryOffers: {
|
|
18881
18881
|
active: number;
|
|
@@ -20216,7 +20216,6 @@ export declare const adminBillingSummaryResponseSchema: z.ZodObject<{
|
|
|
20216
20216
|
};
|
|
20217
20217
|
}>;
|
|
20218
20218
|
}, "strip", z.ZodTypeAny, {
|
|
20219
|
-
generatedAt: string;
|
|
20220
20219
|
families: {
|
|
20221
20220
|
total: number;
|
|
20222
20221
|
coachLinked: number;
|
|
@@ -20404,6 +20403,7 @@ export declare const adminBillingSummaryResponseSchema: z.ZodObject<{
|
|
|
20404
20403
|
directSubscribedThenCoachLinkedRateBasisPoints: number | null;
|
|
20405
20404
|
};
|
|
20406
20405
|
};
|
|
20406
|
+
generatedAt: string;
|
|
20407
20407
|
acquisition: {
|
|
20408
20408
|
window: {
|
|
20409
20409
|
since: string;
|
|
@@ -20961,7 +20961,7 @@ export declare const adminBillingSummaryResponseSchema: z.ZodObject<{
|
|
|
20961
20961
|
id: string;
|
|
20962
20962
|
updatedAt: string;
|
|
20963
20963
|
maxFamilies: number;
|
|
20964
|
-
provider: "
|
|
20964
|
+
provider: "stripe" | "manual";
|
|
20965
20965
|
membership: {
|
|
20966
20966
|
hasAccess: boolean;
|
|
20967
20967
|
sourcePlanId: string | null;
|
|
@@ -21020,8 +21020,8 @@ export declare const adminBillingSummaryResponseSchema: z.ZodObject<{
|
|
|
21020
21020
|
yearly: number;
|
|
21021
21021
|
};
|
|
21022
21022
|
byProvider: {
|
|
21023
|
-
manual: number;
|
|
21024
21023
|
stripe: number;
|
|
21024
|
+
manual: number;
|
|
21025
21025
|
};
|
|
21026
21026
|
introductoryOffers: {
|
|
21027
21027
|
active: number;
|
|
@@ -21033,7 +21033,6 @@ export declare const adminBillingSummaryResponseSchema: z.ZodObject<{
|
|
|
21033
21033
|
};
|
|
21034
21034
|
};
|
|
21035
21035
|
}, {
|
|
21036
|
-
generatedAt: string;
|
|
21037
21036
|
families: {
|
|
21038
21037
|
total: number;
|
|
21039
21038
|
coachLinked: number;
|
|
@@ -21221,6 +21220,7 @@ export declare const adminBillingSummaryResponseSchema: z.ZodObject<{
|
|
|
21221
21220
|
directSubscribedThenCoachLinkedRateBasisPoints: number | null;
|
|
21222
21221
|
};
|
|
21223
21222
|
};
|
|
21223
|
+
generatedAt: string;
|
|
21224
21224
|
acquisition: {
|
|
21225
21225
|
window: {
|
|
21226
21226
|
since: string;
|
|
@@ -21778,7 +21778,7 @@ export declare const adminBillingSummaryResponseSchema: z.ZodObject<{
|
|
|
21778
21778
|
id: string;
|
|
21779
21779
|
updatedAt: string;
|
|
21780
21780
|
maxFamilies: number;
|
|
21781
|
-
provider: "
|
|
21781
|
+
provider: "stripe" | "manual";
|
|
21782
21782
|
membership: {
|
|
21783
21783
|
hasAccess: boolean;
|
|
21784
21784
|
sourcePlanId: string | null;
|
|
@@ -21837,8 +21837,8 @@ export declare const adminBillingSummaryResponseSchema: z.ZodObject<{
|
|
|
21837
21837
|
yearly: number;
|
|
21838
21838
|
};
|
|
21839
21839
|
byProvider: {
|
|
21840
|
-
manual: number;
|
|
21841
21840
|
stripe: number;
|
|
21841
|
+
manual: number;
|
|
21842
21842
|
};
|
|
21843
21843
|
introductoryOffers: {
|
|
21844
21844
|
active: number;
|
package/dist/booking-system.d.ts
CHANGED
|
@@ -114,6 +114,7 @@ export declare const defaultBookingFamilySourceOptions: readonly [{
|
|
|
114
114
|
export declare const bookingPageSurfaceSchema: z.ZodEnum<["brand", "neutral"]>;
|
|
115
115
|
export declare const bookingPrivacyNoticeUrlSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
116
116
|
export declare const bookingCoachPrivacyNoticeUrlSchema: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
117
|
+
export declare const bookingReplyToEmailSchema: z.ZodString;
|
|
117
118
|
export declare const bookingPageSchema: z.ZodObject<{
|
|
118
119
|
id: z.ZodString;
|
|
119
120
|
organizationId: z.ZodString;
|
|
@@ -194,6 +195,7 @@ export declare const bookingPageSchema: z.ZodObject<{
|
|
|
194
195
|
requiresDetail: boolean;
|
|
195
196
|
legacyValue: "other" | "instagram" | "facebook" | "googleSearch" | "recommendation" | "existingClient" | "anotherFamily" | null;
|
|
196
197
|
}[]>;
|
|
198
|
+
replyToEmail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
197
199
|
createdAt: z.ZodString;
|
|
198
200
|
updatedAt: z.ZodString;
|
|
199
201
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -238,6 +240,7 @@ export declare const bookingPageSchema: z.ZodObject<{
|
|
|
238
240
|
rescheduled: string | null;
|
|
239
241
|
} | undefined;
|
|
240
242
|
familyEmailContentRevision?: string | undefined;
|
|
243
|
+
replyToEmail?: string | null | undefined;
|
|
241
244
|
}, {
|
|
242
245
|
status: "paused" | "draft" | "published";
|
|
243
246
|
id: string;
|
|
@@ -280,6 +283,7 @@ export declare const bookingPageSchema: z.ZodObject<{
|
|
|
280
283
|
rescheduled: string | null;
|
|
281
284
|
} | undefined;
|
|
282
285
|
familyEmailContentRevision?: string | undefined;
|
|
286
|
+
replyToEmail?: string | null | undefined;
|
|
283
287
|
}>;
|
|
284
288
|
export declare const bookingPageWriteSchema: z.ZodEffects<z.ZodObject<{
|
|
285
289
|
organizationId: z.ZodString;
|
|
@@ -342,6 +346,7 @@ export declare const bookingPageWriteSchema: z.ZodEffects<z.ZodObject<{
|
|
|
342
346
|
reminder: string | null;
|
|
343
347
|
rescheduled: string | null;
|
|
344
348
|
}>>;
|
|
349
|
+
replyToEmail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
345
350
|
}, "strict", z.ZodTypeAny, {
|
|
346
351
|
status: "paused" | "draft" | "published";
|
|
347
352
|
timeZone: string;
|
|
@@ -373,6 +378,7 @@ export declare const bookingPageWriteSchema: z.ZodEffects<z.ZodObject<{
|
|
|
373
378
|
requiresDetail: boolean;
|
|
374
379
|
legacyValue: "other" | "instagram" | "facebook" | "googleSearch" | "recommendation" | "existingClient" | "anotherFamily" | null;
|
|
375
380
|
}[] | undefined;
|
|
381
|
+
replyToEmail?: string | null | undefined;
|
|
376
382
|
}, {
|
|
377
383
|
status: "paused" | "draft" | "published";
|
|
378
384
|
timeZone: string;
|
|
@@ -404,6 +410,7 @@ export declare const bookingPageWriteSchema: z.ZodEffects<z.ZodObject<{
|
|
|
404
410
|
requiresDetail: boolean;
|
|
405
411
|
legacyValue: "other" | "instagram" | "facebook" | "googleSearch" | "recommendation" | "existingClient" | "anotherFamily" | null;
|
|
406
412
|
}[] | undefined;
|
|
413
|
+
replyToEmail?: string | null | undefined;
|
|
407
414
|
}>, {
|
|
408
415
|
status: "paused" | "draft" | "published";
|
|
409
416
|
timeZone: string;
|
|
@@ -435,6 +442,7 @@ export declare const bookingPageWriteSchema: z.ZodEffects<z.ZodObject<{
|
|
|
435
442
|
requiresDetail: boolean;
|
|
436
443
|
legacyValue: "other" | "instagram" | "facebook" | "googleSearch" | "recommendation" | "existingClient" | "anotherFamily" | null;
|
|
437
444
|
}[] | undefined;
|
|
445
|
+
replyToEmail?: string | null | undefined;
|
|
438
446
|
}, {
|
|
439
447
|
status: "paused" | "draft" | "published";
|
|
440
448
|
timeZone: string;
|
|
@@ -466,6 +474,7 @@ export declare const bookingPageWriteSchema: z.ZodEffects<z.ZodObject<{
|
|
|
466
474
|
requiresDetail: boolean;
|
|
467
475
|
legacyValue: "other" | "instagram" | "facebook" | "googleSearch" | "recommendation" | "existingClient" | "anotherFamily" | null;
|
|
468
476
|
}[] | undefined;
|
|
477
|
+
replyToEmail?: string | null | undefined;
|
|
469
478
|
}>;
|
|
470
479
|
export declare const bookingServiceSchema: z.ZodObject<{
|
|
471
480
|
id: z.ZodString;
|
|
@@ -5538,6 +5547,7 @@ export declare const bookingAdminWorkspaceSchema: z.ZodObject<{
|
|
|
5538
5547
|
requiresDetail: boolean;
|
|
5539
5548
|
legacyValue: "other" | "instagram" | "facebook" | "googleSearch" | "recommendation" | "existingClient" | "anotherFamily" | null;
|
|
5540
5549
|
}[]>;
|
|
5550
|
+
replyToEmail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5541
5551
|
createdAt: z.ZodString;
|
|
5542
5552
|
updatedAt: z.ZodString;
|
|
5543
5553
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -5582,6 +5592,7 @@ export declare const bookingAdminWorkspaceSchema: z.ZodObject<{
|
|
|
5582
5592
|
rescheduled: string | null;
|
|
5583
5593
|
} | undefined;
|
|
5584
5594
|
familyEmailContentRevision?: string | undefined;
|
|
5595
|
+
replyToEmail?: string | null | undefined;
|
|
5585
5596
|
}, {
|
|
5586
5597
|
status: "paused" | "draft" | "published";
|
|
5587
5598
|
id: string;
|
|
@@ -5624,6 +5635,7 @@ export declare const bookingAdminWorkspaceSchema: z.ZodObject<{
|
|
|
5624
5635
|
rescheduled: string | null;
|
|
5625
5636
|
} | undefined;
|
|
5626
5637
|
familyEmailContentRevision?: string | undefined;
|
|
5638
|
+
replyToEmail?: string | null | undefined;
|
|
5627
5639
|
}>>;
|
|
5628
5640
|
services: z.ZodArray<z.ZodObject<{
|
|
5629
5641
|
id: z.ZodString;
|
|
@@ -6453,6 +6465,7 @@ export declare const bookingAdminWorkspaceSchema: z.ZodObject<{
|
|
|
6453
6465
|
rescheduled: string | null;
|
|
6454
6466
|
} | undefined;
|
|
6455
6467
|
familyEmailContentRevision?: string | undefined;
|
|
6468
|
+
replyToEmail?: string | null | undefined;
|
|
6456
6469
|
} | null;
|
|
6457
6470
|
availabilityRules: {
|
|
6458
6471
|
id: string;
|
|
@@ -6651,6 +6664,7 @@ export declare const bookingAdminWorkspaceSchema: z.ZodObject<{
|
|
|
6651
6664
|
rescheduled: string | null;
|
|
6652
6665
|
} | undefined;
|
|
6653
6666
|
familyEmailContentRevision?: string | undefined;
|
|
6667
|
+
replyToEmail?: string | null | undefined;
|
|
6654
6668
|
} | null;
|
|
6655
6669
|
availabilityRules: {
|
|
6656
6670
|
id: string;
|
|
@@ -7883,14 +7897,14 @@ export declare const bookingSlotQuerySchema: z.ZodObject<{
|
|
|
7883
7897
|
until: z.ZodString;
|
|
7884
7898
|
displayTimeZone: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
7885
7899
|
}, "strip", z.ZodTypeAny, {
|
|
7886
|
-
until: string;
|
|
7887
7900
|
from: string;
|
|
7901
|
+
until: string;
|
|
7888
7902
|
serviceId: string;
|
|
7889
7903
|
coachUserId?: string | undefined;
|
|
7890
7904
|
displayTimeZone?: string | undefined;
|
|
7891
7905
|
}, {
|
|
7892
|
-
until: string;
|
|
7893
7906
|
from: string;
|
|
7907
|
+
until: string;
|
|
7894
7908
|
serviceId: string;
|
|
7895
7909
|
coachUserId?: string | undefined;
|
|
7896
7910
|
displayTimeZone?: string | undefined;
|
package/dist/booking-system.js
CHANGED
|
@@ -213,6 +213,9 @@ export const bookingCoachPrivacyNoticeUrlSchema = bookingPrivacyNoticeUrlSchema.
|
|
|
213
213
|
return false;
|
|
214
214
|
}
|
|
215
215
|
}, "Use your own business privacy policy URL, not the Littles Baby Tracker privacy policy.");
|
|
216
|
+
// D-573 (UIR-066): the address families reach when they reply to a booking
|
|
217
|
+
// email. Absent or null means the assigned coach's sign-in email.
|
|
218
|
+
export const bookingReplyToEmailSchema = z.string().trim().toLowerCase().email().max(254);
|
|
216
219
|
export const bookingPageSchema = z.object({
|
|
217
220
|
id: idSchema,
|
|
218
221
|
organizationId: idSchema,
|
|
@@ -239,6 +242,8 @@ export const bookingPageSchema = z.object({
|
|
|
239
242
|
familyEmailContent: bookingFamilyEmailContentSchema.optional(),
|
|
240
243
|
familyEmailContentRevision: z.string().regex(/^email-[a-f0-9]{64}$/).optional(),
|
|
241
244
|
familyReportedSourceOptions: bookingFamilySourceOptionsSchema,
|
|
245
|
+
// Optional only while older API slots overlap; absent reads as unset.
|
|
246
|
+
replyToEmail: bookingReplyToEmailSchema.nullable().optional(),
|
|
242
247
|
createdAt: isoDateStringSchema,
|
|
243
248
|
updatedAt: isoDateStringSchema
|
|
244
249
|
});
|
|
@@ -266,7 +271,9 @@ export const bookingPageWriteSchema = z.object({
|
|
|
266
271
|
reminderMinutesBefore: z.number().int().min(1).max(43_200).nullable().default(1_440),
|
|
267
272
|
familyReportedSourceOptions: bookingFamilySourceOptionsSchema.optional(),
|
|
268
273
|
// Omission by older clients preserves saved wording; explicit null notes clear it.
|
|
269
|
-
familyEmailContent: bookingFamilyEmailContentSchema.optional()
|
|
274
|
+
familyEmailContent: bookingFamilyEmailContentSchema.optional(),
|
|
275
|
+
// Omission keeps the saved address; null goes back to the sign-in email.
|
|
276
|
+
replyToEmail: bookingReplyToEmailSchema.nullable().optional()
|
|
270
277
|
}).strict().superRefine((value, context) => {
|
|
271
278
|
if (value.status === "published" &&
|
|
272
279
|
!bookingCoachPrivacyNoticeUrlSchema.safeParse(value.privacyNoticeUrl).success) {
|