@casomoltd/nhs-pay 0.15.2 → 0.16.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 (102) hide show
  1. package/README.md +66 -16
  2. package/dist/afc-band.d.ts +33 -0
  3. package/dist/afc-band.js +33 -0
  4. package/dist/afc-band.js.map +1 -0
  5. package/dist/afc-scales.d.ts +67 -0
  6. package/dist/afc-scales.js +238 -0
  7. package/dist/afc-scales.js.map +1 -0
  8. package/dist/allowances.d.ts +91 -0
  9. package/dist/allowances.js +180 -0
  10. package/dist/allowances.js.map +1 -0
  11. package/dist/award.d.ts +175 -36
  12. package/dist/award.js +370 -47
  13. package/dist/award.js.map +1 -1
  14. package/dist/bands.d.ts +34 -12
  15. package/dist/bands.js +26 -9
  16. package/dist/bands.js.map +1 -1
  17. package/dist/circulars/afc-shapes.d.ts +101 -0
  18. package/dist/circulars/afc-shapes.js +18 -0
  19. package/dist/circulars/afc-shapes.js.map +1 -0
  20. package/dist/circulars/{england-md-1-2026r.d.ts → england-md-1-2026-r2.d.ts} +198 -32
  21. package/dist/circulars/{england-md-1-2026r.js → england-md-1-2026-r2.js} +142 -76
  22. package/dist/circulars/england-md-1-2026-r2.js.map +1 -0
  23. package/dist/circulars/ni-hsc-afc-06-2025.d.ts +63 -0
  24. package/dist/circulars/ni-hsc-afc-06-2025.js +100 -0
  25. package/dist/circulars/ni-hsc-afc-06-2025.js.map +1 -0
  26. package/dist/circulars/ni-hsc-tc8-05-2025.d.ts +1 -1
  27. package/dist/circulars/ni-hsc-tc8-05-2025.js +1 -1
  28. package/dist/circulars/scotland-pcs-afc-2026-01.d.ts +82 -0
  29. package/dist/circulars/scotland-pcs-afc-2026-01.js +208 -0
  30. package/dist/circulars/scotland-pcs-afc-2026-01.js.map +1 -0
  31. package/dist/circulars/scotland-pcs-dd-2025-01.d.ts +1 -1
  32. package/dist/circulars/scotland-pcs-dd-2025-01.js +12 -4
  33. package/dist/circulars/scotland-pcs-dd-2025-01.js.map +1 -1
  34. package/dist/circulars/scotland-pcs-dd-2026-01.d.ts +2 -2
  35. package/dist/circulars/scotland-pcs-dd-2026-01.js +2 -2
  36. package/dist/circulars/scotland-pcs-dd-2026-02.d.ts +79 -0
  37. package/dist/circulars/scotland-pcs-dd-2026-02.js +185 -0
  38. package/dist/circulars/scotland-pcs-dd-2026-02.js.map +1 -0
  39. package/dist/circulars/wales-afc-w-02-2025.d.ts +53 -0
  40. package/dist/circulars/wales-afc-w-02-2025.js +85 -0
  41. package/dist/circulars/wales-afc-w-02-2025.js.map +1 -0
  42. package/dist/circulars/wales-afc-w-02-2026.d.ts +48 -0
  43. package/dist/circulars/wales-afc-w-02-2026.js +91 -0
  44. package/dist/circulars/wales-afc-w-02-2026.js.map +1 -0
  45. package/dist/circulars/wales-mdw-01-2025.d.ts +1 -1
  46. package/dist/circulars/wales-mdw-01-2025.js +1 -1
  47. package/dist/circulars/wales-mdw-01-2026.d.ts +1 -1
  48. package/dist/circulars/wales-mdw-01-2026.js +1 -1
  49. package/dist/dental-scales.d.ts +4 -4
  50. package/dist/dental-scales.js +30 -20
  51. package/dist/dental-scales.js.map +1 -1
  52. package/dist/document-source.d.ts +141 -0
  53. package/dist/document-source.js +80 -0
  54. package/dist/document-source.js.map +1 -0
  55. package/dist/errors.d.ts +31 -5
  56. package/dist/errors.js +32 -2
  57. package/dist/errors.js.map +1 -1
  58. package/dist/format.d.ts +2 -2
  59. package/dist/format.js.map +1 -1
  60. package/dist/gad/erf-2023-06-30.d.ts +1 -1
  61. package/dist/gad/erf-2023-06-30.js +2 -1
  62. package/dist/gad/erf-2023-06-30.js.map +1 -1
  63. package/dist/gad/factor-table.d.ts +2 -1
  64. package/dist/gad/factor-table.js.map +1 -1
  65. package/dist/gad/lrf-2023-06-30.d.ts +1 -1
  66. package/dist/gad/lrf-2023-06-30.js +2 -1
  67. package/dist/gad/lrf-2023-06-30.js.map +1 -1
  68. package/dist/hcas.d.ts +10 -14
  69. package/dist/hcas.js +13 -20
  70. package/dist/hcas.js.map +1 -1
  71. package/dist/index.d.ts +17 -9
  72. package/dist/index.js +17 -8
  73. package/dist/index.js.map +1 -1
  74. package/dist/iso-date.d.ts +87 -0
  75. package/dist/iso-date.js +97 -0
  76. package/dist/iso-date.js.map +1 -0
  77. package/dist/medical-scales.d.ts +19 -4
  78. package/dist/medical-scales.js +77 -20
  79. package/dist/medical-scales.js.map +1 -1
  80. package/dist/pension.d.ts +30 -0
  81. package/dist/pension.js +128 -8
  82. package/dist/pension.js.map +1 -1
  83. package/dist/post.d.ts +87 -2
  84. package/dist/post.js +112 -2
  85. package/dist/post.js.map +1 -1
  86. package/dist/regions.d.ts +1 -1
  87. package/dist/regions.js +1 -1
  88. package/dist/resolver.d.ts +57 -7
  89. package/dist/resolver.js +77 -25
  90. package/dist/resolver.js.map +1 -1
  91. package/dist/scale-point.d.ts +13 -4
  92. package/dist/scale-tables.d.ts +57 -10
  93. package/dist/scale-tables.js +58 -9
  94. package/dist/scale-tables.js.map +1 -1
  95. package/dist/scales.d.ts +169 -44
  96. package/dist/scales.js +462 -226
  97. package/dist/scales.js.map +1 -1
  98. package/dist/sources.d.ts +183 -0
  99. package/dist/sources.js +375 -0
  100. package/dist/sources.js.map +1 -0
  101. package/package.json +6 -4
  102. package/dist/circulars/england-md-1-2026r.js.map +0 -1
