Skip to content

Commit

Permalink
[MOL-12787][CWH] Add in all profile for book facilities UAT
Browse files Browse the repository at this point in the history
  • Loading branch information
CWH-UF committed Jan 25, 2024
1 parent 33a60a7 commit d60c989
Show file tree
Hide file tree
Showing 26 changed files with 795 additions and 15 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelogs

## 8.3.4
- Add all new profiles for book facilities UAT

## 8.3.3
- Add new profiles for book facilities UAT

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@govtechsg/singpass-myinfo-oidc-helper",
"version": "8.3.3",
"version": "8.3.4",
"description": "Helper for building a Relying Party to integrate with Singpass OIDC and MyInfo person basic API",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
29 changes: 25 additions & 4 deletions src/myinfo/fake/profiles/fake-profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,33 @@ export enum ProfileArchetype {
MRS_ICA_SC_SINGLE_MOMMY_MAIN_SCENARIO_8 = "Mrs SG Single Mommy Main Applicant Scenario Eight",
// For Book Fac UAT
MR_CCK_RESIDENT_1 = "Mr CCK Resident 1",
MS_CCK_RESIDENT_2 = "Ms CCK Resident 2",
MR_CCK_RESIDENT_3 = "Mr CCK Resident 3",
MR_CCK_RESIDENT_4 = "Mr CCK Resident 4",
MS_CCK_RESIDENT_5 = "Ms CCK Resident 5",
MR_CCK_RESIDENT_6 = "Mr CCK Resident 6",
MS_HBP_RESIDENT_1 = "Ms HBP Resident 1",
MR_HBP_RESIDENT_2 = "Mr HBP Resident 2",
MS_HBP_RESIDENT_3 = "Ms HBP Resident 3",
MS_HBP_RESIDENT_4 = "Ms HBP Resident 4",
MR_HBP_RESIDENT_5 = "Mr HBP Resident 5",
MS_HBP_RESIDENT_6 = "Ms HBP Resident 6",
MR_MP_RESIDENT_1 = "Mr MP Resident 1",
MS_MP_RESIDENT_2 = "Ms MP Resident 2",
MR_MP_RESIDENT_3 = "Mr MP Resident 3",
MR_MP_RESIDENT_4 = "Mr MP Resident 4",
MR_NS_RESIDENT_5 = "Mr NS Resident 5",
MS_PRPG_RESIDENT_1 = "Ms PRPG Resident 1",
MS_MP_RESIDENT_5 = "Ms MP Resident 5",
MR_MP_RESIDENT_6 = "Mr MP Resident 6",
MS_NS_RESIDENT_1 = "Ms NS Resident 1",
MR_NS_RESIDENT_2 = "Mr NS Resident 2",
MR_NS_RESIDENT_3 = "Mr NS Resident 3",
MS_NS_RESIDENT_4 = "Ms NS Resident 4",
MR_NS_RESIDENT_5 = "Mr NS Resident 5",
MS_NS_RESIDENT_6 = "Ms NS Resident 6",
MR_MP_RESIDENT_1 = "Mr MP Resident 1",
MR_HBP_RESIDENT_5 = "Mr HBP Resident 5",
MS_PRPG_RESIDENT_1 = "Ms PRPG Resident 1",
MS_PRPG_RESIDENT_2 = "Ms PRPG Resident 2",
MR_PRPG_RESIDENT_3 = "Mr PRPG Resident 3",
MR_PRPG_RESIDENT_4 = "Mr PRPG Resident 4",
MR_PRPG_RESIDENT_5 = "Mr PRPG Resident 5",
MR_PRPG_RESIDENT_6 = "Mr PRPG Resident 6",
}
58 changes: 50 additions & 8 deletions src/myinfo/fake/profiles/fake-profiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,35 @@ import { mrsICAMommyScenario5 } from "./mrICAMommyScenario5";
import { mrsICAMommyScenario6 } from "./mrICAMommyScenario6";
import { mrsICAMommyScenario8 } from "./mrICAMommyScenario8";
import { mrCckResident1 } from "./mrCckResident1";
import { msCckResident2 } from "./msCckResident2";
import { mrCckResident3 } from "./mrCckResident3";
import { mrCckResident4 } from "./mrCckResident4";
import { msCckResident5 } from "./msCckResident5";
import { mrCckResident6 } from "./mrCckResident6";
import { msHbpResident1 } from "./msHbpResident1";
import { mrHbpResident2 } from "./mrHbpResident2";
import { msHbpResident3 } from "./msHbpResident3";
import { msHbpResident4 } from "./msHbpResident4";
import { mrHbpResident5 } from "./mrHbpResident5";
import { msHbpResident6 } from "./msHbpResident6";
import { mrMpResident1 } from "./mrMpResident1";
import { msMpResident2 } from "./msMpResident2";
import { mrMpResident3 } from "./mrMpResident3";
import { mrMpResident4 } from "./mrMpResident4";
import { mrNsResident5 } from "./mrNsResident5";
import { msPrpgResident1 } from "./msPrpgResident1";
import { msMpResident5 } from "./msMpResident5";
import { mrMpResident6 } from "./mrMpResident6";
import { msNsResident1 } from "./msNsResident1";
import { mrNsResident2 } from "./mrNsResident2";
import { mrNsResident3 } from "./mrNsResident3";
import { msNsResident4 } from "./msNsResident4";
import { mrNsResident5 } from "./mrNsResident5";
import { msNsResident6 } from "./msNsResident6";
import { mrMpResident1 } from "./mrMpResident1";
import { mrHbpResident5 } from "./mrHbpResident5";
import { msPrpgResident1 } from "./msPrpgResident1";
import { msPrpgResident2 } from "./msPrpgResident2";
import { mrPrpgResident3 } from "./mrPrpgResident3";
import { mrPrpgResident4 } from "./mrPrpgResident4";
import { mrPrpgResident5 } from "./mrPrpgResident5";
import { mrPrpgResident6 } from "./mrPrpgResident6";

