Skip to content

Commit

Permalink
Merge pull request #70 from GovTechSG/book-fac-uat-profiles
Browse files Browse the repository at this point in the history
[MISC][YH] Add new profiles for book facilities uat
  • Loading branch information
Gyunikuchan authored Dec 20, 2023
2 parents 0289d36 + 0a03053 commit cee1b05
Show file tree
Hide file tree
Showing 10 changed files with 193 additions and 4 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.1
- Add new profiles for book facilities UAT

## 8.2.0

- **[WARNING]** Remove `vehiclestatus` as a mock param option for `getPersonInfo` in fake helper
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.0",
"version": "8.3.1",
"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
6 changes: 6 additions & 0 deletions src/myinfo/fake/profiles/fake-profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,10 @@ export enum ProfileArchetype {
MRS_ICA_PR_MOMMY_MAIN_SCENARIO_6 = "Mrs PR Mommy Main Applicant Scenario Six IDE",
MR_ICA_SC_DADDY_MAIN_SCENARIO_7 = "Mr SG Daddy Spouse Applicant Scenario Seven IML",
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_HBP_RESIDENT_6 = "Ms HBP Resident 6",
MR_MP_RESIDENT_4 = "Mr MP Resident 4",
MR_NS_RESIDENT_5 = "Mr NS Resident 5",
MS_PRPG_RESIDENT_1 = "Ms PRPG Resident 1"
}
12 changes: 11 additions & 1 deletion src/myinfo/fake/profiles/fake-profiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ import { mrsICAMommyScenario4 } from "./mrICAMommyScenario4";
import { mrsICAMommyScenario5 } from "./mrICAMommyScenario5";
import { mrsICAMommyScenario6 } from "./mrICAMommyScenario6";
import { mrsICAMommyScenario8 } from "./mrICAMommyScenario8";
import { mrCckResident1 } from "./mrCckResident1";
import { msHbpResident6 } from "./msHbpResident6";
import { mrMpResident4 } from "./mrMpResident4";
import { mrNsResident5 } from "./mrNsResident5";
import { msPrpgResident1 } from "./msPrpgResident1";

/**
* Exhaustive list of our MyInfo archetype profiles
Expand Down Expand Up @@ -147,5 +152,10 @@ export const profiles = [
mrsICAMommyScenario4,
mrsICAMommyScenario5,
mrsICAMommyScenario6,
mrsICAMommyScenario8
mrsICAMommyScenario8,
mrCckResident1,
msHbpResident6,
mrMpResident4,
mrNsResident5,
msPrpgResident1
];
34 changes: 34 additions & 0 deletions src/myinfo/fake/profiles/mrCckResident1.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 = "S8939392B";
const name = ProfileArchetype.MR_CCK_RESIDENT_1;

export const mrCckResident1: 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: "2023-12-20",
source: "1",
classification: "C",
value: "1989-04-24",
};

(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).unit.value = "32";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).floor.value = "07";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).block.value = "130";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).street.value = "CHOA CHU KANG AVENUE 1";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).postal.value = "680130";

return profile;
},
};
34 changes: 34 additions & 0 deletions src/myinfo/fake/profiles/mrMpResident4.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 = "S7456600F";
const name = ProfileArchetype.MR_MP_RESIDENT_4;

export const mrMpResident4: 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: "2023-12-20",
source: "1",
classification: "C",
value: "1974-10-17",
};

(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).unit.value = "65";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).floor.value = "08";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).block.value = "58";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).street.value = "MARINE TERRACE";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).postal.value = "440058";

return profile;
},
};
34 changes: 34 additions & 0 deletions src/myinfo/fake/profiles/mrNsResident5.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 = "T0871447E";
const name = ProfileArchetype.MR_NS_RESIDENT_5;

export const mrNsResident5: 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: "2023-12-20",
source: "1",
classification: "C",
value: "1962-11-24",
};

(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).unit.value = "77";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).floor.value = "10";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).block.value = "868";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).street.value = "YISHUN STREET 81";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).postal.value = "760868";

return profile;
},
};
34 changes: 34 additions & 0 deletions src/myinfo/fake/profiles/msHbpResident6.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 = "S6217524I";
const name = ProfileArchetype.MS_HBP_RESIDENT_6;

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

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

profile.dob = {
lastupdated: "2023-12-20",
source: "1",
classification: "C",
value: "1962-11-24",
};

(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).unit.value = "167";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).floor.value = "10";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).block.value = "21";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).street.value = "GHIM MOH ROAD";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).postal.value = "270021";

return profile;
},
};
34 changes: 34 additions & 0 deletions src/myinfo/fake/profiles/msPrpgResident1.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 = "S6003491E";
const name = ProfileArchetype.MS_PRPG_RESIDENT_1;

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

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

profile.dob = {
lastupdated: "2023-12-20",
source: "1",
classification: "C",
value: "1960-06-04",
};

(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).unit.value = "317";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).floor.value = "12";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).block.value = "458";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).street.value = "PASIR RIS DRIVE 4";
(profile.regadd as MyInfoComponents.Schemas.DataitemAddressSg).postal.value = "510458";

return profile;
},
};

0 comments on commit cee1b05

Please sign in to comment.