placementt-core 1.400.920 → 1.400.921

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.
@@ -2111,6 +2111,10 @@ export type LeaverCheckpointResponse = {
2111
2111
  wellbeingScore?: 1 | 2 | 3 | 4 | 5;
2112
2112
  personalEmail?: string;
2113
2113
  date: string;
2114
+ /** Set when the leaver answered the staying-on gate on this form (only shown
2115
+ * when the group permits staying and we didn't already know). true → they're
2116
+ * staying at the school, so the alumni/consent capture is skipped. */
2117
+ stayingAtSchoolSixthForm?: boolean;
2114
2118
  /** Consent / one-time items still outstanding for this leaver, collected on
2115
2119
  * this form and routed to UserData by the backend (never stored here). */
2116
2120
  intentionsCapture?: LeaverConsentCapture;
@@ -2126,6 +2130,7 @@ export type LeaverRequest = Omit<AspirationRequest, "cycleId" | "response"> & {
2126
2130
  response?: LeaverTransitionData;
2127
2131
  alumniId?: string;
2128
2132
  intentionsCapturedAt?: string;
2133
+ stayingAtSchoolSixthForm?: boolean;
2129
2134
  personalEmail?: string;
2130
2135
  token?: string;
2131
2136
  tokenExpiry?: string;
@@ -3025,6 +3030,11 @@ export type LeaverGroup = {
3025
3030
  totalInvited?: number;
3026
3031
  totalResponded?: number;
3027
3032
  aggregates?: LeaverAggregates;
3033
+ /** Staff setup flag — true when every student in this group leaves after this
3034
+ * year (no internal sixth-form option). When false/undefined the leaver form
3035
+ * asks "are you staying on?" first, and stayers skip the alumni / consent
3036
+ * capture (and aren't seeded as alumni). */
3037
+ allStudentsLeave?: boolean;
3028
3038
  /** Post-leaving checkpoint schedule. Absent = checkpoints disabled for this group. */
3029
3039
  checkpointConfig?: {
3030
3040
  resultsDay?: {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "private": false,
3
3
  "name": "placementt-core",
4
4
  "author": "Placementt",
5
- "version": "1.400.920",
5
+ "version": "1.400.921",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
8
8
  "scripts": {
@@ -2028,6 +2028,10 @@ export type LeaverCheckpointResponse = {
2028
2028
  wellbeingScore?: 1|2|3|4|5, // christmas only, optional
2029
2029
  personalEmail?: string, // lets them update their contact email
2030
2030
  date: string, // ISO — server-stamped submission time
2031
+ /** Set when the leaver answered the staying-on gate on this form (only shown
2032
+ * when the group permits staying and we didn't already know). true → they're
2033
+ * staying at the school, so the alumni/consent capture is skipped. */
2034
+ stayingAtSchoolSixthForm?: boolean,
2031
2035
  /** Consent / one-time items still outstanding for this leaver, collected on
2032
2036
  * this form and routed to UserData by the backend (never stored here). */
2033
2037
  intentionsCapture?: LeaverConsentCapture,
@@ -2044,6 +2048,7 @@ export type LeaverRequest = Omit<AspirationRequest, "cycleId"|"response"> & {
2044
2048
  response?: LeaverTransitionData,
2045
2049
  alumniId?: string, // set when this leaver opted in and an Alumni record was created
2046
2050
  intentionsCapturedAt?: string, // ISO — set when consent/alumni data was captured via a later checkpoint (intentions form itself was never completed)
2051
+ stayingAtSchoolSixthForm?: boolean, // canonical per-request staying-on answer (from whichever form captured it); gates whether any form re-asks the staying-on question
2047
2052
 
2048
2053
  // ── Post-leaving contact + magic-link auth (set at checkpoint send time) ──
2049
2054
  personalEmail?: string, // denormalised from response.personalEmail at checkpoint-1 submit
@@ -3020,6 +3025,12 @@ export type LeaverGroup = {
3020
3025
  totalResponded?: number, // incremented on each completion
3021
3026
  aggregates?: LeaverAggregates, // pre-aggregated response data for dashboard charts
3022
3027
 
3028
+ /** Staff setup flag — true when every student in this group leaves after this
3029
+ * year (no internal sixth-form option). When false/undefined the leaver form
3030
+ * asks "are you staying on?" first, and stayers skip the alumni / consent
3031
+ * capture (and aren't seeded as alumni). */
3032
+ allStudentsLeave?: boolean,
3033
+
3023
3034
  /** Post-leaving checkpoint schedule. Absent = checkpoints disabled for this group. */
3024
3035
  checkpointConfig?: {
3025
3036
  resultsDay?: {enabled: boolean, sendAt: string, emailTemplateId?: string}, // ISO datetime