@opencrvs/toolkit 2.0.0-rc.a6e6000 → 2.0.0-rc.a72e073
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/create-countryconfig/index.js +50 -20
- package/dist/commons/conditionals/conditionals.d.ts +6 -0
- package/dist/commons/events/index.d.ts +1 -0
- package/dist/commons/events/state/flags.d.ts +2 -0
- package/dist/conditionals/index.js +4 -0
- package/dist/events/index.js +403 -15
- package/dist/notification/index.js +378 -3
- package/opencrvs-toolkit-2.0.0-rc.a72e073.tgz +0 -0
- package/package.json +2 -2
- package/opencrvs-toolkit-2.0.0-rc.a6e6000.tgz +0 -0
|
@@ -15,7 +15,10 @@ const { execSync } = require('child_process')
|
|
|
15
15
|
const path = require('path')
|
|
16
16
|
const fs = require('fs')
|
|
17
17
|
|
|
18
|
-
const
|
|
18
|
+
const COUNTRYCONFIG_REPO_URL =
|
|
19
|
+
'https://github.com/opencrvs/opencrvs-countryconfig.git'
|
|
20
|
+
const INFRASTRUCTURE_REPO_URL =
|
|
21
|
+
'https://github.com/opencrvs/infrastructure.git'
|
|
19
22
|
|
|
20
23
|
const projectName = process.argv[2]
|
|
21
24
|
|
|
@@ -26,48 +29,75 @@ if (!projectName) {
|
|
|
26
29
|
process.exit(1)
|
|
27
30
|
}
|
|
28
31
|
|
|
29
|
-
const
|
|
32
|
+
const countryconfigDirName = projectName + '-countryconfig'
|
|
33
|
+
const infrastructureDirName = projectName + '-infrastructure'
|
|
30
34
|
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
const countryconfigTargetDir = path.resolve(process.cwd(), countryconfigDirName)
|
|
36
|
+
const infrastructureTargetDir = path.resolve(process.cwd(), infrastructureDirName)
|
|
37
|
+
|
|
38
|
+
if (fs.existsSync(countryconfigTargetDir)) {
|
|
39
|
+
console.error('Error: Directory "' + countryconfigDirName + '" already exists.')
|
|
40
|
+
process.exit(1)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (fs.existsSync(infrastructureTargetDir)) {
|
|
44
|
+
console.error('Error: Directory "' + infrastructureDirName + '" already exists.')
|
|
33
45
|
process.exit(1)
|
|
34
46
|
}
|
|
35
47
|
|
|
36
|
-
console.log(
|
|
48
|
+
console.log('\nScaffolding OpenCRVS country config in ./' + countryconfigDirName + '...\n')
|
|
37
49
|
|
|
38
50
|
try {
|
|
39
|
-
execSync(
|
|
40
|
-
stdio: 'inherit'
|
|
41
|
-
})
|
|
51
|
+
execSync('git clone --depth 1 ' + COUNTRYCONFIG_REPO_URL + ' ' + countryconfigDirName, { stdio: 'inherit' })
|
|
42
52
|
} catch (err) {
|
|
43
|
-
console.error('Failed to clone the repository:', err.message)
|
|
53
|
+
console.error('Failed to clone the country config repository:', err.message)
|
|
44
54
|
process.exit(1)
|
|
45
55
|
}
|
|
46
56
|
|
|
47
57
|
try {
|
|
48
|
-
fs.rmSync(path.join(
|
|
58
|
+
fs.rmSync(path.join(countryconfigTargetDir, '.git'), { recursive: true, force: true })
|
|
49
59
|
} catch (err) {
|
|
50
|
-
console.error('Failed to remove .git directory:', err.message)
|
|
60
|
+
console.error('Failed to remove .git directory from country config:', err.message)
|
|
51
61
|
process.exit(1)
|
|
52
62
|
}
|
|
53
63
|
|
|
54
|
-
const pkgPath = path.join(
|
|
64
|
+
const pkgPath = path.join(countryconfigTargetDir, 'package.json')
|
|
55
65
|
if (fs.existsSync(pkgPath)) {
|
|
56
66
|
try {
|
|
57
67
|
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'))
|
|
58
|
-
pkg.name =
|
|
68
|
+
pkg.name = countryconfigDirName
|
|
59
69
|
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n')
|
|
60
70
|
} catch (err) {
|
|
61
71
|
console.error('Failed to update package.json:', err.message)
|
|
62
72
|
process.exit(1)
|
|
63
73
|
}
|
|
64
74
|
} else {
|
|
65
|
-
console.warn(
|
|
66
|
-
|
|
67
|
-
|
|
75
|
+
console.warn('Warning: No package.json found in the cloned country config repository. Project name was not updated.')
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
console.log('\nScaffolding OpenCRVS infrastructure in ./' + infrastructureDirName + '...\n')
|
|
79
|
+
|
|
80
|
+
try {
|
|
81
|
+
execSync('git clone --depth 1 ' + INFRASTRUCTURE_REPO_URL + ' ' + infrastructureDirName, { stdio: 'inherit' })
|
|
82
|
+
} catch (err) {
|
|
83
|
+
console.error('Failed to clone the infrastructure repository:', err.message)
|
|
84
|
+
process.exit(1)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
try {
|
|
88
|
+
fs.rmSync(path.join(infrastructureTargetDir, '.git'), { recursive: true, force: true })
|
|
89
|
+
} catch (err) {
|
|
90
|
+
console.error('Failed to remove .git directory from infrastructure:', err.message)
|
|
91
|
+
process.exit(1)
|
|
68
92
|
}
|
|
69
93
|
|
|
70
|
-
console.log(
|
|
71
|
-
console.log(
|
|
72
|
-
console.log(
|
|
73
|
-
console.log(
|
|
94
|
+
console.log('\nDone! Your project has been set up in two directories:\n')
|
|
95
|
+
console.log(' ./' + countryconfigDirName + ' -- country configuration')
|
|
96
|
+
console.log(' ./' + infrastructureDirName + ' -- server infrastructure\n')
|
|
97
|
+
console.log('To get started with the country config:\n')
|
|
98
|
+
console.log(' cd ' + countryconfigDirName)
|
|
99
|
+
console.log(' git init')
|
|
100
|
+
console.log(' npm install\n')
|
|
101
|
+
console.log('To get started with the infrastructure:\n')
|
|
102
|
+
console.log(' cd ' + infrastructureDirName)
|
|
103
|
+
console.log(' git init\n')
|
|
@@ -67,6 +67,12 @@ export declare function not(condition: AjvJSONSchema): JSONSchema;
|
|
|
67
67
|
* @returns {JSONSchema} An schema object that always evaluates to false.
|
|
68
68
|
*/
|
|
69
69
|
export declare function never(): JSONSchema;
|
|
70
|
+
/**
|
|
71
|
+
* Returns an JSON Schema object, which is treated as always valid.
|
|
72
|
+
*
|
|
73
|
+
* @returns {JSONSchema} An schema object that always evaluates to true.
|
|
74
|
+
*/
|
|
75
|
+
export declare function always(): JSONSchema;
|
|
70
76
|
/**
|
|
71
77
|
* Generate conditional rules for current date
|
|
72
78
|
*/
|
|
@@ -37,6 +37,7 @@ export * from './scopes';
|
|
|
37
37
|
export * from './serializer';
|
|
38
38
|
export * from './state/availableActions';
|
|
39
39
|
export * from './FileUtils';
|
|
40
|
+
export * from './mocks.test.utils';
|
|
40
41
|
export * from '../conditionals/conditionals';
|
|
41
42
|
export * from '../conditionals/validate';
|
|
42
43
|
export * from './field';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { Action, RequestedCorrectionAction } from '../ActionDocument';
|
|
1
2
|
import { Flag, CustomFlag } from '../Flag';
|
|
2
3
|
import { EventConfig } from '../EventConfig';
|
|
3
4
|
import { EventDocument } from '../EventDocument';
|
|
5
|
+
export declare function findPendingCorrectionAction(writeActions: Action[]): RequestedCorrectionAction | undefined;
|
|
4
6
|
/**
|
|
5
7
|
* This function resolves custom flags for an event based on its actions.
|
|
6
8
|
* Flags are not stored to the event state or any database directly, instead they are always computed/evaluated from the event actions.
|
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/conditionals/index.ts
|
|
31
31
|
var conditionals_exports = {};
|
|
32
32
|
__export(conditionals_exports, {
|
|
33
|
+
always: () => always,
|
|
33
34
|
alwaysTrue: () => alwaysTrue,
|
|
34
35
|
and: () => and,
|
|
35
36
|
createFieldConditionals: () => createFieldConditionals,
|
|
@@ -454,6 +455,9 @@ function not(condition) {
|
|
|
454
455
|
function never() {
|
|
455
456
|
return not(alwaysTrue());
|
|
456
457
|
}
|
|
458
|
+
function always() {
|
|
459
|
+
return defineConditional(alwaysTrue());
|
|
460
|
+
}
|
|
457
461
|
function jsonFieldPath(field) {
|
|
458
462
|
return [field.$$field, ...field.$$subfield].join("/");
|
|
459
463
|
}
|
package/dist/events/index.js
CHANGED
|
@@ -213,6 +213,10 @@ __export(events_exports, {
|
|
|
213
213
|
UUID: () => UUID,
|
|
214
214
|
UnassignActionInput: () => UnassignActionInput,
|
|
215
215
|
UserAuditRecordInput: () => UserAuditRecordInput,
|
|
216
|
+
V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS: () => V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS,
|
|
217
|
+
V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS_MAP: () => V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS_MAP,
|
|
218
|
+
V2_DEFAULT_MOCK_LOCATIONS: () => V2_DEFAULT_MOCK_LOCATIONS,
|
|
219
|
+
V2_DEFAULT_MOCK_LOCATIONS_MAP: () => V2_DEFAULT_MOCK_LOCATIONS_MAP,
|
|
216
220
|
ValidationConfig: () => ValidationConfig,
|
|
217
221
|
VerificationActionConfig: () => VerificationActionConfig,
|
|
218
222
|
VerificationPageConfig: () => VerificationPageConfig,
|
|
@@ -234,6 +238,7 @@ __export(events_exports, {
|
|
|
234
238
|
ageToDate: () => ageToDate,
|
|
235
239
|
aggregateActionAnnotations: () => aggregateActionAnnotations,
|
|
236
240
|
aggregateActionDeclarations: () => aggregateActionDeclarations,
|
|
241
|
+
always: () => always,
|
|
237
242
|
alwaysTrue: () => alwaysTrue,
|
|
238
243
|
and: () => and,
|
|
239
244
|
annotationActions: () => annotationActions,
|
|
@@ -3136,6 +3141,9 @@ var DeduplicationConfig = z23.object({
|
|
|
3136
3141
|
id: z23.string(),
|
|
3137
3142
|
label: TranslationConfig,
|
|
3138
3143
|
query: Clause
|
|
3144
|
+
}).meta({
|
|
3145
|
+
id: "DeduplicationConfig",
|
|
3146
|
+
description: "Configuration for duplicate detection on a declare or register action. The query is built from fuzzy / strict / date-range matchers combined with and/or/not."
|
|
3139
3147
|
});
|
|
3140
3148
|
|
|
3141
3149
|
// ../commons/src/events/ActionConfig.ts
|
|
@@ -3364,7 +3372,10 @@ var Field = BaseField2.extend({
|
|
|
3364
3372
|
}).describe("Custom field defined for the summary view.");
|
|
3365
3373
|
var SummaryConfig = z27.object({
|
|
3366
3374
|
fields: z27.array(z27.union([Field, ReferenceField])).describe("Fields displayed in the event summary view.")
|
|
3367
|
-
}).
|
|
3375
|
+
}).meta({
|
|
3376
|
+
id: "SummaryConfig",
|
|
3377
|
+
description: "Configuration of the event overview page. Defines which declaration fields appear in the record summary, optionally with custom labels, empty-value messages, and templated values."
|
|
3378
|
+
});
|
|
3368
3379
|
|
|
3369
3380
|
// ../commons/src/events/AdvancedSearchConfig.ts
|
|
3370
3381
|
var z28 = __toESM(require("zod/v4"));
|
|
@@ -3488,6 +3499,9 @@ var AdvancedSearchField = z28.discriminatedUnion("fieldType", [FieldConfigSchema
|
|
|
3488
3499
|
var AdvancedSearchConfig = z28.object({
|
|
3489
3500
|
title: TranslationConfig.describe("Advanced search tab title"),
|
|
3490
3501
|
fields: z28.array(AdvancedSearchField).describe("Advanced search fields within the tab.")
|
|
3502
|
+
}).meta({
|
|
3503
|
+
id: "AdvancedSearchConfig",
|
|
3504
|
+
description: "Configuration of one advanced search tab. Each tab has a title and a list of searchable fields \u2014 either declaration fields (via `field()`) or event metadata (via `event()`)."
|
|
3491
3505
|
});
|
|
3492
3506
|
|
|
3493
3507
|
// ../commons/src/events/utils.ts
|
|
@@ -4841,6 +4855,9 @@ function not(condition) {
|
|
|
4841
4855
|
function never2() {
|
|
4842
4856
|
return not(alwaysTrue());
|
|
4843
4857
|
}
|
|
4858
|
+
function always() {
|
|
4859
|
+
return defineConditional(alwaysTrue());
|
|
4860
|
+
}
|
|
4844
4861
|
function jsonFieldPath(field3) {
|
|
4845
4862
|
return [field3.$$field, ...field3.$$subfield].join("/");
|
|
4846
4863
|
}
|
|
@@ -5786,6 +5803,9 @@ var WorkqueueColumnValue = z34.object({
|
|
|
5786
5803
|
var WorkqueueColumn = z34.object({
|
|
5787
5804
|
label: TranslationConfig,
|
|
5788
5805
|
value: WorkqueueColumnValue
|
|
5806
|
+
}).meta({
|
|
5807
|
+
id: "WorkqueueColumn",
|
|
5808
|
+
description: "Configuration for a single workqueue column. The value references an event metadata key (e.g. `dateOfEvent`, `status`, `trackingId`)."
|
|
5789
5809
|
});
|
|
5790
5810
|
function defineWorkqueuesColumns(workqueueColumns) {
|
|
5791
5811
|
return workqueueColumns.map(
|
|
@@ -5991,8 +6011,8 @@ var WorkqueueConfigWithoutQuery = WorkqueueConfig.omit({
|
|
|
5991
6011
|
var WorkqueueConfigInput = WorkqueueConfig.extend({
|
|
5992
6012
|
query: CountryConfigQueryInputType
|
|
5993
6013
|
}).meta({
|
|
5994
|
-
|
|
5995
|
-
|
|
6014
|
+
id: "WorkqueueConfig",
|
|
6015
|
+
description: "Configuration for a single workqueue. Defines the filter applied to the event index, the quick-action button, the columns shown on each row, and the message rendered when the queue is empty."
|
|
5996
6016
|
});
|
|
5997
6017
|
function defineWorkqueue(workqueueInput) {
|
|
5998
6018
|
const queryInput = workqueueInput.query;
|
|
@@ -6368,19 +6388,24 @@ var import_date_fns3 = require("date-fns");
|
|
|
6368
6388
|
function isEditInProgress(actions) {
|
|
6369
6389
|
return actions.at(-1)?.type === ActionType.EDIT;
|
|
6370
6390
|
}
|
|
6371
|
-
function
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6391
|
+
function findPendingCorrectionAction(writeActions2) {
|
|
6392
|
+
let correctionRequestAction;
|
|
6393
|
+
for (let i = writeActions2.length - 1; i >= 0; i--) {
|
|
6394
|
+
const action = writeActions2[i];
|
|
6395
|
+
if (action.status === ActionStatus.Accepted) {
|
|
6396
|
+
if (action.type === ActionType.APPROVE_CORRECTION || action.type === ActionType.REJECT_CORRECTION) {
|
|
6397
|
+
break;
|
|
6398
|
+
}
|
|
6399
|
+
if (action.type === ActionType.REQUEST_CORRECTION) {
|
|
6400
|
+
correctionRequestAction = action;
|
|
6401
|
+
break;
|
|
6402
|
+
}
|
|
6381
6403
|
}
|
|
6382
|
-
|
|
6383
|
-
|
|
6404
|
+
}
|
|
6405
|
+
return correctionRequestAction;
|
|
6406
|
+
}
|
|
6407
|
+
function isCorrectionRequested(actions) {
|
|
6408
|
+
return findPendingCorrectionAction(actions) !== void 0;
|
|
6384
6409
|
}
|
|
6385
6410
|
function isDeclarationIncomplete(actions) {
|
|
6386
6411
|
return getStatusFromActions(actions) === EventStatus.enum.NOTIFIED;
|
|
@@ -10477,3 +10502,366 @@ function getFilePathsFromEvent(event2) {
|
|
|
10477
10502
|
});
|
|
10478
10503
|
return (0, import_lodash7.uniq)(filepaths);
|
|
10479
10504
|
}
|
|
10505
|
+
|
|
10506
|
+
// ../commons/src/events/mocks.test.utils.ts
|
|
10507
|
+
var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS = [
|
|
10508
|
+
{
|
|
10509
|
+
id: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
10510
|
+
name: "Central",
|
|
10511
|
+
parentId: null,
|
|
10512
|
+
validUntil: null,
|
|
10513
|
+
externalId: "ydyJb1RAy4U1"
|
|
10514
|
+
},
|
|
10515
|
+
{
|
|
10516
|
+
id: "c599b691-fd2d-45e1-abf4-d185de727fb5",
|
|
10517
|
+
name: "Sulaka",
|
|
10518
|
+
parentId: null,
|
|
10519
|
+
validUntil: null,
|
|
10520
|
+
externalId: "pQ8nGxWmZ2Q3"
|
|
10521
|
+
},
|
|
10522
|
+
{
|
|
10523
|
+
id: "7ef2b9c7-5e6d-49f6-ae05-656207d0fc64",
|
|
10524
|
+
name: "Pualula",
|
|
10525
|
+
parentId: null,
|
|
10526
|
+
validUntil: null,
|
|
10527
|
+
externalId: "Aq91DweLmT8k"
|
|
10528
|
+
},
|
|
10529
|
+
{
|
|
10530
|
+
id: "6d1a59df-988c-4021-a846-ccbc021931a7",
|
|
10531
|
+
name: "Chuminga",
|
|
10532
|
+
parentId: null,
|
|
10533
|
+
validUntil: null,
|
|
10534
|
+
externalId: "Rw0fYNh2Xk9a"
|
|
10535
|
+
},
|
|
10536
|
+
{
|
|
10537
|
+
id: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
10538
|
+
name: "Ibombo",
|
|
10539
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
10540
|
+
validUntil: null,
|
|
10541
|
+
externalId: "k7DsP4vbN1Qe"
|
|
10542
|
+
},
|
|
10543
|
+
{
|
|
10544
|
+
id: "27160bbd-32d1-4625-812f-860226bfb92a",
|
|
10545
|
+
name: "Isango",
|
|
10546
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
10547
|
+
validUntil: null,
|
|
10548
|
+
externalId: "Gm3Z9eQpHw4L"
|
|
10549
|
+
},
|
|
10550
|
+
{
|
|
10551
|
+
id: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
10552
|
+
name: "Isamba",
|
|
10553
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
10554
|
+
validUntil: null,
|
|
10555
|
+
externalId: "sT0xVu1KqJ7r"
|
|
10556
|
+
},
|
|
10557
|
+
{
|
|
10558
|
+
id: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
10559
|
+
name: "Itambo",
|
|
10560
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
10561
|
+
validUntil: null,
|
|
10562
|
+
externalId: "Nq6Bv2HpL9Te"
|
|
10563
|
+
},
|
|
10564
|
+
{
|
|
10565
|
+
id: "d42ab2fe-e7ed-470e-8b31-4fb27f9b8250",
|
|
10566
|
+
name: "Ezhi",
|
|
10567
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
10568
|
+
validUntil: null,
|
|
10569
|
+
externalId: "xK8cQ0ZRy5Wd"
|
|
10570
|
+
},
|
|
10571
|
+
{
|
|
10572
|
+
id: "8fbd09d2-212b-47f4-beb3-5e1694931d9f",
|
|
10573
|
+
name: "Ilanga",
|
|
10574
|
+
parentId: "c599b691-fd2d-45e1-abf4-d185de727fb5",
|
|
10575
|
+
validUntil: null,
|
|
10576
|
+
externalId: "Cq4Jm1XvN8Ls"
|
|
10577
|
+
},
|
|
10578
|
+
// Villages under Ibombo (62a0ccb4-880d-4f30-8882-f256007dfff9)
|
|
10579
|
+
{
|
|
10580
|
+
id: "1d4e5f6a-7b8c-4912-8efa-345678901234",
|
|
10581
|
+
name: "Klow",
|
|
10582
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
10583
|
+
validUntil: null,
|
|
10584
|
+
externalId: "IkYcYBUcyY2"
|
|
10585
|
+
},
|
|
10586
|
+
{
|
|
10587
|
+
id: "2e5f6a7b-8c9d-4a23-8fab-456789012345",
|
|
10588
|
+
name: "Mbondo",
|
|
10589
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
10590
|
+
validUntil: null,
|
|
10591
|
+
externalId: "Qhvv5hvo3mY"
|
|
10592
|
+
},
|
|
10593
|
+
{
|
|
10594
|
+
id: "3f6a7b8c-9d0e-4b34-8abc-567890123456",
|
|
10595
|
+
name: "Ndara",
|
|
10596
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
10597
|
+
validUntil: null,
|
|
10598
|
+
externalId: "crXh068O9TR"
|
|
10599
|
+
},
|
|
10600
|
+
{
|
|
10601
|
+
id: "4a7b8c9d-0e1f-4c45-abcd-678901234567",
|
|
10602
|
+
name: "Olani",
|
|
10603
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
10604
|
+
validUntil: null,
|
|
10605
|
+
externalId: "r00It8Tvvp7"
|
|
10606
|
+
},
|
|
10607
|
+
{
|
|
10608
|
+
id: "5b8c9d0e-1f2a-4d56-bcde-789012345678",
|
|
10609
|
+
name: "Pemba",
|
|
10610
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
10611
|
+
validUntil: null,
|
|
10612
|
+
externalId: "ZnUWsbONIaH"
|
|
10613
|
+
},
|
|
10614
|
+
{
|
|
10615
|
+
id: "6c9d0e1f-2a3b-4e67-8def-890123456789",
|
|
10616
|
+
name: "Quanza",
|
|
10617
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
10618
|
+
validUntil: null,
|
|
10619
|
+
externalId: "fDZycvQTa7l"
|
|
10620
|
+
},
|
|
10621
|
+
{
|
|
10622
|
+
id: "7d0e1f2a-3b4c-4f78-8efa-901234567890",
|
|
10623
|
+
name: "Rivka",
|
|
10624
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
10625
|
+
validUntil: null,
|
|
10626
|
+
externalId: "KqswxCGTELa"
|
|
10627
|
+
},
|
|
10628
|
+
// Villages under Isamba (967032fd-3f81-478a-826c-30cb8fe121bd)
|
|
10629
|
+
{
|
|
10630
|
+
id: "8e1f2a3b-4c5d-4089-8fab-012345678901",
|
|
10631
|
+
name: "Mbula",
|
|
10632
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
10633
|
+
validUntil: null,
|
|
10634
|
+
externalId: "osEbKjRc9Kg"
|
|
10635
|
+
},
|
|
10636
|
+
{
|
|
10637
|
+
id: "9f2a3b4c-5d6e-4190-8abf-123456789012",
|
|
10638
|
+
name: "Ndoki",
|
|
10639
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
10640
|
+
validUntil: null,
|
|
10641
|
+
externalId: "aq4daBUAGr3"
|
|
10642
|
+
},
|
|
10643
|
+
{
|
|
10644
|
+
id: "0a3b4c5d-6e7f-4201-abcd-234567890123",
|
|
10645
|
+
name: "Tsanga",
|
|
10646
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
10647
|
+
validUntil: null,
|
|
10648
|
+
externalId: "cqis6Y8trbJ"
|
|
10649
|
+
},
|
|
10650
|
+
{
|
|
10651
|
+
id: "1b4c5d6e-7f8a-4312-bcde-345678901234",
|
|
10652
|
+
name: "Waziri",
|
|
10653
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
10654
|
+
validUntil: null,
|
|
10655
|
+
externalId: "LMijHPyyx6d"
|
|
10656
|
+
},
|
|
10657
|
+
{
|
|
10658
|
+
id: "2c5d6e7f-8a9b-4423-8def-456789012345",
|
|
10659
|
+
name: "Zimbi",
|
|
10660
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
10661
|
+
validUntil: null,
|
|
10662
|
+
externalId: "pcQYbPuKGZ7"
|
|
10663
|
+
},
|
|
10664
|
+
// Villages under Itambo (89a33893-b17d-481d-a26d-6461e7ac1651)
|
|
10665
|
+
{
|
|
10666
|
+
id: "3d6e7f8a-9b0c-4534-8efa-567890123456",
|
|
10667
|
+
name: "Felani",
|
|
10668
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
10669
|
+
validUntil: null,
|
|
10670
|
+
externalId: "gSqpoCGdMXp"
|
|
10671
|
+
},
|
|
10672
|
+
{
|
|
10673
|
+
id: "4e7f8a9b-0c1d-4645-8fab-678901234567",
|
|
10674
|
+
name: "Goroma",
|
|
10675
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
10676
|
+
validUntil: null,
|
|
10677
|
+
externalId: "KvAAIaNqVrp"
|
|
10678
|
+
},
|
|
10679
|
+
{
|
|
10680
|
+
id: "5f8a9b0c-1d2e-4756-8abc-789012345678",
|
|
10681
|
+
name: "Halifu",
|
|
10682
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
10683
|
+
validUntil: null,
|
|
10684
|
+
externalId: "qe4UnEVt1hv"
|
|
10685
|
+
},
|
|
10686
|
+
{
|
|
10687
|
+
id: "6a9b0c1d-2e3f-4867-abcd-890123456789",
|
|
10688
|
+
name: "Jabari",
|
|
10689
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
10690
|
+
validUntil: null,
|
|
10691
|
+
externalId: "yHH9Nz4rLOt"
|
|
10692
|
+
},
|
|
10693
|
+
{
|
|
10694
|
+
id: "7b0c1d2e-3f4a-4978-bcde-901234567890",
|
|
10695
|
+
name: "Kifani",
|
|
10696
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
10697
|
+
validUntil: null,
|
|
10698
|
+
externalId: "eSWmXIGeu1I"
|
|
10699
|
+
},
|
|
10700
|
+
{
|
|
10701
|
+
id: "8c1d2e3f-4a5b-4089-8def-012345678901",
|
|
10702
|
+
name: "Lumela",
|
|
10703
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
10704
|
+
validUntil: null,
|
|
10705
|
+
externalId: "bh0b3aI1uP3"
|
|
10706
|
+
}
|
|
10707
|
+
];
|
|
10708
|
+
var V2_DEFAULT_MOCK_LOCATIONS = [
|
|
10709
|
+
{
|
|
10710
|
+
id: "6f6186ce-cd5f-4a5f-810a-2d99e7c4ba12",
|
|
10711
|
+
name: "Central Provincial Office",
|
|
10712
|
+
locationType: "CRVS_OFFICE",
|
|
10713
|
+
administrativeAreaId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
10714
|
+
validUntil: null,
|
|
10715
|
+
externalId: "Xr3Df8WpK6Ys"
|
|
10716
|
+
},
|
|
10717
|
+
{
|
|
10718
|
+
id: "b1c2d3e4-f5a6-7890-bcde-f12345678901",
|
|
10719
|
+
name: "Central Health Post",
|
|
10720
|
+
locationType: "HEALTH_FACILITY",
|
|
10721
|
+
administrativeAreaId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
10722
|
+
validUntil: null
|
|
10723
|
+
},
|
|
10724
|
+
{
|
|
10725
|
+
id: "028d2c85-ca31-426d-b5d1-2cef545a4902",
|
|
10726
|
+
name: "Ibombo District Office",
|
|
10727
|
+
locationType: "CRVS_OFFICE",
|
|
10728
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
10729
|
+
validUntil: null,
|
|
10730
|
+
externalId: "Sm4Nw7GrD2Vy"
|
|
10731
|
+
},
|
|
10732
|
+
{
|
|
10733
|
+
id: "62a0ccb4-4f30-4f30-8882-f256007dff9f",
|
|
10734
|
+
name: "Isamba District Office",
|
|
10735
|
+
locationType: "CRVS_OFFICE",
|
|
10736
|
+
administrativeAreaId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
10737
|
+
validUntil: null,
|
|
10738
|
+
externalId: "Vg1Bq5XeH9Lt"
|
|
10739
|
+
},
|
|
10740
|
+
{
|
|
10741
|
+
id: "954c93e1-13f7-4435-bb82-35e0e215e07d",
|
|
10742
|
+
name: "Isango District Office",
|
|
10743
|
+
locationType: "CRVS_OFFICE",
|
|
10744
|
+
administrativeAreaId: "27160bbd-32d1-4625-812f-860226bfb92a",
|
|
10745
|
+
validUntil: null,
|
|
10746
|
+
externalId: "Je7Lm2XqN9Vz"
|
|
10747
|
+
},
|
|
10748
|
+
{
|
|
10749
|
+
id: "2884f5b9-17b4-49ce-bf4d-f538228935df",
|
|
10750
|
+
name: "Sulaka Provincial Office",
|
|
10751
|
+
locationType: "CRVS_OFFICE",
|
|
10752
|
+
administrativeAreaId: "c599b691-fd2d-45e1-abf4-d185de727fb5",
|
|
10753
|
+
validUntil: null,
|
|
10754
|
+
externalId: "Ht2Wp9KcX5Qv"
|
|
10755
|
+
},
|
|
10756
|
+
{
|
|
10757
|
+
id: "030358c6-54af-44be-821b-8e4af963a49c",
|
|
10758
|
+
name: "Ilanga District Office",
|
|
10759
|
+
locationType: "CRVS_OFFICE",
|
|
10760
|
+
administrativeAreaId: "8fbd09d2-212b-47f4-beb3-5e1694931d9f",
|
|
10761
|
+
validUntil: null,
|
|
10762
|
+
externalId: "Yp6Ds1WqN3Xz"
|
|
10763
|
+
},
|
|
10764
|
+
{
|
|
10765
|
+
id: "423d000f-101b-47c0-8b86-21a908067cee",
|
|
10766
|
+
name: "Chamakubi Health Post",
|
|
10767
|
+
locationType: "HEALTH_FACILITY",
|
|
10768
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
10769
|
+
validUntil: null,
|
|
10770
|
+
externalId: "M1nFr8LbC2Qy"
|
|
10771
|
+
},
|
|
10772
|
+
{
|
|
10773
|
+
id: "4d3279be-d026-420c-88f7-f0a4ae986973",
|
|
10774
|
+
name: "Ibombo Rural Health Centre",
|
|
10775
|
+
locationType: "HEALTH_FACILITY",
|
|
10776
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
10777
|
+
validUntil: null,
|
|
10778
|
+
externalId: "bT7pV6YrW0Xc"
|
|
10779
|
+
},
|
|
10780
|
+
{
|
|
10781
|
+
id: "190902f4-1d77-476a-8947-41145af1db7d",
|
|
10782
|
+
name: "Chikobo Rural Health Centre",
|
|
10783
|
+
locationType: "HEALTH_FACILITY",
|
|
10784
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
10785
|
+
validUntil: null,
|
|
10786
|
+
externalId: "zE4qPn2SgJ5d"
|
|
10787
|
+
},
|
|
10788
|
+
{
|
|
10789
|
+
id: "f5ecbd9b-a01e-4a65-910e-70e86ab41b71",
|
|
10790
|
+
name: "Chilochabalenje Health Post",
|
|
10791
|
+
locationType: "HEALTH_FACILITY",
|
|
10792
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
10793
|
+
validUntil: null,
|
|
10794
|
+
externalId: "H8vDs1MqR4Uf"
|
|
10795
|
+
},
|
|
10796
|
+
{
|
|
10797
|
+
id: "dbfc178f-7295-4b90-b28d-111c95b03127",
|
|
10798
|
+
name: "Chipeso Rural Health Centre",
|
|
10799
|
+
locationType: "HEALTH_FACILITY",
|
|
10800
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
10801
|
+
validUntil: null,
|
|
10802
|
+
externalId: "Qw3uZ9KfX6Lm"
|
|
10803
|
+
},
|
|
10804
|
+
{
|
|
10805
|
+
id: "09862bfe-c7ac-46cd-987b-668681533c80",
|
|
10806
|
+
name: "Chisamba Rural Health Centre",
|
|
10807
|
+
locationType: "HEALTH_FACILITY",
|
|
10808
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
10809
|
+
validUntil: null,
|
|
10810
|
+
externalId: "Yr0pCg8LdM2s"
|
|
10811
|
+
},
|
|
10812
|
+
{
|
|
10813
|
+
id: "834ce389-e95b-4fb0-96a0-33e9ab323059",
|
|
10814
|
+
name: "Chitanda Rural Health Centre",
|
|
10815
|
+
locationType: "HEALTH_FACILITY",
|
|
10816
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
10817
|
+
validUntil: null,
|
|
10818
|
+
externalId: "tS9gJ4PwB1Qx"
|
|
10819
|
+
},
|
|
10820
|
+
{
|
|
10821
|
+
id: "0431c433-6062-4a4c-aee9-25271aec61ee",
|
|
10822
|
+
name: "Golden Valley Rural Health Centre",
|
|
10823
|
+
locationType: "HEALTH_FACILITY",
|
|
10824
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
10825
|
+
validUntil: null,
|
|
10826
|
+
externalId: "Ld7Qm3XsA8Vr"
|
|
10827
|
+
},
|
|
10828
|
+
{
|
|
10829
|
+
id: "bc84d0b6-7ba7-480d-a339-5d9920d90eb2",
|
|
10830
|
+
name: "Ipongo Rural Health Centre",
|
|
10831
|
+
locationType: "HEALTH_FACILITY",
|
|
10832
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
10833
|
+
validUntil: null,
|
|
10834
|
+
externalId: "kF2sW9DmH0Bt"
|
|
10835
|
+
},
|
|
10836
|
+
{
|
|
10837
|
+
id: "4cf1f53b-b730-41d2-8649-dff7eeed970d",
|
|
10838
|
+
name: "Itumbwe Health Post",
|
|
10839
|
+
locationType: "HEALTH_FACILITY",
|
|
10840
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
10841
|
+
validUntil: null,
|
|
10842
|
+
externalId: "Ue5Xb3VaC7Pq"
|
|
10843
|
+
},
|
|
10844
|
+
{
|
|
10845
|
+
id: "4b3676cb-9355-4942-9eb9-2ce46acaf0e0",
|
|
10846
|
+
name: "Kabangalala Rural Health Centre",
|
|
10847
|
+
locationType: "HEALTH_FACILITY",
|
|
10848
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
10849
|
+
validUntil: null,
|
|
10850
|
+
externalId: "Pz8Kc1TqH6Jn"
|
|
10851
|
+
},
|
|
10852
|
+
// Village offices
|
|
10853
|
+
{
|
|
10854
|
+
id: "1f4a5b6c-7d8e-4312-8abc-345678901234",
|
|
10855
|
+
name: "Klow Village Office",
|
|
10856
|
+
locationType: "CRVS_OFFICE",
|
|
10857
|
+
administrativeAreaId: "1d4e5f6a-7b8c-4912-8efa-345678901234",
|
|
10858
|
+
validUntil: null,
|
|
10859
|
+
externalId: "PmAyxAJkxiJ"
|
|
10860
|
+
}
|
|
10861
|
+
];
|
|
10862
|
+
var V2_DEFAULT_MOCK_LOCATIONS_MAP = new Map(
|
|
10863
|
+
V2_DEFAULT_MOCK_LOCATIONS.map((l) => [l.id, l])
|
|
10864
|
+
);
|
|
10865
|
+
var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS_MAP = new Map(
|
|
10866
|
+
V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS.map((a) => [a.id, a])
|
|
10867
|
+
);
|
|
@@ -2621,6 +2621,9 @@ var DeduplicationConfig = z23.object({
|
|
|
2621
2621
|
id: z23.string(),
|
|
2622
2622
|
label: TranslationConfig,
|
|
2623
2623
|
query: Clause
|
|
2624
|
+
}).meta({
|
|
2625
|
+
id: "DeduplicationConfig",
|
|
2626
|
+
description: "Configuration for duplicate detection on a declare or register action. The query is built from fuzzy / strict / date-range matchers combined with and/or/not."
|
|
2624
2627
|
});
|
|
2625
2628
|
|
|
2626
2629
|
// ../commons/src/events/ActionConfig.ts
|
|
@@ -2849,7 +2852,10 @@ var Field = BaseField2.extend({
|
|
|
2849
2852
|
}).describe("Custom field defined for the summary view.");
|
|
2850
2853
|
var SummaryConfig = z27.object({
|
|
2851
2854
|
fields: z27.array(z27.union([Field, ReferenceField])).describe("Fields displayed in the event summary view.")
|
|
2852
|
-
}).
|
|
2855
|
+
}).meta({
|
|
2856
|
+
id: "SummaryConfig",
|
|
2857
|
+
description: "Configuration of the event overview page. Defines which declaration fields appear in the record summary, optionally with custom labels, empty-value messages, and templated values."
|
|
2858
|
+
});
|
|
2853
2859
|
|
|
2854
2860
|
// ../commons/src/events/AdvancedSearchConfig.ts
|
|
2855
2861
|
var z28 = __toESM(require("zod/v4"));
|
|
@@ -2973,6 +2979,9 @@ var AdvancedSearchField = z28.discriminatedUnion("fieldType", [FieldConfigSchema
|
|
|
2973
2979
|
var AdvancedSearchConfig = z28.object({
|
|
2974
2980
|
title: TranslationConfig.describe("Advanced search tab title"),
|
|
2975
2981
|
fields: z28.array(AdvancedSearchField).describe("Advanced search fields within the tab.")
|
|
2982
|
+
}).meta({
|
|
2983
|
+
id: "AdvancedSearchConfig",
|
|
2984
|
+
description: "Configuration of one advanced search tab. Each tab has a title and a list of searchable fields \u2014 either declaration fields (via `field()`) or event metadata (via `event()`)."
|
|
2976
2985
|
});
|
|
2977
2986
|
|
|
2978
2987
|
// ../commons/src/events/utils.ts
|
|
@@ -4089,6 +4098,9 @@ var WorkqueueColumnValue = z34.object({
|
|
|
4089
4098
|
var WorkqueueColumn = z34.object({
|
|
4090
4099
|
label: TranslationConfig,
|
|
4091
4100
|
value: WorkqueueColumnValue
|
|
4101
|
+
}).meta({
|
|
4102
|
+
id: "WorkqueueColumn",
|
|
4103
|
+
description: "Configuration for a single workqueue column. The value references an event metadata key (e.g. `dateOfEvent`, `status`, `trackingId`)."
|
|
4092
4104
|
});
|
|
4093
4105
|
function defineWorkqueuesColumns(workqueueColumns) {
|
|
4094
4106
|
return workqueueColumns.map(
|
|
@@ -4294,8 +4306,8 @@ var WorkqueueConfigWithoutQuery = WorkqueueConfig.omit({
|
|
|
4294
4306
|
var WorkqueueConfigInput = WorkqueueConfig.extend({
|
|
4295
4307
|
query: CountryConfigQueryInputType
|
|
4296
4308
|
}).meta({
|
|
4297
|
-
|
|
4298
|
-
|
|
4309
|
+
id: "WorkqueueConfig",
|
|
4310
|
+
description: "Configuration for a single workqueue. Defines the filter applied to the event index, the quick-action button, the columns shown on each row, and the message rendered when the queue is empty."
|
|
4299
4311
|
});
|
|
4300
4312
|
var WorkqueueCountInput = z37.array(
|
|
4301
4313
|
z37.object({ slug: z37.string(), query: QueryType })
|
|
@@ -7117,6 +7129,369 @@ var ACTION_FILTERS = {
|
|
|
7117
7129
|
// ../commons/src/events/FileUtils.ts
|
|
7118
7130
|
var import_lodash7 = require("lodash");
|
|
7119
7131
|
|
|
7132
|
+
// ../commons/src/events/mocks.test.utils.ts
|
|
7133
|
+
var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS = [
|
|
7134
|
+
{
|
|
7135
|
+
id: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7136
|
+
name: "Central",
|
|
7137
|
+
parentId: null,
|
|
7138
|
+
validUntil: null,
|
|
7139
|
+
externalId: "ydyJb1RAy4U1"
|
|
7140
|
+
},
|
|
7141
|
+
{
|
|
7142
|
+
id: "c599b691-fd2d-45e1-abf4-d185de727fb5",
|
|
7143
|
+
name: "Sulaka",
|
|
7144
|
+
parentId: null,
|
|
7145
|
+
validUntil: null,
|
|
7146
|
+
externalId: "pQ8nGxWmZ2Q3"
|
|
7147
|
+
},
|
|
7148
|
+
{
|
|
7149
|
+
id: "7ef2b9c7-5e6d-49f6-ae05-656207d0fc64",
|
|
7150
|
+
name: "Pualula",
|
|
7151
|
+
parentId: null,
|
|
7152
|
+
validUntil: null,
|
|
7153
|
+
externalId: "Aq91DweLmT8k"
|
|
7154
|
+
},
|
|
7155
|
+
{
|
|
7156
|
+
id: "6d1a59df-988c-4021-a846-ccbc021931a7",
|
|
7157
|
+
name: "Chuminga",
|
|
7158
|
+
parentId: null,
|
|
7159
|
+
validUntil: null,
|
|
7160
|
+
externalId: "Rw0fYNh2Xk9a"
|
|
7161
|
+
},
|
|
7162
|
+
{
|
|
7163
|
+
id: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7164
|
+
name: "Ibombo",
|
|
7165
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7166
|
+
validUntil: null,
|
|
7167
|
+
externalId: "k7DsP4vbN1Qe"
|
|
7168
|
+
},
|
|
7169
|
+
{
|
|
7170
|
+
id: "27160bbd-32d1-4625-812f-860226bfb92a",
|
|
7171
|
+
name: "Isango",
|
|
7172
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7173
|
+
validUntil: null,
|
|
7174
|
+
externalId: "Gm3Z9eQpHw4L"
|
|
7175
|
+
},
|
|
7176
|
+
{
|
|
7177
|
+
id: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7178
|
+
name: "Isamba",
|
|
7179
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7180
|
+
validUntil: null,
|
|
7181
|
+
externalId: "sT0xVu1KqJ7r"
|
|
7182
|
+
},
|
|
7183
|
+
{
|
|
7184
|
+
id: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7185
|
+
name: "Itambo",
|
|
7186
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7187
|
+
validUntil: null,
|
|
7188
|
+
externalId: "Nq6Bv2HpL9Te"
|
|
7189
|
+
},
|
|
7190
|
+
{
|
|
7191
|
+
id: "d42ab2fe-e7ed-470e-8b31-4fb27f9b8250",
|
|
7192
|
+
name: "Ezhi",
|
|
7193
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7194
|
+
validUntil: null,
|
|
7195
|
+
externalId: "xK8cQ0ZRy5Wd"
|
|
7196
|
+
},
|
|
7197
|
+
{
|
|
7198
|
+
id: "8fbd09d2-212b-47f4-beb3-5e1694931d9f",
|
|
7199
|
+
name: "Ilanga",
|
|
7200
|
+
parentId: "c599b691-fd2d-45e1-abf4-d185de727fb5",
|
|
7201
|
+
validUntil: null,
|
|
7202
|
+
externalId: "Cq4Jm1XvN8Ls"
|
|
7203
|
+
},
|
|
7204
|
+
// Villages under Ibombo (62a0ccb4-880d-4f30-8882-f256007dfff9)
|
|
7205
|
+
{
|
|
7206
|
+
id: "1d4e5f6a-7b8c-4912-8efa-345678901234",
|
|
7207
|
+
name: "Klow",
|
|
7208
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7209
|
+
validUntil: null,
|
|
7210
|
+
externalId: "IkYcYBUcyY2"
|
|
7211
|
+
},
|
|
7212
|
+
{
|
|
7213
|
+
id: "2e5f6a7b-8c9d-4a23-8fab-456789012345",
|
|
7214
|
+
name: "Mbondo",
|
|
7215
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7216
|
+
validUntil: null,
|
|
7217
|
+
externalId: "Qhvv5hvo3mY"
|
|
7218
|
+
},
|
|
7219
|
+
{
|
|
7220
|
+
id: "3f6a7b8c-9d0e-4b34-8abc-567890123456",
|
|
7221
|
+
name: "Ndara",
|
|
7222
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7223
|
+
validUntil: null,
|
|
7224
|
+
externalId: "crXh068O9TR"
|
|
7225
|
+
},
|
|
7226
|
+
{
|
|
7227
|
+
id: "4a7b8c9d-0e1f-4c45-abcd-678901234567",
|
|
7228
|
+
name: "Olani",
|
|
7229
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7230
|
+
validUntil: null,
|
|
7231
|
+
externalId: "r00It8Tvvp7"
|
|
7232
|
+
},
|
|
7233
|
+
{
|
|
7234
|
+
id: "5b8c9d0e-1f2a-4d56-bcde-789012345678",
|
|
7235
|
+
name: "Pemba",
|
|
7236
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7237
|
+
validUntil: null,
|
|
7238
|
+
externalId: "ZnUWsbONIaH"
|
|
7239
|
+
},
|
|
7240
|
+
{
|
|
7241
|
+
id: "6c9d0e1f-2a3b-4e67-8def-890123456789",
|
|
7242
|
+
name: "Quanza",
|
|
7243
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7244
|
+
validUntil: null,
|
|
7245
|
+
externalId: "fDZycvQTa7l"
|
|
7246
|
+
},
|
|
7247
|
+
{
|
|
7248
|
+
id: "7d0e1f2a-3b4c-4f78-8efa-901234567890",
|
|
7249
|
+
name: "Rivka",
|
|
7250
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7251
|
+
validUntil: null,
|
|
7252
|
+
externalId: "KqswxCGTELa"
|
|
7253
|
+
},
|
|
7254
|
+
// Villages under Isamba (967032fd-3f81-478a-826c-30cb8fe121bd)
|
|
7255
|
+
{
|
|
7256
|
+
id: "8e1f2a3b-4c5d-4089-8fab-012345678901",
|
|
7257
|
+
name: "Mbula",
|
|
7258
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7259
|
+
validUntil: null,
|
|
7260
|
+
externalId: "osEbKjRc9Kg"
|
|
7261
|
+
},
|
|
7262
|
+
{
|
|
7263
|
+
id: "9f2a3b4c-5d6e-4190-8abf-123456789012",
|
|
7264
|
+
name: "Ndoki",
|
|
7265
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7266
|
+
validUntil: null,
|
|
7267
|
+
externalId: "aq4daBUAGr3"
|
|
7268
|
+
},
|
|
7269
|
+
{
|
|
7270
|
+
id: "0a3b4c5d-6e7f-4201-abcd-234567890123",
|
|
7271
|
+
name: "Tsanga",
|
|
7272
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7273
|
+
validUntil: null,
|
|
7274
|
+
externalId: "cqis6Y8trbJ"
|
|
7275
|
+
},
|
|
7276
|
+
{
|
|
7277
|
+
id: "1b4c5d6e-7f8a-4312-bcde-345678901234",
|
|
7278
|
+
name: "Waziri",
|
|
7279
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7280
|
+
validUntil: null,
|
|
7281
|
+
externalId: "LMijHPyyx6d"
|
|
7282
|
+
},
|
|
7283
|
+
{
|
|
7284
|
+
id: "2c5d6e7f-8a9b-4423-8def-456789012345",
|
|
7285
|
+
name: "Zimbi",
|
|
7286
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7287
|
+
validUntil: null,
|
|
7288
|
+
externalId: "pcQYbPuKGZ7"
|
|
7289
|
+
},
|
|
7290
|
+
// Villages under Itambo (89a33893-b17d-481d-a26d-6461e7ac1651)
|
|
7291
|
+
{
|
|
7292
|
+
id: "3d6e7f8a-9b0c-4534-8efa-567890123456",
|
|
7293
|
+
name: "Felani",
|
|
7294
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7295
|
+
validUntil: null,
|
|
7296
|
+
externalId: "gSqpoCGdMXp"
|
|
7297
|
+
},
|
|
7298
|
+
{
|
|
7299
|
+
id: "4e7f8a9b-0c1d-4645-8fab-678901234567",
|
|
7300
|
+
name: "Goroma",
|
|
7301
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7302
|
+
validUntil: null,
|
|
7303
|
+
externalId: "KvAAIaNqVrp"
|
|
7304
|
+
},
|
|
7305
|
+
{
|
|
7306
|
+
id: "5f8a9b0c-1d2e-4756-8abc-789012345678",
|
|
7307
|
+
name: "Halifu",
|
|
7308
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7309
|
+
validUntil: null,
|
|
7310
|
+
externalId: "qe4UnEVt1hv"
|
|
7311
|
+
},
|
|
7312
|
+
{
|
|
7313
|
+
id: "6a9b0c1d-2e3f-4867-abcd-890123456789",
|
|
7314
|
+
name: "Jabari",
|
|
7315
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7316
|
+
validUntil: null,
|
|
7317
|
+
externalId: "yHH9Nz4rLOt"
|
|
7318
|
+
},
|
|
7319
|
+
{
|
|
7320
|
+
id: "7b0c1d2e-3f4a-4978-bcde-901234567890",
|
|
7321
|
+
name: "Kifani",
|
|
7322
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7323
|
+
validUntil: null,
|
|
7324
|
+
externalId: "eSWmXIGeu1I"
|
|
7325
|
+
},
|
|
7326
|
+
{
|
|
7327
|
+
id: "8c1d2e3f-4a5b-4089-8def-012345678901",
|
|
7328
|
+
name: "Lumela",
|
|
7329
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7330
|
+
validUntil: null,
|
|
7331
|
+
externalId: "bh0b3aI1uP3"
|
|
7332
|
+
}
|
|
7333
|
+
];
|
|
7334
|
+
var V2_DEFAULT_MOCK_LOCATIONS = [
|
|
7335
|
+
{
|
|
7336
|
+
id: "6f6186ce-cd5f-4a5f-810a-2d99e7c4ba12",
|
|
7337
|
+
name: "Central Provincial Office",
|
|
7338
|
+
locationType: "CRVS_OFFICE",
|
|
7339
|
+
administrativeAreaId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7340
|
+
validUntil: null,
|
|
7341
|
+
externalId: "Xr3Df8WpK6Ys"
|
|
7342
|
+
},
|
|
7343
|
+
{
|
|
7344
|
+
id: "b1c2d3e4-f5a6-7890-bcde-f12345678901",
|
|
7345
|
+
name: "Central Health Post",
|
|
7346
|
+
locationType: "HEALTH_FACILITY",
|
|
7347
|
+
administrativeAreaId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7348
|
+
validUntil: null
|
|
7349
|
+
},
|
|
7350
|
+
{
|
|
7351
|
+
id: "028d2c85-ca31-426d-b5d1-2cef545a4902",
|
|
7352
|
+
name: "Ibombo District Office",
|
|
7353
|
+
locationType: "CRVS_OFFICE",
|
|
7354
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7355
|
+
validUntil: null,
|
|
7356
|
+
externalId: "Sm4Nw7GrD2Vy"
|
|
7357
|
+
},
|
|
7358
|
+
{
|
|
7359
|
+
id: "62a0ccb4-4f30-4f30-8882-f256007dff9f",
|
|
7360
|
+
name: "Isamba District Office",
|
|
7361
|
+
locationType: "CRVS_OFFICE",
|
|
7362
|
+
administrativeAreaId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7363
|
+
validUntil: null,
|
|
7364
|
+
externalId: "Vg1Bq5XeH9Lt"
|
|
7365
|
+
},
|
|
7366
|
+
{
|
|
7367
|
+
id: "954c93e1-13f7-4435-bb82-35e0e215e07d",
|
|
7368
|
+
name: "Isango District Office",
|
|
7369
|
+
locationType: "CRVS_OFFICE",
|
|
7370
|
+
administrativeAreaId: "27160bbd-32d1-4625-812f-860226bfb92a",
|
|
7371
|
+
validUntil: null,
|
|
7372
|
+
externalId: "Je7Lm2XqN9Vz"
|
|
7373
|
+
},
|
|
7374
|
+
{
|
|
7375
|
+
id: "2884f5b9-17b4-49ce-bf4d-f538228935df",
|
|
7376
|
+
name: "Sulaka Provincial Office",
|
|
7377
|
+
locationType: "CRVS_OFFICE",
|
|
7378
|
+
administrativeAreaId: "c599b691-fd2d-45e1-abf4-d185de727fb5",
|
|
7379
|
+
validUntil: null,
|
|
7380
|
+
externalId: "Ht2Wp9KcX5Qv"
|
|
7381
|
+
},
|
|
7382
|
+
{
|
|
7383
|
+
id: "030358c6-54af-44be-821b-8e4af963a49c",
|
|
7384
|
+
name: "Ilanga District Office",
|
|
7385
|
+
locationType: "CRVS_OFFICE",
|
|
7386
|
+
administrativeAreaId: "8fbd09d2-212b-47f4-beb3-5e1694931d9f",
|
|
7387
|
+
validUntil: null,
|
|
7388
|
+
externalId: "Yp6Ds1WqN3Xz"
|
|
7389
|
+
},
|
|
7390
|
+
{
|
|
7391
|
+
id: "423d000f-101b-47c0-8b86-21a908067cee",
|
|
7392
|
+
name: "Chamakubi Health Post",
|
|
7393
|
+
locationType: "HEALTH_FACILITY",
|
|
7394
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7395
|
+
validUntil: null,
|
|
7396
|
+
externalId: "M1nFr8LbC2Qy"
|
|
7397
|
+
},
|
|
7398
|
+
{
|
|
7399
|
+
id: "4d3279be-d026-420c-88f7-f0a4ae986973",
|
|
7400
|
+
name: "Ibombo Rural Health Centre",
|
|
7401
|
+
locationType: "HEALTH_FACILITY",
|
|
7402
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7403
|
+
validUntil: null,
|
|
7404
|
+
externalId: "bT7pV6YrW0Xc"
|
|
7405
|
+
},
|
|
7406
|
+
{
|
|
7407
|
+
id: "190902f4-1d77-476a-8947-41145af1db7d",
|
|
7408
|
+
name: "Chikobo Rural Health Centre",
|
|
7409
|
+
locationType: "HEALTH_FACILITY",
|
|
7410
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7411
|
+
validUntil: null,
|
|
7412
|
+
externalId: "zE4qPn2SgJ5d"
|
|
7413
|
+
},
|
|
7414
|
+
{
|
|
7415
|
+
id: "f5ecbd9b-a01e-4a65-910e-70e86ab41b71",
|
|
7416
|
+
name: "Chilochabalenje Health Post",
|
|
7417
|
+
locationType: "HEALTH_FACILITY",
|
|
7418
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7419
|
+
validUntil: null,
|
|
7420
|
+
externalId: "H8vDs1MqR4Uf"
|
|
7421
|
+
},
|
|
7422
|
+
{
|
|
7423
|
+
id: "dbfc178f-7295-4b90-b28d-111c95b03127",
|
|
7424
|
+
name: "Chipeso Rural Health Centre",
|
|
7425
|
+
locationType: "HEALTH_FACILITY",
|
|
7426
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7427
|
+
validUntil: null,
|
|
7428
|
+
externalId: "Qw3uZ9KfX6Lm"
|
|
7429
|
+
},
|
|
7430
|
+
{
|
|
7431
|
+
id: "09862bfe-c7ac-46cd-987b-668681533c80",
|
|
7432
|
+
name: "Chisamba Rural Health Centre",
|
|
7433
|
+
locationType: "HEALTH_FACILITY",
|
|
7434
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7435
|
+
validUntil: null,
|
|
7436
|
+
externalId: "Yr0pCg8LdM2s"
|
|
7437
|
+
},
|
|
7438
|
+
{
|
|
7439
|
+
id: "834ce389-e95b-4fb0-96a0-33e9ab323059",
|
|
7440
|
+
name: "Chitanda Rural Health Centre",
|
|
7441
|
+
locationType: "HEALTH_FACILITY",
|
|
7442
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7443
|
+
validUntil: null,
|
|
7444
|
+
externalId: "tS9gJ4PwB1Qx"
|
|
7445
|
+
},
|
|
7446
|
+
{
|
|
7447
|
+
id: "0431c433-6062-4a4c-aee9-25271aec61ee",
|
|
7448
|
+
name: "Golden Valley Rural Health Centre",
|
|
7449
|
+
locationType: "HEALTH_FACILITY",
|
|
7450
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7451
|
+
validUntil: null,
|
|
7452
|
+
externalId: "Ld7Qm3XsA8Vr"
|
|
7453
|
+
},
|
|
7454
|
+
{
|
|
7455
|
+
id: "bc84d0b6-7ba7-480d-a339-5d9920d90eb2",
|
|
7456
|
+
name: "Ipongo Rural Health Centre",
|
|
7457
|
+
locationType: "HEALTH_FACILITY",
|
|
7458
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7459
|
+
validUntil: null,
|
|
7460
|
+
externalId: "kF2sW9DmH0Bt"
|
|
7461
|
+
},
|
|
7462
|
+
{
|
|
7463
|
+
id: "4cf1f53b-b730-41d2-8649-dff7eeed970d",
|
|
7464
|
+
name: "Itumbwe Health Post",
|
|
7465
|
+
locationType: "HEALTH_FACILITY",
|
|
7466
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7467
|
+
validUntil: null,
|
|
7468
|
+
externalId: "Ue5Xb3VaC7Pq"
|
|
7469
|
+
},
|
|
7470
|
+
{
|
|
7471
|
+
id: "4b3676cb-9355-4942-9eb9-2ce46acaf0e0",
|
|
7472
|
+
name: "Kabangalala Rural Health Centre",
|
|
7473
|
+
locationType: "HEALTH_FACILITY",
|
|
7474
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7475
|
+
validUntil: null,
|
|
7476
|
+
externalId: "Pz8Kc1TqH6Jn"
|
|
7477
|
+
},
|
|
7478
|
+
// Village offices
|
|
7479
|
+
{
|
|
7480
|
+
id: "1f4a5b6c-7d8e-4312-8abc-345678901234",
|
|
7481
|
+
name: "Klow Village Office",
|
|
7482
|
+
locationType: "CRVS_OFFICE",
|
|
7483
|
+
administrativeAreaId: "1d4e5f6a-7b8c-4912-8efa-345678901234",
|
|
7484
|
+
validUntil: null,
|
|
7485
|
+
externalId: "PmAyxAJkxiJ"
|
|
7486
|
+
}
|
|
7487
|
+
];
|
|
7488
|
+
var V2_DEFAULT_MOCK_LOCATIONS_MAP = new Map(
|
|
7489
|
+
V2_DEFAULT_MOCK_LOCATIONS.map((l) => [l.id, l])
|
|
7490
|
+
);
|
|
7491
|
+
var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS_MAP = new Map(
|
|
7492
|
+
V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS.map((a) => [a.id, a])
|
|
7493
|
+
);
|
|
7494
|
+
|
|
7120
7495
|
// ../commons/src/notification/UserNotifications.ts
|
|
7121
7496
|
var z44 = __toESM(require("zod/v4"));
|
|
7122
7497
|
var TriggerEvent = {
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencrvs/toolkit",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.a72e073",
|
|
4
4
|
"description": "OpenCRVS toolkit for building country configurations",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"bin": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"jwt-decode": "^3.0.0",
|
|
34
34
|
"lodash": "^4.17.10",
|
|
35
35
|
"object-hash": "^3.0.0",
|
|
36
|
-
"qs": "6.
|
|
36
|
+
"qs": "6.15.2",
|
|
37
37
|
"superjson": "1.9.0-0",
|
|
38
38
|
"ts-morph": "^27.0.2",
|
|
39
39
|
"uuid": "^9.0.0",
|
|
Binary file
|