@casomoltd/nhs-pay 0.33.0 → 0.35.0

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.
Files changed (149) hide show
  1. package/README.md +4 -4
  2. package/dist/additional-pension.d.ts +6 -4
  3. package/dist/additional-pension.js +22 -18
  4. package/dist/additional-pension.js.map +1 -1
  5. package/dist/afc-band.d.ts +4 -4
  6. package/dist/afc-band.js +4 -4
  7. package/dist/afc-scales.d.ts +67 -71
  8. package/dist/afc-scales.js +165 -215
  9. package/dist/afc-scales.js.map +1 -1
  10. package/dist/circulars/afc-shapes.d.ts +41 -21
  11. package/dist/circulars/afc-shapes.js +9 -8
  12. package/dist/circulars/afc-shapes.js.map +1 -1
  13. package/dist/circulars/ni-hsc-afc-06-2025.d.ts +4 -3
  14. package/dist/circulars/ni-hsc-afc-06-2025.js +4 -3
  15. package/dist/circulars/ni-hsc-afc-06-2025.js.map +1 -1
  16. package/dist/dates.d.ts +9 -5
  17. package/dist/dates.js.map +1 -1
  18. package/dist/errors.d.ts +58 -45
  19. package/dist/errors.js +63 -52
  20. package/dist/errors.js.map +1 -1
  21. package/dist/factor-basis.d.ts +95 -106
  22. package/dist/factor-basis.js +97 -108
  23. package/dist/factor-basis.js.map +1 -1
  24. package/dist/gad/additional-pension-0-703-2026-07-08.d.ts +185 -0
  25. package/dist/gad/additional-pension-0-703-2026-07-08.js +89 -0
  26. package/dist/gad/{additional-pension-0-703-2023-10-03.js.map → additional-pension-0-703-2026-07-08.js.map} +1 -1
  27. package/dist/gad/additional-pension-0-712-2026-07-08.d.ts +34 -0
  28. package/dist/gad/additional-pension-0-712-2026-07-08.js +172 -0
  29. package/dist/gad/additional-pension-0-712-2026-07-08.js.map +1 -0
  30. package/dist/gad/additional-pension-0-713-2026-07-08.d.ts +34 -0
  31. package/dist/gad/additional-pension-0-713-2026-07-08.js +175 -0
  32. package/dist/gad/additional-pension-0-713-2026-07-08.js.map +1 -0
  33. package/dist/gad/additional-pension-0-714-2026-07-08.d.ts +34 -0
  34. package/dist/gad/additional-pension-0-714-2026-07-08.js +178 -0
  35. package/dist/gad/additional-pension-0-714-2026-07-08.js.map +1 -0
  36. package/dist/gad/additional-pension-0-715-2026-07-08.d.ts +34 -0
  37. package/dist/gad/additional-pension-0-715-2026-07-08.js +181 -0
  38. package/dist/gad/additional-pension-0-715-2026-07-08.js.map +1 -0
  39. package/dist/gad/additional-pension-0-716-2026-07-08.d.ts +34 -0
  40. package/dist/gad/additional-pension-0-716-2026-07-08.js +172 -0
  41. package/dist/gad/additional-pension-0-716-2026-07-08.js.map +1 -0
  42. package/dist/gad/additional-pension-0-717-2026-07-08.d.ts +34 -0
  43. package/dist/gad/additional-pension-0-717-2026-07-08.js +175 -0
  44. package/dist/gad/additional-pension-0-717-2026-07-08.js.map +1 -0
  45. package/dist/gad/additional-pension-0-718-2026-07-08.d.ts +34 -0
  46. package/dist/gad/additional-pension-0-718-2026-07-08.js +178 -0
  47. package/dist/gad/additional-pension-0-718-2026-07-08.js.map +1 -0
  48. package/dist/gad/additional-pension-0-719-2026-07-08.d.ts +34 -0
  49. package/dist/gad/additional-pension-0-719-2026-07-08.js +181 -0
  50. package/dist/gad/additional-pension-0-719-2026-07-08.js.map +1 -0
  51. package/dist/gad/additional-pension-table.d.ts +4 -11
  52. package/dist/gad/additional-pension-table.js.map +1 -1
  53. package/dist/gad/erf-0-420-2026-07-08.d.ts +51 -0
  54. package/dist/gad/erf-0-420-2026-07-08.js +83 -0
  55. package/dist/gad/erf-0-420-2026-07-08.js.map +1 -0
  56. package/dist/gad/erf-1-401-2026-07-08.d.ts +42 -0
  57. package/dist/gad/erf-1-401-2026-07-08.js +67 -0
  58. package/dist/gad/erf-1-401-2026-07-08.js.map +1 -0
  59. package/dist/gad/erf-1-402-2026-07-08.d.ts +43 -0
  60. package/dist/gad/erf-1-402-2026-07-08.js +78 -0
  61. package/dist/gad/erf-1-402-2026-07-08.js.map +1 -0
  62. package/dist/gad/erf-1-407-2026-07-08.d.ts +42 -0
  63. package/dist/gad/erf-1-407-2026-07-08.js +67 -0
  64. package/dist/gad/erf-1-407-2026-07-08.js.map +1 -0
  65. package/dist/gad/factor-set.d.ts +54 -0
  66. package/dist/gad/factor-set.js +83 -0
  67. package/dist/gad/factor-set.js.map +1 -0
  68. package/dist/gad/factor-table.d.ts +31 -20
  69. package/dist/gad/factor-table.js +67 -37
  70. package/dist/gad/factor-table.js.map +1 -1
  71. package/dist/gad/lrf-0-421-2026-07-08.d.ts +46 -0
  72. package/dist/gad/lrf-0-421-2026-07-08.js +72 -0
  73. package/dist/gad/lrf-0-421-2026-07-08.js.map +1 -0
  74. package/dist/gad/lrf-0-422-2026-07-08.d.ts +43 -0
  75. package/dist/gad/lrf-0-422-2026-07-08.js +69 -0
  76. package/dist/gad/{lrf-0-422-2023-06-30.js.map → lrf-0-422-2026-07-08.js.map} +1 -1
  77. package/dist/gad/lrf-2-416-2026-07-08.d.ts +41 -0
  78. package/dist/gad/lrf-2-416-2026-07-08.js +66 -0
  79. package/dist/gad/lrf-2-416-2026-07-08.js.map +1 -0
  80. package/dist/hcas-pcts.js +1 -1
  81. package/dist/hcas-pcts.js.map +1 -1
  82. package/dist/index.d.ts +7 -5
  83. package/dist/index.js +9 -7
  84. package/dist/index.js.map +1 -1
  85. package/dist/pension-projection.d.ts +30 -44
  86. package/dist/pension-projection.js +37 -61
  87. package/dist/pension-projection.js.map +1 -1
  88. package/dist/published/england-afc.d.ts +52 -9
  89. package/dist/published/england-afc.js +59 -115
  90. package/dist/published/england-afc.js.map +1 -1
  91. package/dist/scales.d.ts +31 -6
  92. package/dist/scales.js +38 -22
  93. package/dist/scales.js.map +1 -1
  94. package/dist/sections/section-1995.d.ts +6 -6
  95. package/dist/sections/section-1995.js +34 -27
  96. package/dist/sections/section-1995.js.map +1 -1
  97. package/dist/sections/section-2008.d.ts +4 -4
  98. package/dist/sections/section-2008.js +19 -23
  99. package/dist/sections/section-2008.js.map +1 -1
  100. package/dist/sections/section-2015.d.ts +7 -7
  101. package/dist/sections/section-2015.js +3 -7
  102. package/dist/sections/section-2015.js.map +1 -1
  103. package/package.json +1 -1
  104. package/dist/gad/additional-pension-0-703-2023-10-03.d.ts +0 -180
  105. package/dist/gad/additional-pension-0-703-2023-10-03.js +0 -87
  106. package/dist/gad/additional-pension-0-712-2023-10-03.d.ts +0 -35
  107. package/dist/gad/additional-pension-0-712-2023-10-03.js +0 -170
  108. package/dist/gad/additional-pension-0-712-2023-10-03.js.map +0 -1
  109. package/dist/gad/additional-pension-0-713-2023-10-03.d.ts +0 -35
  110. package/dist/gad/additional-pension-0-713-2023-10-03.js +0 -173
  111. package/dist/gad/additional-pension-0-713-2023-10-03.js.map +0 -1
  112. package/dist/gad/additional-pension-0-714-2023-10-03.d.ts +0 -35
  113. package/dist/gad/additional-pension-0-714-2023-10-03.js +0 -176
  114. package/dist/gad/additional-pension-0-714-2023-10-03.js.map +0 -1
  115. package/dist/gad/additional-pension-0-715-2023-10-03.d.ts +0 -35
  116. package/dist/gad/additional-pension-0-715-2023-10-03.js +0 -179
  117. package/dist/gad/additional-pension-0-715-2023-10-03.js.map +0 -1
  118. package/dist/gad/additional-pension-0-716-2023-10-03.d.ts +0 -35
  119. package/dist/gad/additional-pension-0-716-2023-10-03.js +0 -170
  120. package/dist/gad/additional-pension-0-716-2023-10-03.js.map +0 -1
  121. package/dist/gad/additional-pension-0-717-2023-10-03.d.ts +0 -35
  122. package/dist/gad/additional-pension-0-717-2023-10-03.js +0 -173
  123. package/dist/gad/additional-pension-0-717-2023-10-03.js.map +0 -1
  124. package/dist/gad/additional-pension-0-718-2023-10-03.d.ts +0 -35
  125. package/dist/gad/additional-pension-0-718-2023-10-03.js +0 -176
  126. package/dist/gad/additional-pension-0-718-2023-10-03.js.map +0 -1
  127. package/dist/gad/additional-pension-0-719-2023-10-03.d.ts +0 -35
  128. package/dist/gad/additional-pension-0-719-2023-10-03.js +0 -179
  129. package/dist/gad/additional-pension-0-719-2023-10-03.js.map +0 -1
  130. package/dist/gad/erf-1-401-2023-06-30.d.ts +0 -47
  131. package/dist/gad/erf-1-401-2023-06-30.js +0 -73
  132. package/dist/gad/erf-1-401-2023-06-30.js.map +0 -1
  133. package/dist/gad/erf-1-402-2023-06-30.d.ts +0 -48
  134. package/dist/gad/erf-1-402-2023-06-30.js +0 -84
  135. package/dist/gad/erf-1-402-2023-06-30.js.map +0 -1
  136. package/dist/gad/erf-1-407-2023-06-30.d.ts +0 -47
  137. package/dist/gad/erf-1-407-2023-06-30.js +0 -73
  138. package/dist/gad/erf-1-407-2023-06-30.js.map +0 -1
  139. package/dist/gad/erf-2023-06-30.d.ts +0 -72
  140. package/dist/gad/erf-2023-06-30.js +0 -105
  141. package/dist/gad/erf-2023-06-30.js.map +0 -1
  142. package/dist/gad/lrf-0-422-2023-06-30.d.ts +0 -45
  143. package/dist/gad/lrf-0-422-2023-06-30.js +0 -70
  144. package/dist/gad/lrf-2-416-2023-06-30.d.ts +0 -46
  145. package/dist/gad/lrf-2-416-2023-06-30.js +0 -72
  146. package/dist/gad/lrf-2-416-2023-06-30.js.map +0 -1
  147. package/dist/gad/lrf-2023-06-30.d.ts +0 -72
  148. package/dist/gad/lrf-2023-06-30.js +0 -99
  149. package/dist/gad/lrf-2023-06-30.js.map +0 -1
