@casomoltd/nhs-pay 0.19.3 → 0.20.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 (93) hide show
  1. package/README.md +69 -5
  2. package/dist/afc-scales.d.ts +14 -7
  3. package/dist/afc-scales.js +28 -23
  4. package/dist/afc-scales.js.map +1 -1
  5. package/dist/bands.d.ts +2 -2
  6. package/dist/commutation.d.ts +49 -5
  7. package/dist/commutation.js +124 -43
  8. package/dist/commutation.js.map +1 -1
  9. package/dist/dates.d.ts +2 -0
  10. package/dist/dates.js +4 -0
  11. package/dist/dates.js.map +1 -1
  12. package/dist/errors.d.ts +70 -12
  13. package/dist/errors.js +85 -19
  14. package/dist/errors.js.map +1 -1
  15. package/dist/factor-basis.d.ts +87 -0
  16. package/dist/factor-basis.js +99 -0
  17. package/dist/factor-basis.js.map +1 -0
  18. package/dist/gad/erf-1-401-2023-06-30.d.ts +47 -0
  19. package/dist/gad/erf-1-401-2023-06-30.js +73 -0
  20. package/dist/gad/erf-1-401-2023-06-30.js.map +1 -0
  21. package/dist/gad/erf-1-402-2023-06-30.d.ts +48 -0
  22. package/dist/gad/erf-1-402-2023-06-30.js +84 -0
  23. package/dist/gad/erf-1-402-2023-06-30.js.map +1 -0
  24. package/dist/gad/erf-1-407-2023-06-30.d.ts +47 -0
  25. package/dist/gad/erf-1-407-2023-06-30.js +73 -0
  26. package/dist/gad/erf-1-407-2023-06-30.js.map +1 -0
  27. package/dist/gad/erf-2023-06-30.d.ts +3 -0
  28. package/dist/gad/erf-2023-06-30.js +1 -0
  29. package/dist/gad/erf-2023-06-30.js.map +1 -1
  30. package/dist/gad/factor-table.d.ts +62 -31
  31. package/dist/gad/factor-table.js +67 -34
  32. package/dist/gad/factor-table.js.map +1 -1
  33. package/dist/gad/lrf-2-416-2023-06-30.d.ts +46 -0
  34. package/dist/gad/lrf-2-416-2023-06-30.js +72 -0
  35. package/dist/gad/lrf-2-416-2023-06-30.js.map +1 -0
  36. package/dist/gad/lrf-2023-06-30.d.ts +3 -0
  37. package/dist/gad/lrf-2023-06-30.js +1 -0
  38. package/dist/gad/lrf-2023-06-30.js.map +1 -1
  39. package/dist/gad/promotional-scale-2020.d.ts +37 -0
  40. package/dist/gad/promotional-scale-2020.js +38 -0
  41. package/dist/gad/promotional-scale-2020.js.map +1 -0
  42. package/dist/index.d.ts +17 -4
  43. package/dist/index.js +22 -13
  44. package/dist/index.js.map +1 -1
  45. package/dist/iso-date.d.ts +7 -0
  46. package/dist/iso-date.js +11 -0
  47. package/dist/iso-date.js.map +1 -1
  48. package/dist/member-benefits.d.ts +237 -0
  49. package/dist/member-benefits.js +440 -0
  50. package/dist/member-benefits.js.map +1 -0
  51. package/dist/pay-path.d.ts +70 -0
  52. package/dist/pay-path.js +155 -0
  53. package/dist/pay-path.js.map +1 -0
  54. package/dist/pension/curve.d.ts +74 -0
  55. package/dist/pension/curve.js +134 -0
  56. package/dist/pension/curve.js.map +1 -0
  57. package/dist/pension/history.js +3 -3
  58. package/dist/pension/history.js.map +1 -1
  59. package/dist/pension/ledger.d.ts +71 -31
  60. package/dist/pension/ledger.js +41 -6
  61. package/dist/pension/ledger.js.map +1 -1
  62. package/dist/pension/money.d.ts +23 -6
  63. package/dist/pension/money.js +23 -1
  64. package/dist/pension/money.js.map +1 -1
  65. package/dist/pension/uplift.d.ts +23 -0
  66. package/dist/pension/uplift.js +34 -1
  67. package/dist/pension/uplift.js.map +1 -1
  68. package/dist/pension-projection.d.ts +25 -31
  69. package/dist/pension-projection.js +40 -197
  70. package/dist/pension-projection.js.map +1 -1
  71. package/dist/scale-point.d.ts +11 -1
  72. package/dist/scales.d.ts +9 -9
  73. package/dist/scales.js +68 -67
  74. package/dist/scales.js.map +1 -1
  75. package/dist/sections/final-salary.d.ts +97 -0
  76. package/dist/sections/final-salary.js +99 -0
  77. package/dist/sections/final-salary.js.map +1 -0
  78. package/dist/sections/section-1995.d.ts +20 -0
  79. package/dist/sections/section-1995.js +52 -0
  80. package/dist/sections/section-1995.js.map +1 -0
  81. package/dist/sections/section-2008.d.ts +16 -0
  82. package/dist/sections/section-2008.js +44 -0
  83. package/dist/sections/section-2008.js.map +1 -0
  84. package/dist/sections/section-2015.d.ts +43 -0
  85. package/dist/sections/section-2015.js +57 -0
  86. package/dist/sections/section-2015.js.map +1 -0
  87. package/dist/sources.d.ts +14 -0
  88. package/dist/sources.js +21 -0
  89. package/dist/sources.js.map +1 -1
  90. package/dist/values.d.ts +4 -5
  91. package/dist/values.js +4 -5
  92. package/dist/values.js.map +1 -1
  93. package/package.json +8 -5
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Verbatim transcription — GAD "NHSPS_EW — Consolidated Factor
3
+ * Spreadsheet", table 2-416, factors issued 30 June 2023.
4
+ * Sheet x-416 · PDF p.21.
5
+ *
6
+ * Sources: "NHSBSA, Early and Late Retirement Factors" (the
7
+ * member-facing extract) and "GAD NHS_EW Consolidated Factors,
8
+ * version 2026-01" (the workbook, and the source of record) —
9
+ * see docs/source-archive.md#sa-01 and #sa-02.
10
+ *
11
+ * Table 2-416 (LRF1): 2008 Section late retirement factors, pension,
12
+ * relative to a pension age of 65. Unisex; keyed by AGE "in complete
13
+ * years & months", as the table's own header defines it. Read for
14
+ * the 2008 Section's pension drawn after 65.
15
+ *
16
+ * Rows are ages (65–75), columns months (0–11), exactly as
17
+ * printed; the last row prints a single 0-month value. Delete this
18
+ * file whole when a later issue supersedes the table; git history is
19
+ * the archive.
20
+ *
21
+ * ── Checked against GAD's own workbook, 23 Sep 2026 ─
22
+ *
23
+ * **Unchanged and still current.** The workbook's *Version control*
24
+ * sheet shows x-416 last updated in version 2023-02, dated 30 June
25
+ * 2023, the `issued` date below; no later version names it. Every
26
+ * cell of the x-416 sheet was diffed against the NHSBSA extract —
27
+ * 121 cells — with **zero differences**.
28
+ */
29
+ /** LRF — Table 2-416, issued 30 Jun 2023. */
30
+ export declare const LRF_2_416: {
31
+ readonly kind: "lrf";
32
+ readonly index: {
33
+ readonly by: "age";
34
+ readonly firstAge: 65;
35
+ };
36
+ readonly provenance: {
37
+ readonly tableRef: "2-416";
38
+ readonly sheet: "x-416";
39
+ readonly page: 21;
40
+ readonly guidanceRef: "LRF1";
41
+ readonly issued: import("../iso-date.js").IsoDate;
42
+ readonly sourceUrl: string;
43
+ readonly methodGuidance: string;
44
+ };
45
+ readonly rows: readonly [readonly [1, 1.003, 1.006, 1.009, 1.011, 1.014, 1.017, 1.02, 1.023, 1.026, 1.029, 1.031], readonly [1.034, 1.037, 1.04, 1.044, 1.047, 1.05, 1.053, 1.056, 1.059, 1.062, 1.065, 1.068], readonly [1.071, 1.075, 1.078, 1.082, 1.085, 1.088, 1.092, 1.095, 1.099, 1.102, 1.105, 1.109], readonly [1.112, 1.116, 1.12, 1.123, 1.127, 1.131, 1.135, 1.138, 1.142, 1.146, 1.149, 1.153], readonly [1.157, 1.161, 1.165, 1.169, 1.173, 1.177, 1.181, 1.185, 1.19, 1.194, 1.198, 1.202], readonly [1.206, 1.21, 1.215, 1.219, 1.224, 1.228, 1.233, 1.237, 1.242, 1.246, 1.251, 1.255], readonly [1.26, 1.265, 1.269, 1.274, 1.279, 1.284, 1.289, 1.294, 1.299, 1.304, 1.309, 1.314], readonly [1.318, 1.324, 1.329, 1.335, 1.34, 1.345, 1.351, 1.356, 1.361, 1.367, 1.372, 1.377], readonly [1.383, 1.389, 1.395, 1.4, 1.406, 1.412, 1.418, 1.424, 1.43, 1.436, 1.442, 1.448], readonly [1.453, 1.46, 1.466, 1.473, 1.479, 1.486, 1.492, 1.499, 1.505, 1.512, 1.518, 1.525], readonly [1.531]];
46
+ };
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Verbatim transcription — GAD "NHSPS_EW — Consolidated Factor
3
+ * Spreadsheet", table 2-416, factors issued 30 June 2023.
4
+ * Sheet x-416 · PDF p.21.
5
+ *
6
+ * Sources: "NHSBSA, Early and Late Retirement Factors" (the
7
+ * member-facing extract) and "GAD NHS_EW Consolidated Factors,
8
+ * version 2026-01" (the workbook, and the source of record) —
9
+ * see docs/source-archive.md#sa-01 and #sa-02.
10
+ *
11
+ * Table 2-416 (LRF1): 2008 Section late retirement factors, pension,
12
+ * relative to a pension age of 65. Unisex; keyed by AGE "in complete
13
+ * years & months", as the table's own header defines it. Read for
14
+ * the 2008 Section's pension drawn after 65.
15
+ *
16
+ * Rows are ages (65–75), columns months (0–11), exactly as
17
+ * printed; the last row prints a single 0-month value. Delete this
18
+ * file whole when a later issue supersedes the table; git history is
19
+ * the archive.
20
+ *
21
+ * ── Checked against GAD's own workbook, 23 Sep 2026 ─
22
+ *
23
+ * **Unchanged and still current.** The workbook's *Version control*
24
+ * sheet shows x-416 last updated in version 2023-02, dated 30 June
25
+ * 2023, the `issued` date below; no later version names it. Every
26
+ * cell of the x-416 sheet was diffed against the NHSBSA extract —
27
+ * 121 cells — with **zero differences**.
28
+ */
29
+ import { isoDate } from '../iso-date.js';
30
+ /** LRF — Table 2-416, issued 30 Jun 2023. */
31
+ export const LRF_2_416 = {
32
+ kind: 'lrf',
33
+ index: { by: 'age', firstAge: 65 },
34
+ provenance: {
35
+ tableRef: '2-416',
36
+ sheet: 'x-416',
37
+ page: 21,
38
+ guidanceRef: 'LRF1',
39
+ issued: isoDate('2023-06-30'),
40
+ sourceUrl: 'https://www.nhsbsa.nhs.uk/sites/default/'
41
+ + 'files/2024-02/Early%20and%20Late%20Retirement'
42
+ + '%20Factors.pdf',
43
+ methodGuidance: 'GAD NHSPS 1995/2008 E&W — Voluntary early and'
44
+ + ' late retirements in normal health, 7 Aug 2019',
45
+ },
46
+ rows: [
47
+ // 0mo 1mo 2mo 3mo 4mo 5mo
48
+ // 6mo 7mo 8mo 9mo 10mo 11mo
49
+ [1.000, 1.003, 1.006, 1.009, 1.011, 1.014,
50
+ 1.017, 1.020, 1.023, 1.026, 1.029, 1.031], // 65
51
+ [1.034, 1.037, 1.040, 1.044, 1.047, 1.050,
52
+ 1.053, 1.056, 1.059, 1.062, 1.065, 1.068], // 66
53
+ [1.071, 1.075, 1.078, 1.082, 1.085, 1.088,
54
+ 1.092, 1.095, 1.099, 1.102, 1.105, 1.109], // 67
55
+ [1.112, 1.116, 1.120, 1.123, 1.127, 1.131,
56
+ 1.135, 1.138, 1.142, 1.146, 1.149, 1.153], // 68
57
+ [1.157, 1.161, 1.165, 1.169, 1.173, 1.177,
58
+ 1.181, 1.185, 1.190, 1.194, 1.198, 1.202], // 69
59
+ [1.206, 1.210, 1.215, 1.219, 1.224, 1.228,
60
+ 1.233, 1.237, 1.242, 1.246, 1.251, 1.255], // 70
61
+ [1.260, 1.265, 1.269, 1.274, 1.279, 1.284,
62
+ 1.289, 1.294, 1.299, 1.304, 1.309, 1.314], // 71
63
+ [1.318, 1.324, 1.329, 1.335, 1.340, 1.345,
64
+ 1.351, 1.356, 1.361, 1.367, 1.372, 1.377], // 72
65
+ [1.383, 1.389, 1.395, 1.400, 1.406, 1.412,
66
+ 1.418, 1.424, 1.430, 1.436, 1.442, 1.448], // 73
67
+ [1.453, 1.460, 1.466, 1.473, 1.479, 1.486,
68
+ 1.492, 1.499, 1.505, 1.512, 1.518, 1.525], // 74
69
+ [1.531], // 75 — 0mo only
70
+ ],
71
+ };
72
+ //# sourceMappingURL=lrf-2-416-2023-06-30.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lrf-2-416-2023-06-30.js","sourceRoot":"","sources":["../../src/gad/lrf-2-416-2023-06-30.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAEvC,6CAA6C;AAC7C,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,EAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAC;IAChC,UAAU,EAAE;QACV,QAAQ,EAAE,OAAO;QACjB,KAAK,EAAE,OAAO;QACd,IAAI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AAE,KAAK;QAClD,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;YACvC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,KAAK;QAClD,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;YACvC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,KAAK;QAClD,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;YACvC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,KAAK;QAClD,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;YACvC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,KAAK;QAClD,CAAC,KAAK,CAAC,EAAiC,gBAAgB;KACzD;CACiC,CAAC"}
@@ -56,6 +56,9 @@
56
56
  /** 2015 scheme LRF — Table 0-421, issued 30 Jun 2023. */