package/README.md CHANGED
@@ -99,7 +99,7 @@ fmtPct(8.3); // '8.3%'
99
99
 
100
100
  Medical and dental grades resolve the same way as AfC, via a
101
101
  per-family resolver. `getMedicalScales(year, nation)` lists the
102
- grades published for a nation and year; `fromScalePoint` builds a
102
+ grades published for a nation and year; `fromPoint` builds a
103
103
  `Post` (gross, pension tier, tax, NI, take-home) from one point.
104
104
 
105
105
  ```ts
@@ -107,16 +107,24 @@ import {getMedicalScales, medicalResolver} from '@casomoltd/nhs-pay';
107
107
 
108
108
  const grades = getMedicalScales('2026-27', 'england');
109
109
  const consultant = grades.find((g) => g.grade === 'consultant')!;
110
- const top = consultant.points.at(-1)!; // 'Threshold 4 · 19y'
110
+ const top = consultant.points.at(-1)!;
111
111
 
112
- const post = medicalResolver.fromScalePoint(
113
- 'consultant', top.label, 'england', '2026-27',
112
+ const post = medicalResolver.fromPoint(
113
+ 'consultant', top, 'england', '2026-27',
114
114
  );
115
115
  console.log(post.salary); // basic pay
116
116
  console.log(post.pensionRate); // member contribution %
117
117
  console.log(post.takeHome.net); // annual net after tax + NI + pension
118
+ console.log(consultant.source.reference); // the circular it came from
118
119
  ```
119
120
 
121
+ `fromPoint` takes the point itself. There is also
122
+ `fromScalePoint(grade, label, …)` for a caller holding only a label,
123
+ but a label does not identify a point on every scale — England's
124
+ consultant scale is 20 payroll steps over 5 threshold labels, so
125
+ `'Threshold 4'` names six of them and that call throws
126
+ `AmbiguousScalePoint` rather than picking one.
127
+
120
128
  `getDentalScales` / `dentalResolver` mirror this for salaried
121
129
  dental grades. Both fail loud (`ScaleUnavailable`) for an
122
130
  unpublished nation/year or grade rather than defaulting.
@@ -288,20 +296,62 @@ has 2 points (vs 1 in England) and Bands 8a–9 have 2
288
296
  points each (vs 3).
289
297
 
290
298
  Source: [PCS(AFC)2026/1][scot-circular] — Scottish Health
291
- Workforce Directorate circular (23 Jan 2026). Full pay
292
- tables: [MSG Scotland AfC pay scales 2025-26 and 2026-27][scot-scales].
299
+ Workforce Directorate circular (23 Jan 2026). Annex B holds
300
+ both years' rate tables; Annex C sets them out increment by
301
+ increment and corroborates Annex B point for point.
302
+
303
+ Scotland's 2025-26 settlement was 4.25%, but carried an
304
+ inflation guarantee — at least one percentage point above
305
+ average CPI for the calendar year of the uplift. 2025 CPI
306
+ confirmed at 3.4%, so the guarantee triggered and the rate
307
+ was revised to 4.4%, backdated to 1 April 2025 with arrears.
308
+ 2026-27's 3.75% then applies to the revised base, so both
309
+ years moved. Take both from Annex B rather than the MSG
310
+ consolidated table, which still prints the original 4.25%
311
+ rates.
293
312
 
