placementt-core 1.400.997 → 1.400.999
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/benchmarkEvidenceRules.d.ts +18 -3
- package/lib/benchmarkEvidenceRules.js +43 -3
- package/lib/benchmarkEvidenceRules.js.map +1 -1
- package/lib/callables/registry.d.ts +8 -8
- package/lib/callables/surveys.d.ts +6 -6
- package/lib/callables/surveys.js +7 -7
- package/lib/callables/surveys.js.map +1 -1
- package/lib/constants.d.ts +35 -1
- package/lib/constants.js +256 -2
- package/lib/constants.js.map +1 -1
- package/lib/portfolioAggregate.d.ts +8 -1
- package/lib/portfolioAggregate.js +54 -7
- package/lib/portfolioAggregate.js.map +1 -1
- package/lib/surveys/schedule.d.ts +7 -7
- package/lib/surveys/schedule.js +5 -5
- package/lib/surveys/schedule.js.map +1 -1
- package/lib/surveys/schedule.test.js +1 -1
- package/lib/surveys/schedule.test.js.map +1 -1
- package/lib/surveys/types.d.ts +28 -25
- package/lib/surveys/types.js +12 -12
- package/lib/surveys/types.js.map +1 -1
- package/lib/typeDefinitions.d.ts +11 -5
- package/package.json +1 -1
- package/src/benchmarkEvidenceRules.ts +43 -3
- package/src/callables/surveys.ts +8 -8
- package/src/constants.ts +261 -1
- package/src/portfolioAggregate.ts +54 -7
- package/src/surveys/schedule.test.ts +1 -1
- package/src/surveys/schedule.ts +9 -9
- package/src/surveys/types.ts +28 -25
- package/src/typeDefinitions.ts +53 -12
|
@@ -49,9 +49,24 @@ export declare const BENCHMARK_META: Record<GatsbyBenchmarkNumber, BenchmarkMeta
|
|
|
49
49
|
/**
|
|
50
50
|
* StudentActivity.activityType → the benchmark(s) that activity is evidence for.
|
|
51
51
|
* Employer-facing encounters count towards BM5; first-hand workplace experiences
|
|
52
|
-
* count towards BM6
|
|
53
|
-
*
|
|
54
|
-
*
|
|
52
|
+
* count towards BM6; encounters with a university or college count towards BM7.
|
|
53
|
+
* "other" is intentionally unmapped: we don't guess a benchmark from an untyped
|
|
54
|
+
* activity (that would fabricate coverage).
|
|
55
|
+
*
|
|
56
|
+
* The same principle governs the extracurricular and supercurricular types added
|
|
57
|
+
* alongside the activity picker: sport, music, performance, clubs, leadership, DofE,
|
|
58
|
+
* uniformed groups, wider reading, competitions, essay prizes, EPQs and cultural
|
|
59
|
+
* visits are all real enrichment but none of them is an encounter with an employer,
|
|
60
|
+
* a workplace or a provider, so they map to nothing rather than quietly inflating a
|
|
61
|
+
* school's coverage. Only the two programme types that genuinely put a student inside
|
|
62
|
+
* a university or a lab are mapped: research placements (a real workplace, hosted by a
|
|
63
|
+
* provider) and summer schools (a provider encounter).
|
|
64
|
+
*
|
|
65
|
+
* NOTE: `onlineProgramme` predates the picker, when it meant an employer's virtual
|
|
66
|
+
* work-experience programme, and is left at BM5 so existing schools' Compass returns
|
|
67
|
+
* don't change under them. Its label is now "Online course or MOOC" — a FutureLearn
|
|
68
|
+
* course is not an employer encounter, and virtual insight days now belong under
|
|
69
|
+
* workShadowing/workshop — so this should probably become [] for new records.
|
|
55
70
|
*/
|
|
56
71
|
export declare const ACTIVITY_TYPE_BENCHMARKS: Record<StudentActivity["activityType"], GatsbyBenchmarkNumber[]>;
|
|
57
72
|
/**
|
|
@@ -103,9 +103,24 @@ exports.BENCHMARK_META = {
|
|
|
103
103
|
/**
|
|
104
104
|
* StudentActivity.activityType → the benchmark(s) that activity is evidence for.
|
|
105
105
|
* Employer-facing encounters count towards BM5; first-hand workplace experiences
|
|
106
|
-
* count towards BM6
|
|
107
|
-
*
|
|
108
|
-
*
|
|
106
|
+
* count towards BM6; encounters with a university or college count towards BM7.
|
|
107
|
+
* "other" is intentionally unmapped: we don't guess a benchmark from an untyped
|
|
108
|
+
* activity (that would fabricate coverage).
|
|
109
|
+
*
|
|
110
|
+
* The same principle governs the extracurricular and supercurricular types added
|
|
111
|
+
* alongside the activity picker: sport, music, performance, clubs, leadership, DofE,
|
|
112
|
+
* uniformed groups, wider reading, competitions, essay prizes, EPQs and cultural
|
|
113
|
+
* visits are all real enrichment but none of them is an encounter with an employer,
|
|
114
|
+
* a workplace or a provider, so they map to nothing rather than quietly inflating a
|
|
115
|
+
* school's coverage. Only the two programme types that genuinely put a student inside
|
|
116
|
+
* a university or a lab are mapped: research placements (a real workplace, hosted by a
|
|
117
|
+
* provider) and summer schools (a provider encounter).
|
|
118
|
+
*
|
|
119
|
+
* NOTE: `onlineProgramme` predates the picker, when it meant an employer's virtual
|
|
120
|
+
* work-experience programme, and is left at BM5 so existing schools' Compass returns
|
|
121
|
+
* don't change under them. Its label is now "Online course or MOOC" — a FutureLearn
|
|
122
|
+
* course is not an employer encounter, and virtual insight days now belong under
|
|
123
|
+
* workShadowing/workshop — so this should probably become [] for new records.
|
|
109
124
|
*/
|
|
110
125
|
exports.ACTIVITY_TYPE_BENCHMARKS = {
|
|
111
126
|
employerTalk: [5],
|
|
@@ -115,6 +130,31 @@ exports.ACTIVITY_TYPE_BENCHMARKS = {
|
|
|
115
130
|
partTimeWork: [6],
|
|
116
131
|
volunteering: [6],
|
|
117
132
|
other: [],
|
|
133
|
+
// Extracurricular — enrichment, not Gatsby evidence.
|
|
134
|
+
sport: [],
|
|
135
|
+
music: [],
|
|
136
|
+
performingArts: [],
|
|
137
|
+
creativeArts: [],
|
|
138
|
+
leadership: [],
|
|
139
|
+
dofe: [],
|
|
140
|
+
uniformedGroup: [],
|
|
141
|
+
// Covers both Young Enterprise (mentored by employers) and a student's own side
|
|
142
|
+
// hustle, so it can't be safely counted as an employer encounter either way.
|
|
143
|
+
enterprise: [],
|
|
144
|
+
clubSociety: [],
|
|
145
|
+
// Supercurricular — independent academic study, not an encounter.
|
|
146
|
+
widerReading: [],
|
|
147
|
+
lecture: [],
|
|
148
|
+
competition: [],
|
|
149
|
+
essayPrize: [],
|
|
150
|
+
epq: [],
|
|
151
|
+
academicSociety: [],
|
|
152
|
+
culturalVisit: [],
|
|
153
|
+
languageLearning: [],
|
|
154
|
+
subjectQualification: [],
|
|
155
|
+
// Time spent working inside a university lab or employer, arranged by a provider.
|
|
156
|
+
researchPlacement: [6, 7],
|
|
157
|
+
summerSchool: [7],
|
|
118
158
|
};
|
|
119
159
|
/**
|
|
120
160
|
* The benchmarks an event provides evidence for: its tagged Gatsby benchmarks,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"benchmarkEvidenceRules.js","sourceRoot":"","sources":["../src/benchmarkEvidenceRules.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"benchmarkEvidenceRules.js","sourceRoot":"","sources":["../src/benchmarkEvidenceRules.ts"],"names":[],"mappings":";;;AA+LA,0DAGC;AAGD,wDAEC;AAGD,gEAEC;AAOD,0EAGC;AAwBD,oDAEC;AAWD,kDAMC;AAGD,sDAGC;AAGD,gDAIC;AAUD,oCAMC;AA7RD,mDAA0F;AAE1F;;;;;;;;;;;;;;GAcG;AAEU,QAAA,wBAAwB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAU,CAAC;AAiC1E;;;;;GAKG;AACU,QAAA,0BAA0B,GACnC,iDAAiC,CAAC,MAAM,CAAC,CAAC,CAAC,EAA8B,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AAE5E,QAAA,cAAc,GAAiD;IACxE,CAAC,EAAE;QACC,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,4BAA4B;QAClC,WAAW,EAAE,kGAAkG;QAC/G,MAAM,EAAE,WAAW;QACnB,oBAAoB,EAAE,KAAK;QAC3B,WAAW,EAAE,KAAK;KACrB;IACD,CAAC,EAAE;QACC,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,kDAAkD;QACxD,WAAW,EAAE,+FAA+F;QAC5G,MAAM,EAAE,QAAQ;QAChB,oBAAoB,EAAE,IAAI;QAC1B,WAAW,EAAE,KAAK;KACrB;IACD,CAAC,EAAE;QACC,MAAM,EAAE,CAAC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
307
307
|
request: z.ZodObject<{
|
|
308
308
|
oId: z.ZodString;
|
|
309
309
|
scope: z.ZodEnum<[string, ...string[]]>;
|
|
310
|
-
|
|
310
|
+
group: z.ZodString;
|
|
311
311
|
studentSelection: z.ZodOptional<z.ZodString>;
|
|
312
312
|
selectionSummary: z.ZodOptional<z.ZodString>;
|
|
313
313
|
emailTemplateId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
314
314
|
applyToExisting: z.ZodOptional<z.ZodBoolean>;
|
|
315
315
|
}, "strip", z.ZodTypeAny, {
|
|
316
|
+
group: string;
|
|
316
317
|
oId: string;
|
|
317
318
|
scope: string;
|
|
318
|
-
cohort: string;
|
|
319
319
|
emailTemplateId?: string | null | undefined;
|
|
320
320
|
studentSelection?: string | undefined;
|
|
321
321
|
selectionSummary?: string | undefined;
|
|
322
322
|
applyToExisting?: boolean | undefined;
|
|
323
323
|
}, {
|
|
324
|
+
group: string;
|
|
324
325
|
oId: string;
|
|
325
326
|
scope: string;
|
|
326
|
-
cohort: string;
|
|
327
327
|
emailTemplateId?: string | null | undefined;
|
|
328
328
|
studentSelection?: string | undefined;
|
|
329
329
|
selectionSummary?: string | undefined;
|
|
@@ -967,27 +967,27 @@ export declare const callableGroups: {
|
|
|
967
967
|
deleted: number;
|
|
968
968
|
}>;
|
|
969
969
|
};
|
|
970
|
-
"surveys-
|
|
970
|
+
"surveys-saveSurveyGroupSetup": {
|
|
971
971
|
request: z.ZodObject<{
|
|
972
972
|
oId: z.ZodString;
|
|
973
973
|
scope: z.ZodEnum<[string, ...string[]]>;
|
|
974
|
-
|
|
974
|
+
group: z.ZodString;
|
|
975
975
|
studentSelection: z.ZodOptional<z.ZodString>;
|
|
976
976
|
selectionSummary: z.ZodOptional<z.ZodString>;
|
|
977
977
|
emailTemplateId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
978
978
|
applyToExisting: z.ZodOptional<z.ZodBoolean>;
|
|
979
979
|
}, "strip", z.ZodTypeAny, {
|
|
980
|
+
group: string;
|
|
980
981
|
oId: string;
|
|
981
982
|
scope: string;
|
|
982
|
-
cohort: string;
|
|
983
983
|
emailTemplateId?: string | null | undefined;
|
|
984
984
|
studentSelection?: string | undefined;
|
|
985
985
|
selectionSummary?: string | undefined;
|
|
986
986
|
applyToExisting?: boolean | undefined;
|
|
987
987
|
}, {
|
|
988
|
+
group: string;
|
|
988
989
|
oId: string;
|
|
989
990
|
scope: string;
|
|
990
|
-
cohort: string;
|
|
991
991
|
emailTemplateId?: string | null | undefined;
|
|
992
992
|
studentSelection?: string | undefined;
|
|
993
993
|
selectionSummary?: string | undefined;
|
|
@@ -8,7 +8,7 @@ export declare const surveyCallables: {
|
|
|
8
8
|
yearGroups: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
9
9
|
scheduledSendDate: z.ZodString;
|
|
10
10
|
/** Overrides the year derived from the send date — the leaver thread's
|
|
11
|
-
* Christmas leg sends in the year after the
|
|
11
|
+
* Christmas leg sends in the year after the group's own. */
|
|
12
12
|
academicYear: z.ZodOptional<z.ZodString>;
|
|
13
13
|
closeAfterDays: z.ZodOptional<z.ZodNumber>;
|
|
14
14
|
emailTemplateId: z.ZodOptional<z.ZodString>;
|
|
@@ -302,32 +302,32 @@ export declare const surveyCallables: {
|
|
|
302
302
|
deleted: number;
|
|
303
303
|
}>;
|
|
304
304
|
};
|
|
305
|
-
"surveys-
|
|
305
|
+
"surveys-saveSurveyGroupSetup": {
|
|
306
306
|
request: z.ZodObject<{
|
|
307
307
|
oId: z.ZodString;
|
|
308
308
|
scope: z.ZodEnum<[string, ...string[]]>;
|
|
309
309
|
/** Year group ("9") or skills group id ("all", "yg9", a mapping id). */
|
|
310
|
-
|
|
310
|
+
group: z.ZodString;
|
|
311
311
|
/** JSON-serialised DataViewerSelectionBackend. */
|
|
312
312
|
studentSelection: z.ZodOptional<z.ZodString>;
|
|
313
313
|
selectionSummary: z.ZodOptional<z.ZodString>;
|
|
314
|
-
/** null clears the
|
|
314
|
+
/** null clears the group's template and falls back to the default copy. */
|
|
315
315
|
emailTemplateId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
316
316
|
/** false → store the answer for future years only, leaving the cycles
|
|
317
317
|
* already provisioned alone. Defaults to true. */
|
|
318
318
|
applyToExisting: z.ZodOptional<z.ZodBoolean>;
|
|
319
319
|
}, "strip", z.ZodTypeAny, {
|
|
320
|
+
group: string;
|
|
320
321
|
oId: string;
|
|
321
322
|
scope: string;
|
|
322
|
-
cohort: string;
|
|
323
323
|
emailTemplateId?: string | null | undefined;
|
|
324
324
|
studentSelection?: string | undefined;
|
|
325
325
|
selectionSummary?: string | undefined;
|
|
326
326
|
applyToExisting?: boolean | undefined;
|
|
327
327
|
}, {
|
|
328
|
+
group: string;
|
|
328
329
|
oId: string;
|
|
329
330
|
scope: string;
|
|
330
|
-
cohort: string;
|
|
331
331
|
emailTemplateId?: string | null | undefined;
|
|
332
332
|
studentSelection?: string | undefined;
|
|
333
333
|
selectionSummary?: string | undefined;
|
package/lib/callables/surveys.js
CHANGED
|
@@ -12,7 +12,7 @@ const types_1 = require("../surveys/types");
|
|
|
12
12
|
* hook that drives every staff survey page (`useSurveyAdmin`) calls all of them.
|
|
13
13
|
*/
|
|
14
14
|
const surveyKind = zod_1.z.enum(types_1.SURVEY_KINDS_LIST);
|
|
15
|
-
const
|
|
15
|
+
const groupScope = zod_1.z.enum(types_1.SURVEY_GROUP_SCOPES);
|
|
16
16
|
const raters = zod_1.z.object({
|
|
17
17
|
students: zod_1.z.boolean().optional(),
|
|
18
18
|
parents: zod_1.z.boolean().optional(),
|
|
@@ -27,7 +27,7 @@ exports.surveyCallables = {
|
|
|
27
27
|
yearGroups: zod_1.z.array(zod_1.z.string()).optional(),
|
|
28
28
|
scheduledSendDate: zod_1.z.string(), // ISO
|
|
29
29
|
/** Overrides the year derived from the send date — the leaver thread's
|
|
30
|
-
* Christmas leg sends in the year after the
|
|
30
|
+
* Christmas leg sends in the year after the group's own. */
|
|
31
31
|
academicYear: zod_1.z.string().optional(),
|
|
32
32
|
closeAfterDays: zod_1.z.number().optional(),
|
|
33
33
|
emailTemplateId: zod_1.z.string().optional(),
|
|
@@ -115,16 +115,16 @@ exports.surveyCallables = {
|
|
|
115
115
|
request: zod_1.z.object({ cycleId: zod_1.z.string(), jobId: zod_1.z.string().optional() }),
|
|
116
116
|
response: zod_1.z.object({ deleted: zod_1.z.number() }),
|
|
117
117
|
},
|
|
118
|
-
"surveys-
|
|
118
|
+
"surveys-saveSurveyGroupSetup": {
|
|
119
119
|
request: zod_1.z.object({
|
|
120
120
|
oId: zod_1.z.string(),
|
|
121
|
-
scope:
|
|
121
|
+
scope: groupScope,
|
|
122
122
|
/** Year group ("9") or skills group id ("all", "yg9", a mapping id). */
|
|
123
|
-
|
|
123
|
+
group: zod_1.z.string(),
|
|
124
124
|
/** JSON-serialised DataViewerSelectionBackend. */
|
|
125
125
|
studentSelection: zod_1.z.string().optional(),
|
|
126
126
|
selectionSummary: zod_1.z.string().optional(),
|
|
127
|
-
/** null clears the
|
|
127
|
+
/** null clears the group's template and falls back to the default copy. */
|
|
128
128
|
emailTemplateId: zod_1.z.string().nullable().optional(),
|
|
129
129
|
/** false → store the answer for future years only, leaving the cycles
|
|
130
130
|
* already provisioned alone. Defaults to true. */
|
|
@@ -141,7 +141,7 @@ exports.surveyCallables = {
|
|
|
141
141
|
request: zod_1.z.object({
|
|
142
142
|
oId: zod_1.z.string(),
|
|
143
143
|
/** Omit for every programme the institute runs. */
|
|
144
|
-
scope:
|
|
144
|
+
scope: groupScope.optional(),
|
|
145
145
|
/** Provision the upcoming academic year rather than the current one. */
|
|
146
146
|
nextYear: zod_1.z.boolean().optional(),
|
|
147
147
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surveys.js","sourceRoot":"","sources":["../../src/callables/surveys.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AAEtB,
|
|
1
|
+
{"version":3,"file":"surveys.js","sourceRoot":"","sources":["../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Schema, SurveyDateRule, SurveyOrdinal, SurveyWeekday, WorkflowStage } from "./typeDefinitions";
|
|
1
|
+
import { AnalyticsItem, ApplicantStage, CommSchema, CustomFormSchema, CustomFormSchemaField, EmailTemplateConfig, FlagCodes, LeadStageSchema, StudentActivity, StudentActivityCategory, StudentActivityType, SurveyDateRule, SurveyOrdinal, SurveyWeekday, WorkflowStage } from "./typeDefinitions";
|
|
2
2
|
export declare const providerCodes: {
|
|
3
3
|
soleTrader: {
|
|
4
4
|
title: string;
|
|
@@ -95,6 +95,40 @@ export declare const flagCodes: {
|
|
|
95
95
|
};
|
|
96
96
|
export declare const sampleTargets: AnalyticsItem;
|
|
97
97
|
export declare const DEFAULT_ACTIVITY_REFLECTION_FORM_ID = "defaultActivityReflectionForm";
|
|
98
|
+
export declare const STUDENT_ACTIVITY_CATEGORIES: {
|
|
99
|
+
[key in StudentActivityCategory]: {
|
|
100
|
+
label: string;
|
|
101
|
+
shortLabel: string;
|
|
102
|
+
description: string;
|
|
103
|
+
examples: string;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
export declare const ACTIVITY_TYPES_BY_CATEGORY: {
|
|
107
|
+
[key in StudentActivityCategory]: StudentActivityType[];
|
|
108
|
+
};
|
|
109
|
+
export declare const ACTIVITY_TYPE_ORGANISATION: {
|
|
110
|
+
[key in StudentActivityType]?: {
|
|
111
|
+
label: string;
|
|
112
|
+
subtitle?: string;
|
|
113
|
+
required?: boolean;
|
|
114
|
+
} | false;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Follow-up questions per activity type, rendered into the details step underneath the
|
|
118
|
+
* type dropdown. Typed as CustomFormSchemaField so the same shape the custom form builder
|
|
119
|
+
* produces can drive these (and so a school could edit them in the builder later);
|
|
120
|
+
* `width` is the md column width, xs is always full width.
|
|
121
|
+
*
|
|
122
|
+
* These are deliberately the things a school can act on — level reached, role held,
|
|
123
|
+
* outcome achieved, who ran it, and which subject it points at — not a second description
|
|
124
|
+
* of the activity. Longer "what did you learn" reflection stays in the reflection step
|
|
125
|
+
* (DEFAULT_ACTIVITY_REFLECTION_FORM); the short prompts here ask something narrower that
|
|
126
|
+
* only makes sense for that type.
|
|
127
|
+
*/
|
|
128
|
+
export declare const ACTIVITY_SCHEMAS: {
|
|
129
|
+
[key in StudentActivityType]: CustomFormSchemaField[];
|
|
130
|
+
};
|
|
131
|
+
export declare const studentActivityCategory: (activity: Pick<StudentActivity, "type">) => StudentActivityCategory;
|
|
98
132
|
export declare const DEFAULT_ACTIVITY_REFLECTION_FORM: CustomFormSchema;
|
|
99
133
|
export declare const PRIMARY_COLOUR = "#397DF2";
|
|
100
134
|
export declare const LOGO_SECONDARY_COLOUR = "#964FF7";
|