placementt-core 1.400.1105 → 1.400.1107
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/activityLogging.d.ts +23 -17
- package/lib/activityLogging.js +26 -32
- package/lib/activityLogging.js.map +1 -1
- package/lib/activityLogging.test.js +27 -9
- package/lib/activityLogging.test.js.map +1 -1
- package/lib/callables/index.d.ts +1 -0
- package/lib/callables/index.js +1 -0
- package/lib/callables/index.js.map +1 -1
- package/lib/callables/registry.d.ts +162 -56
- package/lib/callables/registry.js +3 -1
- package/lib/callables/registry.js.map +1 -1
- package/lib/callables/studentLaunches.d.ts +100 -0
- package/lib/callables/studentLaunches.js +72 -0
- package/lib/callables/studentLaunches.js.map +1 -0
- package/lib/callables/surveys.d.ts +12 -30
- package/lib/callables/surveys.js +6 -14
- package/lib/callables/surveys.js.map +1 -1
- package/lib/firebase/callableJobContext.js +5 -0
- package/lib/firebase/callableJobContext.js.map +1 -1
- package/lib/firebase/firebase.d.ts +1 -1
- package/lib/firebase/firebase.js +10 -0
- package/lib/firebase/firebase.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/studentAudiences.d.ts +284 -0
- package/lib/studentAudiences.js +416 -0
- package/lib/studentAudiences.js.map +1 -0
- package/lib/studentAudiences.test.d.ts +1 -0
- package/lib/studentAudiences.test.js +206 -0
- package/lib/studentAudiences.test.js.map +1 -0
- package/lib/studentTools.d.ts +16 -24
- package/lib/studentTools.js +16 -44
- package/lib/studentTools.js.map +1 -1
- package/lib/surveys/types.d.ts +5 -0
- package/lib/surveys/types.js.map +1 -1
- package/lib/typeDefinitions.d.ts +55 -0
- package/lib/typeDefinitions.js.map +1 -1
- package/package.json +1 -1
- package/src/activityLogging.test.ts +29 -9
- package/src/activityLogging.ts +37 -29
- package/src/callables/index.ts +1 -0
- package/src/callables/registry.ts +3 -1
- package/src/callables/studentLaunches.ts +71 -0
- package/src/callables/surveys.ts +6 -14
- package/src/firebase/callableJobContext.ts +6 -0
- package/src/firebase/firebase.tsx +12 -1
- package/src/index.ts +1 -0
- package/src/studentAudiences.test.ts +260 -0
- package/src/studentAudiences.ts +509 -0
- package/src/studentTools.ts +31 -44
- package/src/surveys/types.ts +5 -0
- package/src/typeDefinitions.ts +53 -0
package/lib/activityLogging.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ActivityLoggingConfig, InstituteData } from "./typeDefinitions";
|
|
2
|
+
import { AudienceCandidate } from "./studentAudiences";
|
|
2
3
|
/**
|
|
3
4
|
* Whether a student can log activities, and whether we may email them about it.
|
|
4
5
|
*
|
|
@@ -9,50 +10,55 @@ import { ActivityLoggingConfig, InstituteData } from "./typeDefinitions";
|
|
|
9
10
|
* area, its analytics and its Gatsby reporting.
|
|
10
11
|
* - `activityLogging` is the LAUNCH. It is what a school says to its students, and
|
|
11
12
|
* absent means nothing has been said. A feature that appears in a pupil's account
|
|
12
|
-
* unannounced gets used by nobody and asked about by everybody, so a
|
|
13
|
-
* sees activity logging only once the school has launched it to them.
|
|
13
|
+
* unannounced gets used by nobody and asked about by everybody, so a group of
|
|
14
|
+
* students sees activity logging only once the school has launched it to them.
|
|
14
15
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
16
|
+
* Activity logging was the first thing a school launched, and for a while the only
|
|
17
|
+
* one; launching is now one shape for it and the two destinations tools alike, in
|
|
18
|
+
* ./studentAudiences. What is left here is the product switch and the names the
|
|
19
|
+
* activity surfaces already know the launch by.
|
|
18
20
|
*/
|
|
19
21
|
/** Does the school have the Activities area at all? Absent means yes. */
|
|
20
22
|
export declare const activityLoggingProductOn: (institute?: Pick<InstituteData, "trackExtracurriculars">) => boolean;
|
|
21
23
|
/**
|
|
22
24
|
* Does the stored launch still count today?
|
|
23
25
|
*
|
|
24
|
-
* A launch is made for one academic year. With `rollOver` on it carries forward
|
|
25
|
-
* forever; without it, September spends it.
|
|
26
|
-
*
|
|
27
26
|
* @param {ActivityLoggingConfig} [config] the school's launch.
|
|
28
27
|
* @param {Date} [now] the date to judge it against.
|
|
29
|
-
* @return {boolean} whether the
|
|
28
|
+
* @return {boolean} whether the groups it names are live.
|
|
30
29
|
*/
|
|
31
30
|
export declare const activityLaunchCurrent: (config?: ActivityLoggingConfig, now?: Date) => boolean;
|
|
32
31
|
/**
|
|
33
32
|
* The year groups activity logging is live for right now.
|
|
34
33
|
*
|
|
34
|
+
* Only the year group form of a launch, which is how every launch was made before
|
|
35
|
+
* groups existed and what the original `launchActivityLogging` callable still
|
|
36
|
+
* writes. A launch made of groups answers a different question — see
|
|
37
|
+
* `liveAudiences` — and is deliberately not flattened into year groups here, since
|
|
38
|
+
* "Year 10 pupil premium" is not Year 10.
|
|
39
|
+
*
|
|
35
40
|
* @param {InstituteData} [institute] the school.
|
|
36
41
|
* @param {Date} [now] the date to judge the launch against.
|
|
37
|
-
* @return {string[]} the year group tags, empty when
|
|
42
|
+
* @return {string[]} the year group tags, empty when none is live.
|
|
38
43
|
*/
|
|
39
44
|
export declare const activityLoggingLiveYearGroups: (institute?: InstituteData, now?: Date) => string[];
|
|
40
45
|
/**
|
|
41
46
|
* Can THIS student log activities, and may we email them about it?
|
|
42
47
|
*
|
|
43
|
-
* The one gate every student-facing surface asks. A student
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* hasn't announced.
|
|
48
|
+
* The one gate every student-facing surface asks. A student the launch's groups
|
|
49
|
+
* don't match is not in one, which is the safe way round: they see nothing rather
|
|
50
|
+
* than being shown something their school hasn't announced.
|
|
47
51
|
*
|
|
48
52
|
* @param {InstituteData} [institute] their school.
|
|
49
|
-
* @param {
|
|
53
|
+
* @param {AudienceCandidate} [student] their record, with their uid as `id`.
|
|
50
54
|
* @param {Date} [now] the date to judge the launch against.
|
|
51
55
|
* @return {boolean} whether activity logging is live for them.
|
|
52
56
|
*/
|
|
53
|
-
export declare const activityLoggingLive: (institute?: InstituteData,
|
|
57
|
+
export declare const activityLoggingLive: (institute?: InstituteData, student?: AudienceCandidate, now?: Date) => boolean;
|
|
54
58
|
/** Where a school's activity logging stands, in the vocabulary the careers year
|
|
55
|
-
* setup uses for every other programme.
|
|
59
|
+
* setup uses for every other programme. A launch with no groups reads as
|
|
60
|
+
* "unconfigured" rather than "unlaunched", because the setup questions and the
|
|
61
|
+
* launch are one flow here. */
|
|
56
62
|
export type ActivityLoggingState = "unconfigured" | "needsLaunch" | "live";
|
|
57
63
|
/**
|
|
58
64
|
* Has this school launched activity logging, and does the launch still stand?
|
package/lib/activityLogging.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.activityLoggingState = exports.activityLoggingLive = exports.activityLoggingLiveYearGroups = exports.activityLaunchCurrent = exports.activityLoggingProductOn = void 0;
|
|
4
|
-
const
|
|
4
|
+
const studentAudiences_1 = require("./studentAudiences");
|
|
5
5
|
/**
|
|
6
6
|
* Whether a student can log activities, and whether we may email them about it.
|
|
7
7
|
*
|
|
@@ -12,12 +12,13 @@ const schedule_1 = require("./surveys/schedule");
|
|
|
12
12
|
* area, its analytics and its Gatsby reporting.
|
|
13
13
|
* - `activityLogging` is the LAUNCH. It is what a school says to its students, and
|
|
14
14
|
* absent means nothing has been said. A feature that appears in a pupil's account
|
|
15
|
-
* unannounced gets used by nobody and asked about by everybody, so a
|
|
16
|
-
* sees activity logging only once the school has launched it to them.
|
|
15
|
+
* unannounced gets used by nobody and asked about by everybody, so a group of
|
|
16
|
+
* students sees activity logging only once the school has launched it to them.
|
|
17
17
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
18
|
+
* Activity logging was the first thing a school launched, and for a while the only
|
|
19
|
+
* one; launching is now one shape for it and the two destinations tools alike, in
|
|
20
|
+
* ./studentAudiences. What is left here is the product switch and the names the
|
|
21
|
+
* activity surfaces already know the launch by.
|
|
21
22
|
*/
|
|
22
23
|
/** Does the school have the Activities area at all? Absent means yes. */
|
|
23
24
|
const activityLoggingProductOn = (institute) => institute?.trackExtracurriculars !== false;
|
|
@@ -25,25 +26,24 @@ exports.activityLoggingProductOn = activityLoggingProductOn;
|
|
|
25
26
|
/**
|
|
26
27
|
* Does the stored launch still count today?
|
|
27
28
|
*
|
|
28
|
-
* A launch is made for one academic year. With `rollOver` on it carries forward
|
|
29
|
-
* forever; without it, September spends it.
|
|
30
|
-
*
|
|
31
29
|
* @param {ActivityLoggingConfig} [config] the school's launch.
|
|
32
30
|
* @param {Date} [now] the date to judge it against.
|
|
33
|
-
* @return {boolean} whether the
|
|
31
|
+
* @return {boolean} whether the groups it names are live.
|
|
34
32
|
*/
|
|
35
|
-
const activityLaunchCurrent = (config, now = new Date()) =>
|
|
36
|
-
if (!config?.launchedYear)
|
|
37
|
-
return false;
|
|
38
|
-
return Boolean(config.rollOver) || config.launchedYear === (0, schedule_1.academicYearOf)(now);
|
|
39
|
-
};
|
|
33
|
+
const activityLaunchCurrent = (config, now = new Date()) => (0, studentAudiences_1.launchCurrent)(config, now);
|
|
40
34
|
exports.activityLaunchCurrent = activityLaunchCurrent;
|
|
41
35
|
/**
|
|
42
36
|
* The year groups activity logging is live for right now.
|
|
43
37
|
*
|
|
38
|
+
* Only the year group form of a launch, which is how every launch was made before
|
|
39
|
+
* groups existed and what the original `launchActivityLogging` callable still
|
|
40
|
+
* writes. A launch made of groups answers a different question — see
|
|
41
|
+
* `liveAudiences` — and is deliberately not flattened into year groups here, since
|
|
42
|
+
* "Year 10 pupil premium" is not Year 10.
|
|
43
|
+
*
|
|
44
44
|
* @param {InstituteData} [institute] the school.
|
|
45
45
|
* @param {Date} [now] the date to judge the launch against.
|
|
46
|
-
* @return {string[]} the year group tags, empty when
|
|
46
|
+
* @return {string[]} the year group tags, empty when none is live.
|
|
47
47
|
*/
|
|
48
48
|
const activityLoggingLiveYearGroups = (institute, now = new Date()) => {
|
|
49
49
|
if (!(0, exports.activityLoggingProductOn)(institute))
|
|
@@ -57,25 +57,19 @@ exports.activityLoggingLiveYearGroups = activityLoggingLiveYearGroups;
|
|
|
57
57
|
/**
|
|
58
58
|
* Can THIS student log activities, and may we email them about it?
|
|
59
59
|
*
|
|
60
|
-
* The one gate every student-facing surface asks. A student
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* hasn't announced.
|
|
60
|
+
* The one gate every student-facing surface asks. A student the launch's groups
|
|
61
|
+
* don't match is not in one, which is the safe way round: they see nothing rather
|
|
62
|
+
* than being shown something their school hasn't announced.
|
|
64
63
|
*
|
|
65
64
|
* @param {InstituteData} [institute] their school.
|
|
66
|
-
* @param {
|
|
65
|
+
* @param {AudienceCandidate} [student] their record, with their uid as `id`.
|
|
67
66
|
* @param {Date} [now] the date to judge the launch against.
|
|
68
67
|
* @return {boolean} whether activity logging is live for them.
|
|
69
68
|
*/
|
|
70
|
-
const activityLoggingLive = (institute,
|
|
71
|
-
if (!yearGroup)
|
|
72
|
-
return false;
|
|
69
|
+
const activityLoggingLive = (institute, student, now = new Date()) => {
|
|
73
70
|
if (!(0, exports.activityLoggingProductOn)(institute))
|
|
74
71
|
return false;
|
|
75
|
-
|
|
76
|
-
if (!(0, exports.activityLaunchCurrent)(config, now))
|
|
77
|
-
return false;
|
|
78
|
-
return config?.yearGroups?.[yearGroup] === true;
|
|
72
|
+
return (0, studentAudiences_1.studentLaunchLive)(institute, "activities", student, now);
|
|
79
73
|
};
|
|
80
74
|
exports.activityLoggingLive = activityLoggingLive;
|
|
81
75
|
/**
|
|
@@ -92,11 +86,11 @@ const activityLoggingState = (institute, now = new Date()) => {
|
|
|
92
86
|
const config = institute?.activityLogging;
|
|
93
87
|
// Never answered, or answered and launched to nobody — both leave a school with
|
|
94
88
|
// the questions still to answer.
|
|
95
|
-
if (!config?.setupCompletedAt || !
|
|
89
|
+
if (!config?.setupCompletedAt || !(0, studentAudiences_1.launchAudiences)(institute, "activities").length)
|
|
90
|
+
return "unconfigured";
|
|
91
|
+
if (!(0, exports.activityLoggingProductOn)(institute))
|
|
96
92
|
return "unconfigured";
|
|
97
|
-
|
|
98
|
-
return "live";
|
|
99
|
-
return "needsLaunch";
|
|
93
|
+
return (0, studentAudiences_1.liveAudiences)(institute, "activities", now).length ? "live" : "needsLaunch";
|
|
100
94
|
};
|
|
101
95
|
exports.activityLoggingState = activityLoggingState;
|
|
102
96
|
//# sourceMappingURL=activityLogging.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activityLogging.js","sourceRoot":"","sources":["../src/activityLogging.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"activityLogging.js","sourceRoot":"","sources":["../src/activityLogging.ts"],"names":[],"mappings":";;;AACA,yDAM4B;AAE5B;;;;;;;;;;;;;;;;;GAiBG;AAEH,yEAAyE;AAClE,MAAM,wBAAwB,GAAG,CAAC,SAAwD,EAAW,EAAE,CAC1G,SAAS,EAAE,qBAAqB,KAAK,KAAK,CAAC;AADlC,QAAA,wBAAwB,4BACU;AAE/C;;;;;;GAMG;AACI,MAAM,qBAAqB,GAAG,CAAC,MAA8B,EAAE,GAAG,GAAG,IAAI,IAAI,EAAE,EAAW,EAAE,CAC/F,IAAA,gCAAa,EAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AADlB,QAAA,qBAAqB,yBACH;AAE/B;;;;;;;;;;;;GAYG;AACI,MAAM,6BAA6B,GAAG,CAAC,SAAyB,EAAE,GAAG,GAAG,IAAI,IAAI,EAAE,EAAY,EAAE;IACnG,IAAI,CAAC,IAAA,gCAAwB,EAAC,SAAS,CAAC;QAAE,OAAO,EAAE,CAAC;IACpD,MAAM,MAAM,GAAG,SAAS,EAAE,eAAe,CAAC;IAC1C,IAAI,CAAC,IAAA,6BAAqB,EAAC,MAAM,EAAE,GAAG,CAAC;QAAE,OAAO,EAAE,CAAC;IACnD,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,IA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AUGUST_2026)).toBe(false);
|
|
48
48
|
});
|
|
49
49
|
});
|
|
50
|
+
/** A pupil, as the gate reads one: their uid and whatever their record holds. */
|
|
51
|
+
const pupil = (year) => ({ id: "pupil-1", details: year ? { year } : {} });
|
|
50
52
|
describe("activityLoggingLive", () => {
|
|
51
53
|
it("is live for a launched year group", () => {
|
|
52
|
-
expect((0, activityLogging_1.activityLoggingLive)(launched({ "Year 12": true }), "Year 12", IN_2026_27)).toBe(true);
|
|
54
|
+
expect((0, activityLogging_1.activityLoggingLive)(launched({ "Year 12": true }), pupil("Year 12"), IN_2026_27)).toBe(true);
|
|
53
55
|
});
|
|
54
56
|
it("is not live for a year group left out of the launch", () => {
|
|
55
|
-
expect((0, activityLogging_1.activityLoggingLive)(launched({ "Year 12": true }), "Year 9", IN_2026_27)).toBe(false);
|
|
57
|
+
expect((0, activityLogging_1.activityLoggingLive)(launched({ "Year 12": true }), pupil("Year 9"), IN_2026_27)).toBe(false);
|
|
56
58
|
});
|
|
57
59
|
it("is not live for a year group switched off", () => {
|
|
58
|
-
expect((0, activityLogging_1.activityLoggingLive)(launched({ "Year 12": false }), "Year 12", IN_2026_27)).toBe(false);
|
|
60
|
+
expect((0, activityLogging_1.activityLoggingLive)(launched({ "Year 12": false }), pupil("Year 12"), IN_2026_27)).toBe(false);
|
|
59
61
|
});
|
|
60
62
|
it("is not live for a student with no year group on their record", () => {
|
|
61
|
-
expect((0, activityLogging_1.activityLoggingLive)(launched({ "Year 12": true }),
|
|
63
|
+
expect((0, activityLogging_1.activityLoggingLive)(launched({ "Year 12": true }), pupil(), IN_2026_27)).toBe(false);
|
|
62
64
|
});
|
|
63
65
|
it("stops at the new academic year unless the launch rolls over", () => {
|
|
64
|
-
expect((0, activityLogging_1.activityLoggingLive)(launched({ "Year 12": true }), "Year 12", IN_2027_28)).toBe(false);
|
|
65
|
-
expect((0, activityLogging_1.activityLoggingLive)(launched({ "Year 12": true }, { rollOver: true }), "Year 12", IN_2027_28)).toBe(true);
|
|
66
|
+
expect((0, activityLogging_1.activityLoggingLive)(launched({ "Year 12": true }), pupil("Year 12"), IN_2027_28)).toBe(false);
|
|
67
|
+
expect((0, activityLogging_1.activityLoggingLive)(launched({ "Year 12": true }, { rollOver: true }), pupil("Year 12"), IN_2027_28)).toBe(true);
|
|
66
68
|
});
|
|
67
69
|
it("is never live when the product itself is off, whatever the launch says", () => {
|
|
68
70
|
const off = launched({ "Year 12": true });
|
|
69
71
|
off.trackExtracurriculars = false;
|
|
70
|
-
expect((0, activityLogging_1.activityLoggingLive)(off, "Year 12", IN_2026_27)).toBe(false);
|
|
72
|
+
expect((0, activityLogging_1.activityLoggingLive)(off, pupil("Year 12"), IN_2026_27)).toBe(false);
|
|
71
73
|
});
|
|
72
74
|
it("matches the school's own year tag verbatim rather than normalising it", () => {
|
|
73
|
-
expect((0, activityLogging_1.activityLoggingLive)(launched({ "Yr 12 (KS5)": true }), "Yr 12 (KS5)", IN_2026_27)).toBe(true);
|
|
74
|
-
expect((0, activityLogging_1.activityLoggingLive)(launched({ "Yr 12 (KS5)": true }), "Year 12", IN_2026_27)).toBe(false);
|
|
75
|
+
expect((0, activityLogging_1.activityLoggingLive)(launched({ "Yr 12 (KS5)": true }), pupil("Yr 12 (KS5)"), IN_2026_27)).toBe(true);
|
|
76
|
+
expect((0, activityLogging_1.activityLoggingLive)(launched({ "Yr 12 (KS5)": true }), pupil("Year 12"), IN_2026_27)).toBe(false);
|
|
77
|
+
});
|
|
78
|
+
it("is live for a pupil a launched group's filter matches, not just a year group", () => {
|
|
79
|
+
const school = {
|
|
80
|
+
trackExtracurriculars: true,
|
|
81
|
+
studentAudiences: {
|
|
82
|
+
pp: {
|
|
83
|
+
label: "Year 11 pupil premium",
|
|
84
|
+
studentSelection: JSON.stringify({ allSelected: true, filters: [
|
|
85
|
+
{ k: "details.year", v: "Year 11" }, { k: "userGroup", v: "pupilPremium" },
|
|
86
|
+
] }),
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
activityLogging: { audiences: { pp: true }, launchedYear: "2026-27" },
|
|
90
|
+
};
|
|
91
|
+
expect((0, activityLogging_1.activityLoggingLive)(school, { id: "a", details: { year: "Year 11" }, userGroup: "pupilPremium" }, IN_2026_27)).toBe(true);
|
|
92
|
+
expect((0, activityLogging_1.activityLoggingLive)(school, { id: "b", details: { year: "Year 11" } }, IN_2026_27)).toBe(false);
|
|
75
93
|
});
|
|
76
94
|
});
|
|
77
95
|
describe("activityLoggingLiveYearGroups", () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activityLogging.test.js","sourceRoot":"","sources":["../src/activityLogging.test.ts"],"names":[],"mappings":";;AACA,uDAM2B;AAE3B,iFAAiF;AACjF,4DAA4D;AAC5D,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC,CAAC;AACpD,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC,CAAC;AACpD,qEAAqE;AACrE,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC,CAAC;AAErD,MAAM,MAAM,GAAG,CAAC,YAAoC,EAAE,EAAiB,EAAE,CAAC,CAAC;IACvE,IAAI,EAAE,qBAAqB;IAC3B,GAAG,SAAS;CACG,CAAA,CAAC;AAEpB,MAAM,QAAQ,GAAG,CAAC,UAAmC,EAAE,QAAgE,EAAE,EAAE,EAAE,CACzH,MAAM,CAAC,EAAC,eAAe,EAAE;QACrB,gBAAgB,EAAE,sBAAsB;QACxC,YAAY,EAAE,SAAS;QACvB,UAAU;QACV,GAAG,KAAK;KACX,EAAC,CAAC,CAAC;AAER,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACtC,EAAE,CAAC,uEAAuE,EAAE,GAAG,EAAE;QAC7E,MAAM,CAAC,IAAA,0CAAwB,EAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC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
package/lib/callables/index.js
CHANGED
|
@@ -23,6 +23,7 @@ __exportStar(require("./jobRoles"), exports);
|
|
|
23
23
|
__exportStar(require("./apprenticeships"), exports);
|
|
24
24
|
__exportStar(require("./he"), exports);
|
|
25
25
|
__exportStar(require("./activityLogging"), exports);
|
|
26
|
+
__exportStar(require("./studentLaunches"), exports);
|
|
26
27
|
__exportStar(require("./billing"), exports);
|
|
27
28
|
__exportStar(require("./hubImpactReport"), exports);
|
|
28
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/callables/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,6CAA2B;AAC3B,uDAAqC;AACrC,8CAA4B;AAC5B,2CAAyB;AACzB,6CAA2B;AAC3B,oDAAkC;AAClC,uCAAqB;AACrB,oDAAkC;AAClC,4CAA0B;AAC1B,oDAAkC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/callables/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,6CAA2B;AAC3B,uDAAqC;AACrC,8CAA4B;AAC5B,2CAAyB;AACzB,6CAA2B;AAC3B,oDAAkC;AAClC,uCAAqB;AACrB,oDAAkC;AAClC,oDAAkC;AAClC,4CAA0B;AAC1B,oDAAkC"}
|