294
313
  [scot-circular]: https://www.publications.scot.nhs.uk/files/pcs2026-afc-01.pdf
295
- [scot-scales]: https://www.msg.scot.nhs.uk/wp-content/uploads/AfC-Pay-Scales-2025-26-and-2026-27.pdf
296
314
 
297
315
  ### Wales
298
316
 
299
- The Welsh Government applies a Living Wage Foundation floor
300
- as an advance uplift. Spine points below the floor are
301
- lifted to it. Source: [AfC(W) 01/2026][wales-circular]
302
- pay letter (6 Jan 2026).
303
-
304
- [wales-circular]: https://www.nhs.wales/files/pc-resources/2026-afc-1-2026-living-wage-pdf-pdf/
317
+ Wales runs its own pay ladder and both years are transcribed
318
+ from it: [AfC(W) 02/2025][wales-2025] (29 May 2025) and
319
+ [AfC(W) 02/2026][wales-2026] (12 Feb 2026), Annex 1 of each.
320
+
321
+ Wales is **not** England's table with a floor applied. The two
322
+ ladders differ at every band from 4 upward, where no floor
323
+ reaches: Band 9 tops out at £131,732 in Wales against £129,783
324
+ in England. A floor lifts the bottom of a ladder and cannot
325
+ raise its top. Wales also carries two Band 2 points where
326
+ England has one.
327
+
328
+ Point labels come from each circular's own "years until
329
+ eligible for pay progression" column, so they are stated by
330
+ the Welsh source rather than borrowed from England's table,
331
+ and they do not always agree with England's for the same band.
332
+
333
+ The living-wage floor is real but separate: it is an advance
334
+ payment that lifts the lowest points, which is why the 2026/27
335
+ uplift explicitly does not apply to them. `WALES_LIVING_WAGE`
336
+ carries both published figures — the annual floor and the hourly
337
+ rate it is set against — for reference; nothing derives a scale
338
+ from it, and neither figure derives from the other.
339
+ Source: [AfC(W) 01/2026][wales-lw] (6 Jan 2026).
340
+
341
+ Band 1 is published in both years (£24,833, then £26,300) and
342
+ closed to new entrants. It is absent from `AFC_BANDS`, the same
343
+ gap Scotland has.
344
+
345
+ Both Welsh years were transcribed during an outage of the NHS Wales
346
+ web estate (2 September 2026), so the circulars were read from NHS
347
+ Wales Employers' copy rather than the publisher's own. Each file was
348
+ checked byte-for-byte against a copy downloaded from `www.nhs.wales`
349
+ the previous day, before the outage, and both matched. The links
350
+ above are the publisher's, which is where these documents live.
351
+
352
+ [wales-2025]: https://www.nhs.wales/files/pc-resources/afc-w-02-2025-pdf-2-pdf/
353
+ [wales-2026]: https://www.nhs.wales/files/pc-resources/afc-w-02-2026-pdf-pdf/
354
+ [wales-lw]: https://www.nhs.wales/files/pc-resources/2026-afc-1-2026-living-wage-pdf-pdf/
305
355
 
306
356
  ### Other data
307
357
 
@@ -324,7 +374,7 @@ dental grades, which is what most published sources omit.
324
374
 
325
375
  | Nation | Circular | Year | Source |
326
376
  | ------ | -------- | ---- | ------ |
327
- | England | M&D 1/2026R | 2026/27 | [NHS Employers][md-eng] |
377
+ | England | PC(M&D) 1/2026 R2 | 2026/27 | [NHS Employers][md-eng] |
328
378
  | Scotland | PCS(DD)2026/01 | 2026/27 (training grades only) | [NHS Scotland][md-sco] |
329
379
  | Scotland | PCS(DD)2025/01 + addendum | 2025/26 (complete round) | [NHS Scotland][md-sco25] |
330
380
  | Wales | M&D(W) 01/2026 | 2026/27 | [NHS Wales][md-wal] |
@@ -400,8 +450,8 @@ Pension, tax, NI and net values are computed by
400
450
  `nhsTakeHome` and should be cross-checked against:
401
451
 
402
452
  - [NHS Employers pay scales 2025/26][scales-2526] and
403
- [2026/27][scales-2627] for England/NI/Wales gross
404
- - [MSG Scotland AfC pay scales][scot-scales] for Scotland
453
+ [2026/27][scales-2627] for England/NI gross
454
+ - [PCS(AFC)2026/1][scot-circular] Annex B for Scotland
405
455
  gross
406
456
  - [NHSBSA pension contribution rates 2025/26][pension-2526]
407
457
  for pension tier rates
