@casomoltd/nhs-pay 0.32.0 → 0.33.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.
- package/README.md +23 -21
- package/dist/afc-scales.d.ts +43 -10
- package/dist/afc-scales.js +50 -16
- package/dist/afc-scales.js.map +1 -1
- package/dist/allowances.js +11 -11
- package/dist/allowances.js.map +1 -1
- package/dist/award.d.ts +3 -3
- package/dist/award.js +21 -21
- package/dist/award.js.map +1 -1
- package/dist/circulars/england-md-1-2026-r2.d.ts +13 -0
- package/dist/circulars/england-md-1-2026-r2.js +13 -0
- package/dist/circulars/england-md-1-2026-r2.js.map +1 -1
- package/dist/circulars/ni-hsc-tc8-05-2025.d.ts +22 -0
- package/dist/circulars/ni-hsc-tc8-05-2025.js +22 -0
- package/dist/circulars/ni-hsc-tc8-05-2025.js.map +1 -1
- package/dist/circulars/scotland-pcs-dd-2025-01.d.ts +20 -0
- package/dist/circulars/scotland-pcs-dd-2025-01.js +20 -0
- package/dist/circulars/scotland-pcs-dd-2025-01.js.map +1 -1
- package/dist/circulars/scotland-pcs-dd-2026-01.d.ts +19 -0
- package/dist/circulars/scotland-pcs-dd-2026-01.js +30 -10
- package/dist/circulars/scotland-pcs-dd-2026-01.js.map +1 -1
- package/dist/circulars/scotland-pcs-dd-2026-02.d.ts +10 -0
- package/dist/circulars/scotland-pcs-dd-2026-02.js +10 -0
- package/dist/circulars/scotland-pcs-dd-2026-02.js.map +1 -1
- package/dist/circulars/wales-mdw-01-2025.d.ts +17 -0
- package/dist/circulars/wales-mdw-01-2025.js +17 -0
- package/dist/circulars/wales-mdw-01-2025.js.map +1 -1
- package/dist/circulars/wales-mdw-01-2026.d.ts +20 -0
- package/dist/circulars/wales-mdw-01-2026.js +20 -0
- package/dist/circulars/wales-mdw-01-2026.js.map +1 -1
- package/dist/commutation.js +3 -2
- package/dist/commutation.js.map +1 -1
- package/dist/dental-grades.d.ts +25 -0
- package/dist/dental-grades.js +25 -0
- package/dist/dental-grades.js.map +1 -0
- package/dist/dental-scales.d.ts +5 -21
- package/dist/dental-scales.js +73 -72
- package/dist/dental-scales.js.map +1 -1
- package/dist/format.js +3 -2
- package/dist/format.js.map +1 -1
- package/dist/hcas-pcts.d.ts +1 -1
- package/dist/hcas-zone.d.ts +23 -0
- package/dist/hcas-zone.js +17 -0
- package/dist/hcas-zone.js.map +1 -0
- package/dist/hcas.d.ts +26 -18
- package/dist/hcas.js +45 -24
- package/dist/hcas.js.map +1 -1
- package/dist/index.d.ts +23 -14
- package/dist/index.js +13 -9
- package/dist/index.js.map +1 -1
- package/dist/medical-grades.d.ts +33 -0
- package/dist/medical-grades.js +33 -0
- package/dist/medical-grades.js.map +1 -0
- package/dist/medical-scales.d.ts +10 -33
- package/dist/medical-scales.js +104 -158
- package/dist/medical-scales.js.map +1 -1
- package/dist/member/input-period.d.ts +18 -5
- package/dist/member/input-period.js +24 -13
- package/dist/member/input-period.js.map +1 -1
- package/dist/pay-round.js +3 -3
- package/dist/pay-round.js.map +1 -1
- package/dist/pay-year.d.ts +17 -0
- package/dist/pay-year.js +20 -0
- package/dist/pay-year.js.map +1 -0
- package/dist/pension/ledger.d.ts +7 -0
- package/dist/pension/ledger.js +18 -11
- package/dist/pension/ledger.js.map +1 -1
- package/dist/pension.js +2 -1
- package/dist/pension.js.map +1 -1
- package/dist/post.d.ts +20 -21
- package/dist/post.js +54 -53
- package/dist/post.js.map +1 -1
- package/dist/published/england-afc.d.ts +29 -0
- package/dist/published/england-afc.js +142 -0
- package/dist/published/england-afc.js.map +1 -0
- package/dist/published/hcas-zones.d.ts +18 -0
- package/dist/published/hcas-zones.js +46 -0
- package/dist/published/hcas-zones.js.map +1 -0
- package/dist/published/wales-living-wage.d.ts +36 -0
- package/dist/published/wales-living-wage.js +30 -0
- package/dist/published/wales-living-wage.js.map +1 -0
- package/dist/regions.d.ts +25 -14
- package/dist/regions.js +61 -71
- package/dist/regions.js.map +1 -1
- package/dist/resolver.d.ts +46 -41
- package/dist/resolver.js +70 -142
- package/dist/resolver.js.map +1 -1
- package/dist/role.d.ts +3 -3
- package/dist/scale-point.d.ts +11 -7
- package/dist/scale-point.js +29 -1
- package/dist/scale-point.js.map +1 -1
- package/dist/scale-tables.d.ts +42 -60
- package/dist/scale-tables.js +65 -105
- package/dist/scale-tables.js.map +1 -1
- package/dist/scale-translators.d.ts +90 -0
- package/dist/scale-translators.js +97 -0
- package/dist/scale-translators.js.map +1 -0
- package/dist/scales.d.ts +138 -101
- package/dist/scales.js +221 -457
- package/dist/scales.js.map +1 -1
- package/dist/sources.d.ts +8 -12
- package/dist/sources.js +9 -15
- package/dist/sources.js.map +1 -1
- package/dist/take-home.js +1 -2
- package/dist/take-home.js.map +1 -1
- package/dist/values.d.ts +10 -3
- package/dist/values.js +11 -4
- package/dist/values.js.map +1 -1
- package/dist/working-week.d.ts +23 -8
- package/dist/working-week.js +55 -25
- package/dist/working-week.js.map +1 -1
- package/package.json +3 -3
- package/dist/bands.d.ts +0 -63
- package/dist/bands.js +0 -78
- package/dist/bands.js.map +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The HCAS zones' ids and the shape of one zone's rate, in a module that
|
|
3
|
+
* imports nothing, so `regions.ts`, the published zone table and `hcas.ts`
|
|
4
|
+
* can all name a zone without an import cycle (as `afc-band.ts` does for
|
|
5
|
+
* the bands).
|
|
6
|
+
*/
|
|
7
|
+
/** One zone: its rate as a percentage of basic pay, and the cash floor
|
|
8
|
+
* and ceiling it is held between. */
|
|
9
|
+
export interface HcasZone {
|
|
10
|
+
readonly rate: number;
|
|
11
|
+
readonly min: number;
|
|
12
|
+
readonly max: number;
|
|
13
|
+
}
|
|
14
|
+
export declare const HCAS_ZONE_IDS: {
|
|
15
|
+
readonly INNER_LONDON: "inner-london";
|
|
16
|
+
readonly OUTER_LONDON: "outer-london";
|
|
17
|
+
readonly FRINGE: "fringe";
|
|
18
|
+
};
|
|
19
|
+
export type HcasZoneId = (typeof HCAS_ZONE_IDS)[keyof typeof HCAS_ZONE_IDS];
|
|
20
|
+
/** The three London zones, keyed by the zone id a region resolves to. */
|
|
21
|
+
export type HcasZones = Readonly<Record<HcasZoneId, HcasZone>>;
|
|
22
|
+
/** Type guard — is this string a valid zone ID? */
|
|
23
|
+
export declare function isHcasZoneId(value: string): value is HcasZoneId;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The HCAS zones' ids and the shape of one zone's rate, in a module that
|
|
3
|
+
* imports nothing, so `regions.ts`, the published zone table and `hcas.ts`
|
|
4
|
+
* can all name a zone without an import cycle (as `afc-band.ts` does for
|
|
5
|
+
* the bands).
|
|
6
|
+
*/
|
|
7
|
+
export const HCAS_ZONE_IDS = {
|
|
8
|
+
INNER_LONDON: 'inner-london',
|
|
9
|
+
OUTER_LONDON: 'outer-london',
|
|
10
|
+
FRINGE: 'fringe',
|
|
11
|
+
};
|
|
12
|
+
const ZONE_ID_LIST = Object.values(HCAS_ZONE_IDS);
|
|
13
|
+
/** Type guard — is this string a valid zone ID? */
|
|
14
|
+
export function isHcasZoneId(value) {
|
|
15
|
+
return ZONE_ID_LIST.includes(value);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=hcas-zone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hcas-zone.js","sourceRoot":"","sources":["../src/hcas-zone.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,YAAY,EAAE,cAAc;IAC5B,YAAY,EAAE,cAAc;IAC5B,MAAM,EAAE,QAAQ;CACR,CAAC;AAUX,MAAM,YAAY,GAChB,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;AAE/B,mDAAmD;AACnD,MAAM,UAAU,YAAY,CAC1B,KAAa;IAEb,OACE,YACD,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACpB,CAAC"}
|
package/dist/hcas.d.ts
CHANGED
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* HCAS (High Cost Area Supplement)
|
|
3
|
-
*
|
|
2
|
+
* HCAS (High Cost Area Supplement): England's zones by pay year (HCAS is
|
|
3
|
+
* England's only), the supplement, and gross salary. The zone ids and
|
|
4
|
+
* types are in `hcas-zone.ts`.
|
|
4
5
|
*
|
|
5
6
|
* Browser-safe — no node:fs dependency.
|
|
6
7
|
*/
|
|
7
|
-
import type {
|
|
8
|
+
import type { PayYear } from '@casomoltd/paye-calc';
|
|
8
9
|
import type { AfcRegionId } from './regions.js';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
readonly OUTER_LONDON: "outer-london";
|
|
12
|
-
readonly FRINGE: "fringe";
|
|
13
|
-
};
|
|
14
|
-
export type HcasZoneId = (typeof HCAS_ZONE_IDS)[keyof typeof HCAS_ZONE_IDS];
|
|
15
|
-
/** Type guard — is this string a valid zone ID? */
|
|
16
|
-
export declare function isHcasZoneId(value: string): value is HcasZoneId;
|
|
10
|
+
import type { HcasZone, HcasZones } from './hcas-zone.js';
|
|
11
|
+
import type { SalaryRange } from './values.js';
|
|
17
12
|
/**
|
|
18
13
|
* Calculate HCAS supplement for a base salary.
|
|
19
14
|
* Applies percentage rate clamped between min/max.
|
|
@@ -21,14 +16,27 @@ export declare function isHcasZoneId(value: string): value is HcasZoneId;
|
|
|
21
16
|
export declare function calculateHcasSupplement(baseSalary: number, zone: HcasZone): number;
|
|
22
17
|
/**
|
|
23
18
|
* Produce a region's gross from a base salary: the HCAS
|
|
24
|
-
* supplement for England's high-cost zones, and nothing else.
|
|
19
|
+
* supplement for England's high-cost zones, and nothing else. The zones
|
|
20
|
+
* are England's for `year`, read here, so a caller cannot pass another
|
|
21
|
+
* year's or another nation's; a region outside them is paid its base.
|
|
25
22
|
*
|
|
26
23
|
* No nation adjustment happens here. Every nation's ladder is
|
|
27
|
-
*
|
|
28
|
-
* `
|
|
24
|
+
* held in `scales.ts` and reached through
|
|
25
|
+
* `getAfcScales`, so a caller wanting Welsh pay asks for
|
|
29
26
|
* the Welsh table rather than passing another nation's figure
|
|
30
|
-
* to be adjusted.
|
|
31
|
-
* a number that was neither nation's once Wales's own scales
|
|
32
|
-
* were read from its circular.
|
|
27
|
+
* to be adjusted.
|
|
33
28
|
*/
|
|
34
|
-
export declare function grossSalary(base: number, region: AfcRegionId,
|
|
29
|
+
export declare function grossSalary(base: number, region: AfcRegionId, year: PayYear): number;
|
|
30
|
+
/**
|
|
31
|
+
* The basic salaries between which a zone pays its percentage: below
|
|
32
|
+
* `min` its cash floor applies, above `max` its cash cap. Exact, not
|
|
33
|
+
* rounded: a consumer rounds as it prints.
|
|
34
|
+
*/
|
|
35
|
+
export declare function hcasRateBand(zone: HcasZone): SalaryRange;
|
|
36
|
+
/**
|
|
37
|
+
* England's HCAS zones for a pay year, from the handbook's table for that
|
|
38
|
+
* year: the zones a London supplement is read from, whatever nation the
|
|
39
|
+
* reader is in. Throws {@link ScaleUnavailable} for a year the table does
|
|
40
|
+
* not hold, rather than lending another year's ceilings.
|
|
41
|
+
*/
|
|
42
|
+
export declare function englandHcasZones(year: PayYear): HcasZones;
|
package/dist/hcas.js
CHANGED
|
@@ -1,45 +1,66 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* HCAS (High Cost Area Supplement)
|
|
3
|
-
*
|
|
2
|
+
* HCAS (High Cost Area Supplement): England's zones by pay year (HCAS is
|
|
3
|
+
* England's only), the supplement, and gross salary. The zone ids and
|
|
4
|
+
* types are in `hcas-zone.ts`.
|
|
4
5
|
*
|
|
5
6
|
* Browser-safe — no node:fs dependency.
|
|
6
7
|
*/
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
const ZONE_ID_LIST = Object.values(HCAS_ZONE_IDS);
|
|
14
|
-
/** Type guard — is this string a valid zone ID? */
|
|
15
|
-
export function isHcasZoneId(value) {
|
|
16
|
-
return ZONE_ID_LIST.includes(value);
|
|
17
|
-
}
|
|
8
|
+
import { NATION_KEYS } from '@casomoltd/paye-calc';
|
|
9
|
+
import { ScaleUnavailable } from './errors.js';
|
|
10
|
+
import { HCAS_ZONES } from './published/hcas-zones.js';
|
|
11
|
+
import { afcRegionToHcasZone } from './regions.js';
|
|
12
|
+
import { PER_CENT } from './values.js';
|
|
18
13
|
/**
|
|
19
14
|
* Calculate HCAS supplement for a base salary.
|
|
20
15
|
* Applies percentage rate clamped between min/max.
|
|
21
16
|
*/
|
|
22
17
|
export function calculateHcasSupplement(baseSalary, zone) {
|
|
23
|
-
const raw = baseSalary * (zone
|
|
18
|
+
const raw = baseSalary * rateOf(zone);
|
|
24
19
|
return Math.round(Math.min(Math.max(raw, zone.min), zone.max));
|
|
25
20
|
}
|
|
26
21
|
/**
|
|
27
22
|
* Produce a region's gross from a base salary: the HCAS
|
|
28
|
-
* supplement for England's high-cost zones, and nothing else.
|
|
23
|
+
* supplement for England's high-cost zones, and nothing else. The zones
|
|
24
|
+
* are England's for `year`, read here, so a caller cannot pass another
|
|
25
|
+
* year's or another nation's; a region outside them is paid its base.
|
|
29
26
|
*
|
|
30
27
|
* No nation adjustment happens here. Every nation's ladder is
|
|
31
|
-
*
|
|
32
|
-
* `
|
|
28
|
+
* held in `scales.ts` and reached through
|
|
29
|
+
* `getAfcScales`, so a caller wanting Welsh pay asks for
|
|
33
30
|
* the Welsh table rather than passing another nation's figure
|
|
34
|
-
* to be adjusted.
|
|
35
|
-
* a number that was neither nation's once Wales's own scales
|
|
36
|
-
* were read from its circular.
|
|
31
|
+
* to be adjusted.
|
|
37
32
|
*/
|
|
38
|
-
export function grossSalary(base, region,
|
|
39
|
-
const
|
|
40
|
-
if (
|
|
33
|
+
export function grossSalary(base, region, year) {
|
|
34
|
+
const zone = afcRegionToHcasZone(region);
|
|
35
|
+
if (zone === null) {
|
|
41
36
|
return base;
|
|
42
37
|
}
|
|
43
|
-
return base + calculateHcasSupplement(base,
|
|
38
|
+
return base + calculateHcasSupplement(base, englandHcasZones(year)[zone]);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The basic salaries between which a zone pays its percentage: below
|
|
42
|
+
* `min` its cash floor applies, above `max` its cash cap. Exact, not
|
|
43
|
+
* rounded: a consumer rounds as it prints.
|
|
44
|
+
*/
|
|
45
|
+
export function hcasRateBand(zone) {
|
|
46
|
+
const rate = rateOf(zone);
|
|
47
|
+
return { min: zone.min / rate, max: zone.max / rate };
|
|
48
|
+
}
|
|
49
|
+
/** A zone's rate as a fraction of basic pay. */
|
|
50
|
+
function rateOf(zone) {
|
|
51
|
+
return zone.rate / PER_CENT;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* England's HCAS zones for a pay year, from the handbook's table for that
|
|
55
|
+
* year: the zones a London supplement is read from, whatever nation the
|
|
56
|
+
* reader is in. Throws {@link ScaleUnavailable} for a year the table does
|
|
57
|
+
* not hold, rather than lending another year's ceilings.
|
|
58
|
+
*/
|
|
59
|
+
export function englandHcasZones(year) {
|
|
60
|
+
const key = year;
|
|
61
|
+
const zones = HCAS_ZONES[key];
|
|
62
|
+
if (zones === undefined)
|
|
63
|
+
throw new ScaleUnavailable(NATION_KEYS.england, year);
|
|
64
|
+
return zones;
|
|
44
65
|
}
|
|
45
66
|
//# sourceMappingURL=hcas.js.map
|
package/dist/hcas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hcas.js","sourceRoot":"","sources":["../src/hcas.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"hcas.js","sourceRoot":"","sources":["../src/hcas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAC,gBAAgB,EAAC,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAC,UAAU,EAAC,MAAM,2BAA2B,CAAC;AAErD,OAAO,EAAC,mB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AAK,SAAS;QAAE,MAAM,IAAI,gBAAgB,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC/E,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export { afcBand1 } from './afc-scales.js';
|
|
2
2
|
export type { AfcBand1, AfcBand1Published } from './afc-scales.js';
|
|
3
|
-
export { AFC_BANDS, AFC_BAND_IDS
|
|
4
|
-
export type { AfcBandId
|
|
3
|
+
export { AFC_BANDS, AFC_BAND_IDS } from './afc-band.js';
|
|
4
|
+
export type { AfcBandId } from './afc-band.js';
|
|
5
|
+
export { WALES_LIVING_WAGE } from './published/wales-living-wage.js';
|
|
6
|
+
export type { WalesLivingWage } from './published/wales-living-wage.js';
|
|
7
|
+
export { AFC_CURRENT_YEAR, AFC_PREVIOUS_YEAR, afcPointOf, getAfcScales, afcScaleSource, latestAfcYear, latestRoundLag, payRoundLag, isPayRoundInReach, isAwaitingPayAward, assertLatestRoundsInReach, afcPayYears, afcPayYearFor, AFC_PAY_YEAR_KINDS, } from './scales.js';
|
|
8
|
+
export type { AfcBandMeta, AfcPayYearLookup } from './scales.js';
|
|
5
9
|
export type { PayLadder, ScalePoint } from './scale-point.js';
|
|
10
|
+
export { schemeYearOfPayYear } from './pay-year.js';
|
|
6
11
|
export { PensionTiers, getEmployerPensionRate, getPensionScheme, getPensionTiers, getPensionTiersVO, lookupPensionTier, pensionTierRate, } from './pension.js';
|
|
7
12
|
export type { EmployerPensionRate, NhsPensionScheme, PensionTier, } from './pension.js';
|
|
8
13
|
export type { SalaryRange } from './values.js';
|
|
@@ -10,11 +15,16 @@ export { Post, NO_ADJUSTMENTS } from './post.js';
|
|
|
10
15
|
export type { PostIdentity, PostAdjustments } from './post.js';
|
|
11
16
|
export type { AfcRole, DentalRole, MedicalRole, Role, RoleKind, VsmRole, } from './role.js';
|
|
12
17
|
export { afcResolver, dentalResolver, medicalResolver } from './resolver.js';
|
|
13
|
-
export type { AfcResolver, DentalResolver, MedicalResolver, NationScaleResolver, PayScaleResolver, } from './resolver.js';
|
|
14
|
-
export { MEDICAL_GRADES, MEDICAL_GRADE_IDS
|
|
15
|
-
export type { MedicalGradeId
|
|
16
|
-
export {
|
|
17
|
-
export type {
|
|
18
|
+
export type { AfcResolver, DentalResolver, MedicalResolver, NationScaleResolver, PayScaleResolver, ScaleYears, AfcPointQuery, AfcLabelQuery, GradePointQuery, GradeLabelQuery, } from './resolver.js';
|
|
19
|
+
export { MEDICAL_GRADES, MEDICAL_GRADE_IDS } from './medical-grades.js';
|
|
20
|
+
export type { MedicalGradeId } from './medical-grades.js';
|
|
21
|
+
export { MEDICAL_FAMILY, MEDICAL_PAY_YEARS, getMedicalScales, latestMedicalSource, } from './medical-scales.js';
|
|
22
|
+
export type { MedicalGradeMeta } from './medical-scales.js';
|
|
23
|
+
export { DENTAL_GRADES, DENTAL_GRADE_IDS } from './dental-grades.js';
|
|
24
|
+
export type { DentalGradeId } from './dental-grades.js';
|
|
25
|
+
export { DENTAL_FAMILY, DENTAL_PAY_YEARS, getDentalScales } from './dental-scales.js';
|
|
26
|
+
export type { GradeFamily } from './scale-tables.js';
|
|
27
|
+
export type { DentalGradeMeta } from './dental-scales.js';
|
|
18
28
|
export { ADDITIONAL_PENSION_LIMIT, ADDITIONAL_PENSION_PAYMENTS, ADDITIONAL_PENSION_UNIT, additionalPensionCost, additionalPensionToBuy, } from './additional-pension.js';
|
|
19
29
|
export type { AdditionalPensionPayment, AdditionalPensionPurchase, } from './additional-pension.js';
|
|
20
30
|
export { ADDITIONAL_PENSION_COVERS } from './gad/additional-pension-table.js';
|
|
@@ -66,17 +76,16 @@ export type { LedgerSeed, SeedBasis } from './pension/seed.js';
|
|
|
66
76
|
export { buildLedger } from './pension/ledger.js';
|
|
67
77
|
export type { AppliedDrawing, AppliedLeaverAdjustment, LedgerRequest, LedgerYear, MemberLedger, } from './pension/ledger.js';
|
|
68
78
|
export type { EstimatedHistory } from './pension/history.js';
|
|
69
|
-
export { HCAS_ZONE_IDS,
|
|
70
|
-
export type { HcasZoneId } from './hcas.js';
|
|
79
|
+
export { HCAS_ZONE_IDS, isHcasZoneId } from './hcas-zone.js';
|
|
80
|
+
export type { HcasZone, HcasZoneId, HcasZones } from './hcas-zone.js';
|
|
81
|
+
export { calculateHcasSupplement, englandHcasZones, grossSalary, hcasRateBand, } from './hcas.js';
|
|
71
82
|
export { getHcasPcts, getHcasZone, } from './hcas-pcts.js';
|
|
72
83
|
export type { HcasPct } from './hcas-pcts.js';
|
|
73
|
-
export { AFC_REGIONS, ZONE_TO_REGION, afcRegionToHcasZone, afcRegionToNation,
|
|
84
|
+
export { AFC_REGIONS, ZONE_TO_REGION, afcRegionToHcasZone, afcRegionToNation, afcRegionOf, baseAfcRegion, isAfcRegionId, resolveRegion, } from './regions.js';
|
|
74
85
|
export type { AfcRegionId, ResolvedRegion, } from './regions.js';
|
|
75
|
-
export { AFC_CURRENT_YEAR, AFC_PREVIOUS_YEAR, afcPointOf, getAfcScales, } from './bands.js';
|
|
76
|
-
export type { AfcBandMeta, AfcScaleData, } from './bands.js';
|
|
77
86
|
export { nhsTakeHome } from './take-home.js';
|
|
78
|
-
export { afcWeekInForce, afcWeeklyHours, hoursPerYear } from './working-week.js';
|
|
87
|
+
export { afcWeekInForce, afcWeeklyHours, annualiseHourly, hoursPerYear, } from './working-week.js';
|
|
79
88
|
export type { NhsTakeHomeOptions } from './take-home.js';
|
|
80
89
|
export { fmtMoney, fmtPct, fmtSalary, formatGBP, formatGBPPrecise, formatPct, formatPctPrecise, yearLabel, } from './format.js';
|
|
81
|
-
export { TAX_REGIONS, TAX_YEARS, NATIONS, NATION_KEYS, TakeHomePay, GrossAnnual, PensionBasis, PensionPercent, StudentLoanPlan, nationToTaxRegion, getTaxYearConfig, } from '@casomoltd/paye-calc';
|
|
90
|
+
export { TAX_REGIONS, TAX_YEARS, YEAR_LABELS, NATIONS, NATION_KEYS, TakeHomePay, GrossAnnual, PensionBasis, PensionPercent, StudentLoanPlan, nationToTaxRegion, getTaxYearConfig, } from '@casomoltd/paye-calc';
|
|
82
91
|
export type { Nation, TaxRegion, TaxYear, PayYear, YearLabel, } from '@casomoltd/paye-calc';
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
// ── Scales ───────────────────────────────────────
|
|
2
2
|
export { afcBand1 } from './afc-scales.js';
|
|
3
|
-
export { AFC_BANDS, AFC_BAND_IDS
|
|
3
|
+
export { AFC_BANDS, AFC_BAND_IDS } from './afc-band.js';
|
|
4
|
+
export { WALES_LIVING_WAGE } from './published/wales-living-wage.js';
|
|
5
|
+
export { AFC_CURRENT_YEAR, AFC_PREVIOUS_YEAR, afcPointOf, getAfcScales, afcScaleSource, latestAfcYear, latestRoundLag, payRoundLag, isPayRoundInReach, isAwaitingPayAward, assertLatestRoundsInReach, afcPayYears, afcPayYearFor, AFC_PAY_YEAR_KINDS, } from './scales.js';
|
|
6
|
+
export { schemeYearOfPayYear } from './pay-year.js';
|
|
4
7
|
// ── Pension ──────────────────────────────────────
|
|
5
8
|
export { PensionTiers, getEmployerPensionRate, getPensionScheme, getPensionTiers, getPensionTiersVO, lookupPensionTier, pensionTierRate, } from './pension.js';
|
|
6
9
|
// ── Post & resolvers ─────────────────────────────
|
|
7
10
|
export { Post, NO_ADJUSTMENTS } from './post.js';
|
|
8
11
|
export { afcResolver, dentalResolver, medicalResolver } from './resolver.js';
|
|
9
12
|
// ── Medical & dental scales ──────────────────────
|
|
10
|
-
export { MEDICAL_GRADES, MEDICAL_GRADE_IDS
|
|
11
|
-
export {
|
|
13
|
+
export { MEDICAL_GRADES, MEDICAL_GRADE_IDS } from './medical-grades.js';
|
|
14
|
+
export { MEDICAL_FAMILY, MEDICAL_PAY_YEARS, getMedicalScales, latestMedicalSource, } from './medical-scales.js';
|
|
15
|
+
export { DENTAL_GRADES, DENTAL_GRADE_IDS } from './dental-grades.js';
|
|
16
|
+
export { DENTAL_FAMILY, DENTAL_PAY_YEARS, getDentalScales } from './dental-scales.js';
|
|
12
17
|
// ── Additional pension ───────────────────────────
|
|
13
18
|
export { ADDITIONAL_PENSION_LIMIT, ADDITIONAL_PENSION_PAYMENTS, ADDITIONAL_PENSION_UNIT, additionalPensionCost, additionalPensionToBuy, } from './additional-pension.js';
|
|
14
19
|
export { ADDITIONAL_PENSION_COVERS } from './gad/additional-pension-table.js';
|
|
@@ -67,21 +72,20 @@ export { isSchemeYearEnd, schemeYearAfter, schemeYearBefore, schemeYearClosedBy,
|
|
|
67
72
|
export { SEED_BASES, seedFromJoinDate, seedFromStatement, } from './pension/seed.js';
|
|
68
73
|
export { buildLedger } from './pension/ledger.js';
|
|
69
74
|
// ── HCAS ─────────────────────────────────────────
|
|
70
|
-
export { HCAS_ZONE_IDS,
|
|
75
|
+
export { HCAS_ZONE_IDS, isHcasZoneId } from './hcas-zone.js';
|
|
76
|
+
export { calculateHcasSupplement, englandHcasZones, grossSalary, hcasRateBand, } from './hcas.js';
|
|
71
77
|
// ── HCAS PCTs ────────────────────────────────────
|
|
72
78
|
export { getHcasPcts, getHcasZone, } from './hcas-pcts.js';
|
|
73
79
|
// ── Regions ──────────────────────────────────────
|
|
74
|
-
export { AFC_REGIONS, ZONE_TO_REGION, afcRegionToHcasZone, afcRegionToNation,
|
|
75
|
-
// ── Bands ────────────────────────────────────────
|
|
76
|
-
export { AFC_CURRENT_YEAR, AFC_PREVIOUS_YEAR, afcPointOf, getAfcScales, } from './bands.js';
|
|
80
|
+
export { AFC_REGIONS, ZONE_TO_REGION, afcRegionToHcasZone, afcRegionToNation, afcRegionOf, baseAfcRegion, isAfcRegionId, resolveRegion, } from './regions.js';
|
|
77
81
|
// ── Take-home ────────────────────────────────────
|
|
78
82
|
export { nhsTakeHome } from './take-home.js';
|
|
79
83
|
// ── Working week ──────────────────────────────
|
|
80
|
-
export { afcWeekInForce, afcWeeklyHours, hoursPerYear } from './working-week.js';
|
|
84
|
+
export { afcWeekInForce, afcWeeklyHours, annualiseHourly, hoursPerYear, } from './working-week.js';
|
|
81
85
|
// ── Format ───────────────────────────────────────
|
|
82
86
|
export { fmtMoney, fmtPct, fmtSalary, formatGBP, formatGBPPrecise, formatPct, formatPctPrecise, yearLabel, } from './format.js';
|
|
83
87
|
// ── Re-exports from paye-calc ────────────────────
|
|
84
88
|
// Types that appear in our public API so consumers
|
|
85
89
|
// don't need a direct paye-calc import for NHS work.
|
|
86
|
-
export { TAX_REGIONS, TAX_YEARS, NATIONS, NATION_KEYS, TakeHomePay, GrossAnnual, PensionBasis, PensionPercent, StudentLoanPlan, nationToTaxRegion, getTaxYearConfig, } from '@casomoltd/paye-calc';
|
|
90
|
+
export { TAX_REGIONS, TAX_YEARS, YEAR_LABELS, NATIONS, NATION_KEYS, TakeHomePay, GrossAnnual, PensionBasis, PensionPercent, StudentLoanPlan, nationToTaxRegion, getTaxYearConfig, } from '@casomoltd/paye-calc';
|
|
87
91
|
//# sourceMappingURL=index.js.map
|
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,
|
|
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,EAAC,SAAS,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAC,iBAAiB,EAAC,MAAM,kCAAkC,CAAC;AAEnE,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,cAAc,EACd,aAAa,EACb,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,yBAAyB,EACzB,WAAW,EACX,aAAa,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E3D,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,WAAW,EACX,YAAY,GACb,MAAM,WAAW,CAAC;AAEnB,oDAAoD;AACpD,OAAO,EACL,WAAW,EACX,WAAW,GACZ,MAAM,gBAAgB,CAAC;AAGxB,oDAAoD;AACpD,OAAO,EACL,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAa,GACd,MAAM,cAAc,CAAC;AAMtB,oDAAoD;AACpD,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAE3C,iDAAiD;AACjD,OAAO,EACL,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,GAC9D,MAAM,mBAAmB,CAAC;AAG3B,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,WAAW,EACX,OAAO,EACP,WAAW,EACX,WAAW,EACX,WAAW,EACX,YAAY,EACZ,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The doctor grades wired into the domain, in their own module so a
|
|
3
|
+
* module that names a grade (the award table, roles, the resolvers) need
|
|
4
|
+
* not import the translation layer in `medical-scales.ts`.
|
|
5
|
+
*/
|
|
6
|
+
/** Doctor grade identifiers wired into the domain. */
|
|
7
|
+
export declare const MEDICAL_GRADES: {
|
|
8
|
+
readonly resident: "resident";
|
|
9
|
+
readonly consultant: "consultant";
|
|
10
|
+
readonly specialtyDoctor: "specialty-doctor";
|
|
11
|
+
readonly specialist: "specialist";
|
|
12
|
+
readonly salariedGp: "salaried-gp";
|
|
13
|
+
readonly gpEducator: "gp-educator";
|
|
14
|
+
readonly locallyEmployedDoctor: "locally-employed-doctor";
|
|
15
|
+
readonly fho1: "fho1";
|
|
16
|
+
readonly fho2: "fho2";
|
|
17
|
+
readonly sho: "sho";
|
|
18
|
+
readonly spr: "spr";
|
|
19
|
+
readonly str: "str";
|
|
20
|
+
readonly specialtyRegistrarCore: "specialty-registrar-core";
|
|
21
|
+
readonly specialtyRegistrarFixed: "specialty-registrar-fixed";
|
|
22
|
+
readonly gpRegistrarSho: "gp-registrar-sho";
|
|
23
|
+
readonly gpRegistrarSpr: "gp-registrar-spr";
|
|
24
|
+
readonly gpRegistrarStr: "gp-registrar-str";
|
|
25
|
+
readonly staffGrade: "staff-grade";
|
|
26
|
+
readonly associateSpecialist: "associate-specialist";
|
|
27
|
+
readonly specialtyDoctor2008: "specialty-doctor-2008";
|
|
28
|
+
readonly associateSpecialist2008: "associate-specialist-2008";
|
|
29
|
+
readonly hospitalPractitioner: "hospital-practitioner";
|
|
30
|
+
};
|
|
31
|
+
export type MedicalGradeId = (typeof MEDICAL_GRADES)[keyof typeof MEDICAL_GRADES];
|
|
32
|
+
/** Ordered grade IDs — stable iteration/enumeration. */
|
|
33
|
+
export declare const MEDICAL_GRADE_IDS: MedicalGradeId[];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The doctor grades wired into the domain, in their own module so a
|
|
3
|
+
* module that names a grade (the award table, roles, the resolvers) need
|
|
4
|
+
* not import the translation layer in `medical-scales.ts`.
|
|
5
|
+
*/
|
|
6
|
+
/** Doctor grade identifiers wired into the domain. */
|
|
7
|
+
export const MEDICAL_GRADES = {
|
|
8
|
+
resident: 'resident',
|
|
9
|
+
consultant: 'consultant',
|
|
10
|
+
specialtyDoctor: 'specialty-doctor',
|
|
11
|
+
specialist: 'specialist',
|
|
12
|
+
salariedGp: 'salaried-gp',
|
|
13
|
+
gpEducator: 'gp-educator',
|
|
14
|
+
locallyEmployedDoctor: 'locally-employed-doctor',
|
|
15
|
+
fho1: 'fho1',
|
|
16
|
+
fho2: 'fho2',
|
|
17
|
+
sho: 'sho',
|
|
18
|
+
spr: 'spr',
|
|
19
|
+
str: 'str',
|
|
20
|
+
specialtyRegistrarCore: 'specialty-registrar-core',
|
|
21
|
+
specialtyRegistrarFixed: 'specialty-registrar-fixed',
|
|
22
|
+
gpRegistrarSho: 'gp-registrar-sho',
|
|
23
|
+
gpRegistrarSpr: 'gp-registrar-spr',
|
|
24
|
+
gpRegistrarStr: 'gp-registrar-str',
|
|
25
|
+
staffGrade: 'staff-grade',
|
|
26
|
+
associateSpecialist: 'associate-specialist',
|
|
27
|
+
specialtyDoctor2008: 'specialty-doctor-2008',
|
|
28
|
+
associateSpecialist2008: 'associate-specialist-2008',
|
|
29
|
+
hospitalPractitioner: 'hospital-practitioner',
|
|
30
|
+
};
|
|
31
|
+
/** Ordered grade IDs — stable iteration/enumeration. */
|
|
32
|
+
export const MEDICAL_GRADE_IDS = Object.values(MEDICAL_GRADES);
|
|
33
|
+
//# sourceMappingURL=medical-grades.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"medical-grades.js","sourceRoot":"","sources":["../src/medical-grades.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,sDAAsD;AACtD,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,YAAY;IACxB,eAAe,EAAE,kBAAkB;IACnC,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,aAAa;IACzB,UAAU,EAAE,aAAa;IACzB,qBAAqB,EAAE,yBAAyB;IAChD,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,sBAAsB,EAAE,0BAA0B;IAClD,uBAAuB,EAAE,2BAA2B;IACpD,cAAc,EAAE,kBAAkB;IAClC,cAAc,EAAE,kBAAkB;IAClC,cAAc,EAAE,kBAAkB;IAClC,UAAU,EAAE,aAAa;IACzB,mBAAmB,EAAE,sBAAsB;IAC3C,mBAAmB,EAAE,uBAAuB;IAC5C,uBAAuB,EAAE,2BAA2B;IACpD,oBAAoB,EAAE,uBAAuB;CACrC,CAAC;AAKX,wDAAwD;AACxD,MAAM,CAAC,MAAM,iBAAiB,GAC5B,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC"}
|
package/dist/medical-scales.d.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* increment), so no pay step is collapsed away.
|
|
14
14
|
*
|
|
15
15
|
* Grades captured in the circulars but not yet wired here (add when a
|
|
16
|
-
*
|
|
16
|
+
* consumer needs them — they are one mapping line each): England's ultra-
|
|
17
17
|
* legacy closed grades SCMO (KB11), CMO (KB01), pre-2003 consultant
|
|
18
18
|
* (MC21), closed Specialist Registrar (MN25) and closed training
|
|
19
19
|
* variants (MN13/15/21/35/37/39); the second staff-grade scales
|
|
@@ -21,51 +21,28 @@
|
|
|
21
21
|
*/
|
|
22
22
|
import type { Nation, PayYear } from '@casomoltd/paye-calc';
|
|
23
23
|
import type { DocumentSource } from './document-source.js';
|
|
24
|
-
import type {
|
|
25
|
-
|
|
26
|
-
export declare const MEDICAL_GRADES: {
|
|
27
|
-
readonly resident: "resident";
|
|
28
|
-
readonly consultant: "consultant";
|
|
29
|
-
readonly specialtyDoctor: "specialty-doctor";
|
|
30
|
-
readonly specialist: "specialist";
|
|
31
|
-
readonly salariedGp: "salaried-gp";
|
|
32
|
-
readonly gpEducator: "gp-educator";
|
|
33
|
-
readonly locallyEmployedDoctor: "locally-employed-doctor";
|
|
34
|
-
readonly fho1: "fho1";
|
|
35
|
-
readonly fho2: "fho2";
|
|
36
|
-
readonly sho: "sho";
|
|
37
|
-
readonly spr: "spr";
|
|
38
|
-
readonly str: "str";
|
|
39
|
-
readonly specialtyRegistrarCore: "specialty-registrar-core";
|
|
40
|
-
readonly specialtyRegistrarFixed: "specialty-registrar-fixed";
|
|
41
|
-
readonly gpRegistrarSho: "gp-registrar-sho";
|
|
42
|
-
readonly gpRegistrarSpr: "gp-registrar-spr";
|
|
43
|
-
readonly gpRegistrarStr: "gp-registrar-str";
|
|
44
|
-
readonly staffGrade: "staff-grade";
|
|
45
|
-
readonly associateSpecialist: "associate-specialist";
|
|
46
|
-
readonly specialtyDoctor2008: "specialty-doctor-2008";
|
|
47
|
-
readonly associateSpecialist2008: "associate-specialist-2008";
|
|
48
|
-
readonly hospitalPractitioner: "hospital-practitioner";
|
|
49
|
-
};
|
|
50
|
-
export type MedicalGradeId = (typeof MEDICAL_GRADES)[keyof typeof MEDICAL_GRADES];
|
|
51
|
-
/** Ordered grade IDs — stable iteration/enumeration. */
|
|
52
|
-
export declare const MEDICAL_GRADE_IDS: MedicalGradeId[];
|
|
24
|
+
import type { MedicalGradeId } from './medical-grades.js';
|
|
25
|
+
import type { GradeFamily, GradeMeta } from './scale-tables.js';
|
|
53
26
|
/** A doctor grade's scale points in a nation/year, with its range. */
|
|
54
27
|
export type MedicalGradeMeta = GradeMeta<MedicalGradeId>;
|
|
28
|
+
/** Every read over the medical tables. */
|
|
29
|
+
export declare const MEDICAL_FAMILY: GradeFamily<MedicalGradeId>;
|
|
55
30
|
/**
|
|
56
31
|
* Pay years this family publishes, newest first — derived from the
|
|
57
32
|
* data so a new pay round can't leave a hand-maintained list stale.
|
|
58
33
|
*/
|
|
59
34
|
export declare const MEDICAL_PAY_YEARS: readonly PayYear[];
|
|
60
35
|
/**
|
|
61
|
-
* Published doctor grades for a nation and
|
|
36
|
+
* Published doctor grades for a nation and pay year, each with its
|
|
62
37
|
* scale points and salary range. Both args required — no default;
|
|
63
38
|
* an absent grade set throws `ScaleUnavailable`.
|
|
64
39
|
*/
|
|
65
40
|
export declare function getMedicalScales(year: PayYear, nation: Nation): MedicalGradeMeta[];
|
|
66
41
|
/**
|
|
67
|
-
* The newest
|
|
68
|
-
* every grade
|
|
42
|
+
* The newest document of the newest year a nation publishes doctors'
|
|
43
|
+
* pay for, across every medical grade that year. It searches
|
|
44
|
+
* the medical tables only: a document that sets dental pay alone is not
|
|
45
|
+
* a candidate.
|
|
69
46
|
*
|
|
70
47
|
* For prose that cites the nation rather than one family's table.
|
|
71
48
|
* Newest by issue date, not by any hardcoded preference: Scotland
|