placementt-core 1.400.1252 → 1.400.1254
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/lib/bulkEngagement.d.ts +14 -2
- package/lib/bulkEngagement.js +24 -25
- package/lib/bulkEngagement.js.map +1 -1
- package/lib/bulkEngagement.test.js +45 -23
- package/lib/bulkEngagement.test.js.map +1 -1
- package/lib/callables/engagement.d.ts +75 -0
- package/lib/callables/engagement.js +19 -0
- package/lib/callables/engagement.js.map +1 -1
- package/lib/callables/registry.d.ts +138 -0
- package/lib/constants.d.ts +7 -0
- package/lib/constants.js +14 -46
- package/lib/constants.js.map +1 -1
- package/lib/onboardingPathways.test.js +1 -1
- package/lib/onboardingPathways.test.js.map +1 -1
- package/lib/renewals.d.ts +3 -3
- package/lib/renewals.js +5 -11
- package/lib/renewals.js.map +1 -1
- package/lib/util.js +3 -3
- package/lib/util.js.map +1 -1
- package/package.json +1 -1
- package/src/bulkEngagement.test.ts +54 -25
- package/src/bulkEngagement.ts +25 -23
- package/src/callables/engagement.ts +19 -0
- package/src/constants.ts +12 -44
- package/src/onboardingPathways.test.ts +1 -1
- package/src/renewals.ts +5 -11
- package/src/util.ts +4 -4
package/lib/bulkEngagement.d.ts
CHANGED
|
@@ -25,6 +25,10 @@ export type BulkEngagementFilters = {
|
|
|
25
25
|
packages: string[];
|
|
26
26
|
products: string[];
|
|
27
27
|
};
|
|
28
|
+
/** Who the popup's "Send test" goes to. Fixed on the server, never taken from the request. */
|
|
29
|
+
export declare const BULK_TEST_RECIPIENT = "tom@careerthread.co.uk";
|
|
30
|
+
/** How many schools' copies one test sends. Matches the cap in the callable's contract. */
|
|
31
|
+
export declare const BULK_TEST_SCHOOLS = 3;
|
|
28
32
|
/** A school that had this email this recently isn't suggested it again. */
|
|
29
33
|
export declare const RECENTLY_SENT_DAYS = 60;
|
|
30
34
|
export type BulkEngagementSchool = {
|
|
@@ -50,8 +54,8 @@ export type BulkEngagementSuggestion = {
|
|
|
50
54
|
/**
|
|
51
55
|
* Whether one email suits one school, and what is missing for it.
|
|
52
56
|
*
|
|
53
|
-
* Renewal emails are suggested
|
|
54
|
-
* to schools whose next onboarding step it is. Neither is suggested to a
|
|
57
|
+
* Renewal emails are suggested to every paying school, and any other admin
|
|
58
|
+
* email to schools whose next onboarding step it is. Neither is suggested to a
|
|
55
59
|
* school that had it in the last 60 days.
|
|
56
60
|
*
|
|
57
61
|
* @param {string} templateKey the admin email template.
|
|
@@ -72,3 +76,11 @@ export declare const matchesBulkFilters: (school: {
|
|
|
72
76
|
package: string;
|
|
73
77
|
products: string[];
|
|
74
78
|
}, { packages, products }: BulkEngagementFilters) => boolean;
|
|
79
|
+
/**
|
|
80
|
+
* How long ago an email went, for the send popup's chips.
|
|
81
|
+
*
|
|
82
|
+
* @param {string} day the day it went, YYYY-MM-DD.
|
|
83
|
+
* @param {Date} now the current time.
|
|
84
|
+
* @return {string} "Today", "1 day ago" or "12 days ago".
|
|
85
|
+
*/
|
|
86
|
+
export declare const bulkSentAgo: (day: string, now: Date) => string;
|
package/lib/bulkEngagement.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.matchesBulkFilters = exports.bulkEngagementSuggestion = exports.RECENTLY_SENT_DAYS = exports.BULK_ENGAGEMENT_PRODUCT_LABELS = exports.BULK_ENGAGEMENT_PRODUCTS = exports.BULK_ENGAGEMENT_PACKAGE_LABELS = exports.BULK_ENGAGEMENT_BLOCKING_FLAGS = exports.BULK_ENGAGEMENT_FLAG_LABELS = void 0;
|
|
3
|
+
exports.bulkSentAgo = exports.matchesBulkFilters = exports.bulkEngagementSuggestion = exports.RECENTLY_SENT_DAYS = exports.BULK_TEST_SCHOOLS = exports.BULK_TEST_RECIPIENT = exports.BULK_ENGAGEMENT_PRODUCT_LABELS = exports.BULK_ENGAGEMENT_PRODUCTS = exports.BULK_ENGAGEMENT_PACKAGE_LABELS = exports.BULK_ENGAGEMENT_BLOCKING_FLAGS = exports.BULK_ENGAGEMENT_FLAG_LABELS = void 0;
|
|
4
4
|
const renewals_1 = require("./renewals");
|
|
5
5
|
const constants_1 = require("./constants");
|
|
6
|
+
const outreachRules_1 = require("./outreachRules");
|
|
6
7
|
exports.BULK_ENGAGEMENT_FLAG_LABELS = {
|
|
7
8
|
noContacts: "No one to send to",
|
|
8
9
|
noRenewalDate: "No renewal date",
|
|
@@ -25,25 +26,17 @@ exports.BULK_ENGAGEMENT_PRODUCT_LABELS = {
|
|
|
25
26
|
employerEvents: "Employer events",
|
|
26
27
|
destinations: "Destinations",
|
|
27
28
|
};
|
|
29
|
+
/** Who the popup's "Send test" goes to. Fixed on the server, never taken from the request. */
|
|
30
|
+
exports.BULK_TEST_RECIPIENT = "tom@careerthread.co.uk";
|
|
31
|
+
/** How many schools' copies one test sends. Matches the cap in the callable's contract. */
|
|
32
|
+
exports.BULK_TEST_SCHOOLS = 3;
|
|
28
33
|
/** A school that had this email this recently isn't suggested it again. */
|
|
29
34
|
exports.RECENTLY_SENT_DAYS = 60;
|
|
30
|
-
/**
|
|
31
|
-
* Days to renewal each renewal email is suggested for, inclusive. "paying"
|
|
32
|
-
* suggests it to every paying school, date or not.
|
|
33
|
-
*/
|
|
34
|
-
const RENEWAL_SUGGEST_DAYS = {
|
|
35
|
-
engagementRenewalPrice: [61, 365],
|
|
36
|
-
engagementRenewalReview: "paying",
|
|
37
|
-
engagementRenewalDue: [31, 90],
|
|
38
|
-
engagementRenewalInvoice: [0, 45],
|
|
39
|
-
// A date this far off has most likely just moved on a year.
|
|
40
|
-
engagementRenewalThanks: [300, 400],
|
|
41
|
-
};
|
|
42
35
|
/**
|
|
43
36
|
* Whether one email suits one school, and what is missing for it.
|
|
44
37
|
*
|
|
45
|
-
* Renewal emails are suggested
|
|
46
|
-
* to schools whose next onboarding step it is. Neither is suggested to a
|
|
38
|
+
* Renewal emails are suggested to every paying school, and any other admin
|
|
39
|
+
* email to schools whose next onboarding step it is. Neither is suggested to a
|
|
47
40
|
* school that had it in the last 60 days.
|
|
48
41
|
*
|
|
49
42
|
* @param {string} templateKey the admin email template.
|
|
@@ -69,17 +62,9 @@ const bulkEngagementSuggestion = (templateKey, school) => {
|
|
|
69
62
|
const none = { suggested: false, flags };
|
|
70
63
|
if (recent || flags.some((f) => exports.BULK_ENGAGEMENT_BLOCKING_FLAGS.includes(f)))
|
|
71
64
|
return none;
|
|
72
|
-
|
|
73
|
-
if (!window)
|
|
65
|
+
if (!renewals_1.RENEWAL_EMAIL_TEMPLATES.includes(templateKey))
|
|
74
66
|
return nextOnboardingTemplate === templateKey ? { suggested: true, reason: "Their next onboarding step", flags } : none;
|
|
75
|
-
|
|
76
|
-
return none;
|
|
77
|
-
if (window === "paying")
|
|
78
|
-
return { suggested: true, reason: "Paying customer", flags };
|
|
79
|
-
const days = renewal.daysToRenewal;
|
|
80
|
-
if (days === undefined || days < window[0] || days > window[1])
|
|
81
|
-
return none;
|
|
82
|
-
return { suggested: true, reason: `Renews in ${days} days`, flags };
|
|
67
|
+
return renewal.applies ? { suggested: true, reason: "Paying customer", flags } : none;
|
|
83
68
|
};
|
|
84
69
|
exports.bulkEngagementSuggestion = bulkEngagementSuggestion;
|
|
85
70
|
/**
|
|
@@ -94,4 +79,18 @@ exports.bulkEngagementSuggestion = bulkEngagementSuggestion;
|
|
|
94
79
|
const matchesBulkFilters = (school, { packages, products }) => (!packages.length || packages.includes(school.package)) &&
|
|
95
80
|
(!products.length || products.some((p) => school.products.includes(p)));
|
|
96
81
|
exports.matchesBulkFilters = matchesBulkFilters;
|
|
82
|
+
/**
|
|
83
|
+
* How long ago an email went, for the send popup's chips.
|
|
84
|
+
*
|
|
85
|
+
* @param {string} day the day it went, YYYY-MM-DD.
|
|
86
|
+
* @param {Date} now the current time.
|
|
87
|
+
* @return {string} "Today", "1 day ago" or "12 days ago".
|
|
88
|
+
*/
|
|
89
|
+
const bulkSentAgo = (day, now) => {
|
|
90
|
+
const days = Math.round((Date.parse(`${(0, outreachRules_1.londonYmd)(now)}T00:00:00Z`) - Date.parse(`${day.slice(0, 10)}T00:00:00Z`)) / 86400000);
|
|
91
|
+
if (days <= 0)
|
|
92
|
+
return "Today";
|
|
93
|
+
return days === 1 ? "1 day ago" : `${days} days ago`;
|
|
94
|
+
};
|
|
95
|
+
exports.bulkSentAgo = bulkSentAgo;
|
|
97
96
|
//# sourceMappingURL=bulkEngagement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bulkEngagement.js","sourceRoot":"","sources":["../src/bulkEngagement.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"bulkEngagement.js","sourceRoot":"","sources":["../src/bulkEngagement.ts"],"names":[],"mappings":";;;AAEA,yCAA2F;AAC3F,2CAA2C;AAC3C,mDAA0C;AAa7B,QAAA,2BAA2B,GAAuC;IAC3E,UAAU,EAAE,mBAAmB;IAC/B,aAAa,EAAE,iBAAiB;IAChC,OAAO,EAAE,UAAU;IACnB,gBAAgB,EAAE,oBAAoB;IACtC,YAAY,EAAE,0BAA0B;CAC3C,CAAC;AAEF,4DAA4D;AAC/C,QAAA,8BAA8B,GAAyB,CAAC,YAAY,CAAC,CAAC;AAEnF,2EAA2E;AAC9D,QAAA,8BAA8B,GAA4B;IACnE,gBAAgB,EAAE,QAAQ;IAC1B,gBAAgB,EAAE,OAAO;IACzB,YAAY,EAAE,aAAa;IAC3B,eAAe,EAAE,YAAY;CAChC,CAAC;AAKW,QAAA,wBAAwB,GAA4B,CAAC,KAAK,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC;AAE9F,QAAA,8BAA8B,GAA0C;IACjF,GAAG,EAAE,iBAAiB;IACtB,cAAc,EAAE,iBAAiB;IACjC,YAAY,EAAE,cAAc;CAC/B,CAAC;AAKF,8FAA8F;AACjF,QAAA,mBAAmB,GAAG,wBAAwB,CAAC;AAE5D,2FAA2F;AAC9E,QAAA,iB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GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC;IAC9H,IAAI,IAAI,IAAI,CAAC;QAAE,OAAO,OAAO,CAAC;IAC9B,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,IAAI,WAAW,CAAC;AACzD,CAAC,CAAC;AAJW,QAAA,WAAW,eAItB"}
|
|
@@ -5,6 +5,8 @@ jest.mock("./firebase/firebaseQuery", () => ({ __esModule: true, default: class
|
|
|
5
5
|
} }));
|
|
6
6
|
const productResolver_1 = require("./productResolver");
|
|
7
7
|
const bulkEngagement_1 = require("./bulkEngagement");
|
|
8
|
+
const engagement_1 = require("./callables/engagement");
|
|
9
|
+
const constants_1 = require("./constants");
|
|
8
10
|
const school = (renewalDate, overrides = {}) => ({
|
|
9
11
|
name: "Calder Park Academy",
|
|
10
12
|
package: "institutes-one",
|
|
@@ -22,37 +24,23 @@ const suggest = (templateKey, institute, date, extra = {}) => (0, bulkEngagement
|
|
|
22
24
|
lastSent: extra.lastSent,
|
|
23
25
|
});
|
|
24
26
|
describe("bulk engagement suggestions", () => {
|
|
25
|
-
it("suggests the
|
|
26
|
-
expect(suggest("
|
|
27
|
-
expect(suggest("
|
|
28
|
-
expect(suggest("engagementRenewalDue", school("2026-11-20"), "2026-11-04").suggested).toBe(false);
|
|
29
|
-
});
|
|
30
|
-
it("suggests the invoice email inside 45 days, and next year's price further out", () => {
|
|
31
|
-
expect(suggest("engagementRenewalInvoice", school("2026-11-20"), "2026-11-04").suggested).toBe(true);
|
|
32
|
-
expect(suggest("engagementRenewalPrice", school("2027-06-10"), "2026-11-04").suggested).toBe(true);
|
|
33
|
-
expect(suggest("engagementRenewalPrice", school("2026-11-20"), "2026-11-04").suggested).toBe(false);
|
|
34
|
-
});
|
|
35
|
-
it("suggests the year in review to every paying school, and thanks to those just renewed", () => {
|
|
36
|
-
expect(suggest("engagementRenewalReview", school(), "2026-11-04").suggested).toBe(true);
|
|
37
|
-
expect(suggest("engagementRenewalThanks", school("2027-10-20"), "2026-11-04").suggested).toBe(true);
|
|
38
|
-
expect(suggest("engagementRenewalThanks", school("2027-01-10"), "2026-11-04").suggested).toBe(false);
|
|
27
|
+
it("suggests the check-in to every paying school, date or not", () => {
|
|
28
|
+
expect(suggest("engagementRenewalCheckIn", school("2027-06-10"), "2026-11-04")).toMatchObject({ suggested: true, reason: "Paying customer" });
|
|
29
|
+
expect(suggest("engagementRenewalCheckIn", school(), "2026-11-04").suggested).toBe(true);
|
|
39
30
|
});
|
|
40
31
|
it("leaves out hub schools", () => {
|
|
41
|
-
expect(suggest("
|
|
32
|
+
expect(suggest("engagementRenewalCheckIn", school("2027-01-10", { package: "careersSchool" }), "2026-11-04").suggested).toBe(false);
|
|
42
33
|
});
|
|
43
34
|
it("doesn't suggest an email the school had in the last 60 days", () => {
|
|
44
|
-
const recent = suggest("
|
|
35
|
+
const recent = suggest("engagementRenewalCheckIn", school("2027-01-10"), "2026-11-04", { lastSent: "2026-10-01T09:00:00Z" });
|
|
45
36
|
expect(recent).toMatchObject({ suggested: false, flags: expect.arrayContaining(["sentRecently"]) });
|
|
46
|
-
expect(suggest("
|
|
37
|
+
expect(suggest("engagementRenewalCheckIn", school("2027-01-10"), "2026-11-04", { lastSent: "2026-06-01T09:00:00Z" }).suggested).toBe(true);
|
|
47
38
|
});
|
|
48
|
-
it("
|
|
49
|
-
expect(suggest("
|
|
50
|
-
.toEqual(["noRenewalDate", "noQuote", "noFinanceContact"]);
|
|
51
|
-
const withFinance = school("2027-01-10", { financeContact: { name: "Pat Lee", email: "pat@school.org" } });
|
|
52
|
-
expect(suggest("engagementRenewalDue", withFinance, "2026-11-04").flags).toEqual([]);
|
|
39
|
+
it("needs no renewal date, quote or finance contact for the check-in", () => {
|
|
40
|
+
expect(suggest("engagementRenewalCheckIn", school(), "2026-11-04", { hasQuote: false }).flags).toEqual([]);
|
|
53
41
|
});
|
|
54
42
|
it("never suggests a school with no one to send to", () => {
|
|
55
|
-
expect(suggest("
|
|
43
|
+
expect(suggest("engagementRenewalCheckIn", school(), "2026-11-04", { contactCount: 0 })).toMatchObject({ suggested: false, flags: ["noContacts"] });
|
|
56
44
|
});
|
|
57
45
|
it("suggests an onboarding email to schools whose next step it is", () => {
|
|
58
46
|
expect(suggest("engagementPickFeatures", school(), "2026-11-04", { nextOnboardingTemplate: "engagementPickFeatures" }))
|
|
@@ -99,4 +87,38 @@ describe("matchesBulkFilters", () => {
|
|
|
99
87
|
expect(bulkEngagement_1.BULK_ENGAGEMENT_PRODUCTS.filter((p) => products[p])).toEqual(["employerEvents"]);
|
|
100
88
|
});
|
|
101
89
|
});
|
|
90
|
+
describe("sendBulkEngagementTest contract", () => {
|
|
91
|
+
const request = (count) => ({
|
|
92
|
+
templateKey: "engagementRenewalCheckIn",
|
|
93
|
+
oIds: Array.from({ length: count }, (_, i) => `school-${i}`),
|
|
94
|
+
subject: "Renewing",
|
|
95
|
+
body: [{ type: "paragraph" }],
|
|
96
|
+
});
|
|
97
|
+
const contract = engagement_1.engagementCallables["bulkEngagement-sendBulkEngagementTest"].request;
|
|
98
|
+
it("takes up to BULK_TEST_SCHOOLS schools and no more", () => {
|
|
99
|
+
expect(contract.safeParse(request(bulkEngagement_1.BULK_TEST_SCHOOLS)).success).toBe(true);
|
|
100
|
+
expect(contract.safeParse(request(bulkEngagement_1.BULK_TEST_SCHOOLS + 1)).success).toBe(false);
|
|
101
|
+
});
|
|
102
|
+
it("has no way to name a recipient", () => {
|
|
103
|
+
expect(contract.parse({ ...request(1), to: "someone@school.sch.uk" })).not.toHaveProperty("to");
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
describe("bulkSentAgo", () => {
|
|
107
|
+
const now = new Date("2026-11-04T09:00:00Z");
|
|
108
|
+
it("counts whole days, from a day or a full date", () => {
|
|
109
|
+
expect((0, bulkEngagement_1.bulkSentAgo)("2026-11-04", now)).toBe("Today");
|
|
110
|
+
expect((0, bulkEngagement_1.bulkSentAgo)("2026-11-03", now)).toBe("1 day ago");
|
|
111
|
+
expect((0, bulkEngagement_1.bulkSentAgo)("2026-10-23", now)).toBe("12 days ago");
|
|
112
|
+
expect((0, bulkEngagement_1.bulkSentAgo)("2026-10-23T15:00:00Z", now)).toBe("12 days ago");
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
describe("the check-in's button", () => {
|
|
116
|
+
it("goes to the Calendly link, not a page on CareerThread", () => {
|
|
117
|
+
const link = constants_1.emailTemplates.engagementRenewalCheckIn.button?.link;
|
|
118
|
+
expect((0, constants_1.emailButtonUrl)(link)).toBe("https://calendly.com/tom-careerthread/30min");
|
|
119
|
+
});
|
|
120
|
+
it("still puts ordinary links on CareerThread", () => {
|
|
121
|
+
expect((0, constants_1.emailButtonUrl)("/institutes/home")).toBe("https://careerthread.co.uk/institutes/home");
|
|
122
|
+
});
|
|
123
|
+
});
|
|
102
124
|
//# sourceMappingURL=bulkEngagement.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bulkEngagement.test.js","sourceRoot":"","sources":["../src/bulkEngagement.test.ts"],"names":[],"mappings":";;AAAA,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE,GAAG,EAAE,CAAC,CAAC,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,EAAC,CAAC,CAAC,CAAC;AAC5D,IAAI,CAAC,IAAI,CAAC,0BAA0B,EAAE,GAAG,EAAE,CAAC,CAAC,EAAC,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE;KAAQ,EAAC,CAAC,CAAC,CAAC;AAGrF,uDAAkD;AAClD,
|
|
1
|
+
{"version":3,"file":"bulkEngagement.test.js","sourceRoot":"","sources":["../src/bulkEngagement.test.ts"],"names":[],"mappings":";;AAAA,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE,GAAG,EAAE,CAAC,CAAC,EAAC,KAAK,EAAE,IAAI,CAAC,E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BAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC;IAClG,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -23,6 +23,17 @@ export declare const engagementCallables: {
|
|
|
23
23
|
contacts: z.ZodNumber;
|
|
24
24
|
/** ISO date this email last went to the school, if it has. */
|
|
25
25
|
lastSent: z.ZodOptional<z.ZodString>;
|
|
26
|
+
/** The last engagement email of any kind that went to the school, if one has. */
|
|
27
|
+
lastEmail: z.ZodOptional<z.ZodObject<{
|
|
28
|
+
title: z.ZodString;
|
|
29
|
+
sentDay: z.ZodString;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
title: string;
|
|
32
|
+
sentDay: string;
|
|
33
|
+
}, {
|
|
34
|
+
title: string;
|
|
35
|
+
sentDay: string;
|
|
36
|
+
}>>;
|
|
26
37
|
/** The school's params, for previewing the email as they'd get it. */
|
|
27
38
|
params: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
28
39
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -36,6 +47,10 @@ export declare const engagementCallables: {
|
|
|
36
47
|
suggested: boolean;
|
|
37
48
|
reason?: string | undefined;
|
|
38
49
|
lastSent?: string | undefined;
|
|
50
|
+
lastEmail?: {
|
|
51
|
+
title: string;
|
|
52
|
+
sentDay: string;
|
|
53
|
+
} | undefined;
|
|
39
54
|
}, {
|
|
40
55
|
name: string;
|
|
41
56
|
oId: string;
|
|
@@ -47,6 +62,10 @@ export declare const engagementCallables: {
|
|
|
47
62
|
suggested: boolean;
|
|
48
63
|
reason?: string | undefined;
|
|
49
64
|
lastSent?: string | undefined;
|
|
65
|
+
lastEmail?: {
|
|
66
|
+
title: string;
|
|
67
|
+
sentDay: string;
|
|
68
|
+
} | undefined;
|
|
50
69
|
}>, "many">;
|
|
51
70
|
}, "strip", z.ZodTypeAny, {
|
|
52
71
|
schools: {
|
|
@@ -60,6 +79,10 @@ export declare const engagementCallables: {
|
|
|
60
79
|
suggested: boolean;
|
|
61
80
|
reason?: string | undefined;
|
|
62
81
|
lastSent?: string | undefined;
|
|
82
|
+
lastEmail?: {
|
|
83
|
+
title: string;
|
|
84
|
+
sentDay: string;
|
|
85
|
+
} | undefined;
|
|
63
86
|
}[];
|
|
64
87
|
}, {
|
|
65
88
|
schools: {
|
|
@@ -73,6 +96,10 @@ export declare const engagementCallables: {
|
|
|
73
96
|
suggested: boolean;
|
|
74
97
|
reason?: string | undefined;
|
|
75
98
|
lastSent?: string | undefined;
|
|
99
|
+
lastEmail?: {
|
|
100
|
+
title: string;
|
|
101
|
+
sentDay: string;
|
|
102
|
+
} | undefined;
|
|
76
103
|
}[];
|
|
77
104
|
}>;
|
|
78
105
|
};
|
|
@@ -126,6 +153,54 @@ export declare const engagementCallables: {
|
|
|
126
153
|
}>;
|
|
127
154
|
}>;
|
|
128
155
|
};
|
|
156
|
+
/**
|
|
157
|
+
* Sends each school's copy of the email to CareerThread's test address, so
|
|
158
|
+
* it can be read before the real send. Nothing is logged on the school or
|
|
159
|
+
* changed on it, and no follow-ups start. The address is set on the server.
|
|
160
|
+
*/
|
|
161
|
+
"bulkEngagement-sendBulkEngagementTest": {
|
|
162
|
+
request: z.ZodObject<{
|
|
163
|
+
templateKey: z.ZodString;
|
|
164
|
+
oIds: z.ZodArray<z.ZodString, "many">;
|
|
165
|
+
subject: z.ZodString;
|
|
166
|
+
body: z.ZodArray<z.ZodUnknown, "many">;
|
|
167
|
+
heroImage: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
168
|
+
}, "strip", z.ZodTypeAny, {
|
|
169
|
+
body: unknown[];
|
|
170
|
+
subject: string;
|
|
171
|
+
templateKey: string;
|
|
172
|
+
oIds: string[];
|
|
173
|
+
heroImage?: string | undefined;
|
|
174
|
+
}, {
|
|
175
|
+
body: unknown[];
|
|
176
|
+
subject: string;
|
|
177
|
+
templateKey: string;
|
|
178
|
+
oIds: string[];
|
|
179
|
+
heroImage?: string | null | undefined;
|
|
180
|
+
}>;
|
|
181
|
+
response: z.ZodObject<{
|
|
182
|
+
results: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
183
|
+
sent: z.ZodArray<z.ZodString, "many">;
|
|
184
|
+
error: z.ZodOptional<z.ZodString>;
|
|
185
|
+
}, "strip", z.ZodTypeAny, {
|
|
186
|
+
sent: string[];
|
|
187
|
+
error?: string | undefined;
|
|
188
|
+
}, {
|
|
189
|
+
sent: string[];
|
|
190
|
+
error?: string | undefined;
|
|
191
|
+
}>>;
|
|
192
|
+
}, "strip", z.ZodTypeAny, {
|
|
193
|
+
results: Record<string, {
|
|
194
|
+
sent: string[];
|
|
195
|
+
error?: string | undefined;
|
|
196
|
+
}>;
|
|
197
|
+
}, {
|
|
198
|
+
results: Record<string, {
|
|
199
|
+
sent: string[];
|
|
200
|
+
error?: string | undefined;
|
|
201
|
+
}>;
|
|
202
|
+
}>;
|
|
203
|
+
};
|
|
129
204
|
/** One-off: removes the open renewal email tasks the old automatic schedule made. */
|
|
130
205
|
"bulkEngagement-clearRenewalEmailTasks": {
|
|
131
206
|
request: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
|
|
@@ -33,6 +33,8 @@ exports.engagementCallables = {
|
|
|
33
33
|
contacts: zod_1.z.number(),
|
|
34
34
|
/** ISO date this email last went to the school, if it has. */
|
|
35
35
|
lastSent: zod_1.z.string().optional(),
|
|
36
|
+
/** The last engagement email of any kind that went to the school, if one has. */
|
|
37
|
+
lastEmail: zod_1.z.object({ title: zod_1.z.string(), sentDay: zod_1.z.string() }).optional(),
|
|
36
38
|
/** The school's params, for previewing the email as they'd get it. */
|
|
37
39
|
params: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
|
|
38
40
|
})),
|
|
@@ -55,6 +57,23 @@ exports.engagementCallables = {
|
|
|
55
57
|
results: zod_1.z.record(zod_1.z.string(), zod_1.z.object({ sent: zod_1.z.array(zod_1.z.string()), error: zod_1.z.string().optional() })),
|
|
56
58
|
}),
|
|
57
59
|
},
|
|
60
|
+
/**
|
|
61
|
+
* Sends each school's copy of the email to CareerThread's test address, so
|
|
62
|
+
* it can be read before the real send. Nothing is logged on the school or
|
|
63
|
+
* changed on it, and no follow-ups start. The address is set on the server.
|
|
64
|
+
*/
|
|
65
|
+
"bulkEngagement-sendBulkEngagementTest": {
|
|
66
|
+
request: zod_1.z.object({
|
|
67
|
+
templateKey: zod_1.z.string().min(1),
|
|
68
|
+
oIds: zod_1.z.array(zod_1.z.string().min(1)).min(1, "Pick at least one school.").max(3),
|
|
69
|
+
subject: zod_1.z.string().trim().min(1, "Give it a subject."),
|
|
70
|
+
body: zod_1.z.array(zod_1.z.unknown()).min(1),
|
|
71
|
+
heroImage: (0, types_1.optionalField)(zod_1.z.string()),
|
|
72
|
+
}),
|
|
73
|
+
response: zod_1.z.object({
|
|
74
|
+
results: zod_1.z.record(zod_1.z.string(), zod_1.z.object({ sent: zod_1.z.array(zod_1.z.string()), error: zod_1.z.string().optional() })),
|
|
75
|
+
}),
|
|
76
|
+
},
|
|
58
77
|
/** One-off: removes the open renewal email tasks the old automatic schedule made. */
|
|
59
78
|
"bulkEngagement-clearRenewalEmailTasks": {
|
|
60
79
|
request: zod_1.z.object({}).optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engagement.js","sourceRoot":"","sources":["../../src/callables/engagement.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,mCAAqD;AAErD;;;;;;;GAOG;AAEH,MAAM,IAAI,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,kBAAkB,EAAE,cAAc,CAAC,CAAC,CAAC;AACpG,MAAM,OAAO,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC,CAAC;AAErD,QAAA,mBAAmB,GAAG;IAC/B,yCAAyC,EAAE;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CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YAC3E,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,oBAAoB,CAAC;YACvD,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACjC,SAAS,EAAE,IAAA,qBAAa,EAAC,OAAC,CAAC,MAAM,EAAE,CAAC;SACvC,CAAC;QACF,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC;YACf,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,CAAC,EAAC,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAC,CAAC,CAAC;SACrG,CAAC;KACL;IACD,qFAAqF;IACrF,uCAAuC,EAAE;QACrC,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;QAChC,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,EAAC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,EAAC,CAAC;KAC5C;CACoB,CAAC"}
|
|
@@ -30,6 +30,16 @@ export declare const allCallables: {
|
|
|
30
30
|
flags: z.ZodArray<z.ZodEnum<["noContacts", "noRenewalDate", "noQuote", "noFinanceContact", "sentRecently"]>, "many">;
|
|
31
31
|
contacts: z.ZodNumber;
|
|
32
32
|
lastSent: z.ZodOptional<z.ZodString>;
|
|
33
|
+
lastEmail: z.ZodOptional<z.ZodObject<{
|
|
34
|
+
title: z.ZodString;
|
|
35
|
+
sentDay: z.ZodString;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
title: string;
|
|
38
|
+
sentDay: string;
|
|
39
|
+
}, {
|
|
40
|
+
title: string;
|
|
41
|
+
sentDay: string;
|
|
42
|
+
}>>;
|
|
33
43
|
params: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
34
44
|
}, "strip", z.ZodTypeAny, {
|
|
35
45
|
name: string;
|
|
@@ -42,6 +52,10 @@ export declare const allCallables: {
|
|
|
42
52
|
suggested: boolean;
|
|
43
53
|
reason?: string | undefined;
|
|
44
54
|
lastSent?: string | undefined;
|
|
55
|
+
lastEmail?: {
|
|
56
|
+
title: string;
|
|
57
|
+
sentDay: string;
|
|
58
|
+
} | undefined;
|
|
45
59
|
}, {
|
|
46
60
|
name: string;
|
|
47
61
|
oId: string;
|
|
@@ -53,6 +67,10 @@ export declare const allCallables: {
|
|
|
53
67
|
suggested: boolean;
|
|
54
68
|
reason?: string | undefined;
|
|
55
69
|
lastSent?: string | undefined;
|
|
70
|
+
lastEmail?: {
|
|
71
|
+
title: string;
|
|
72
|
+
sentDay: string;
|
|
73
|
+
} | undefined;
|
|
56
74
|
}>, "many">;
|
|
57
75
|
}, "strip", z.ZodTypeAny, {
|
|
58
76
|
schools: {
|
|
@@ -66,6 +84,10 @@ export declare const allCallables: {
|
|
|
66
84
|
suggested: boolean;
|
|
67
85
|
reason?: string | undefined;
|
|
68
86
|
lastSent?: string | undefined;
|
|
87
|
+
lastEmail?: {
|
|
88
|
+
title: string;
|
|
89
|
+
sentDay: string;
|
|
90
|
+
} | undefined;
|
|
69
91
|
}[];
|
|
70
92
|
}, {
|
|
71
93
|
schools: {
|
|
@@ -79,6 +101,10 @@ export declare const allCallables: {
|
|
|
79
101
|
suggested: boolean;
|
|
80
102
|
reason?: string | undefined;
|
|
81
103
|
lastSent?: string | undefined;
|
|
104
|
+
lastEmail?: {
|
|
105
|
+
title: string;
|
|
106
|
+
sentDay: string;
|
|
107
|
+
} | undefined;
|
|
82
108
|
}[];
|
|
83
109
|
}>;
|
|
84
110
|
};
|
|
@@ -128,6 +154,49 @@ export declare const allCallables: {
|
|
|
128
154
|
}>;
|
|
129
155
|
}>;
|
|
130
156
|
};
|
|
157
|
+
"bulkEngagement-sendBulkEngagementTest": {
|
|
158
|
+
request: z.ZodObject<{
|
|
159
|
+
templateKey: z.ZodString;
|
|
160
|
+
oIds: z.ZodArray<z.ZodString, "many">;
|
|
161
|
+
subject: z.ZodString;
|
|
162
|
+
body: z.ZodArray<z.ZodUnknown, "many">;
|
|
163
|
+
heroImage: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
164
|
+
}, "strip", z.ZodTypeAny, {
|
|
165
|
+
body: unknown[];
|
|
166
|
+
subject: string;
|
|
167
|
+
templateKey: string;
|
|
168
|
+
oIds: string[];
|
|
169
|
+
heroImage?: string | undefined;
|
|
170
|
+
}, {
|
|
171
|
+
body: unknown[];
|
|
172
|
+
subject: string;
|
|
173
|
+
templateKey: string;
|
|
174
|
+
oIds: string[];
|
|
175
|
+
heroImage?: string | null | undefined;
|
|
176
|
+
}>;
|
|
177
|
+
response: z.ZodObject<{
|
|
178
|
+
results: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
179
|
+
sent: z.ZodArray<z.ZodString, "many">;
|
|
180
|
+
error: z.ZodOptional<z.ZodString>;
|
|
181
|
+
}, "strip", z.ZodTypeAny, {
|
|
182
|
+
sent: string[];
|
|
183
|
+
error?: string | undefined;
|
|
184
|
+
}, {
|
|
185
|
+
sent: string[];
|
|
186
|
+
error?: string | undefined;
|
|
187
|
+
}>>;
|
|
188
|
+
}, "strip", z.ZodTypeAny, {
|
|
189
|
+
results: Record<string, {
|
|
190
|
+
sent: string[];
|
|
191
|
+
error?: string | undefined;
|
|
192
|
+
}>;
|
|
193
|
+
}, {
|
|
194
|
+
results: Record<string, {
|
|
195
|
+
sent: string[];
|
|
196
|
+
error?: string | undefined;
|
|
197
|
+
}>;
|
|
198
|
+
}>;
|
|
199
|
+
};
|
|
131
200
|
"bulkEngagement-clearRenewalEmailTasks": {
|
|
132
201
|
request: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
|
|
133
202
|
response: z.ZodObject<{
|
|
@@ -8010,6 +8079,16 @@ export declare const callableGroups: {
|
|
|
8010
8079
|
flags: z.ZodArray<z.ZodEnum<["noContacts", "noRenewalDate", "noQuote", "noFinanceContact", "sentRecently"]>, "many">;
|
|
8011
8080
|
contacts: z.ZodNumber;
|
|
8012
8081
|
lastSent: z.ZodOptional<z.ZodString>;
|
|
8082
|
+
lastEmail: z.ZodOptional<z.ZodObject<{
|
|
8083
|
+
title: z.ZodString;
|
|
8084
|
+
sentDay: z.ZodString;
|
|
8085
|
+
}, "strip", z.ZodTypeAny, {
|
|
8086
|
+
title: string;
|
|
8087
|
+
sentDay: string;
|
|
8088
|
+
}, {
|
|
8089
|
+
title: string;
|
|
8090
|
+
sentDay: string;
|
|
8091
|
+
}>>;
|
|
8013
8092
|
params: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
8014
8093
|
}, "strip", z.ZodTypeAny, {
|
|
8015
8094
|
name: string;
|
|
@@ -8022,6 +8101,10 @@ export declare const callableGroups: {
|
|
|
8022
8101
|
suggested: boolean;
|
|
8023
8102
|
reason?: string | undefined;
|
|
8024
8103
|
lastSent?: string | undefined;
|
|
8104
|
+
lastEmail?: {
|
|
8105
|
+
title: string;
|
|
8106
|
+
sentDay: string;
|
|
8107
|
+
} | undefined;
|
|
8025
8108
|
}, {
|
|
8026
8109
|
name: string;
|
|
8027
8110
|
oId: string;
|
|
@@ -8033,6 +8116,10 @@ export declare const callableGroups: {
|
|
|
8033
8116
|
suggested: boolean;
|
|
8034
8117
|
reason?: string | undefined;
|
|
8035
8118
|
lastSent?: string | undefined;
|
|
8119
|
+
lastEmail?: {
|
|
8120
|
+
title: string;
|
|
8121
|
+
sentDay: string;
|
|
8122
|
+
} | undefined;
|
|
8036
8123
|
}>, "many">;
|
|
8037
8124
|
}, "strip", z.ZodTypeAny, {
|
|
8038
8125
|
schools: {
|
|
@@ -8046,6 +8133,10 @@ export declare const callableGroups: {
|
|
|
8046
8133
|
suggested: boolean;
|
|
8047
8134
|
reason?: string | undefined;
|
|
8048
8135
|
lastSent?: string | undefined;
|
|
8136
|
+
lastEmail?: {
|
|
8137
|
+
title: string;
|
|
8138
|
+
sentDay: string;
|
|
8139
|
+
} | undefined;
|
|
8049
8140
|
}[];
|
|
8050
8141
|
}, {
|
|
8051
8142
|
schools: {
|
|
@@ -8059,6 +8150,10 @@ export declare const callableGroups: {
|
|
|
8059
8150
|
suggested: boolean;
|
|
8060
8151
|
reason?: string | undefined;
|
|
8061
8152
|
lastSent?: string | undefined;
|
|
8153
|
+
lastEmail?: {
|
|
8154
|
+
title: string;
|
|
8155
|
+
sentDay: string;
|
|
8156
|
+
} | undefined;
|
|
8062
8157
|
}[];
|
|
8063
8158
|
}>;
|
|
8064
8159
|
};
|
|
@@ -8108,6 +8203,49 @@ export declare const callableGroups: {
|
|
|
8108
8203
|
}>;
|
|
8109
8204
|
}>;
|
|
8110
8205
|
};
|
|
8206
|
+
"bulkEngagement-sendBulkEngagementTest": {
|
|
8207
|
+
request: z.ZodObject<{
|
|
8208
|
+
templateKey: z.ZodString;
|
|
8209
|
+
oIds: z.ZodArray<z.ZodString, "many">;
|
|
8210
|
+
subject: z.ZodString;
|
|
8211
|
+
body: z.ZodArray<z.ZodUnknown, "many">;
|
|
8212
|
+
heroImage: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
8213
|
+
}, "strip", z.ZodTypeAny, {
|
|
8214
|
+
body: unknown[];
|
|
8215
|
+
subject: string;
|
|
8216
|
+
templateKey: string;
|
|
8217
|
+
oIds: string[];
|
|
8218
|
+
heroImage?: string | undefined;
|
|
8219
|
+
}, {
|
|
8220
|
+
body: unknown[];
|
|
8221
|
+
subject: string;
|
|
8222
|
+
templateKey: string;
|
|
8223
|
+
oIds: string[];
|
|
8224
|
+
heroImage?: string | null | undefined;
|
|
8225
|
+
}>;
|
|
8226
|
+
response: z.ZodObject<{
|
|
8227
|
+
results: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
8228
|
+
sent: z.ZodArray<z.ZodString, "many">;
|
|
8229
|
+
error: z.ZodOptional<z.ZodString>;
|
|
8230
|
+
}, "strip", z.ZodTypeAny, {
|
|
8231
|
+
sent: string[];
|
|
8232
|
+
error?: string | undefined;
|
|
8233
|
+
}, {
|
|
8234
|
+
sent: string[];
|
|
8235
|
+
error?: string | undefined;
|
|
8236
|
+
}>>;
|
|
8237
|
+
}, "strip", z.ZodTypeAny, {
|
|
8238
|
+
results: Record<string, {
|
|
8239
|
+
sent: string[];
|
|
8240
|
+
error?: string | undefined;
|
|
8241
|
+
}>;
|
|
8242
|
+
}, {
|
|
8243
|
+
results: Record<string, {
|
|
8244
|
+
sent: string[];
|
|
8245
|
+
error?: string | undefined;
|
|
8246
|
+
}>;
|
|
8247
|
+
}>;
|
|
8248
|
+
};
|
|
8111
8249
|
"bulkEngagement-clearRenewalEmailTasks": {
|
|
8112
8250
|
request: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
|
|
8113
8251
|
response: z.ZodObject<{
|