@@ -1,14 +1,14 @@
1
1
  /**
2
- * Translation layer: AfC circulars → canonical scale points.
2
+ * Translation layer: AfC tables as printed → canonical scale points.
3
3
  *
4
4
  * The counterpart to `medical-scales.ts` for Agenda for Change. The
5
- * verbatim transcriptions in `src/circulars/*` hold each publisher's
6
- * own table shape; this module maps them to the uniform
7
- * `Record<AfcBandId, SteppedPoint[]>` the rest of the library speaks.
8
- *
9
- * **England is the exception:** it publishes no AfC circular, so its
10
- * tables are transcribed from the publisher's page in
11
- * `published/england-afc.ts` (the README's AfC pay scales rule).
5
+ * verbatim transcriptions hold each publisher's own table shape: the
6
+ * devolved nations' circulars in `src/circulars/*`, and England's NHS
7
+ * Employers page in `published/england-afc.ts`, since England publishes
8
+ * no AfC circular (the README's AfC pay scales rule). This module maps
9
+ * them to the uniform `Record<AfcBandId, SteppedPoint[]>` the rest of the
10
+ * library speaks, and reads each one's Band 1 beside it. `scales.ts`
11
+ * pairs each result with its source.
12
12
  *
13
13
  * ── Point labels are DERIVED here, not authored ──
14
14
  *
@@ -25,111 +25,148 @@
25
25
  * nothing to catch it; computed from the transcribed interval, a
26
26
  * mis-read interval produces a wrong label that a fixture row fails on.
27
27
  */
