placementt-core 1.400.925 → 1.400.926

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.
@@ -2003,6 +2003,23 @@ export type AspirationSurveySlot = {
2003
2003
  sendMMDD: string;
2004
2004
  label?: string;
2005
2005
  };
2006
+ /**
2007
+ * Per-year-group leaver settings. Used as an override entry in
2008
+ * DestinationsConfig.leavers.byYearGroup — each field replaces the shared leaver
2009
+ * default for that year group only. All MM-DD strings are zero-padded.
2010
+ */
2011
+ export type LeaverYearGroupConfig = {
2012
+ intentionsSendMMDD: string;
2013
+ resultsDay: {
2014
+ enabled: boolean;
2015
+ sendMMDD: string;
2016
+ };
2017
+ christmas: {
2018
+ enabled: boolean;
2019
+ sendMMDD: string;
2020
+ };
2021
+ allStudentsLeave?: boolean;
2022
+ };
2006
2023
  /**
2007
2024
  * One-time Destinations setup, saved on institutes/{oId}.destinationsConfig by the
2008
2025
  * setup wizard. destinationsProvisionCron reads it each year to auto-create that
@@ -2039,6 +2056,13 @@ export type DestinationsConfig = {
2039
2056
  };
2040
2057
  /** true → every student in these groups leaves (no internal sixth form). */
2041
2058
  allStudentsLeave?: boolean;
2059
+ /** Optional per-year-group override. When a year group key is present its
2060
+ * settings REPLACE the shared leaver fields above for that year group only
2061
+ * (Y11 and Y13 typically differ — GCSE vs A-level results days, sixth-form
2062
+ * stayers, etc.). Falls back to the shared fields when a key is absent. */
2063
+ byYearGroup?: {
2064
+ [yearGroup: string]: LeaverYearGroupConfig;
2065
+ };
2042
2066
  recipientFilters?: DestinationsRecipientFilter;
2043
2067
  };
2044
2068
  alumni: {
@@ -3100,7 +3124,7 @@ export type LeaverGroup = {
3100
3124
  created: string;
3101
3125
  stage: "review" | "created" | "scheduled" | "sent" | "archived";
3102
3126
  emailTemplate?: string;
3103
- students: string;
3127
+ students?: string;
3104
3128
  sendAt?: string;
3105
3129
  sentAt?: string;
3106
3130
  reminderSentAt?: string;
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.925",
5
+ "version": "1.400.926",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
8
8
  "scripts": {
@@ -1916,6 +1916,18 @@ export type DestinationsRecipientFilter = {k: string, e?: WhereFilterOp, v: unkn
1916
1916
  /** One scheduled survey in a year's aspiration programme. `sendMMDD` is "MM-DD". */
1917
1917
  export type AspirationSurveySlot = {sendMMDD: string, label?: string};
1918
1918
 
1919
+ /**
1920
+ * Per-year-group leaver settings. Used as an override entry in
1921
+ * DestinationsConfig.leavers.byYearGroup — each field replaces the shared leaver
1922
+ * default for that year group only. All MM-DD strings are zero-padded.
1923
+ */
1924
+ export type LeaverYearGroupConfig = {
1925
+ intentionsSendMMDD: string,
1926
+ resultsDay: {enabled: boolean, sendMMDD: string},
1927
+ christmas: {enabled: boolean, sendMMDD: string},
1928
+ allStudentsLeave?: boolean,
1929
+ };
1930
+
1919
1931
  /**
1920
1932
  * One-time Destinations setup, saved on institutes/{oId}.destinationsConfig by the
1921
1933
  * setup wizard. destinationsProvisionCron reads it each year to auto-create that
@@ -1946,6 +1958,11 @@ export type DestinationsConfig = {
1946
1958
  christmas: {enabled: boolean, sendMMDD: string}, // default "12-08"
1947
1959
  /** true → every student in these groups leaves (no internal sixth form). */
1948
1960
  allStudentsLeave?: boolean,
1961
+ /** Optional per-year-group override. When a year group key is present its
1962
+ * settings REPLACE the shared leaver fields above for that year group only
1963
+ * (Y11 and Y13 typically differ — GCSE vs A-level results days, sixth-form
1964
+ * stayers, etc.). Falls back to the shared fields when a key is absent. */
1965
+ byYearGroup?: {[yearGroup: string]: LeaverYearGroupConfig},
1949
1966
  recipientFilters?: DestinationsRecipientFilter,
1950
1967
  },
1951
1968
  // ── Alumni (mirrors the institute root flags) ──
@@ -3088,7 +3105,7 @@ export type LeaverGroup = {
3088
3105
  created: string;
3089
3106
  stage: "review" | "created" | "scheduled" | "sent" | "archived"; // Sent means we have sent the request to the students.
3090
3107
  emailTemplate?: string, // What template to use for the request?
3091
- students: string, // Data Viewer Backend
3108
+ students?: string, // Data Viewer Backend — absent on auto-provisioned drafts until staff pick recipients
3092
3109
  sendAt?: string, // ISO — scheduled send date; cron fires emails on/after this
3093
3110
  sentAt?: string, // ISO — when invite emails actually fired
3094
3111
  reminderSentAt?: string, // ISO — day-14 reminder fire time