57
57
  export declare const LRF_0_421: {
58
58
  readonly kind: "lrf";
59
+ readonly index: {
60
+ readonly by: "period";
61
+ };
59
62
  readonly provenance: {
60
63
  readonly tableRef: "0-421";
61
64
  readonly sheet: "x-421";
@@ -57,6 +57,7 @@ import { isoDate } from '../iso-date.js';
57
57
  /** 2015 scheme LRF — Table 0-421, issued 30 Jun 2023. */
58
58
  export const LRF_0_421 = {
59
59
  kind: 'lrf',
60
+ index: { by: 'period' },
60
61
  provenance: {
61
62
  tableRef: '0-421',
62
63
  sheet: 'x-421',
@@ -1 +1 @@
1
- {"version":3,"file":"lrf-2023-06-30.js","sourceRoot":"","sources":["../../src/gad/lrf-2023-06-30.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,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,MAAM;QACnD,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;YACvC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,MAAM;QACnD,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;YACvC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,MAAM;QACnD,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;YACvC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,MAAM;QACnD,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;YACvC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,MAAM;QACnD,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;YACvC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,MAAM;QACnD,CAAC,KAAK,CAAC,EAAsC,kBAAkB;KAChE;CACiC,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Verbatim transcription — GAD, "NHS Pension Scheme: Summary of the
3
+ * 2020 assumptions used in the actuarial valuation as at 31 March
4
+ * 2020", 19 October 2023, page 3, "Promotional pay increases".
5
+ *
6
+ * Source: see docs/source-archive.md#sa-57. Mirrored cell by cell,
7
+ * from the PDF's text, in tests/fixtures/gad-promotional-scale-2020.csv.
8
+ *
9
+ * This summary is the document that prints the table. The valuation
10
+ * results report does not contain it, and the advice-on-assumptions
11
+ * report discusses it (Part B6) without reprinting it, so neither is
12
+ * cited for these figures.
13
+ *
14
+ * Index values by age, relative to 100 at age 25: growth in pay from
15
+ * promotion and progression OVER AND ABOVE general pay awards, which
16
+ * is why it composes with a pay figure in today's money without
17
+ * counting the awards twice. All four published columns are
18
+ * transcribed, so none is ever guessed later; which ones a caller
19
+ * reads is `promotionalIndex`'s decision, not this file's.
20
+ *
21
+ * Delete this file whole when a later valuation's summary supersedes
22
+ * it; git history is the archive.
23
+ */
24
+ export declare const PROMOTIONAL_SCALE_2020: {
25
+ readonly ages: readonly [20, 25, 30, 35, 40, 45, 50, 55, 60, 65];
26
+ /** "Non-manual Officers and Practitioners" — every Agenda for
27
+ * Change band. */
28
+ readonly nonManual: {
29
+ readonly male: readonly [73, 100, 132, 165, 195, 215, 229, 236, 242, 242];
30
+ readonly female: readonly [77, 100, 125, 140, 151, 157, 162, 166, 169, 169];
31
+ };
32
+ /** "Manual Officers". */
33
+ readonly manual: {
34
+ readonly male: readonly [83, 100, 120, 136, 146, 155, 161, 165, 165, 165];
35
+ readonly female: readonly [83, 100, 120, 132, 140, 144, 147, 148, 148, 148];
36
+ };
37
+ };
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Verbatim transcription — GAD, "NHS Pension Scheme: Summary of the
3
+ * 2020 assumptions used in the actuarial valuation as at 31 March
4
+ * 2020", 19 October 2023, page 3, "Promotional pay increases".
5
+ *
6
+ * Source: see docs/source-archive.md#sa-57. Mirrored cell by cell,
7
+ * from the PDF's text, in tests/fixtures/gad-promotional-scale-2020.csv.
8
+ *
9
+ * This summary is the document that prints the table. The valuation
10
+ * results report does not contain it, and the advice-on-assumptions
11
+ * report discusses it (Part B6) without reprinting it, so neither is
12
+ * cited for these figures.
13
+ *
14
+ * Index values by age, relative to 100 at age 25: growth in pay from
15
+ * promotion and progression OVER AND ABOVE general pay awards, which
16
+ * is why it composes with a pay figure in today's money without
17
+ * counting the awards twice. All four published columns are
18
+ * transcribed, so none is ever guessed later; which ones a caller
19
+ * reads is `promotionalIndex`'s decision, not this file's.
20
+ *
21
+ * Delete this file whole when a later valuation's summary supersedes
22
+ * it; git history is the archive.
23
+ */
24
+ export const PROMOTIONAL_SCALE_2020 = {
25
+ ages: [20, 25, 30, 35, 40, 45, 50, 55, 60, 65],
26
+ /** "Non-manual Officers and Practitioners" — every Agenda for
27
+ * Change band. */
28
+ nonManual: {
29
+ male: [73, 100, 132, 165, 195, 215, 229, 236, 242, 242],
30
+ female: [77, 100, 125, 140, 151, 157, 162, 166, 169, 169],
31
+ },
32
+ /** "Manual Officers". */
33
+ manual: {
34
+ male: [83, 100, 120, 136, 146, 155, 161, 165, 165, 165],
35
+ female: [83, 100, 120, 132, 140, 144, 147, 148, 148, 148],
36
+ },
37
+ };
38
+ //# sourceMappingURL=promotional-scale-2020.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promotional-scale-2020.js","sourceRoot":"","sources":["../../src/gad/promotional-scale-2020.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;IAC9C;uBACmB;IACnB,SAAS,EAAE;QACT,IAAI,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;QACvD,MAAM,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;KAC1D;IACD,yBAAyB;IACzB,MAAM,EAAE;QACN,IAAI,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;QACvD,MAAM,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;KAC1D;CACO,CAAC"}
package/dist/index.d.ts CHANGED
@@ -15,12 +15,13 @@ export { MEDICAL_GRADES, MEDICAL_GRADE_IDS, MEDICAL_PAY_YEARS, getMedicalScales,
15
15
  export type { MedicalGradeId, MedicalGradeMeta, } from './medical-scales.js';
16
16
  export { DENTAL_GRADES, DENTAL_GRADE_IDS, DENTAL_PAY_YEARS, getDentalScales, } from './dental-scales.js';
17
17
  export type { DentalGradeId, DentalGradeMeta, } from './dental-scales.js';
18
- export { AmbiguousScalePoint, AwardUnavailable, PensionTiersUnavailable, RetirementFactorOutOfRange, ScaleUnavailable, } from './errors.js';
18
+ export { AmbiguousScalePoint, AwardUnavailable, BenefitNotModelled, NOT_MODELLED, PayPathUnavailable, PensionTiersUnavailable, RetirementFactorOutOfRange, ScaleUnavailable, } from './errors.js';
19
+ export type { NotModelled } from './errors.js';
19
20
  export { DocumentSource } from './document-source.js';
20
- export { isoDate, isoMonth, monthOf, firstOfMonth, monthToDate, isoToDate, } from './iso-date.js';
21
+ export { isoDate, isoMonth, monthOf, firstOfMonth, monthToDate, isoToDate, isoDateOf, } from './iso-date.js';
21
22
  export type { IsoDate, IsoMonth } from './iso-date.js';
22
23
  export type { DocumentSourceFields, SourceCurrency, } from './document-source.js';
23
- export { AFC_ENGLAND_SCALES_2025, AFC_ENGLAND_SCALES_2026, AFC_NI_2025, AFC_SCOTLAND, AFC_SCOTLAND_36_HOUR_WEEK, AFC_W_02_2025, AFC_W_02_2026, HSC_TC8_05_2025, MD_W_01_2025, MD_W_01_2026, PC_MD_1_2026_R2, PCS_DD_2025_01, PCS_DD_2025_01_ADDENDUM, PCS_DD_2026_01, PCS_DD_2026_02, } from './sources.js';
24
+ export { AFC_ENGLAND_SCALES_2025, AFC_ENGLAND_SCALES_2026, AFC_NI_2025, AFC_SCOTLAND, AFC_SCOTLAND_36_HOUR_WEEK, AFC_W_01_2026, AFC_W_02_2025, AFC_W_02_2026, HSC_TC8_05_2025, MD_W_01_2025, MD_W_01_2026, PC_MD_1_2026_R2, PCS_DD_2025_01, PCS_DD_2025_01_ADDENDUM, PCS_DD_2026_01, PCS_DD_2026_02, } from './sources.js';
24
25
  export { AWARD_FAMILIES, afcAward, anyNationSettled, awardFamilyFor, awardsFor, changesFor, } from './award.js';
25
26
  export type { AwardFamily, ForthcomingChange, PayAward, PayChange, PayScaleId, } from './award.js';
26
27
  export { payRound } from './pay-round.js';
@@ -29,12 +30,24 @@ export { SESSION_ALLOWANCES, afcSessionAllowances, sessionAllowance, } from './a
29
30
  export type { SessionAllowance, SessionAllowanceId, } from './allowances.js';
30
31
  export { ACTIVE_REVAL_BONUS_PCT, IN_SERVICE_REVALUATION, revaluationFor, } from './revaluation.js';
31
32
  export type { RevaluationYear } from './revaluation.js';
33
+ export { PAY_BASES, promotionalIndex } from './pay-path.js';
34
+ export type { PayBasis, PayPath, YearPay } from './pay-path.js';
35
+ export { ACCRUALS, memberBenefits, PERIOD_KINDS, REMEDY, REMEDY_BASES, SECTION_OPENED, SECTIONS, } from './member-benefits.js';
36
+ export { PAY_MEASURES } from './sections/final-salary.js';
37
+ export type { PayMeasure } from './sections/final-salary.js';
38
+ export type { Assumptions, Award, DeclaredPeriod, Holdings, LegacyRules, LegacySectionId, Member, MemberBenefits, Position, RemedyBasis, RemedyElection, RetirementChoices, SectionId, ServicePeriod, } from './member-benefits.js';
39
+ export type { DeclaredPay, MemberPay } from './pay-path.js';
40
+ export { FACTOR_SOURCES } from './factor-basis.js';
41
+ export type { FactorOutcome } from './factor-basis.js';
42
+ export { CASH_CHOICES } from './commutation.js';
43
+ export type { CashChoice } from './commutation.js';
32
44
  export { ACCRUAL_RATE, factorProvenance, projectPension, retirementFactor, yearlyAccrual, } from './pension-projection.js';
33
45
  export { COMMUTATION_FACTOR, HMRC_LUMP_SUM_CAP_PCT, LUMP_SUM_ALLOWANCE, LUMP_SUM_CAPS, nhsCommutationLimits, VALUATION_FACTOR, commute, } from './commutation.js';
34
46
  export type { CommutationLimits, CommutationResult, DatedAmount, LumpSumCap, LumpSumLimit, LumpSumLimits, } from './commutation.js';
35
47
  export type { FactorProvenance, FactorTableKind, } from './gad/factor-table.js';
36
48
  export { normalPensionAge } from './npa.js';
37
- export type { PensionEstimationInput, PensionProjectionInput, PensionProjectionResult, PensionStatementInput, ProjectionPoint, } from './pension-projection.js';
49
+ export type { PensionEstimationInput, PensionProjectionInput, PensionProjectionResult, PensionStatementInput, } from './pension-projection.js';
50
+ export type { ProjectionPoint } from './pension/curve.js';
38
51
  export type { ProjectionMoney } from './pension/money.js';
39
52
  export { createPrices } from './pension/prices.js';
40
53
  export type { CpiEntry, CpiSource, Prices, } from './pension/prices.js';
package/dist/index.js CHANGED
@@ -10,14 +10,14 @@ export { afcResolver, dentalResolver, medicalResolver } from './resolver.js';
10
10
  export { MEDICAL_GRADES, MEDICAL_GRADE_IDS, MEDICAL_PAY_YEARS, getMedicalScales, latestMedicalSource, } from './medical-scales.js';
11
11
  export { DENTAL_GRADES, DENTAL_GRADE_IDS, DENTAL_PAY_YEARS, getDentalScales, } from './dental-scales.js';
12
12
  // ── Errors ───────────────────────────────────────
13
- export { AmbiguousScalePoint, AwardUnavailable, PensionTiersUnavailable, RetirementFactorOutOfRange, ScaleUnavailable, } from './errors.js';
13
+ export { AmbiguousScalePoint, AwardUnavailable, BenefitNotModelled, NOT_MODELLED, PayPathUnavailable, PensionTiersUnavailable, RetirementFactorOutOfRange, ScaleUnavailable, } from './errors.js';
14
14
  // ── Cited documents ──────────────────────────────
15
15
  // Every published document the library reads a figure from. A consumer
16
16
  // citing "where these figures come from" reads the record rather than
17
17
  // keeping its own copy of the url.
18
18
  export { DocumentSource } from './document-source.js';
19
- export { isoDate, isoMonth, monthOf, firstOfMonth, monthToDate, isoToDate, } from './iso-date.js';
20
- export { AFC_ENGLAND_SCALES_2025, AFC_ENGLAND_SCALES_2026, AFC_NI_2025, AFC_SCOTLAND, AFC_SCOTLAND_36_HOUR_WEEK, AFC_W_02_2025, AFC_W_02_2026, HSC_TC8_05_2025, MD_W_01_2025, MD_W_01_2026, PC_MD_1_2026_R2, PCS_DD_2025_01, PCS_DD_2025_01_ADDENDUM, PCS_DD_2026_01, PCS_DD_2026_02, } from './sources.js';
19
+ export { isoDate, isoMonth, monthOf, firstOfMonth, monthToDate, isoToDate, isoDateOf, } from './iso-date.js';
20
+ export { AFC_ENGLAND_SCALES_2025, AFC_ENGLAND_SCALES_2026, AFC_NI_2025, AFC_SCOTLAND, AFC_SCOTLAND_36_HOUR_WEEK, AFC_W_01_2026, AFC_W_02_2025, AFC_W_02_2026, HSC_TC8_05_2025, MD_W_01_2025, MD_W_01_2026, PC_MD_1_2026_R2, PCS_DD_2025_01, PCS_DD_2025_01_ADDENDUM, PCS_DD_2026_01, PCS_DD_2026_02, } from './sources.js';
21
21
  // ── Pay awards ───────────────────────────────────
22
22
  export { AWARD_FAMILIES, afcAward, anyNationSettled, awardFamilyFor, awardsFor, changesFor, } from './award.js';
23
23
  // ── Pay rounds ───────────────────────────────────
@@ -27,15 +27,25 @@ export { payRound } from './pay-round.js';
27
27
  // ── AfC allowances ───────────────────────────────
28
28
  export { SESSION_ALLOWANCES, afcSessionAllowances, sessionAllowance, } from './allowances.js';
29
29
  export { ACTIVE_REVAL_BONUS_PCT, IN_SERVICE_REVALUATION, revaluationFor, } from './revaluation.js';
30
+ // ── Pay path ───────────────────────────────────────
31
+ // GAD's promotional curve is the same for everybody, so it is public;
32
+ // a member's pay path is built inside and reached through the member's
33
+ // benefits.
34
+ export { PAY_BASES, promotionalIndex } from './pay-path.js';
35
+ // ── Member benefits ────────────────────────────────
36
+ // A member's benefits across every section they hold: built once from
37
+ // the member, asked once per set of retirement choices. The sections
38
+ // themselves are internal.
39
+ export { ACCRUALS, memberBenefits, PERIOD_KINDS, REMEDY, REMEDY_BASES, SECTION_OPENED, SECTIONS, } from './member-benefits.js';
40
+ export { PAY_MEASURES } from './sections/final-salary.js';
41
+ export { FACTOR_SOURCES } from './factor-basis.js';
42
+ export { CASH_CHOICES } from './commutation.js';
30
43
  // ── Pension Projection ─────────────────────────────
31
- // Deliberate surface: the scenario-level API plus
32
- // yearlyAccrual (a consumer builds its pension-growth
33
- // chart from it). Date plumbing (periodInYearsMonths,
34
- // npaDate) and factor-table internals stay private —
35
- // factor VALUES are reachable solely through
36
- // retirementFactor/projectPension, which own the GAD
37
- // rounding rules; factor PROVENANCE is data
38
- // (factorProvenance), so consumers cite it, never
44
+ // The 2015 Section's scenario-level API plus yearlyAccrual (a
45
+ // consumer builds its pension-growth chart from it). Date plumbing
46
+ // and factor-table internals stay private — a factor VALUE is reached
47
+ // only through a function that owns GAD's rounding rules; factor
48
+ // PROVENANCE is data (factorProvenance), so consumers cite it, never
39
49
  // hand-type it.
40
50
  export { ACCRUAL_RATE, factorProvenance, projectPension, retirementFactor, yearlyAccrual, } from './pension-projection.js';
41
51
  // ── Commutation ──────────────────────────────────────
@@ -46,8 +56,7 @@ export { COMMUTATION_FACTOR, HMRC_LUMP_SUM_CAP_PCT, LUMP_SUM_ALLOWANCE, LUMP_SUM
46
56
  // ── Normal pension age ───────────────────────────────
47
57
  export { normalPensionAge } from './npa.js';
48
58
  // ── The pension ledger ───────────────────────────────
49
- // Additive: the projection API above is unchanged, and a
50
- // consumer reads the ledger only when it wants the workings.
59
+ // A consumer reads the ledger only when it wants the workings.
51
60
  export { createPrices } from './pension/prices.js';
52
61
  export { activeRatePct, deferredRatePct, upliftsFor, } from './pension/uplift.js';
53
62
  export { schemeYearClosedBy, schemeYearEndDate, schemeYearEndFor, schemeYearStartDate, seedFromJoinDate, seedFromStatement, } from './pension/seed.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EACL,SAAS,EACT,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,UAAU,EACV,kBAAkB,EAClB,sBAAsB,EACtB,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,eAAe,GAChB,MAAM,aAAa,CAAC;AASrB,oDAAoD;AACpD,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAChB,MAAM,cAAc,CAAC;AAUtB,oDAAoD;AACpD,OAAO,EAAC,IAAI,EAAE,cAAc,EAAC,MAAM,WAAW,CAAC;AAU/C,OAAO,EAAC,WAAW,EAAE,cAAc,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AAS3E,oDAAoD;AACpD,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAK5B,oDAAoD;AACpD,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,uBAAuB,EACvB,0BAA0B,EAC1B,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAErB,oDAAoD;AACpD,uEAAuE;AACvE,sEAAsE;AACtE,mCAAmC;AACnC,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AACpD,OAAO,EACL,OAAO,EACP,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,WAAW,EACX,SAAS,GACV,MAAM,eAAe,CAAC;AAMvB,OAAO,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ACf,UAAU,GACX,MAAM,qBAAqB,CAAC;AAM7B,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAC,WAAW,EAAC,MAAM,qBAAqB,CAAC;AAShD,oDAAoD;AACpD,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,WAAW,EACX,YAAY,GACb,MAAM,WAAW,CAAC;AAGnB,oDAAoD;AACpD,OAAO,EACL,WAAW,EACX,WAAW,GACZ,MAAM,gBAAgB,CAAC;AAGxB,oDAAoD;AACpD,OAAO,EACL,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,QAAQ,EACR,aAAa,GACd,MAAM,cAAc,CAAC;AAMtB,oDAAoD;AACpD,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,GACb,MAAM,YAAY,CAAC;AAMpB,oDAAoD;AACpD,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAG3C,oDAAoD;AACpD,OAAO,EACL,QAAQ,EACR,MAAM,EACN,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,gBAAgB,EAChB,SAAS,GACV,MAAM,aAAa,CAAC;AAErB,oDAAoD;AACpD,mDAAmD;AACnD,qDAAqD;AACrD,OAAO,EACL,WAAW,EACX,SAAS,EACT,OAAO,EACP,WAAW,EACX,WAAW,EACX,WAAW,EACX,YAAY,EACZ,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,GACb,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EACL,SAAS,EACT,YAAY,EACZ,kBAAkB,EAClB,cAAc,E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AAC"}
@@ -85,3 +85,10 @@ export declare function monthToDate(month: IsoMonth): Date;
85
85
  * the check, and {@link isoDate} is the only way to hold one.
86
86
  */
87
87
  export declare function isoToDate(iso: IsoDate): Date;
88
+ /**
89
+ * A `Date` → the calendar day it falls on, in the reader's own frame:
90
+ * the inverse of {@link isoToDate}, and read by parts for the same
91
+ * reason. `toISOString` reads the instant in UTC, which names the day
92
+ * before for any local midnight east of Greenwich in summer time.
93
+ */
94
+ export declare function isoDateOf(date: Date): IsoDate;
package/dist/iso-date.js CHANGED
@@ -94,4 +94,15 @@ export function isoToDate(iso) {
94
94
  const [y, m, d] = iso.split('-').map(Number);
95
95
  return new Date(y, m - 1, d);
96
96
  }
97
+ /**
98
+ * A `Date` → the calendar day it falls on, in the reader's own frame:
99
+ * the inverse of {@link isoToDate}, and read by parts for the same
100
+ * reason. `toISOString` reads the instant in UTC, which names the day
101
+ * before for any local midnight east of Greenwich in summer time.
102
+ */
103
+ export function isoDateOf(date) {
104
+ const pad = (n) => String(n).padStart(2, '0');
105
+ return isoDate(`${date.getFullYear()}-${pad(date.getMonth() + 1)}-`
106
+ + pad(date.getDate()));
107
+ }
97
108
  //# sourceMappingURL=iso-date.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"iso-date.js","sourceRoot":"","sources":["../src/iso-date.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAQtC;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAa;IACpC,SAAS,CACP,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,EAC3B,0BAA0B,KAAK,EAAE,CAClC,CAAC;IACF,OAAO,KAAiB,CAAC;AAC3B,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,OAAO,CAAC,KAAa;IACnC,SAAS,CACP,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,EACjC,4BAA4B,KAAK,EAAE,C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E,IAAI,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,GAAG;UAClD,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CACtB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,237 @@
1
+ import type { CashChoice, CommutationResult } from './commutation.js';
2
+ import type { FactorOutcome } from './factor-basis.js';
3
+ import type { IsoDate } from './iso-date.js';
4
+ import type { MemberPay, PayPath } from './pay-path.js';
5
+ import type { ProjectionPoint } from './pension/curve.js';
6
+ import type { MemberLedger } from './pension/ledger.js';
7
+ import type { EstimatedHistory } from './pension/history.js';
8
+ import type { ProjectionMoney } from './pension/money.js';
9
+ import type { Prices } from './pension/prices.js';
10
+ import type { FinalSalaryRules, PayMeasure } from './sections/final-salary.js';
11
+ /**
12
+ * One scheme, the NHS Pension Scheme, in three sections. "Scheme" only
13
+ * ever means the whole; each part is a section, as a member's own
14
+ * Annual Benefit Statement prints it.
15
+ */
16
+ export declare const SECTIONS: {
17
+ readonly s1995: "section-1995";
18
+ readonly s2008: "section-2008";
19
+ readonly s2015: "section-2015";
20
+ };
21
+ export type SectionId = (typeof SECTIONS)[keyof typeof SECTIONS];
22
+ /** The two final-salary sections, which McCloud calls the legacy
23
+ * scheme. */
24
+ export type LegacySectionId = Exclude<SectionId, typeof SECTIONS.s2015>;
25
+ /** Joined and left, per section, as the member declared it. */
26
+ export interface DeclaredPeriod {
27
+ readonly section: SectionId;
28
+ readonly joined: IsoDate;
29
+ /** Null while still in service. */
30
+ readonly left: IsoDate | null;
31
+ }
32
+ export interface Member {
33
+ readonly dateOfBirth: IsoDate;
34
+ readonly service: readonly DeclaredPeriod[];
35
+ readonly pay: MemberPay;
36
+ /** A 2015 Section balance read off an Annual Benefit Statement,
37
+ * which seeds its ledger at the statement's date. Null where the
38
+ * member gave none. */
39
+ readonly statement: {
40
+ readonly accruedPension: number;
41
+ readonly asAt: IsoDate;
42
+ } | null;
43
+ }
44
+ /** Fixed for one valuation, and worth disclosing beside it. Pay growth is
45
+ * not here: it is GAD's published curve, the same for everybody. */
46
+ export interface Assumptions {
47
+ readonly assumedCpi: number;
48
+ }
49
+ /**
50
+ * How the remedy window is valued, for a member who has one: as more
51
+ * service in their legacy section, or under the 2015 Section's rules
52
+ * while still paid from the legacy section. There is no default and no
53
+ * preferred answer: which pays more depends on the choices a caller
54
+ * compares, and the library cannot see them.
55
+ */
56
+ export declare const REMEDY_BASES: {
57
+ readonly none: "none";
58
+ readonly legacy: "legacy-basis";
59
+ readonly section2015: "section-2015-basis";
60
+ };
61
+ export type RemedyBasis = (typeof REMEDY_BASES)[keyof typeof REMEDY_BASES];
62
+ export type RemedyElection = {
63
+ readonly kind: RemedyBasis;
64
+ };
65
+ /** One set of choices; a caller comparing options asks once for each. */
66
+ export interface RetirementChoices {
67
+ /** Stops accruing. Accrues the whole scheme year it falls in. */
68
+ readonly leaving: IsoDate;
69
+ /** Every section is drawn on this one date. Drawing sections on
70
+ * different dates, and partial retirement, are deferred:
71
+ * https://github.com/casomoltd/nhs-pay/issues/17 */
72
+ readonly drawing: IsoDate;
73
+ readonly remedy: RemedyElection;
74
+ readonly cash: CashChoice;
75
+ }
76
+ /** What a period is: service in its own right, or the McCloud remedy
77
+ * window, held in the legacy section and valued on either basis. */
78
+ export declare const PERIOD_KINDS: {
79
+ readonly ordinary: "ordinary";
80
+ readonly remedyWindow: "remedy-window";
81
+ };
82
+ /** A window of service between two events, held in one section. */
83
+ export interface ServicePeriod {
84
+ readonly section: SectionId;
85
+ readonly from: IsoDate;
86
+ /** Null while the member is still in service in it; `at()` closes
87
+ * it at the leaving date. */
88
+ readonly to: IsoDate | null;
89
+ readonly kind: (typeof PERIOD_KINDS)[keyof typeof PERIOD_KINDS];
90
+ }
91
+ /** How a section accrues: on final salary, or on a career average. */
92
+ export declare const ACCRUALS: {
93
+ readonly finalSalary: "final-salary";
94
+ readonly careerAverage: "career-average";
95
+ };
96
+ /**
97
+ * One section's benefit on one basis. A legacy section returns two
98
+ * when its remedy window is valued on the 2015 basis: that part is
99
+ * paid from the legacy section but determined under the 2015
100
+ * Section's rules. `provenance` says which rules produced the figure,
101
+ * so a reviewer can check it; nothing computes with it.
102
+ */
103
+ export interface Award {
104
+ /** Where it is held and paid from. */
105
+ readonly section: SectionId;
106
+ readonly periods: readonly ServicePeriod[];
107
+ /** The pension at the drawing before its factor: final salary as
108
+ * measured, or the career average pot as revalued. */
109
+ readonly beforeFactor: ProjectionMoney;
110
+ /** After the factor: what is paid. */
111
+ readonly pension: ProjectionMoney;
112
+ /** Nil rather than absent where the rules pay none, so a caller
113
+ * cannot forget to ask. */
114
+ readonly automaticLumpSum: ProjectionMoney;
115
+ readonly factor: FactorOutcome;
116
+ /** A career average award's year-by-year walk, in cash and in today's
117
+ * money; null for final salary, which keeps no balance to walk. */
118
+ readonly ledgers: {
119
+ readonly cash: MemberLedger;
120
+ readonly todaysMoney: MemberLedger;
121
+ } | null;
122
+ readonly provenance: {
123
+ readonly accrual: typeof ACCRUALS.finalSalary;
124
+ readonly denominator: FinalSalaryRules['denominator'];
125
+ readonly payMeasure: PayMeasure;
126
+ /** The years valued, and the pay they were measured on, in
127
+ * today's money: the two figures a reviewer checks first. */
128
+ readonly membership: number;
129
+ readonly finalPay: number;
130
+ }
131
+ /** The 2015 Section's rule, 1/54 of each year's pay revalued: the
132
+ * accrual names it, so no field restates the rate. */
133
+ | {
134
+ readonly accrual: typeof ACCRUALS.careerAverage;
135
+ };
136
+ }
137
+ /** One answer to `at()`: every option compared is its own. */
138
+ export interface Position {
139
+ readonly choices: RetirementChoices;
140
+ readonly awards: readonly Award[];
141
+ /** Summed across awards, after each award's own factor, before
142
+ * cash. */
143
+ readonly crystallised: {
144
+ readonly pension: ProjectionMoney;
145
+ readonly automaticLumpSum: ProjectionMoney;
146
+ };
147
+ readonly cash: CommutationResult;
148
+ /** The price series the cash reading walked with, for converting an
149
+ * outside figure — a cap, a target — into the same rulers. */
150
+ readonly prices: Prices;
151
+ /** The 2015 Section's ledger as the member reads it on a statement,
152
+ * in cash; and the same walk in today's money. The same objects as
153
+ * the 2015 Section award's own `ledgers`, named here because a
154
+ * statement is read against this one section. */
155
+ readonly ledger: MemberLedger;
156
+ readonly todaysMoneyLedger: MemberLedger;
157
+ /** The 2015 Section's years before a stated balance, estimated in
158
+ * today's money; null where the member gave no statement, or joined
159
+ * in its own year. Calibrated to land exactly on the stated
160
+ * balance. */
161
+ readonly estimatedHistory: EstimatedHistory | null;
162
+ /** The 2015 Section's balance at each scheme year end, both
163
+ * rulers. */
164
+ readonly curve: readonly ProjectionPoint[];
165
+ }
166
+ /** A legacy section's rules, read from its statute. */
167
+ export interface LegacyRules {
168
+ readonly section: LegacySectionId;
169
+ /** The age its pension is payable unreduced, which its factors are
170
+ * measured from. */
171
+ readonly pensionAge: number;
172
+ /** The 80 in "1/80 of final pay for each year". */
173
+ readonly denominator: FinalSalaryRules['denominator'];
174
+ /** The automatic lump sum as a multiple of the pension; null where
175
+ * the section pays none. */
176
+ readonly automaticLumpSum: number | null;
177
+ /** Whether drawing after the pension age raises the pension. */
178
+ readonly lateUplift: boolean;
179
+ }
180
+ /** What the member holds today, per section, with the remedy window
181
+ * on the legacy basis — their position since rollback. */
182
+ export interface Holdings {
183
+ readonly bySection: readonly {
184
+ readonly section: SectionId;
185
+ readonly pension: ProjectionMoney;
186
+ /** The automatic lump sum that comes with it, unreduced; nil where
187
+ * the section pays none. */
188
+ readonly automaticLumpSum: ProjectionMoney;
189
+ }[];
190
+ readonly total: ProjectionMoney;
191
+ }
192
+ export interface MemberBenefits {
193
+ /** What the member holds, derived from their service and checked. */
194
+ readonly periods: readonly ServicePeriod[];
195
+ /** Whether they have a remedy window, and so must pass an election
196
+ * to `at()`. */
197
+ readonly remedy: boolean;
198
+ /** The legacy section they hold and its rules; null where they hold
199
+ * the 2015 Section alone. */
200
+ readonly legacy: LegacyRules | null;
201
+ /** The pay every section reads, built once for the member. */
202
+ readonly payPath: PayPath;
203
+ /** Worth today, before any drawing. */
204
+ now(): Holdings;
205
+ /** Worth when drawn, for one set of choices. */
206
+ at(choices: RetirementChoices): Position;
207
+ }
208
+ /**
209
+ * The dates the McCloud remedy turns on, for a caller that has to read
210
+ * a member's answers against them before it can declare their service.
211
+ */
212
+ export declare const REMEDY: {
213
+ readonly eligibleBy: IsoDate;
214
+ readonly from: IsoDate;
215
+ readonly to: IsoDate;
216
+ readonly rollback: IsoDate;
217
+ };
218
+ /**
219
+ * The day each later section opened: the 2008 Section to new joiners
220
+ * under SI 2008/653, and the 2015 Section, which every member moved to
221
+ * for service from that day, under SI 2015/94. The 1995 Section is
222
+ * absent: no answer a member gives turns on its opening.
223
+ */
224
+ export declare const SECTION_OPENED: {
225
+ readonly "section-2008": IsoDate;
226
+ readonly "section-2015": IsoDate;
227
+ };
228
+ /**
229
+ * Build a member's benefits. Throws `PayPathUnavailable` where there
230
+ * is no current pay to build pay from, `BenefitNotModelled` for service
231
+ * the library does not model, and RangeError for a declaration that
232
+ * cannot be true.
233
+ *
234
+ * `today` is required because it decides which answer comes back: it
235
+ * is the date the figures are as at, so a figure reproduces as at it.
236
+ */
237
+ export declare function memberBenefits(member: Member, assumptions: Assumptions, today: Date): MemberBenefits;