28
- import { NATION_KEYS, YEAR_LABELS, payYear } from '@casomoltd/paye-calc';
29
- import { AFC_NI_2025, AFC_SCOTLAND, AFC_W_02_2025, AFC_W_02_2026, } from './sources.js';
28
+ import { YEAR_LABELS } from '@casomoltd/paye-calc';
30
29
  import { AFC_BANDS } from './afc-band.js';
31
30
  import { invariant } from './errors.js';
32
31
  import { WALES_AFC_W_02_2025 } from './circulars/wales-afc-w-02-2025.js';
33
32
  import { WALES_AFC_W_02_2026 } from './circulars/wales-afc-w-02-2026.js';
33
+ import { ENGLAND_AFC_2025_26, ENGLAND_AFC_2026_27, } from './published/england-afc.js';
34
34
  import { NI_HSC_AFC_06_2025 } from './circulars/ni-hsc-afc-06-2025.js';
35
35
  import { SCOTLAND_PCS_AFC_2026_01, } from './circulars/scotland-pcs-afc-2026-01.js';
36
36
  /**
37
- * Band 1, which every AfC circular still prints and this library does
38
- * not model.
37
+ * Band 1, which every AfC publisher still prints and this library does
38
+ * not model as a rung.
39
39
  *
40
40
  * Closed to new entrants in England, Wales and Northern Ireland, and
41
41
  * **open in Scotland**, whose PCS(AFC)2026/1 carries no closure
42
- * statement and gives it a full Annex C pay journey. England is down
43
- * to about 1,200 FTE and falling.
42
+ * statement and gives it a full Annex C pay journey.
44
43
  *
45
- * Not modelled as a RUNG: it is absent from `AFC_BANDS`, so the ladder
46
- * translation skips it by name here and anything else unmapped throws.
47
- * That is the whole job of this list — take it away and every nation's
48
- * Band 1 row fails at module load.
44
+ * Absent from `AFC_BANDS`, so the ladder translation skips it by name
45
+ * here and anything else unmapped throws. That is the whole job of this
46
+ * list — take it away and every nation's Band 1 row fails at module
47
+ * load. Making it a rung shifts every index that reads the band list by
48
+ * position, a separate piece of work; it is reachable as each
49
+ * nation-year's `band1` instead.
49
50
  *
50
- * It is reachable, though, through {@link afcBand1}, which is a lookup
51
- * beside the ladder rather than a rung added to it. Making it a rung
52
- * shifts every index that reads the band list by position, and that is
53
- * a separate piece of work.
51
+ * Declared above the tables because their initialisation reads it.
54
52
  */
55
53
  const UNMODELLED_BANDS = ['band 1'];
