Skip to content

Commit 954b570

Browse files
authored
Update declaration payload to match FieldValue (#1138)
* update toolkit * fix: update test data * fix: update toolkit * update toolkit * update toolkit(#a29215b) * fix: add admin area in test data address
1 parent 925bbbf commit 954b570

File tree

3 files changed

+17
-45
lines changed

3 files changed

+17
-45
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"@hapi/boom": "^9.1.1",
7070
"@hapi/hapi": "^20.0.1",
7171
"@hapi/inert": "^6.0.3",
72-
"@opencrvs/toolkit": "1.9.0-rc.891a767",
72+
"@opencrvs/toolkit": "1.9.0-rc.a29215b",
7373
"@types/chalk": "^2.2.0",
7474
"@types/csv2json": "^1.4.0",
7575
"@types/fhir": "^0.0.30",

src/api/notification/testData.ts

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,7 @@ const RequestBirthNotificationAction = {
137137
'mother.address': {
138138
country: 'FAR',
139139
addressType: 'DOMESTIC',
140-
province: '05cbe3a1-9020-47bd-b558-807607c2f119',
141-
district: 'afaead2b-7ef5-4adb-b4bf-3d2b8437c284',
142-
urbanOrRural: 'URBAN'
140+
administrativeArea: 'afaead2b-7ef5-4adb-b4bf-3d2b8437c284'
143141
},
144142
'informant.email': '[email protected]',
145143
'informant.phoneNo': '0734231245',
@@ -175,9 +173,7 @@ const RequestBirthDeclarationAction = {
175173
'mother.address': {
176174
country: 'FAR',
177175
addressType: 'DOMESTIC',
178-
province: '05cbe3a1-9020-47bd-b558-807607c2f119',
179-
district: 'afaead2b-7ef5-4adb-b4bf-3d2b8437c284',
180-
urbanOrRural: 'URBAN'
176+
administrativeArea: 'afaead2b-7ef5-4adb-b4bf-3d2b8437c284'
181177
},
182178
'informant.email': '[email protected]',
183179
'informant.phoneNo': '0734231245',
@@ -213,9 +209,7 @@ const BirthDeclarationAction = {
213209
'mother.address': {
214210
country: 'FAR',
215211
addressType: 'DOMESTIC',
216-
province: '05cbe3a1-9020-47bd-b558-807607c2f119',
217-
district: 'afaead2b-7ef5-4adb-b4bf-3d2b8437c284',
218-
urbanOrRural: 'URBAN'
212+
administrativeArea: 'afaead2b-7ef5-4adb-b4bf-3d2b8437c284'
219213
},
220214
'informant.email': '[email protected]',
221215
'informant.phoneNo': '0734231245',
@@ -284,9 +278,7 @@ const RequestDeathNotificationAction = {
284278
'deceased.address': {
285279
country: 'FAR',
286280
addressType: 'DOMESTIC',
287-
province: '05cbe3a1-9020-47bd-b558-807607c2f119',
288-
district: 'afaead2b-7ef5-4adb-b4bf-3d2b8437c284',
289-
urbanOrRural: 'URBAN'
281+
administrativeArea: 'afaead2b-7ef5-4adb-b4bf-3d2b8437c284'
290282
},
291283
'informant.relation': 'SPOUSE'
292284
},
@@ -311,13 +303,13 @@ const RequestDeathDeclarationAction = {
311303
createdByRole: 'LOCAL_REGISTRAR',
312304
createdAtLocation: '9e069dda-0d83-4f67-a4f2-9adbf5658e2e' as unknown as UUID,
313305
declaration: {
314-
'spouse.age': { age: '41', asOfDateRef: 'eventDetails.date' },
306+
'spouse.age': { age: 41, asOfDateRef: 'eventDetails.date' },
315307
'spouse.name': {
316308
firstname: 'Toki',
317309
surname: 'Kozuki',
318310
middlename: ''
319311
},
320-
'deceased.age': { age: '31', asOfDateRef: 'eventDetails.date' },
312+
'deceased.age': { age: 31, asOfDateRef: 'eventDetails.date' },
321313
'deceased.name': {
322314
firstname: 'Oden',
323315
surname: 'Kozuki',
@@ -332,9 +324,7 @@ const RequestDeathDeclarationAction = {
332324
'deceased.address': {
333325
country: 'FAR',
334326
addressType: 'DOMESTIC',
335-
province: '05cbe3a1-9020-47bd-b558-807607c2f119',
336-
district: 'afaead2b-7ef5-4adb-b4bf-3d2b8437c284',
337-
urbanOrRural: 'URBAN'
327+
administrativeArea: 'afaead2b-7ef5-4adb-b4bf-3d2b8437c284'
338328
},
339329
'eventDetails.date': '2025-08-19',
340330
'spouse.dobUnknown': true,
@@ -367,13 +357,13 @@ const DeathDeclarationAction = {
367357
createdByRole: 'LOCAL_REGISTRAR',
368358
createdAtLocation: '9e069dda-0d83-4f67-a4f2-9adbf5658e2e' as unknown as UUID,
369359
declaration: {
370-
'spouse.age': { age: '41', asOfDateRef: 'eventDetails.date' },
360+
'spouse.age': { age: 41, asOfDateRef: 'eventDetails.date' },
371361
'spouse.name': {
372362
firstname: 'Toki',
373363
surname: 'Kozuki',
374364
middlename: ''
375365
},
376-
'deceased.age': { age: '31', asOfDateRef: 'eventDetails.date' },
366+
'deceased.age': { age: 31, asOfDateRef: 'eventDetails.date' },
377367
'deceased.name': {
378368
firstname: 'Oden',
379369
surname: 'Kozuki',
@@ -388,9 +378,7 @@ const DeathDeclarationAction = {
388378
'deceased.address': {
389379
country: 'FAR',
390380
addressType: 'DOMESTIC',
391-
province: '05cbe3a1-9020-47bd-b558-807607c2f119',
392-
district: 'afaead2b-7ef5-4adb-b4bf-3d2b8437c284',
393-
urbanOrRural: 'URBAN'
381+
administrativeArea: 'afaead2b-7ef5-4adb-b4bf-3d2b8437c284'
394382
},
395383
'eventDetails.date': '2025-08-19',
396384
'spouse.dobUnknown': true,

yarn.lock

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -834,10 +834,10 @@
834834
dependencies:
835835
"@octokit/openapi-types" "^18.0.0"
836836

837-
"@opencrvs/[email protected].891a767":
838-
version "1.9.0-rc.891a767"
839-
resolved "https://registry.yarnpkg.com/@opencrvs/toolkit/-/toolkit-1.9.0-rc.891a767.tgz#fb73a78c6f5f98068f3eb9ef595dec707a92d61e"
840-
integrity sha512-Qc8K3C5Yppb9gLulMRJ6A6JYno/Br89/13yPN1Yr41DkHvR+tPdpi8fDRtzo6Z1d7Zyab4JbAv9nOgYe1TIk2w==
837+
"@opencrvs/[email protected].a29215b":
838+
version "1.9.0-rc.a29215b"
839+
resolved "https://registry.yarnpkg.com/@opencrvs/toolkit/-/toolkit-1.9.0-rc.a29215b.tgz#38e3f97650b66d59ef65b22d9173574e975f9629"
840+
integrity sha512-Kx6Q4jQhvBAkm54lIkTV7aaZGb/+pu86F3D2an59HcOUaifXlMunqVPxMR38t5O0IuBU64qyUGF/Vzh5l7aCUg==
841841
dependencies:
842842
"@trpc/client" "11.4.3"
843843
"@trpc/server" "11.4.3"
@@ -5166,7 +5166,7 @@ string-argv@^0.0.2:
51665166
resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.0.2.tgz#dac30408690c21f3c3630a3ff3a05877bdcbd736"
51675167
integrity sha512-p6/Mqq0utTQWUeGMi/m0uBtlLZEwXSY3+mXzeRRqw7fz5ezUb28Wr0R99NlfbWaMmL/jCyT9be4jpn7Yz8IO8w==
51685168

5169-
"string-width-cjs@npm:string-width@^4.2.0":
5169+
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.3:
51705170
version "4.2.3"
51715171
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
51725172
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -5192,15 +5192,6 @@ string-width@^2.1.1:
51925192
is-fullwidth-code-point "^2.0.0"
51935193
strip-ansi "^4.0.0"
51945194

5195-
string-width@^4.1.0, string-width@^4.2.3:
5196-
version "4.2.3"
5197-
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
5198-
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
5199-
dependencies:
5200-
emoji-regex "^8.0.0"
5201-
is-fullwidth-code-point "^3.0.0"
5202-
strip-ansi "^6.0.1"
5203-
52045195
string-width@^5.0.1, string-width@^5.1.2:
52055196
version "5.1.2"
52065197
resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794"
@@ -5226,7 +5217,7 @@ stringify-object@^3.2.2:
52265217
is-obj "^1.0.1"
52275218
is-regexp "^1.0.0"
52285219

5229-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
5220+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
52305221
version "6.0.1"
52315222
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
52325223
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -5247,13 +5238,6 @@ strip-ansi@^4.0.0:
52475238
dependencies:
52485239
ansi-regex "^3.0.0"
52495240

5250-
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
5251-
version "6.0.1"
5252-
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
5253-
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
5254-
dependencies:
5255-
ansi-regex "^5.0.1"
5256-
52575241
strip-ansi@^7.0.1:
52585242
version "7.1.0"
52595243
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"

0 commit comments

Comments
 (0)