@@ -0,0 +1,33 @@
1
+ /**
2
+ * The Agenda for Change band registry — the identity of a band,
3
+ * separate from any year's figures.
4
+ *
5
+ * Its own module because a band id is more primitive than the scale
6
+ * data: `scales.ts` holds the canonical tables and `afc-scales.ts`
7
+ * translates the circulars into them, and both need to name a band. If
8
+ * the registry lived with either, the other would import it and the
9
+ * two would form a cycle that fails at module load, when the
10
+ * translation runs.
11
+ *
12
+ * **Band 1 is absent, deliberately.** Every AfC circular still prints
13
+ * it and it is closed to new entrants in all four nations. Adding it
14
+ * is a scope decision, not a transcription fix — `afc-scales.ts` names
15
+ * it as an excluded band so a circular carrying it does not read as a
16
+ * gap.
17
+ */
18
+ export declare const AFC_BANDS: {
19
+ readonly B2: "2";
20
+ readonly B3: "3";
21
+ readonly B4: "4";
22
+ readonly B5: "5";
23
+ readonly B6: "6";
24
+ readonly B7: "7";
25
+ readonly B8a: "8a";
26
+ readonly B8b: "8b";
27
+ readonly B8c: "8c";
28
+ readonly B8d: "8d";
29
+ readonly B9: "9";
30
+ };
31
+ export type AfcBandId = (typeof AFC_BANDS)[keyof typeof AFC_BANDS];
32
+ /** Ordered band IDs — use for iteration. */
33
+ export declare const AFC_BAND_IDS: AfcBandId[];
@@ -0,0 +1,33 @@
1
+ /**
2
+ * The Agenda for Change band registry — the identity of a band,
3
+ * separate from any year's figures.
4
+ *
5
+ * Its own module because a band id is more primitive than the scale
6
+ * data: `scales.ts` holds the canonical tables and `afc-scales.ts`
7
+ * translates the circulars into them, and both need to name a band. If
8
+ * the registry lived with either, the other would import it and the
9
+ * two would form a cycle that fails at module load, when the
10
+ * translation runs.
11
+ *
12
+ * **Band 1 is absent, deliberately.** Every AfC circular still prints
13
+ * it and it is closed to new entrants in all four nations. Adding it
14
+ * is a scope decision, not a transcription fix — `afc-scales.ts` names
15
+ * it as an excluded band so a circular carrying it does not read as a
16
+ * gap.
17
+ */
18
+ export const AFC_BANDS = {
19
+ B2: '2',
20
+ B3: '3',
21
+ B4: '4',
22
+ B5: '5',
23
+ B6: '6',
24
+ B7: '7',
25
+ B8a: '8a',
26
+ B8b: '8b',
27
+ B8c: '8c',
28
+ B8d: '8d',
29
+ B9: '9',
30
+ };
31
+ /** Ordered band IDs — use for iteration. */
32
+ export const AFC_BAND_IDS = Object.values(AFC_BANDS);
33
+ //# sourceMappingURL=afc-band.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"afc-band.js","sourceRoot":"","sources":["../src/afc-band.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,EAAE,EAAE,GAAG;IACP,EAAE,EAAE,GAAG;IACP,EAAE,EAAE,GAAG;IACP,EAAE,EAAE,GAAG;IACP,EAAE,EAAE,GAAG;IACP,EAAE,EAAE,GAAG;IACP,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,EAAE,EAAE,GAAG;CACC,CAAC;AAKX,4CAA4C;AAC5C,MAAM,CAAC,MAAM,YAAY,GACvB,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Translation layer: AfC circulars → canonical scale points.
3
+ *
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, ScalePoint[]>` the rest of the library speaks.
8
+ *
9
+ * **England is a deliberate exception and stays in `scales.ts`.** It
10
+ * publishes no AfC circular — its scales are an NHS Employers web page
11
+ * plus a poster — so there is nothing to transcribe. The rule this
12
+ * layer follows is: *where the publisher issues a circular, transcribe
13
+ * it verbatim; where it publishes a web table, cite it and pin it with
14
+ * fixtures.* Inventing a pseudo-circular file for England to make the
15
+ * four shapes match would assert a document that does not exist, which
16
+ * is worse than the asymmetry.
17
+ *
18
+ * ── Point labels are DERIVED here, not authored ──
19
+ *
20
+ * No publisher prints a "Year N" label. Every label this library
21
+ * renders is our reading of an interval the publisher DOES print:
22
+ * England, Wales and Northern Ireland head that column "Years until
23
+ * eligible for pay progression", and Scotland's Annex C heads it
24
+ * "Yearly Increment". One convention, all four nations — a point's
25
+ * label is the year of service in which a member first reaches it, and
26
+ * the top point takes a `+` because service continues past it.
27
+ *
28
+ * Deriving rather than typing them is the point. Held as literals
29
+ * beside the salaries, a label and its interval could disagree with
30
+ * nothing to catch it; computed from the transcribed interval, a
31
+ * mis-read interval produces a wrong label that a fixture row fails on.
32
+ */
33
+ import type { AfcBandId } from './afc-band.js';
34
+ import type { ScalePoint } from './scale-point.js';
35
+ export declare const WALES_SCALES_2025_26: Record<AfcBandId, ScalePoint[]>;
36
+ export declare const WALES_SCALES_2026_27: Record<AfcBandId, ScalePoint[]>;
37
+ export declare const NI_SCALES_2025_26: Record<AfcBandId, ScalePoint[]>;
38
+ /**
39
+ * Scotland 2026-27, from Annex C.
40
+ *
41
+ * Annex C rather than Annex B because only Annex C carries the year of
42
+ * service. Annex B gives the same salaries against a bare point
43
+ * number, which cannot produce a label — `scotlandAnnexB` below exists
44
+ * so a fixture can check the two annexes agree.
45
+ */
46
+ export declare const SCOTLAND_SCALES_2026_27: Record<AfcBandId, ScalePoint[]>;
47
+ /**
48
+ * Annex B's salaries for a year, keyed by band, in printed order.
49
+ *
50
+ * Exposed so a test can assert that the annex a label came from and
51
+ * the annex the salaries were published in agree. Two annexes of one
52
+ * circular disagreeing would mean a transcription error in one of
53
+ * them, and nothing else would notice.
54
+ */
55
+ export declare function scotlandAnnexB(year: '2025-26' | '2026-27'): Map<AfcBandId, number[]>;
56
+ /**
57
+ * Scotland 2025-26.
58
+ *
59
+ * Built from the 2026-27 journey's SHAPE with Annex B's 2025-26
60
+ * salaries: the circular prints an identical increment structure for
61
+ * both years — the settlement changed the rates, not the ladder — and
62
+ * Annex C's 2025-26 table restates that structure rather than adding
63
+ * to it. Building the year from Annex B against a shape the circular
64
+ * publishes twice is faithful; re-typing the same increments would
65
+ * only add a second place to mistype them.
66
+ */
67
+ export declare const SCOTLAND_SCALES_2025_26: Record<AfcBandId, ScalePoint[]>;
@@ -0,0 +1,238 @@
1
+ /**
2
+ * Translation layer: AfC circulars → canonical scale points.
3
+ *
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, ScalePoint[]>` the rest of the library speaks.
8
+ *
9
+ * **England is a deliberate exception and stays in `scales.ts`.** It
10
+ * publishes no AfC circular — its scales are an NHS Employers web page
11
+ * plus a poster — so there is nothing to transcribe. The rule this
12
+ * layer follows is: *where the publisher issues a circular, transcribe
13
+ * it verbatim; where it publishes a web table, cite it and pin it with
14
+ * fixtures.* Inventing a pseudo-circular file for England to make the
15
+ * four shapes match would assert a document that does not exist, which
16
+ * is worse than the asymmetry.
17
+ *
18
+ * ── Point labels are DERIVED here, not authored ──
19
+ *
20
+ * No publisher prints a "Year N" label. Every label this library
21
+ * renders is our reading of an interval the publisher DOES print:
22
+ * England, Wales and Northern Ireland head that column "Years until
23
+ * eligible for pay progression", and Scotland's Annex C heads it
24
+ * "Yearly Increment". One convention, all four nations — a point's
25
+ * label is the year of service in which a member first reaches it, and
26
+ * the top point takes a `+` because service continues past it.
27
+ *
28
+ * Deriving rather than typing them is the point. Held as literals
29
+ * beside the salaries, a label and its interval could disagree with
30
+ * nothing to catch it; computed from the transcribed interval, a
31
+ * mis-read interval produces a wrong label that a fixture row fails on.
32
+ */
33
+ import { AFC_BANDS } from './afc-band.js';
34
+ import { invariant } from './errors.js';
35
+ import { WALES_AFC_W_02_2025 } from './circulars/wales-afc-w-02-2025.js';
36
+ import { WALES_AFC_W_02_2026 } from './circulars/wales-afc-w-02-2026.js';
37
+ import { NI_HSC_AFC_06_2025 } from './circulars/ni-hsc-afc-06-2025.js';
38
+ import { SCOTLAND_PCS_AFC_2026_01, } from './circulars/scotland-pcs-afc-2026-01.js';
39
+ /**
40
+ * Band 1, which every AfC circular still prints and this library does
41
+ * not model.
42
+ *
43
+ * Closed to new entrants in all four nations, and England is down to
44
+ * about 1,200 FTE and falling. Skipping it is a deliberate scope
45
+ * choice, NOT a transcription gap — which is why it is named here and
46
+ * anything else unmapped throws. Adding it later is a change to
47
+ * `AFC_BANDS`, and the transcriptions already carry the figures.
48
+ */
49
+ const UNMODELLED_BANDS = ['band 1'];
50
+ /**
51
+ * A band as a circular prints it → the id this library uses, or `null`
52
+ * where the band is deliberately not modelled.
53
+ *
54
+ * Case and spacing differ by publisher — Scotland prints `Band 8A`
55
+ * where Wales prints `Band 8a` — so the mapping normalises, then
56
+ * checks against the registry rather than trusting the normalisation:
57
+ * a band the library does not know is an error, not a silent skip.
58
+ */
59
+ function bandIdOf(printed) {
60
+ const key = printed.replace(/^Band\s+/i, '').toLowerCase();
61
+ if (UNMODELLED_BANDS.includes(`band ${key}`)) {
62
+ return null;
63
+ }
64
+ const id = Object.values(AFC_BANDS)
65
+ .find((b) => b === key);
66
+ invariant(id !== undefined, `afc-scales: no band id for the printed band "${printed}"`);
67
+ return id;
68
+ }
69
+ /** A point's label from the year of service it is first reached in. */
70
+ function yearLabelAt(year, isTop) {
71
+ return isTop ? `Year ${year}+` : `Year ${year}`;
72
+ }
73
+ /**
74
+ * A stepped row → its points.
75
+ *
76
+ * The entry point is always Year 1. Each later step is reached after
77
+ * the printed interval, so its year is the running total plus one.
78
+ */
79
+ function pointsFromStepped(row) {
80
+ const points = [];
81
+ let year = 1;
82
+ points.push({
83
+ label: yearLabelAt(year, false),
84
+ salary: row.entry,
85
+ });
86
+ if (row.intermediate !== undefined) {
87
+ year += row.yearsToNext;
88
+ points.push({
89
+ label: yearLabelAt(year, false),
90
+ salary: row.intermediate,
91
+ });
92
+ invariant(row.yearsToTop !== undefined, `afc-scales: ${row.band} prints an intermediate step with no `
93
+ + 'interval to the top');
94
+ year += row.yearsToTop;
95
+ }
96
+ else {
97
+ year += row.yearsToNext;
98
+ }
99
+ points.push({ label: yearLabelAt(year, true), salary: row.top });
100
+ return points;
101
+ }
102
+ /** A flat row → its single point. */
103
+ function pointsFromFlat(row) {
104
+ // Year 1 without a `+`: the circular prints one figure and no
105
+ // progression, so there is no service beyond the point to signal.
106
+ return [{ label: 'Year 1', salary: row.salary }];
107
+ }
108
+ /**
109
+ * Scotland's Annex C → points.
110
+ *
111
+ * Consecutive increments at one salary are one pay point, and the
112
+ * increment the run starts at is that point's year. The last run is
113
+ * the top.
114
+ */
115
+ function pointsFromJourney(rows) {
116
+ const runs = [];
117
+ for (const row of rows) {
118
+ const last = runs[runs.length - 1];
119
+ if (!last || last.salary !== row.salary) {
120
+ runs.push({ year: row.increment, salary: row.salary });
121
+ }
122
+ }
123
+ invariant(runs.length > 0, 'afc-scales: a pay journey with no increments');
124
+ return runs.map((run, i) => ({
125
+ label: yearLabelAt(run.year, i === runs.length - 1),
126
+ salary: run.salary,
127
+ }));
128
+ }
129
+ /** Every band a circular prints, keyed by id. */
130
+ function scalesFrom(flat, stepped) {
131
+ const out = {};
132
+ for (const row of flat) {
133
+ const id = bandIdOf(row.band);
134
+ if (id) {
135
+ out[id] = pointsFromFlat(row);
136
+ }
137
+ }
138
+ for (const row of stepped) {
139
+ const id = bandIdOf(row.band);
140
+ if (id) {
141
+ out[id] = pointsFromStepped(row);
142
+ }
143
+ }
144
+ return assertEveryBand(out);
145
+ }
146
+ /**
147
+ * Every band must be present.
148
+ *
149
+ * A circular that omits one is either a transcription that stopped
150
+ * early or a genuine change in what the nation publishes, and both
151
+ * need a person to look. Failing here beats serving a band page with
152
+ * nothing on it.
153
+ */
154
+ function assertEveryBand(out) {
155
+ for (const band of Object.values(AFC_BANDS)) {
156
+ invariant(out[band] !== undefined, `afc-scales: no points transcribed for band ${band}`);
157
+ }
158
+ return out;
159
+ }
160
+ /** Scotland's bands, from the Annex C pay journey. */
161
+ function scotlandScales(journey) {
162
+ const byBand = new Map();
163
+ for (const row of journey) {
164
+ const id = bandIdOf(row.band);
165
+ if (!id) {
166
+ continue;
167
+ }
168
+ const rows = byBand.get(id) ?? [];
169
+ rows.push(row);
170
+ byBand.set(id, rows);
171
+ }
172
+ const out = {};
173
+ for (const [id, rows] of byBand) {
174
+ out[id] = pointsFromJourney(rows);
175
+ }
176
+ return assertEveryBand(out);
177
+ }
178
+ export const WALES_SCALES_2025_26 = scalesFrom(WALES_AFC_W_02_2025.flatBands, WALES_AFC_W_02_2025.steppedBands);
179
+ export const WALES_SCALES_2026_27 = scalesFrom(WALES_AFC_W_02_2026.flatBands, WALES_AFC_W_02_2026.steppedBands);
180
+ export const NI_SCALES_2025_26 = scalesFrom(NI_HSC_AFC_06_2025.flatBands, NI_HSC_AFC_06_2025.steppedBands);
181
+ /**
182
+ * Scotland 2026-27, from Annex C.
183
+ *
184
+ * Annex C rather than Annex B because only Annex C carries the year of
185
+ * service. Annex B gives the same salaries against a bare point
186
+ * number, which cannot produce a label — `scotlandAnnexB` below exists
187
+ * so a fixture can check the two annexes agree.
188
+ */
189
+ export const SCOTLAND_SCALES_2026_27 = scotlandScales(SCOTLAND_PCS_AFC_2026_01.payJourney2026);
190
+ /**
191
+ * Annex B's salaries for a year, keyed by band, in printed order.
192
+ *
193
+ * Exposed so a test can assert that the annex a label came from and
194
+ * the annex the salaries were published in agree. Two annexes of one
195
+ * circular disagreeing would mean a transcription error in one of
196
+ * them, and nothing else would notice.
197
+ */
198
+ export function scotlandAnnexB(year) {
199
+ const rows = year === '2025-26'
200
+ ? SCOTLAND_PCS_AFC_2026_01.annexB2025
201
+ : SCOTLAND_PCS_AFC_2026_01.annexB2026;
202
+ const out = new Map();
203
+ for (const row of rows) {
204
+ const id = bandIdOf(row.band);
205
+ if (!id) {
206
+ continue;
207
+ }
208
+ out.set(id, [...(out.get(id) ?? []), row.salary]);
209
+ }
210
+ return out;
211
+ }
212
+ /**
213
+ * Scotland 2025-26.
214
+ *
215
+ * Built from the 2026-27 journey's SHAPE with Annex B's 2025-26
216
+ * salaries: the circular prints an identical increment structure for
217
+ * both years — the settlement changed the rates, not the ladder — and
218
+ * Annex C's 2025-26 table restates that structure rather than adding
219
+ * to it. Building the year from Annex B against a shape the circular
220
+ * publishes twice is faithful; re-typing the same increments would
221
+ * only add a second place to mistype them.
222
+ */
223
+ export const SCOTLAND_SCALES_2025_26 = (() => {
224
+ const salaries = scotlandAnnexB('2025-26');
225
+ const out = {};
226
+ for (const [band, points] of Object.entries(SCOTLAND_SCALES_2026_27)) {
227
+ const yearSalaries = salaries.get(band);
228
+ invariant(yearSalaries !== undefined
229
+ && yearSalaries.length === points.length, `afc-scales: Scotland ${band} has ${points.length} points in `
230
+ + `Annex C but ${yearSalaries?.length ?? 0} in Annex B 2025-26`);
231
+ out[band] = points.map((point, i) => ({
232
+ label: point.label,
233
+ salary: yearSalaries[i],
234
+ }));
235
+ }
236
+ return assertEveryBand(out);
237
+ })();
238
+ //# sourceMappingURL=afc-scales.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"afc-scales.js","sourceRoot":"","sources":["../src/afc-scales.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,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;;;;;;;;;GASG;AACH,MAAM,gBAAgB,GAAsB,CAAC,QAAQ,CAAC,CAAC;AAEvD;;;;;;;;GAQG;AACH,SAAS,QAAQ,CAAC,OAAe;IAC/B,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IAC3D,IAAI,gBAAgB,CAAC,QAAQ,CAAC,QAAQ,GAAG,EAAE,CAAC,EAAE,CAAC;QAC7C,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,EAAE,GAAI,MAAM,CAAC,MAAM,CAAC,SAAS,CAAc;SAC9C,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC;IAC1B,S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EAAE,CAAC;IACzD,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CACzC,uBAAuB,CACO,EAAE,CAAC;QACjC,MAAM,YAAY,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACxC,SAAS,CACP,YAAY,KAAK,SAAS;eACvB,YAAY,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM,EACxC,wBAAwB,IAAI,QAAQ,MAAM,CAAC,MAAM,aAAa;cAC5D,eAAe,YAAY,EAAE,MAAM,IAAI,CAAC,qBAAqB,CAChE,CAAC;QACF,GAAG,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;YACpC,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,MAAM,EAAE,YAAY,CAAC,CAAC,CAAE;SACzB,CAAC,CAAC,CAAC;IACN,CAAC;IACD,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC;AAC9B,CAAC,CAAC,EAAE,CAAC"}
@@ -0,0 +1,91 @@
1
+ /**
2
+ * AfC cash allowances — the per-session payments that sit beside the
3
+ * pay scales and are uplifted by the same award.
4
+ *
5
+ * Separate from {@link getAfcScales} because an allowance is not a
6
+ * scale point: it is not annual, not banded, and not pensionable pay
7
+ * in the way a salary is, so folding it into a scale year would put
8
+ * two different kinds of money behind one lookup.
9
+ *
10
+ * Recorded as cited constants for the same reason awards are — the
11
+ * publisher states the cash figure, and the uplifted rate is rounded
12
+ * by the publisher rather than by us. Scotland's 2026-27 rate is
13
+ * £27.51, where 26.51 × 1.0375 is £27.504.
14
+ *
15
+ * Coverage is deliberately partial, and absence means UNTRANSCRIBED,
16
+ * not unpaid. England's medical & dental circular sets an on-call
17
+ * availability allowance of its own — annual by nodal point, not per
18
+ * session — transcribed verbatim in `src/circulars/` and outside this
19
+ * lookup entirely, so a missing row here does not mean no such
20
+ * allowance is paid in that nation. Scotland has no sleep-in row
21
+ * for the same reason: its circular uplifts the on-call
22
+ * availability allowance and is silent on them, where Wales's
23
+ * prints a sleeping-in rate.
24
+ *
25
+ * Northern Ireland's two rates ARE transcribed — HSC (AfC) 06/2025
26
+ * Section 2 prints a sleep-in and an on-call rate, and
27
+ * `ni-hsc-afc-06-2025.ts` carries both — but they are not surfaced
28
+ * here, so `afcSessionAllowances(year, 'northern-ireland')` returns
29
+ * empty. That is a gap in this module, not in the transcription.
30
+ */
31
+ import type { Nation, PayYear } from '@casomoltd/paye-calc';
32
+ import type { IsoDate } from './iso-date.js';
33
+ import type { DocumentSource } from './document-source.js';
34
+ /**
35
+ * Identifiers for the per-session allowances transcribed here.
36
+ *
37
+ * Prefixed by nation because these are NOT the same payment under
38
+ * different names: Scotland's on-call availability allowance and
39
+ * Wales's three rates are set by different instruments, on
40
+ * different footings, and an unprefixed `onCall` would let one be
41
+ * passed where the other is meant and still compile.
42
+ */
43
+ export declare const SESSION_ALLOWANCES: {
44
+ readonly scotlandOnCallAvailability: "scotland-on-call-availability";
45
+ readonly walesSleepingIn: "wales-sleeping-in";
46
+ readonly walesOnCallWeekday: "wales-on-call-weekday-weekend";
47
+ readonly walesOnCallPublicHoliday: "wales-on-call-public-holiday";
48
+ };
49
+ export type SessionAllowanceId = (typeof SESSION_ALLOWANCES)[keyof typeof SESSION_ALLOWANCES];
50
+ /** One published rate, as its instrument prints it. */
51
+ interface SessionAllowanceRate {
52
+ readonly id: SessionAllowanceId;
53
+ /** The allowance's name as its own instrument prints it. */
54
+ readonly label: string;
55
+ readonly year: PayYear;
56
+ /** £ per session, as printed by the instrument. */
57
+ readonly perSession: number;
58
+ /** ISO date the rate applies from. */
59
+ readonly effectiveFrom: IsoDate;
60
+ readonly source: DocumentSource;
61
+ }
62
+ /** A published rate with the nation its instrument belongs to. */
63
+ export interface SessionAllowance extends SessionAllowanceRate {
64
+ readonly nation: Nation;
65
+ }
66
+ /**
67
+ * Every per-session allowance transcribed for a nation and year,
68
+ * in the order its instrument prints them. Empty where none has
69
+ * been transcribed — see this module's header on what absence
70
+ * means.
71
+ */
72
+ export declare function afcSessionAllowances(year: PayYear, nation: Nation): readonly SessionAllowance[];
73
+ /**
74
+ * One named allowance for a tax year, or `undefined` where that
75
+ * year has none transcribed.
76
+ *
77
+ * Keyed by allowance id, not by (nation, year): each id belongs to
78
+ * exactly one nation's instrument, so the nation is implied. A
79
+ * `(year, nation)` signature would take an argument it could not
80
+ * honour — asked for Wales it could only ever answer for whichever
81
+ * single allowance the function had been written around, and
82
+ * return `undefined` for the rest as though none were published.
83
+ *
84
+ * Undefined rather than a throw: unlike the AfC award, which every
85
+ * nation settles every year, most (allowance, year) pairs have no
86
+ * transcription and absence is the normal answer rather than an
87
+ * error. Callers branch on it; routing that through an exception
88
+ * would be an `if` written as a throw.
89
+ */
90
+ export declare function sessionAllowance(id: SessionAllowanceId, year: PayYear): SessionAllowance | undefined;
91
+ export {};