/**
* Exhaustive list of our MyInfo archetype profiles
Expand Down Expand Up @@ -158,12 +179,33 @@ export const profiles = [
mrsICAMommyScenario6,
mrsICAMommyScenario8,
mrCckResident1,
msCckResident2,
mrCckResident3,
mrCckResident4,
msCckResident5,
mrCckResident6,
msHbpResident1,
mrHbpResident2,
msHbpResident3,
msHbpResident4,
mrHbpResident5,
msHbpResident6,
mrMpResident1,
msMpResident2,
mrMpResident3,
mrMpResident4,
mrNsResident5,
msPrpgResident1,
msMpResident5,
mrMpResident6,
msNsResident1,
mrNsResident2,
mrNsResident3,
msNsResident4,
mrNsResident5,
msNsResident6,
mrMpResident1,
mrHbpResident5,
msPrpgResident1,
msPrpgResident2,
mrPrpgResident3,
mrPrpgResident4,
mrPrpgResident5,
mrPrpgResident6,
];
34 changes: 34 additions & 0 deletions src/myinfo/fake/profiles/mrCckResident3.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import * as _ from "lodash";
import { MyInfoComponents, MyInfoSexCode } from "../../domain";
import { FakeProfile, ProfileArchetype } from "./fake-profile";
import { BaseProfile } from "./sponsored-children/BaseProfile";

const id = "S5823426E";
const name = ProfileArchetype.MR_CCK_RESIDENT_3;

export const mrCckResident3: FakeProfile = {
id,
name,
generate: (profileName) => {
profileName = _.isEmpty(profileName) ? name : profileName;
const profile: MyInfoComponents.Schemas.Person = BaseProfile.generate(profileName);

profile.sex.code = MyInfoSexCode.MALE;
profile.sex.desc = MyInfoSexCode.fn.toEnumDesc(MyInfoSexCode.MALE);

profile.dob = {
lastupdated: "2024-01-24",
source: "1",
classification: "C",
value: "1958-05-15",
};

(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).unit.value = "275";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).floor.value = "16";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).block.value = "406";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).street.value = "CHOA CHU KANG AVENUE 3";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).postal.value = "680406";

return profile;
},
};
34 changes: 34 additions & 0 deletions src/myinfo/fake/profiles/mrCckResident4.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import * as _ from "lodash";
import { MyInfoComponents, MyInfoSexCode } from "../../domain";
import { FakeProfile, ProfileArchetype } from "./fake-profile";
import { BaseProfile } from "./sponsored-children/BaseProfile";

const id = "S4991727I";
const name = ProfileArchetype.MR_CCK_RESIDENT_4;

export const mrCckResident4: FakeProfile = {
id,
name,
generate: (profileName) => {
profileName = _.isEmpty(profileName) ? name : profileName;
const profile: MyInfoComponents.Schemas.Person = BaseProfile.generate(profileName);

profile.sex.code = MyInfoSexCode.MALE;
profile.sex.desc = MyInfoSexCode.fn.toEnumDesc(MyInfoSexCode.MALE);

profile.dob = {
lastupdated: "2024-01-24",
source: "1",
classification: "C",
value: "1949-01-11",
};

(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).unit.value = "891";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).floor.value = "10";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).block.value = "441A";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).street.value = "BUKIT BATOK WEST AVENUE 8";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).postal.value = "651441";

return profile;
},
};
34 changes: 34 additions & 0 deletions src/myinfo/fake/profiles/mrCckResident6.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import * as _ from "lodash";
import { MyInfoComponents, MyInfoSexCode } from "../../domain";
import { FakeProfile, ProfileArchetype } from "./fake-profile";
import { BaseProfile } from "./sponsored-children/BaseProfile";

const id = "S4919079D";
const name = ProfileArchetype.MR_CCK_RESIDENT_6;

export const mrCckResident6: FakeProfile = {
id,
name,
generate: (profileName) => {
profileName = _.isEmpty(profileName) ? name : profileName;
const profile: MyInfoComponents.Schemas.Person = BaseProfile.generate(profileName);

profile.sex.code = MyInfoSexCode.MALE;
profile.sex.desc = MyInfoSexCode.fn.toEnumDesc(MyInfoSexCode.MALE);

profile.dob = {
lastupdated: "2024-01-24",
source: "1",
classification: "C",
value: "1949-01-11",
};

(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).unit.value = "106";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).floor.value = "12";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).block.value = "803D";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).street.value = "KEAT HONG CLOSE";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).postal.value = "684803";

return profile;
},
};
34 changes: 34 additions & 0 deletions src/myinfo/fake/profiles/mrHbpResident2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import * as _ from "lodash";
import { MyInfoComponents, MyInfoSexCode } from "../../domain";
import { FakeProfile, ProfileArchetype } from "./fake-profile";
import { BaseProfile } from "./sponsored-children/BaseProfile";

const id = "S8672262C";
const name = ProfileArchetype.MR_HBP_RESIDENT_2;

export const mrHbpResident2: FakeProfile = {
id,
name,
generate: (profileName) => {
profileName = _.isEmpty(profileName) ? name : profileName;
const profile: MyInfoComponents.Schemas.Person = BaseProfile.generate(profileName);

profile.sex.code = MyInfoSexCode.MALE;
profile.sex.desc = MyInfoSexCode.fn.toEnumDesc(MyInfoSexCode.MALE);

profile.dob = {
lastupdated: "2024-01-24",
source: "1",
classification: "C",
value: "1986-09-28",
};

(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).unit.value = "161";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).floor.value = "13";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).block.value = "311A";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).street.value = "CLEMENTI AVENUE 4";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).postal.value = "121311";

return profile;
},
};
34 changes: 34 additions & 0 deletions src/myinfo/fake/profiles/mrMpResident3.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import * as _ from "lodash";
import { MyInfoComponents, MyInfoSexCode } from "../../domain";
import { FakeProfile, ProfileArchetype } from "./fake-profile";
import { BaseProfile } from "./sponsored-children/BaseProfile";

const id = "S9965211Z";
const name = ProfileArchetype.MR_MP_RESIDENT_3;

export const mrMpResident3: FakeProfile = {
id,
name,
generate: (profileName) => {
profileName = _.isEmpty(profileName) ? name : profileName;
const profile: MyInfoComponents.Schemas.Person = BaseProfile.generate(profileName);

profile.sex.code = MyInfoSexCode.MALE;
profile.sex.desc = MyInfoSexCode.fn.toEnumDesc(MyInfoSexCode.MALE);

profile.dob = {
lastupdated: "2024-01-24",
source: "1",
classification: "C",
value: "1999-09-21",
};

(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).unit.value = "211";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).floor.value = "10";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).block.value = "60";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).street.value = "CIRCUIT ROAD";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).postal.value = "370060";

return profile;
},
};
34 changes: 34 additions & 0 deletions src/myinfo/fake/profiles/mrNsResident2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import * as _ from "lodash";
import { MyInfoComponents, MyInfoSexCode } from "../../domain";
import { FakeProfile, ProfileArchetype } from "./fake-profile";
import { BaseProfile } from "./sponsored-children/BaseProfile";

const id = "S8993188F";
const name = ProfileArchetype.MR_NS_RESIDENT_2;

export const mrNsResident2: FakeProfile = {
id,
name,
generate: (profileName) => {
profileName = _.isEmpty(profileName) ? name : profileName;
const profile: MyInfoComponents.Schemas.Person = BaseProfile.generate(profileName);

profile.sex.code = MyInfoSexCode.MALE;
profile.sex.desc = MyInfoSexCode.fn.toEnumDesc(MyInfoSexCode.MALE);

profile.dob = {
lastupdated: "2024-01-24",
source: "1",
classification: "C",
value: "1989-07-23",
};

(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).unit.value = "3549";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).floor.value = "10";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).block.value = "855";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).street.value = "YISHUN RING ROAD";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).postal.value = "760855";

return profile;
},
};
34 changes: 34 additions & 0 deletions src/myinfo/fake/profiles/mrNsResident3.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import * as _ from "lodash";
import { MyInfoComponents, MyInfoSexCode } from "../../domain";
import { FakeProfile, ProfileArchetype } from "./fake-profile";
import { BaseProfile } from "./sponsored-children/BaseProfile";

const id = "S7680309I";
const name = ProfileArchetype.MR_NS_RESIDENT_3;

export const mrNsResident3: FakeProfile = {
id,
name,
generate: (profileName) => {
profileName = _.isEmpty(profileName) ? name : profileName;
const profile: MyInfoComponents.Schemas.Person = BaseProfile.generate(profileName);

profile.sex.code = MyInfoSexCode.MALE;
profile.sex.desc = MyInfoSexCode.fn.toEnumDesc(MyInfoSexCode.MALE);

profile.dob = {
lastupdated: "2024-01-24",
source: "1",
classification: "C",
value: "1976-02-12",
};

(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).unit.value = "229";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).floor.value = "10";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).block.value = "131";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).street.value = "YISHUN STREET 11";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).postal.value = "760131";

return profile;
},
};
Loading

0 comments on commit d60c989

Please sign in to comment.