56
54
  /**
57
- * What we hold for Band 1, per nation.
55
+ * England's tables, read from the NHS Employers pay-scales pages,
56
+ * "NHS Employers — AfC pay scales 2025/26" (#sa-25) and "… 2026/27"
57
+ * (#sa-26), transcribed in `published/england-afc.ts`.
58
+ */
59
+ export const ENGLAND_TABLES_2025_26 = tablesFrom(ENGLAND_AFC_2025_26, 'NHS Employers 2025/26');
60
+ export const ENGLAND_TABLES_2026_27 = tablesFrom(ENGLAND_AFC_2026_27, 'NHS Employers 2026/27');
61
+ /**
62
+ * Wales's own tables, read from Annex 1 of "Wales, AfC(W) 02/2025"
63
+ * (#sa-44) and "Wales, AfC(W) 02/2026" (#sa-45). They differ from
64
+ * England's at every band from 4 upward, so England's figures plus a
65
+ * living-wage floor reproduce neither year: the floor lifts the bottom of
66
+ * a ladder and cannot raise its top. Band 2 carries two points, as
67
+ * England's does.
68
+ */
69
+ export const WALES_TABLES_2025_26 = tablesFrom(WALES_AFC_W_02_2025, 'AfC(W) 02/2025');
70
+ export const WALES_TABLES_2026_27 = tablesFrom(WALES_AFC_W_02_2026, 'AfC(W) 02/2026');
71
+ /**
72
+ * Northern Ireland's tables, from HSC (AfC) 06/2025 (3 December 2025,
73
+ * effective 1 April 2025). One year only: the circular's header says why
74
+ * NI has no 2026-27 round.
58
75
  *
59
- * **Total over `Nation`, so an absence is a claim somebody made rather
60
- * than a silence.** An empty array is a sentence a reviewer can check
61
- * against the circular; no entry at all is indistinguishable from
62
- * nobody having looked.
76
+ * The figures are England's for every band, because NI's circular prints
77
+ * the same numbers. They are read from NI's circular, not England's table,
78
+ * so they coincide as a fact about the two documents and NI can diverge
79
+ * without a code change. Its Basic Pay block prints Bands 1 and 2 as
80
+ * single flat figures and starts its entry/interval/top table at Band 3,
81
+ * so Band 2 is ONE point where England's is two.
82
+ *
83
+ * All 29 values are pinned against the circular in
84
+ * `tests/fixtures/pay-scales.csv`.
85
+ */
86
+ export const NI_TABLES_2025_26 = tablesFrom(NI_HSC_AFC_06_2025, 'HSC (AfC) 06/2025');
87
+ /**
88
+ * Scotland's Annex B by year: the salaries against bare point numbers.
89
+ * It gives each year's Band 1, and 2025-26's salaries; only Annex C
90
+ * carries the year of service a label needs.
91
+ */
92
+ const SCOTLAND_ANNEX_B = {
93
+ [YEAR_LABELS.Y2025_26]: SCOTLAND_PCS_AFC_2026_01.annexB2025,
94
+ [YEAR_LABELS.Y2026_27]: SCOTLAND_PCS_AFC_2026_01.annexB2026,
95
+ };
96
+ /**
97
+ * Scotland 2026-27, from Annex C: 3.75% on the revised 2025-26 base, so
98
+ * the inflation guarantee reaches this year too. Source: "Scotland,
99
+ * PCS(AFC)2026/1" (#sa-13), effective 1 April 2026.
63
100
  *
64
- * Read off the transcription, never retyped: the circular file is the
65
- * producer, and a second copy is a figure free to drift from the
66
- * document it claims to quote.
101
+ * Annex C rather than Annex B because only Annex C carries the year of
102
+ * service. Annex B gives the same salaries against a bare point number,
103
+ * which cannot produce a label — `scotlandAnnexB` exists so a fixture
104
+ * can check the two annexes agree.
67
105
  */
