@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,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`,
@@ -1 +1 @@
1
- {"version":3,"file":"afc-shapes.js","sourceRoot":"","sources":["../../src/circulars/afc-shapes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}
1
+ {"version":3,"file":"afc-shapes.js","sourceRoot":"","sources":["../../src/circulars/afc-shapes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG"}
@@ -11,9 +11,10 @@
11
11
  *
12
12
  * **This is the only AfC year Northern Ireland has published.** No
13
13
  * 2026/27 pay circular exists: the Health Minister stated a desire to
14
- * proceed with 3.3% on 12 February 2026 "subject to my budgetary
15
- * position", and as at the most recent Assembly answer (AQW
16
- * 49635/22-27, 15 July 2026) he "cannot" pay it "until I have clarity
14
+ * proceed with 3.3% on 12 February 2026 (#sa-53), deliverable only
15
+ * "when clear about my budgetary position", and as at the most recent
16
+ * Assembly answer (AQW
17
+ * 49635/22-27, 15 July 2026, #sa-69) he "cannot" pay it "until I have clarity
17
18
  * on my Department's budget". HSC staff are still on these rates.
18
19
  *
19
20
  * **Bands 1 and 2 have NO progression columns.** The circular prints
@@ -11,9 +11,10 @@
11
11
  *
12
12
  * **This is the only AfC year Northern Ireland has published.** No
13
13
  * 2026/27 pay circular exists: the Health Minister stated a desire to
14
- * proceed with 3.3% on 12 February 2026 "subject to my budgetary
15
- * position", and as at the most recent Assembly answer (AQW
16
- * 49635/22-27, 15 July 2026) he "cannot" pay it "until I have clarity
14
+ * proceed with 3.3% on 12 February 2026 (#sa-53), deliverable only
15
+ * "when clear about my budgetary position", and as at the most recent
16
+ * Assembly answer (AQW
17
+ * 49635/22-27, 15 July 2026, #sa-69) he "cannot" pay it "until I have clarity
17
18
  * on my Department's budget". HSC staff are still on these rates.
18
19
  *
19
20
  * **Bands 1 and 2 have NO progression columns.** The circular prints
@@ -1 +1 @@
1
- {"version":3,"file":"ni-hsc-afc-06-2025.js","sourceRoot":"","sources":["../../src/circulars/ni-hsc-afc-06-2025.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAIH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,QAAQ,EAAE,mBAAmB;IAC7B,MAAM,EAAE,kBAAkB;IAC1B,MAAM,EAAE,YAAY;IACpB,aAAa,EAAE,YAAY;IAE3B,mCAAmC;IACnC,yDAAyD;IACzD,SAAS,EAAE;QACT;YACE,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,wBAAwB;SAC/B;QACD,EAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAC;KACR;IAEzB,sCAAsC;IACtC,YAAY,EAAE;QACZ,EAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,EAAC;QAC1D,EAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,EAAC;QAC1D;YACE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;YAC5C,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK;SAC/C;QACD;YACE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;YAC5C,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK;SAC/C;QACD;YACE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;YAC5C,YAAY,EAAE,KAAK,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AAG,EAAE,KAAK;SAC/C;QACD;YACE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;YAC7C,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK;SAC/C;QACD;YACE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;YAC7C,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK;SAC/C;QACD;YACE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;YAC7C,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM;SAChD;QACD;YACE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;YAC7C,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM;SACjD;KACyB;IAE5B,kDAAkD;IAClD,kEAAkE;IAClE,iEAAiE;IACjE,+DAA+D;IAC/D,uBAAuB;IACvB,UAAU,EAAE;QACV,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,KAAK;KACd;IAED,6BAA6B;IAC7B,iEAAiE;IACjE,kEAAkE;IAClE,qEAAqE;IACrE,mEAAmE;IACnE,mEAAmE;IACnE,6DAA6D;IAC7D,4DAA4D;CACpD,CAAC"}
package/dist/dates.d.ts CHANGED
@@ -22,6 +22,14 @@
22
22
  * dev-only test oracle (tests/period-oracle.test.ts). Migrate to
23
23
  * it when Node ships Temporal unflagged.
24
24
  */
25
+ /** A calendar period, or an age, in complete years and months plus the
26
+ * days beyond the last whole month: what a GAD factor table is read
27
+ * at. */
28
+ export interface Period {
29
+ readonly years: number;
30
+ readonly months: number;
31
+ readonly days: number;
32
+ }
25
33
  /** Months in a year, and in a scheme year. */
26
34
  export declare const MONTHS_PER_YEAR = 12;
27
35
  /**
@@ -34,11 +42,7 @@ export declare const MONTHS_PER_YEAR = 12;
34
42
  * period with negative days for a month-end date would silently
35
43
  * defeat the ERF round-up downstream.
36
44
  */
37
- export declare function periodInYearsMonths(from: Date, to: Date): {
38
- years: number;
39
- months: number;
40
- days: number;
41
- };
45
+ export declare function periodInYearsMonths(from: Date, to: Date): Period;
42
46
  /**
43
47
  * Months from `from` to `to`, a part month of at least 16 days
44
48
  * counting as one: the scheme's count for a leaver's final year and
package/dist/dates.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"dates.js","sourceRoot":"","sources":["../src/dates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,8CAA8C;AAC9C,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC;AAElC,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,aAAa,GAAG,IAAI,CAAC;AAC3B,2EAA2E;AAC3E,MAAM,UAAU,GACd,aAAa,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,aAAa,CAAC;AACxE;+DAC+D;AAC/D,MAAM,aAAa,GAAG,MAAM,CAAC;AAC7B,MAAM,WAAW,GAAG,aAAa,GAAG,UAAU,CAAC;AAC/C;8CAC8C;AAC9C,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC;;;;;GAKG;AACH,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAErC;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CACjC,IAAU,EACV,EAAQ;IAER;;;;;;;;qCAQiC;IACjC,SAAS,CACP,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,EAC7B,mCAAmC,CACpC,CAAC;IACF,SAAS,CACP,CAA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kC;AAClC,MAAM,UAAU,QAAQ,CAAC,GAAG,KAAsB;IAChD,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;AAC9D,CAAC;AAED;uCACuC;AACvC,MAAM,UAAU,WAAW,CAAC,IAAU,EAAE,EAAQ;IAC9C,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC;AAClE,CAAC;AAED;6CAC6C;AAC7C,SAAS,gBAAgB,CAAC,IAAU,EAAE,CAAS;IAC7C,MAAM,OAAO,GAAG,IAAI,IAAI,CACtB,IAAI,CAAC,WAAW,EAAE,EAClB,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,GAAG,CAAC,EACvB,CAAC,CACF,CAAC,OAAO,EAAE,CAAC;IACZ,OAAO,IAAI,IAAI,CACb,IAAI,CAAC,WAAW,EAAE,EAClB,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,EACnB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,CAClC,CAAC;AACJ,CAAC"}
package/dist/errors.d.ts CHANGED
@@ -15,8 +15,11 @@
15
15
  * it throws a bare Error to fail loud in tests and pages.
16
16
  */
17
17
  import type { Nation, PayYear, TaxYear } from '@casomoltd/paye-calc';
18
- import type { FactorProvenance, FactorTableIndex } from './gad/factor-table.js';
19
- /** A span, or an age, to the month: how a GAD table is keyed. */
18
+ import type { FactorProvenance, FactorTableIndex, FactorTableKind } from './gad/factor-table.js';
19
+ /** A span, or an age, to the month: how a GAD table is keyed. It is
20
+ * `Period` (`dates.ts`) without its days on purpose: a table's rows
21
+ * and columns stop at the month, so the position a lookup fell at and
22
+ * the last one printed have no days to carry. */
20
23
  interface YearsMonths {
21
24
  readonly years: number;
22
25
  readonly months: number;
@@ -64,16 +67,25 @@ export declare class PensionTiersUnavailable extends Error {
64
67
  * published, so callers with free date inputs catch it by type rather
65
68
  * than matching message text.
66
69
  *
67
- * `tableRef` names the table; `guidanceRef` alone does not, because the
68
- * guidance numbers each scheme's tables from 1 and so `ERF1` is both
69
- * 0-420 and 1-401. `years`, `months` and the bounds are a PERIOD from
70
- * the pension age on a period table and the member's AGE on an age
71
- * table, which `keyedBy` says.
70
+ * `provenance` and `kind` are the table's own: a consumer cites the
71
+ * table the drawing ran off from them, and says from `kind` which side
72
+ * of the pension age it fell. `tableRef` and `guidanceRef` are the
73
+ * provenance's, kept for the message text; `tableRef` names the table
74
+ * and `guidanceRef` alone does not, because the guidance numbers each
75
+ * scheme's tables from 1 and so `ERF1` is both 0-420 and 1-401.
76
+ * `years`, `months` and the bounds are a PERIOD from the pension age on
77
+ * a period table and the member's AGE on an age table, which `keyedBy`
78
+ * says.
72
79
  */
73
80
  export declare class RetirementFactorOutOfRange extends Error {
74
- /** Table name in the governing guidance, e.g. 'ERF1' */
81
+ /** The citation of the table the drawing ran off: the same object
82
+ * every factor read from that table carries. */
83
+ readonly provenance: FactorProvenance;
84
+ /** The table's kind: `erf` early, `lrf` late. */
85
+ readonly kind: FactorTableKind;
86
+ /** The provenance's name in the governing guidance, e.g. 'ERF1' */
75
87
  readonly guidanceRef: string;
76
- /** GAD's table reference, e.g. '0-420': unique, where
88
+ /** The provenance's GAD table reference, e.g. '0-420': unique, where
77
89
  * `guidanceRef` is not. */
78
90
  readonly tableRef: string;
79
91
  readonly keyedBy: FactorTableIndex;
@@ -81,8 +93,9 @@ export declare class RetirementFactorOutOfRange extends Error {
81
93
  readonly months: number;
82
94
  readonly maxYears: number;
83
95
  readonly maxMonths: number;
84
- constructor({ provenance, index, at, max }: {
96
+ constructor({ provenance, kind, index, at, max }: {
85
97
  readonly provenance: FactorProvenance;
98
+ readonly kind: FactorTableKind;
86
99
  readonly index: FactorTableIndex;
87
100
  /** Where the drawing fell, and the furthest the table prints. */
88
101
  readonly at: YearsMonths;
@@ -128,19 +141,6 @@ export declare class PayPathUnavailable extends Error {
128
141
  readonly reason: string;
129
142
  constructor(reason: string);
130
143
  }
131
- /** What {@link BenefitNotModelled} refuses, as a closed set a
132
- * consumer can branch on. Each is deferred, and each names the issue
133
- * that carries what a build would take. */
134
- export declare const NOT_MODELLED: {
135
- readonly breakInService: "break-in-service";
136
- readonly bothLegacySections: "both-legacy-sections";
137
- readonly no2015Section: "no-2015-section";
138
- readonly remedyMemberLeftEarly: "remedy-member-left-before-2022";
139
- readonly statementBeforeRollback: "statement-before-rollback";
140
- readonly preservedDrawnEarly: "preserved-benefits-drawn-early";
141
- readonly partTimeLegacy: "part-time-legacy-service";
142
- };
143
- export type NotModelled = (typeof NOT_MODELLED)[keyof typeof NOT_MODELLED];
144
144
  /**
145
145
  * A benefit the library can name but has not modelled, refused rather
146
146
  * than priced on an assumption nobody would see. `code` says which, so
@@ -151,17 +151,6 @@ export declare class BenefitNotModelled extends Error {
151
151
  readonly code: NotModelled;
152
152
  constructor(code: NotModelled, detail: string);
153
153
  }
154
- /** What a {@link BeforeStatement} refused, as a closed set a consumer can
155
- * branch on. */
156
- export declare const STATEMENT_READS: {
157
- /** A leaving, which a walk would never reach. */
158
- readonly leaving: "leaving";
159
- /** The balance held on a date. */
160
- readonly balance: "balance";
161
- /** The close of a scheme year. */
162
- readonly yearClose: "year-close";
163
- };
164
- export type StatementRead = (typeof STATEMENT_READS)[keyof typeof STATEMENT_READS];
165
154
  /**
166
155
  * A read of a member's 2015 Section balance on a date before their
167
156
  * statement's 31 March, or a leaving before it. Not a build to come: a
@@ -185,6 +174,40 @@ export declare class BeforeStatement extends Error {
185
174
  /** The statement's 31 March. */
186
175
  statementDate: Date);
187
176
  }
177
+ /**
178
+ * An additional pension purchase the published tables do not price, or
179
+ * the scheme's rules do not allow. Refused rather than extrapolated,
180
+ * because an extrapolated factor is a price nobody has published; `code`
181
+ * says which, so a consumer can tell a member what to change.
182
+ */
183
+ export declare class AdditionalPensionUnavailable extends Error {
184
+ readonly code: AdditionalPensionRefusal;
185
+ constructor(code: AdditionalPensionRefusal, detail: string);
186
+ }
187
+ /** What {@link BenefitNotModelled} refuses, as a closed set a
188
+ * consumer can branch on. Each is deferred, and each names the issue
189
+ * that carries what a build would take. */
190
+ export declare const NOT_MODELLED: {
191
+ readonly breakInService: "break-in-service";
192
+ readonly bothLegacySections: "both-legacy-sections";
193
+ readonly no2015Section: "no-2015-section";
194
+ readonly remedyMemberLeftEarly: "remedy-member-left-before-2022";
195
+ readonly statementBeforeRollback: "statement-before-rollback";
196
+ readonly preservedDrawnEarly: "preserved-benefits-drawn-early";
197
+ readonly partTimeLegacy: "part-time-legacy-service";
198
+ };
199
+ export type NotModelled = (typeof NOT_MODELLED)[keyof typeof NOT_MODELLED];
200
+ /** What a {@link BeforeStatement} refused, as a closed set a consumer can
201
+ * branch on. */
202
+ export declare const STATEMENT_READS: {
203
+ /** A leaving, which a walk would never reach. */
204
+ readonly leaving: "leaving";
205
+ /** The balance held on a date. */
206
+ readonly balance: "balance";
207
+ /** The close of a scheme year. */
208
+ readonly yearClose: "year-close";
209
+ };
210
+ export type StatementRead = (typeof STATEMENT_READS)[keyof typeof STATEMENT_READS];
188
211
  /** Why an additional pension purchase is refused, as a closed set a
189
212
  * consumer can branch on. */
190
213
  export declare const ADDITIONAL_PENSION_REFUSALS: {
@@ -194,23 +217,13 @@ export declare const ADDITIONAL_PENSION_REFUSALS: {
194
217
  readonly overLimit: "over-limit";
195
218
  /** An age or payment period the table does not print. */
196
219
  readonly outsideTable: "outside-table";
197
- /** An election outside the dates the tables and the limit hold for. */
220
+ /** An election outside the dates the purchase limit holds for. */
198
221
  readonly outsideDates: "outside-dates";
199
222
  /** A member who leaves before drawing: deferred growth is not
200
223
  * modelled. */
201
224
  readonly leftBeforeDrawing: "left-before-drawing";
202
225
  };
203
226
  export type AdditionalPensionRefusal = (typeof ADDITIONAL_PENSION_REFUSALS)[keyof typeof ADDITIONAL_PENSION_REFUSALS];
204
- /**
205
- * An additional pension purchase the published tables do not price, or
206
- * the scheme's rules do not allow. Refused rather than extrapolated,
207
- * because an extrapolated factor is a price nobody has published; `code`
208
- * says which, so a consumer can tell a member what to change.
209
- */
210
- export declare class AdditionalPensionUnavailable extends Error {
211
- readonly code: AdditionalPensionRefusal;
212
- constructor(code: AdditionalPensionRefusal, detail: string);
213
- }
214
227
  /**
215
228
  * Whether a read on `on` falls before the first date a statement answers,
216
229
  * and so is one {@link BeforeStatement} refuses. `answersFrom` is that date,
package/dist/errors.js CHANGED
@@ -65,16 +65,25 @@ export class PensionTiersUnavailable extends Error {
65
65
  * published, so callers with free date inputs catch it by type rather
66
66
  * than matching message text.
67
67
  *
68
- * `tableRef` names the table; `guidanceRef` alone does not, because the
69
- * guidance numbers each scheme's tables from 1 and so `ERF1` is both
70
- * 0-420 and 1-401. `years`, `months` and the bounds are a PERIOD from
71
- * the pension age on a period table and the member's AGE on an age
72
- * table, which `keyedBy` says.
68
+ * `provenance` and `kind` are the table's own: a consumer cites the
69
+ * table the drawing ran off from them, and says from `kind` which side
70
+ * of the pension age it fell. `tableRef` and `guidanceRef` are the
71
+ * provenance's, kept for the message text; `tableRef` names the table
72
+ * and `guidanceRef` alone does not, because the guidance numbers each
73
+ * scheme's tables from 1 and so `ERF1` is both 0-420 and 1-401.
74
+ * `years`, `months` and the bounds are a PERIOD from the pension age on
75
+ * a period table and the member's AGE on an age table, which `keyedBy`
76
+ * says.
73
77
  */
74
78
  export class RetirementFactorOutOfRange extends Error {
75
- /** Table name in the governing guidance, e.g. 'ERF1' */
79
+ /** The citation of the table the drawing ran off: the same object
80
+ * every factor read from that table carries. */
81
+ provenance;
82
+ /** The table's kind: `erf` early, `lrf` late. */
83
+ kind;
84
+ /** The provenance's name in the governing guidance, e.g. 'ERF1' */
76
85
  guidanceRef;
77
- /** GAD's table reference, e.g. '0-420': unique, where
86
+ /** The provenance's GAD table reference, e.g. '0-420': unique, where
78
87
  * `guidanceRef` is not. */
79
88
  tableRef;
80
89
  keyedBy;
@@ -82,7 +91,7 @@ export class RetirementFactorOutOfRange extends Error {
82
91
  months;
83
92
  maxYears;
84
93
  maxMonths;
85
- constructor({ provenance, index, at, max }) {
94
+ constructor({ provenance, kind, index, at, max }) {
86
95
  const { tableRef, guidanceRef } = provenance;
87
96
  super(index.by === 'period'
88
97
  ? `${tableRef} (${guidanceRef}) out of range: ${at.years}yr `
@@ -91,6 +100,8 @@ export class RetirementFactorOutOfRange extends Error {
91
100
  + `is outside ${index.firstAge}yr 0mo to `
92
101
  + `${max.years}yr ${max.months}mo`);
93
102
  this.name = 'RetirementFactorOutOfRange';
103
+ this.provenance = provenance;
104
+ this.kind = kind;
94
105
  this.guidanceRef = guidanceRef;
95
106
  this.tableRef = tableRef;
96
107
  this.keyedBy = index;
@@ -155,25 +166,6 @@ export class PayPathUnavailable extends Error {
155
166
  this.name = 'PayPathUnavailable';
156
167
  }
157
168
  }
158
- /** What {@link BenefitNotModelled} refuses, as a closed set a
159
- * consumer can branch on. Each is deferred, and each names the issue
160
- * that carries what a build would take. */
161
- export const NOT_MODELLED = {
162
- // https://github.com/casomoltd/nhs-pay/issues/16
163
- breakInService: 'break-in-service',
164
- // https://github.com/casomoltd/nhs-pay/issues/16
165
- bothLegacySections: 'both-legacy-sections',
166
- // https://github.com/casomoltd/nhs-pay/issues/19
167
- no2015Section: 'no-2015-section',
168
- // https://github.com/casomoltd/nhs-pay/issues/19
169
- remedyMemberLeftEarly: 'remedy-member-left-before-2022',
170
- // https://github.com/casomoltd/nhs-pay/issues/20
171
- statementBeforeRollback: 'statement-before-rollback',
172
- // https://github.com/casomoltd/nhs-pay/issues/18
173
- preservedDrawnEarly: 'preserved-benefits-drawn-early',
174
- // https://github.com/casomoltd/nhs-pay/issues/26
175
- partTimeLegacy: 'part-time-legacy-service',
176
- };
177
169
  /**
178
170
  * A benefit the library can name but has not modelled, refused rather
179
171
  * than priced on an assumption nobody would see. `code` says which, so
@@ -188,16 +180,6 @@ export class BenefitNotModelled extends Error {
188
180
  this.name = 'BenefitNotModelled';
189
181
  }
190
182
  }
191
- /** What a {@link BeforeStatement} refused, as a closed set a consumer can
192
- * branch on. */
193
- export const STATEMENT_READS = {
194
- /** A leaving, which a walk would never reach. */
195
- leaving: 'leaving',
196
- /** The balance held on a date. */
197
- balance: 'balance',
198
- /** The close of a scheme year. */
199
- yearClose: 'year-close',
200
- };
201
183
  /**
202
184
  * A read of a member's 2015 Section balance on a date before their
203
185
  * statement's 31 March, or a leaving before it. Not a build to come: a
@@ -229,21 +211,6 @@ export class BeforeStatement extends Error {
229
211
  this.name = 'BeforeStatement';
230
212
  }
231
213
  }
232
- /** Why an additional pension purchase is refused, as a closed set a
233
- * consumer can branch on. */
234
- export const ADDITIONAL_PENSION_REFUSALS = {
235
- /** Not a whole number of £250 units. */
236
- offUnit: 'off-unit',
237
- /** More than the limit a member may buy. */
238
- overLimit: 'over-limit',
239
- /** An age or payment period the table does not print. */
240
- outsideTable: 'outside-table',
241
- /** An election outside the dates the tables and the limit hold for. */
242
- outsideDates: 'outside-dates',
243
- /** A member who leaves before drawing: deferred growth is not
244
- * modelled. */
245
- leftBeforeDrawing: 'left-before-drawing',
246
- };
247
214
  /**
248
215
  * An additional pension purchase the published tables do not price, or
249
216
  * the scheme's rules do not allow. Refused rather than extrapolated,
@@ -258,6 +225,50 @@ export class AdditionalPensionUnavailable extends Error {
258
225
  this.name = 'AdditionalPensionUnavailable';
259
226
  }
260
227
  }
228
+ /** What {@link BenefitNotModelled} refuses, as a closed set a
229
+ * consumer can branch on. Each is deferred, and each names the issue
230
+ * that carries what a build would take. */
231
+ export const NOT_MODELLED = {
232
+ // https://github.com/casomoltd/nhs-pay/issues/16
233
+ breakInService: 'break-in-service',
234
+ // https://github.com/casomoltd/nhs-pay/issues/16
235
+ bothLegacySections: 'both-legacy-sections',
236
+ // https://github.com/casomoltd/nhs-pay/issues/19
237
+ no2015Section: 'no-2015-section',
238
+ // https://github.com/casomoltd/nhs-pay/issues/19
239
+ remedyMemberLeftEarly: 'remedy-member-left-before-2022',
240
+ // https://github.com/casomoltd/nhs-pay/issues/20
241
+ statementBeforeRollback: 'statement-before-rollback',
242
+ // https://github.com/casomoltd/nhs-pay/issues/18
243
+ preservedDrawnEarly: 'preserved-benefits-drawn-early',
244
+ // https://github.com/casomoltd/nhs-pay/issues/26
245
+ partTimeLegacy: 'part-time-legacy-service',
246
+ };
247
+ /** What a {@link BeforeStatement} refused, as a closed set a consumer can
248
+ * branch on. */
249
+ export const STATEMENT_READS = {
250
+ /** A leaving, which a walk would never reach. */
251
+ leaving: 'leaving',
252
+ /** The balance held on a date. */
253
+ balance: 'balance',
254
+ /** The close of a scheme year. */
255
+ yearClose: 'year-close',
256
+ };
257
+ /** Why an additional pension purchase is refused, as a closed set a
258
+ * consumer can branch on. */
259
+ export const ADDITIONAL_PENSION_REFUSALS = {
260
+ /** Not a whole number of £250 units. */
261
+ offUnit: 'off-unit',
262
+ /** More than the limit a member may buy. */
263
+ overLimit: 'over-limit',
264
+ /** An age or payment period the table does not print. */
265
+ outsideTable: 'outside-table',
266
+ /** An election outside the dates the purchase limit holds for. */
267
+ outsideDates: 'outside-dates',
268
+ /** A member who leaves before drawing: deferred growth is not
269
+ * modelled. */
270
+ leftBeforeDrawing: 'left-before-drawing',
271
+ };
261
272
  /**
262
273
  * Whether a read on `on` falls before the first date a statement answers,
263
274
  * and so is one {@link BeforeStatement} refuses. `answersFrom` is that date,
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAeH;;;;;GAKG;AACH,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IAE9B;IAIA;IACA;IAEA;IARX,YACW,MAAc;IACvB;;8CAE0C;IACjC,IAAa,EACb,OAAgB;IACzB,6DAA6D;IACpD,UAAmB;QA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