68
- const BAND_1 = {
69
- // Empty because there is no transcription to read it OFF, not because
70
- // the publisher withholds it. NHS Employers prints Band 1 like every
71
- // other nation — £25,272 for 2026/27, footnoted "Band 1 closed to new
72
- // entrants", on both the pay-scales poster and the web table. But
73
- // England issues no AfC circular, so it has no file under
74
- // `circulars/` and `band1Of` has nothing to read; authoring the
75
- // figure here instead would be the first hand-typed scale value in
76
- // this record, against the rule stated above it. Reaching England's
77
- // Band 1 means deciding that separately.
78
- [NATION_KEYS.england]: [],
79
- [NATION_KEYS.wales]: [
80
- band1Of(WALES_AFC_W_02_2025.flatBands, payYear(YEAR_LABELS.Y2025_26), AFC_W_02_2025, 'AfC(W) 02/2025'),
81
- band1Of(WALES_AFC_W_02_2026.flatBands, payYear(YEAR_LABELS.Y2026_27), AFC_W_02_2026, 'AfC(W) 02/2026'),
82
- ],
83
- [NATION_KEYS.northernIreland]: [
84
- band1Of(NI_HSC_AFC_06_2025.flatBands, payYear(YEAR_LABELS.Y2025_26), AFC_NI_2025, 'HSC (AfC) 06/2025'),
85
- ],
86
- // Scotland is the exception the whole accessor exists for: its
87
- // PCS(AFC)2026/1 carries no closure statement for Band 1 and gives it
88
- // a full Annex C pay journey, so it is a band people are hired onto.
89
- [NATION_KEYS.scotland]: [
90
- band1FromAnnexB(SCOTLAND_PCS_AFC_2026_01.annexB2025, payYear(YEAR_LABELS.Y2025_26)),
91
- band1FromAnnexB(SCOTLAND_PCS_AFC_2026_01.annexB2026, payYear(YEAR_LABELS.Y2026_27)),
92
- ],
106
+ export const SCOTLAND_TABLES_2026_27 = {
107
+ scales: scotlandScales(SCOTLAND_PCS_AFC_2026_01.payJourney2026),
108
+ band1: band1Of(SCOTLAND_ANNEX_B[YEAR_LABELS.Y2026_27], 'PCS(AFC)2026/1 Annex B 2026-27'),
93
109
  };
94
- /** Band 1 from a circular's flat-band table, which is where the three
95
- * nations that close it print it — above the stepped table, on its own,
96
- * with no progression columns. */
97
- function band1Of(rows, year, source, which) {
98
- const found = rows.filter((r) => r.band === 'Band 1');
99
- invariant(found.length === 1, `afcBand1: ${which} prints ${found.length} Band 1 rows, expected 1`);
100
- const [row] = found;
110
+ /**
111
+ * Scotland 2025-26. Scotland negotiates its own award: the 2025-26
112
+ * settlement was 4.25% with an inflation guarantee of at least one point
113
+ * above the calendar year's average CPI. 2025 CPI confirmed at 3.4%, so
114
+ * the rate became 4.4%, backdated to 1 April 2025. Source: "Scotland,
115
+ * PCS(AFC)2026/1" (#sa-13), Annex B, the revised 4.4% column.
116
+ *
117
+ * Built from the 2026-27 journey's SHAPE with Annex B's 2025-26
118
+ * salaries: the circular prints an identical increment structure for
119
+ * both years — the settlement changed the rates, not the ladder — and
120
+ * Annex C's 2025-26 table restates that structure rather than adding
121
+ * to it. Building the year from Annex B against a shape the circular
122
+ * publishes twice is faithful; re-typing the same increments would
123
+ * only add a second place to mistype them.
124
+ */
125
+ export const SCOTLAND_TABLES_2025_26 = {
126
+ scales: withAnnexBSalaries(SCOTLAND_TABLES_2026_27.scales, scotlandAnnexB(YEAR_LABELS.Y2025_26)),
127
+ band1: band1Of(SCOTLAND_ANNEX_B[YEAR_LABELS.Y2025_26], 'PCS(AFC)2026/1 Annex B 2025-26'),
128
+ };
129
+ /**
130
+ * Annex B's salaries for a year, keyed by band, in printed order.
131
+ *
132
+ * Exposed so a test can assert that the annex a label came from and
133
+ * the annex the salaries were published in agree. Two annexes of one
134
+ * circular disagreeing would mean a transcription error in one of
135
+ * them, and nothing else would notice.
136
+ */
137
+ export function scotlandAnnexB(year) {
138
+ const out = new Map();
139
+ for (const [id, rows] of rowsByBand(SCOTLAND_ANNEX_B[year])) {
140
+ out.set(id, rows.map((row) => row.salary));
141
+ }
142
+ return out;
143
+ }
144
+ /** A publisher's tables in the shared shape → its ladder and Band 1.
145
+ * `which` names the document in an error. */
146
+ function tablesFrom(printed, which) {
101
147
  return {
102
- year,
103
- salary: row.salary,
104
- ...(row.note !== undefined ? { note: row.note } : {}),
105
- source,
148
+ scales: scalesFrom(printed),
149
+ band1: band1Of(printed.flatBands, which),
106
150
  };
107
151
  }
108
- /** Band 1 from Scotland's Annex B, which prints one row per point. The
109
- * count is asserted rather than the first match taken: Band 1 has one
110
- * point today, and a circular giving it two would otherwise return
111
- * point 1 silently while a consumer says entry and top are the same. */
112
- function band1FromAnnexB(rows, year) {
113
- const found = rows.filter((r) => r.band === 'Band 1');
114
- invariant(found.length === 1, `afcBand1: Scotland's ${year} Annex B prints ${found.length} `
115
- + 'Band 1 rows, expected 1');
116
- return { year, salary: found[0].salary, source: AFC_SCOTLAND };
117
- }
118
152
  /**
119
- * Band 1 for a nation and pay year, or `undefined` where that nation
120
- * publishes none we hold.
121
- *
122
- * Deliberately NOT part of `AFC_BANDS` or the scale list. Band 1 joining
123
- * either shifts every index that reads the list by position, and this
124
- * needs to shift nothing — it is a lookup beside the ladder, not a rung
125
- * added to it.
153
+ * Band 1 from the rows a publisher prints it in: the flat-band table,
154
+ * above the stepped one, for the three nations that close it, and
155
+ * Annex B for Scotland. The count is asserted rather than the first
156
+ * match taken: Band 1 has one point today, and a table giving it two
157
+ * would otherwise return point 1 silently while a consumer says entry
158
+ * and top are the same.
126
159
  */
127
- export function afcBand1(year, nation) {
128
- const found = BAND_1[nation].find((b) => b.year === year);
129
- return found ? { ...found, nation } : undefined;
160
+ function band1Of(rows, which) {
161
+ const found = rows.filter((r) => r.band === 'Band 1');
162
+ invariant(found.length === 1, `afc-scales: ${which} prints ${found.length} Band 1 rows, expected 1`);
163
+ const [row] = found;
164
+ return row.note === undefined
165
+ ? { salary: row.salary }
166
+ : { salary: row.salary, note: row.note };
130
167
  }
131
168
  /**
132
- * A band as a circular prints it → the id this library uses, or `null`
169
+ * A band as a publisher prints it → the id this library uses, or `null`
133
170
  * where the band is deliberately not modelled.
134
171
  *
135
172
  * Case and spacing differ by publisher — Scotland prints `Band 8A`
@@ -147,13 +184,25 @@ function bandIdOf(printed) {
147
184
  invariant(id !== undefined, `afc-scales: no band id for the printed band "${printed}"`);
148
185
  return id;
149
186
  }
187
+ /** A publisher's rows grouped by the band they print, in printed order,
188
+ * with the unmodelled bands left out. */
189
+ function rowsByBand(rows) {
190
+ const out = new Map();
191
+ for (const row of rows) {
192
+ const id = bandIdOf(row.band);
193
+ if (id) {
194
+ out.set(id, [...(out.get(id) ?? []), row]);
195
+ }
196
+ }
197
+ return out;
198
+ }
150
199
  /**
151
200
  * An Agenda for Change point from the year of service it is first
152
201
  * reached in: the label every nation's scale prints, and the same year
153
202
  * as a number, so a reader that needs the timing never has to parse it
154
203
  * back out of the label. The one producer of both, for all four nations.
155
204
  */
156
- export function afcPoint(year, isTop, salary) {
205
+ function afcPoint(year, isTop, salary) {
157
206
  return {
158
207
  label: isTop ? `Year ${year}+` : `Year ${year}`,
159
208
  salary,
@@ -167,21 +216,18 @@ export function afcPoint(year, isTop, salary) {
167
216
  * the printed interval, so its year is the running total plus one.
168
217
  */
169
218
  function pointsFromStepped(row) {
170
- const points = [];
171
- let year = 1;
172
- points.push(afcPoint(year, false, row.entry));
173
- if (row.intermediate !== undefined) {
174
- year += row.yearsToNext;
175
- points.push(afcPoint(year, false, row.intermediate));
176
- invariant(row.yearsToTop !== undefined, `afc-scales: ${row.band} prints an intermediate step with no `
177
- + 'interval to the top');
178
- year += row.yearsToTop;
179
- }
180
- else {
181
- year += row.yearsToNext;
219
+ const nextYear = 1 + row.yearsToNext;
220
+ if (row.intermediate === undefined) {
221
+ return [
222
+ afcPoint(1, false, row.entry),
223
+ afcPoint(nextYear, true, row.top),
224
+ ];
182
225
  }
183
- points.push(afcPoint(year, true, row.top));
184
- return points;
226
+ return [
227
+ afcPoint(1, false, row.entry),
228
+ afcPoint(nextYear, false, row.intermediate),
229
+ afcPoint(nextYear + row.yearsToTop, true, row.top),
230
+ ];
185
231
  }
186
232
  /** A flat row → its single point. */
187
233
  function pointsFromFlat(row) {
@@ -199,7 +245,7 @@ function pointsFromFlat(row) {
199
245
  function pointsFromJourney(rows) {
200
246
  const runs = [];
201
247
  for (const row of rows) {
202
- const last = runs[runs.length - 1];
248
+ const last = runs.at(-1);
203
249
  if (!last || last.salary !== row.salary) {
204
250
  runs.push({ year: row.increment, salary: row.salary });
205
251
  }
@@ -207,16 +253,16 @@ function pointsFromJourney(rows) {
207
253
  invariant(runs.length > 0, 'afc-scales: a pay journey with no increments');
208
254
  return runs.map((run, i) => afcPoint(run.year, i === runs.length - 1, run.salary));
209
255
  }
210
- /** Every band a circular prints, keyed by id. */
211
- function scalesFrom(flat, stepped) {
256
+ /** Every band a publisher prints in the shared shape, keyed by id. */
257
+ function scalesFrom(printed) {
212
258
  const out = {};
213
- for (const row of flat) {
259
+ for (const row of printed.flatBands) {
214
260
  const id = bandIdOf(row.band);
215
261
  if (id) {
216
262
  out[id] = pointsFromFlat(row);
217
263
  }
218
264
  }
219
- for (const row of stepped) {
265
+ for (const row of printed.steppedBands) {
220
266
  const id = bandIdOf(row.band);
221
267
  if (id) {
222
268
  out[id] = pointsFromStepped(row);
@@ -227,10 +273,10 @@ function scalesFrom(flat, stepped) {
227
273
  /**
228
274
  * Every band must be present.
229
275
  *
230
- * A circular that omits one is either a transcription that stopped
231
- * early or a genuine change in what the nation publishes, and both
232
- * need a person to look. Failing here beats serving a band page with
233
- * nothing on it.
276
+ * A table that omits one is either a transcription that stopped early
277
+ * or a genuine change in what the nation publishes, and both need a
278
+ * person to look. Failing here beats serving a band page with nothing
279
+ * on it.
234
280
  */
235
281
  function assertEveryBand(out) {
236
282
  for (const band of Object.values(AFC_BANDS)) {
@@ -240,119 +286,23 @@ function assertEveryBand(out) {
240
286
  }
241
287
  /** Scotland's bands, from the Annex C pay journey. */
242
288
  function scotlandScales(journey) {
243
- const byBand = new Map();
244
- for (const row of journey) {
245
- const id = bandIdOf(row.band);
246
- if (!id) {
247
- continue;
248
- }
249
- const rows = byBand.get(id) ?? [];
250
- rows.push(row);
251
- byBand.set(id, rows);
252
- }
253
289
  const out = {};
254
- for (const [id, rows] of byBand) {
290
+ for (const [id, rows] of rowsByBand(journey)) {
255
291
  out[id] = pointsFromJourney(rows);
256
292
  }
257
293
  return assertEveryBand(out);
258
294
  }
259
- /**
260
- * Wales's own ladders, read from Annex 1 of "Wales, AfC(W) 02/2025"
261
- * (#sa-44) and "Wales, AfC(W) 02/2026" (#sa-45). They differ from
262
- * England's at every band from 4 upward, so England's figures plus a
263
- * living-wage floor reproduce neither year: the floor lifts the bottom of
264
- * a ladder and cannot raise its top. Band 2 carries two points, as
265
- * England's does. Band 1 is published in both years and closed to new
266
- * entrants; it is absent here because `AFC_BANDS` starts at Band 2, and
267
- * reachable through `afcBand1`.
268
- */
269
- export const WALES_SCALES_2025_26 = scalesFrom(WALES_AFC_W_02_2025.flatBands, WALES_AFC_W_02_2025.steppedBands);
270
- export const WALES_SCALES_2026_27 = scalesFrom(WALES_AFC_W_02_2026.flatBands, WALES_AFC_W_02_2026.steppedBands);
271
- /**
272
- * Northern Ireland's ladder, from HSC (AfC) 06/2025 (3 December 2025,
273
- * effective 1 April 2025), translated from NI's own circular.
274
- *
275
- * ONE year. NI has issued no 2026-27 AfC pay circular: the Health
276
- * Minister stated a desire to proceed with 3.3% on 12 February 2026
277
- * "subject to my budgetary position", and as at the Assembly answer of
278
- * 15 July 2026 (AQW 49635/22-27) he "cannot" pay it
279
- * "until I have clarity on my Department's budget". HSC staff are
280
- * on these rates as at that answer. The 3.3% is still recorded in `award.ts` —
281
- * announced and published are different things.
282
- *
283
- * The figures are England's for every band, because NI's circular prints
284
- * the same numbers. They are read from NI's circular, not England's table,
285
- * so they coincide as a fact about the two documents and NI can diverge
286
- * without a code change. Its Basic Pay block prints Bands 1 and 2 as
287
- * single flat figures and starts its entry/interval/top table at Band 3,
288
- * so Band 2 is ONE point where England's is two.
289
- *
290
- * All 29 values are pinned against the circular in
291
- * `tests/fixtures/pay-scales.csv`.
292
- */
293
- export const NI_SCALES_2025_26 = scalesFrom(NI_HSC_AFC_06_2025.flatBands, NI_HSC_AFC_06_2025.steppedBands);
294
- /**
295
- * Scotland 2026-27, from Annex C: 3.75% on the revised 2025-26 base, so
296
- * the inflation guarantee reaches this year too. Source: "Scotland,
297
- * PCS(AFC)2026/1" (#sa-13), effective 1 April 2026.
298
- *
299
- * Annex C rather than Annex B because only Annex C carries the year of
300
- * service. Annex B gives the same salaries against a bare point
301
- * number, which cannot produce a label — `scotlandAnnexB` below exists
302
- * so a fixture can check the two annexes agree.
303
- */
304
- export const SCOTLAND_SCALES_2026_27 = scotlandScales(SCOTLAND_PCS_AFC_2026_01.payJourney2026);
305
- /**
306
- * Annex B's salaries for a year, keyed by band, in printed order.
307
- *
308
- * Exposed so a test can assert that the annex a label came from and
309
- * the annex the salaries were published in agree. Two annexes of one
310
- * circular disagreeing would mean a transcription error in one of
311
- * them, and nothing else would notice.
312
- */
313
- export function scotlandAnnexB(year) {
314
- const rows = year === '2025-26'
315
- ? SCOTLAND_PCS_AFC_2026_01.annexB2025
316
- : SCOTLAND_PCS_AFC_2026_01.annexB2026;
317
- const out = new Map();
318
- for (const row of rows) {
319
- const id = bandIdOf(row.band);
320
- if (!id) {
321
- continue;
322
- }
323
- out.set(id, [...(out.get(id) ?? []), row.salary]);
324
- }
325
- return out;
326
- }
327
- /**
328
- * Scotland 2025-26. Scotland negotiates its own award: the 2025-26
329
- * settlement was 4.25% with an inflation guarantee of at least one point
330
- * above the calendar year's average CPI. 2025 CPI confirmed at 3.4%, so
331
- * the rate became 4.4%, backdated to 1 April 2025. Source: "Scotland,
332
- * PCS(AFC)2026/1" (#sa-13), Annex B, the revised 4.4% column.
333
- *
334
- * Built from the 2026-27 journey's SHAPE with Annex B's 2025-26
335
- * salaries: the circular prints an identical increment structure for
336
- * both years — the settlement changed the rates, not the ladder — and
337
- * Annex C's 2025-26 table restates that structure rather than adding
338
- * to it. Building the year from Annex B against a shape the circular
339
- * publishes twice is faithful; re-typing the same increments would
340
- * only add a second place to mistype them.
341
- */
342
- export const SCOTLAND_SCALES_2025_26 = (() => {
343
- const salaries = scotlandAnnexB('2025-26');
295
+ /** Scotland's 2026-27 ladder carrying Annex B 2025-26's salaries: the
296
+ * same points, each with that year's salary at its position. */
297
+ function withAnnexBSalaries(shape, salaries) {
344
298
  const out = {};
345
- for (const [band, points] of Object.entries(SCOTLAND_SCALES_2026_27)) {
299
+ for (const [band, points] of Object.entries(shape)) {
346
300
  const yearSalaries = salaries.get(band);
347
- invariant(yearSalaries !== undefined
348
- && yearSalaries.length === points.length, `afc-scales: Scotland ${band} has ${points.length} points in `
301
+ invariant(yearSalaries !== undefined && yearSalaries.length === points.length, `afc-scales: Scotland ${band} has ${points.length} points in `
349
302
  + `Annex C but ${yearSalaries?.length ?? 0} in Annex B 2025-26`);
350
303
  // The lengths are pinned equal above, so every point has its salary.
351
- out[band] = points.map((point, i) => ({
352
- ...point,
353
- salary: yearSalaries[i],
354
- }));
304
+ out[band] = points.map((point, i) => ({ ...point, salary: yearSalaries[i] }));
355
305
  }
356
306
  return assertEveryBand(out);
357
- })();
307
+ }
358
308
  //# sourceMappingURL=afc-scales.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"afc-scales.js","sourceRoot":"","sources":["../src/afc-scales.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,EAAC,WAAW,EAAE,WAAW,EAAE,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAEvE,OAAO,EACL,WAAW,EACX,YAAY,EACZ,aAAa,EACb,aAAa,GACd,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAExC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAMtC,OAAO,EAAC,mBAAmB,EAAC,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAC,mBAAmB,EAAC,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAC,kBAAkB,EAAC,MAAM,mCAAmC,CAAC;AACrE,OAAO,EACL,wBAAwB,GACzB,MAAM,yCAAyC,CAAC;AAEjD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,gBAAgB,GAAsB,CAAC,QAAQ,CAAC,CAAC;AAuBvD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,GAAwC;IAClD,sEAAsE;IACtE,qEAAqE;IACrE,sEAAsE;IACtE,kEAAkE;IAClE,0DAA0D;IAC1D,gEAAgE;IAChE,mEAAmE;IACnE,oEAAoE;IACpE,yCAAyC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AAM,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QAC7C,GAAG,CAAC,EAAE,CAAC,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IACD,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC;AAC9B,CAAC;AAED;iEACiE;AACjE,SAAS,kBAAkB,CACzB,KAAwC,EACxC,QAAkC;IAElC,MAAM,GAAG,GAA+C,EAAE,CAAC;IAC3D,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAClB,EAAE,CAAC;QAChC,MAAM,YAAY,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACxC,SAAS,CACP,YAAY,KAAK,SAAS,IAAI,YAAY,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM,EACnE,wBAAwB,IAAI,QAAQ,MAAM,CAAC,MAAM,aAAa;cAC5D,eAAe,YAAY,EAAE,MAAM,IAAI,CAAC,qBAAqB,CAChE,CAAC;QACF,qEAAqE;QACrE,GAAG,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAC,GAAG,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC;IAC9E,CAAC;IACD,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC;AAC9B,CAAC"}
@@ -1,13 +1,14 @@
1
1
  /**
2
- * The table shapes AfC pay circulars actually print.
2
+ * The table shapes AfC pay publishers actually print.
3
3
  *
4
- * Shared by the verbatim transcriptions in this directory because the
5
- * publishers genuinely share them, not to save typing: Wales and
6
- * Northern Ireland both print an "Entry step point / Years until
7
- * eligible for pay progression / Intermediate step point / Top step
8
- * point" table, with the same columns in the same order, so one type
9
- * describes both faithfully. Scotland prints something different and
10
- * has its own shapes below.
4
+ * Shared by the AfC verbatim transcriptions, the circulars in this
5
+ * directory and England's published page in `src/published/england-afc.ts`,
6
+ * because the publishers genuinely share them, not to save typing: NHS
7
+ * Employers, Wales and Northern Ireland all print an "Entry step point /
8
+ * Years until eligible for pay progression / Intermediate step point /
9
+ * Top step point" table, with the same columns in the same order, so one
10
+ * type describes them faithfully. Scotland prints something different
11
+ * and has its own shapes below.
11
12
  *
12
13
  * These describe the SOURCE, not the domain. A band is `'Band 8a'`
13
14
  * because that is what the page says; the mapping to an `AfcBandId`,
@@ -23,8 +24,8 @@
23
24
  * table starts at Band 3. England's publisher prints Band 2 with an
24
25
  * entry point, a two-year interval and a top point — same cash,
25
26
  * different published structure. Recording the shape the publisher
26
- * used is the point: England's two-point shape was once copied across
27
- * to NI, and only a later reading of the PDF caught it.
27
+ * used is the point: a two-point shape cannot then be copied onto a
28
+ * nation that prints one figure.
28
29
  */
29
30
  export interface FlatBandRow {
30
31
  /** The band as the circular prints it, e.g. 'Band 1'. */
@@ -39,30 +40,48 @@ export interface FlatBandRow {
39
40
  * A band printed with an entry point, a progression interval, and a
40
41
  * top point — optionally with an intermediate step between them.
41
42
  *
42
- * `yearsToIntermediate` / `yearsToTop` are the publisher's OWN
43
+ * `yearsToNext` / `yearsToTop` are the publisher's OWN
43
44
  * "Years until eligible for pay progression" figures, transcribed as
44
45
  * printed. Our "Year N" point labels are DERIVED from them rather
45
46
  * than typed alongside the salaries, so a mis-transcribed interval
46
47
  * shows up as a wrong label that a fixture catches, instead of a label
47
48
  * and an interval quietly disagreeing.
48
49
  */
49
- export interface SteppedBandRow {
50
+ export type SteppedBandRow = TwoPointRow | ThreePointRow;
51
+ /** A stepped band printed as entry, interval and top. */
52
+ interface TwoPointRow {
53
+ /** The band as the circular prints it, e.g. 'Band 3'. */
54
+ readonly band: string;
55
+ readonly entry: number;
56
+ /** Years at the entry point before the top. */
57
+ readonly yearsToNext: number;
58
+ readonly top: number;
59
+ readonly note?: string;
60
+ /** Forbidden, so a row printing an intermediate step must be a
61
+ * {@link ThreePointRow} and carry both intervals. */
62
+ readonly intermediate?: never;
63
+ readonly yearsToTop?: never;
64
+ }
65
+ /** A stepped band printed with an intermediate step between entry and
66
+ * top: two intervals, so neither can be printed without the other. */
67
+ interface ThreePointRow {
50
68
  /** The band as the circular prints it, e.g. 'Band 8a'. */
51
69
  readonly band: string;
52
70
  readonly entry: number;
53
- /**
54
- * Years at the entry point before the next step. Where there is an
55
- * intermediate step this is the wait for it; where there is not, it
56
- * is the wait for the top.
57
- */
71
+ /** Years at the entry point before the intermediate step. */
58
72
  readonly yearsToNext: number;
59
- /** Absent for a two-point band. */
60
- readonly intermediate?: number;
61
- /** Present only alongside {@link SteppedBandRow.intermediate}. */
62
- readonly yearsToTop?: number;
73
+ readonly intermediate: number;
74
+ /** Years at the intermediate step before the top. */
75
+ readonly yearsToTop: number;
63
76
  readonly top: number;
64
77
  readonly note?: string;
65
78
  }
79
+ /** A publisher's AfC tables in the shared shape: the bands it prints as
80
+ * one figure, and the bands it prints as a progression. */
81
+ export interface PrintedAfcTables {
82
+ readonly flatBands: readonly FlatBandRow[];
83
+ readonly steppedBands: readonly SteppedBandRow[];
84
+ }
66
85
  /**
67
86
  * One row of Scotland's Annex B, which prints a band's points as
68
87
  * numbered rows rather than as an entry/top pair.
@@ -99,3 +118,4 @@ export interface PayJourneyRow {
99
118
  readonly increment: number;
100
119
  readonly salary: number;
101
120
  }
121
+ export {};