@opencrvs/toolkit 2.0.0-rc.a928ed6 → 2.0.0-rc.aa3ef7c
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/package.json +12 -2
- package/dist/application-config/index.js +27 -14
- package/dist/cli.js +3 -1
- package/dist/commons/api/router.d.ts +14 -3
- package/dist/commons/events/ActionInput.d.ts +36 -36
- package/dist/commons/events/Draft.d.ts +2 -3
- package/dist/commons/events/index.d.ts +1 -0
- package/dist/conditionals/index.js +3 -1
- package/dist/events/index.js +456 -33
- package/dist/migrations/v2.0/index.js +3 -1
- package/dist/notification/index.js +452 -33
- package/dist/scopes/index.js +3 -1
- package/opencrvs-toolkit-2.0.0-rc.aa3ef7c.tgz +0 -0
- package/package.json +5 -1
- package/opencrvs-toolkit-2.0.0-rc.a928ed6.tgz +0 -0
|
@@ -293,7 +293,9 @@ var ScopeType = z2.enum([
|
|
|
293
293
|
var EncodedScope = z2.string().brand("EncodedScope");
|
|
294
294
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
295
295
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
296
|
-
accessLevel: JurisdictionFilter.enum.all
|
|
296
|
+
accessLevel: JurisdictionFilter.enum.all,
|
|
297
|
+
registeredIn: JurisdictionFilter.enum.all,
|
|
298
|
+
declaredIn: JurisdictionFilter.enum.all
|
|
297
299
|
};
|
|
298
300
|
|
|
299
301
|
// ../commons/src/authentication.ts
|
|
@@ -653,8 +655,8 @@ var ActionConditional = z7.discriminatedUnion("type", [
|
|
|
653
655
|
// Action can be shown to the user in the list but as disabled
|
|
654
656
|
EnableConditional
|
|
655
657
|
]).meta({
|
|
656
|
-
|
|
657
|
-
|
|
658
|
+
id: "ActionConditional",
|
|
659
|
+
description: "Conditional gating whether an action is shown (SHOW) or enabled (ENABLE). When omitted from an action, the action is shown and enabled for everyone."
|
|
658
660
|
});
|
|
659
661
|
var DisplayOnReviewConditional = z7.object({
|
|
660
662
|
type: z7.literal(ConditionalType.DISPLAY_ON_REVIEW),
|
|
@@ -670,8 +672,8 @@ var FieldConditional = z7.discriminatedUnion("type", [
|
|
|
670
672
|
// Field output can be shown / hidden on the review page
|
|
671
673
|
DisplayOnReviewConditional
|
|
672
674
|
]).meta({
|
|
673
|
-
|
|
674
|
-
|
|
675
|
+
id: "FieldConditional",
|
|
676
|
+
description: "Conditional gating whether a form field is shown (SHOW), enabled (ENABLE), or displayed on the review page (DISPLAY_ON_REVIEW). When omitted, the field is shown and enabled for everyone, and is displayed on review whenever it has a value."
|
|
675
677
|
});
|
|
676
678
|
|
|
677
679
|
// ../commons/src/events/FieldType.ts
|
|
@@ -1307,8 +1309,8 @@ var FlagConfig = z15.object({
|
|
|
1307
1309
|
),
|
|
1308
1310
|
label: TranslationConfig.describe("Human readable label of the flag.")
|
|
1309
1311
|
}).meta({
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
+
id: "FlagConfig",
|
|
1313
|
+
description: "Configuration for a custom flag that can be added to or removed from records by event actions."
|
|
1312
1314
|
});
|
|
1313
1315
|
var ActionFlagConfig = z15.object({
|
|
1314
1316
|
id: Flag,
|
|
@@ -1317,8 +1319,8 @@ var ActionFlagConfig = z15.object({
|
|
|
1317
1319
|
"When conditional is met, the operation is performed on the flag. If not provided, the operation is performed unconditionally."
|
|
1318
1320
|
)
|
|
1319
1321
|
}).meta({
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
+
id: "ActionFlagConfig",
|
|
1323
|
+
description: "Add or remove operation applied to a flag when the parent action is accepted. Optionally gated by a conditional."
|
|
1322
1324
|
});
|
|
1323
1325
|
|
|
1324
1326
|
// ../commons/src/events/EventMetadata.ts
|
|
@@ -1666,8 +1668,15 @@ var FieldReference = import_v43.default.object({
|
|
|
1666
1668
|
)
|
|
1667
1669
|
}).describe("Reference to a field by its ID");
|
|
1668
1670
|
var ValidationConfig = import_v43.default.object({
|
|
1669
|
-
validator: Conditional
|
|
1670
|
-
|
|
1671
|
+
validator: Conditional.describe(
|
|
1672
|
+
"Conditional expression that must hold for the field value to be considered valid."
|
|
1673
|
+
),
|
|
1674
|
+
message: TranslationConfig.describe(
|
|
1675
|
+
"Error message displayed when the validator does not hold."
|
|
1676
|
+
)
|
|
1677
|
+
}).meta({
|
|
1678
|
+
id: "ValidationConfig",
|
|
1679
|
+
description: "Validation rule applied to a form field. The validator is a conditional expression that must hold for the field value to be considered valid."
|
|
1671
1680
|
});
|
|
1672
1681
|
var requiredSchema = import_v43.default.union([
|
|
1673
1682
|
import_v43.default.boolean(),
|
|
@@ -2257,17 +2266,21 @@ var HttpField = BaseField.extend({
|
|
|
2257
2266
|
var AutocompleteField = BaseField.extend({
|
|
2258
2267
|
type: import_v43.default.literal(FieldType.AUTOCOMPLETE),
|
|
2259
2268
|
configuration: import_v43.default.object({
|
|
2260
|
-
url: import_v43.default.string().describe(
|
|
2269
|
+
url: import_v43.default.string().describe(
|
|
2270
|
+
"URL to fetch autocomplete suggestions from. This should be a country config server endpoint."
|
|
2271
|
+
).optional(),
|
|
2261
2272
|
method: import_v43.default.enum(["GET", "POST"]).default("GET").optional(),
|
|
2262
2273
|
defaultOptions: import_v43.default.array(
|
|
2263
2274
|
import_v43.default.object({
|
|
2264
2275
|
label: import_v43.default.string(),
|
|
2265
2276
|
value: import_v43.default.string()
|
|
2266
2277
|
})
|
|
2267
|
-
).optional()
|
|
2278
|
+
).optional().describe(
|
|
2279
|
+
"Manual entry is supported through configuration, allowing users to provide values not currently represented in the dataset."
|
|
2280
|
+
)
|
|
2268
2281
|
})
|
|
2269
2282
|
}).meta({
|
|
2270
|
-
description: "
|
|
2283
|
+
description: "Generic autocomplete component designed for use with large dictionary-based datasets. The component supports dynamic retrieval of options from configurable data sources and is intended for datasets that may contain tens or hundreds of thousands of records.",
|
|
2271
2284
|
id: "AutocompleteField"
|
|
2272
2285
|
});
|
|
2273
2286
|
var SearchField = HttpField.extend({
|
|
@@ -2497,15 +2510,18 @@ var VerificationPageConfig = FormPageConfig.extend({
|
|
|
2497
2510
|
actions: VerificationActionConfig
|
|
2498
2511
|
});
|
|
2499
2512
|
var PageConfig = z21.discriminatedUnion("type", [FormPageConfig, VerificationPageConfig]).meta({
|
|
2500
|
-
|
|
2501
|
-
|
|
2513
|
+
id: "PageConfig",
|
|
2514
|
+
description: "Configuration for a single page in a form. Either a form page with fields and a continue button, or a verification page with verify/cancel options."
|
|
2502
2515
|
});
|
|
2503
2516
|
|
|
2504
2517
|
// ../commons/src/events/FormConfig.ts
|
|
2505
2518
|
var DeclarationFormConfig = z22.object({
|
|
2506
2519
|
label: TranslationConfig.describe("Human readable description of the form"),
|
|
2507
2520
|
pages: z22.array(FormPageConfig)
|
|
2508
|
-
}).
|
|
2521
|
+
}).meta({
|
|
2522
|
+
id: "DeclarationFormConfig",
|
|
2523
|
+
description: "Configuration of the declaration form."
|
|
2524
|
+
});
|
|
2509
2525
|
var ActionFormConfig = z22.object({
|
|
2510
2526
|
label: TranslationConfig.describe("Human readable description of the form"),
|
|
2511
2527
|
pages: z22.array(PageConfig)
|
|
@@ -2605,6 +2621,9 @@ var DeduplicationConfig = z23.object({
|
|
|
2605
2621
|
id: z23.string(),
|
|
2606
2622
|
label: TranslationConfig,
|
|
2607
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."
|
|
2608
2627
|
});
|
|
2609
2628
|
|
|
2610
2629
|
// ../commons/src/events/ActionConfig.ts
|
|
@@ -2722,17 +2741,42 @@ var ActionConfig = z24.discriminatedUnion("type", [
|
|
|
2722
2741
|
* OpenAPI references are defined here so our generated OpenAPI spec knows to reuse the models
|
|
2723
2742
|
* and treat them as "models" instead of duplicating the data structure in each endpoint.
|
|
2724
2743
|
*/
|
|
2725
|
-
ReadActionConfig.meta({
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2744
|
+
ReadActionConfig.meta({
|
|
2745
|
+
id: "ReadActionConfig",
|
|
2746
|
+
description: "Configuration for the read action \u2014 defines the record-tab content displayed on the event overview page."
|
|
2747
|
+
}),
|
|
2748
|
+
DeclareConfig.meta({
|
|
2749
|
+
id: "DeclareActionConfig",
|
|
2750
|
+
description: "Configuration for the declare action. Includes review-page fields. Shared with the notify action (ActionType.NOTIFY)."
|
|
2751
|
+
}),
|
|
2752
|
+
RejectConfig.meta({
|
|
2753
|
+
id: "RejectActionConfig",
|
|
2754
|
+
description: "Configuration for rejecting a record before registration."
|
|
2755
|
+
}),
|
|
2756
|
+
RegisterConfig.meta({
|
|
2757
|
+
id: "RegisterActionConfig",
|
|
2758
|
+
description: "Configuration for registering a record."
|
|
2759
|
+
}),
|
|
2729
2760
|
PrintCertificateActionConfig.meta({
|
|
2730
|
-
id: "PrintCertificateActionConfig"
|
|
2761
|
+
id: "PrintCertificateActionConfig",
|
|
2762
|
+
description: "Configuration for printing a certificate of a registered record."
|
|
2763
|
+
}),
|
|
2764
|
+
RequestCorrectionConfig.meta({
|
|
2765
|
+
id: "RequestCorrectionActionConfig",
|
|
2766
|
+
description: "Configuration for requesting a correction on a registered record."
|
|
2767
|
+
}),
|
|
2768
|
+
EditActionConfig.meta({
|
|
2769
|
+
id: "EditActionConfig",
|
|
2770
|
+
description: "Configuration for editing a record before registration."
|
|
2771
|
+
}),
|
|
2772
|
+
ArchiveConfig.meta({
|
|
2773
|
+
id: "ArchiveActionConfig",
|
|
2774
|
+
description: "Configuration for archiving a record."
|
|
2731
2775
|
}),
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2776
|
+
CustomActionConfig.meta({
|
|
2777
|
+
id: "CustomActionConfig",
|
|
2778
|
+
description: "Configuration for a country-defined custom action. An event may include any number of these."
|
|
2779
|
+
})
|
|
2736
2780
|
]).describe(
|
|
2737
2781
|
"Configuration of an action available for an event. Data collected depends on the action type and is accessible through the annotation property in ActionDocument."
|
|
2738
2782
|
).meta({ id: "ActionConfig" });
|
|
@@ -2808,7 +2852,10 @@ var Field = BaseField2.extend({
|
|
|
2808
2852
|
}).describe("Custom field defined for the summary view.");
|
|
2809
2853
|
var SummaryConfig = z27.object({
|
|
2810
2854
|
fields: z27.array(z27.union([Field, ReferenceField])).describe("Fields displayed in the event summary view.")
|
|
2811
|
-
}).
|
|
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
|
+
});
|
|
2812
2859
|
|
|
2813
2860
|
// ../commons/src/events/AdvancedSearchConfig.ts
|
|
2814
2861
|
var z28 = __toESM(require("zod/v4"));
|
|
@@ -2932,6 +2979,9 @@ var AdvancedSearchField = z28.discriminatedUnion("fieldType", [FieldConfigSchema
|
|
|
2932
2979
|
var AdvancedSearchConfig = z28.object({
|
|
2933
2980
|
title: TranslationConfig.describe("Advanced search tab title"),
|
|
2934
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()`)."
|
|
2935
2985
|
});
|
|
2936
2986
|
|
|
2937
2987
|
// ../commons/src/events/utils.ts
|
|
@@ -3824,8 +3874,9 @@ var EventConfig = _EventConfigBase.superRefine((event2, ctx) => {
|
|
|
3824
3874
|
validateActionFlags(event2, ctx);
|
|
3825
3875
|
validateActionOrder(event2, ctx);
|
|
3826
3876
|
}).meta({
|
|
3827
|
-
id: "EventConfig"
|
|
3828
|
-
|
|
3877
|
+
id: "EventConfig",
|
|
3878
|
+
description: "Configuration defining an event type registered in OpenCRVS (for example birth or death)."
|
|
3879
|
+
});
|
|
3829
3880
|
|
|
3830
3881
|
// ../commons/src/events/EventConfigInput.ts
|
|
3831
3882
|
var defineDeclarationForm = (form) => DeclarationFormConfig.parse(form);
|
|
@@ -4047,6 +4098,9 @@ var WorkqueueColumnValue = z34.object({
|
|
|
4047
4098
|
var WorkqueueColumn = z34.object({
|
|
4048
4099
|
label: TranslationConfig,
|
|
4049
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`)."
|
|
4050
4104
|
});
|
|
4051
4105
|
function defineWorkqueuesColumns(workqueueColumns) {
|
|
4052
4106
|
return workqueueColumns.map(
|
|
@@ -4252,8 +4306,8 @@ var WorkqueueConfigWithoutQuery = WorkqueueConfig.omit({
|
|
|
4252
4306
|
var WorkqueueConfigInput = WorkqueueConfig.extend({
|
|
4253
4307
|
query: CountryConfigQueryInputType
|
|
4254
4308
|
}).meta({
|
|
4255
|
-
|
|
4256
|
-
|
|
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."
|
|
4257
4311
|
});
|
|
4258
4312
|
var WorkqueueCountInput = z37.array(
|
|
4259
4313
|
z37.object({ slug: z37.string(), query: QueryType })
|
|
@@ -4295,7 +4349,9 @@ var BaseActionInput = z38.object({
|
|
|
4295
4349
|
keepAssignment: z38.boolean().optional(),
|
|
4296
4350
|
keepAssignmentIfAccepted: z38.boolean().optional(),
|
|
4297
4351
|
keepAssignmentIfRejected: z38.boolean().optional(),
|
|
4298
|
-
waitFor: z38.boolean().
|
|
4352
|
+
waitFor: z38.boolean().default(true).describe(
|
|
4353
|
+
"Whether action waits for the indexing before returning. Defaults to true. Setting this to to false completes faster but might lead to stale data in the client if the client tries to read the event immediately after performing the action. Use with care."
|
|
4354
|
+
),
|
|
4299
4355
|
// For normal users, the createdAtLocation is resolved on the backend from the user's primaryOfficeId.
|
|
4300
4356
|
// @TODO: createdAtLocation should be limited to actions that system users can perform. For normal users, it should not be part of the base action.
|
|
4301
4357
|
createdAtLocation: UUID.nullish().describe(
|
|
@@ -4475,7 +4531,7 @@ var Draft = z39.object({
|
|
|
4475
4531
|
}).describe(
|
|
4476
4532
|
"A temporary storage for an action. Stored with details of the event, creator and creation time."
|
|
4477
4533
|
);
|
|
4478
|
-
var DraftInput = BaseActionInput.extend({
|
|
4534
|
+
var DraftInput = BaseActionInput.omit({ waitFor: true }).extend({
|
|
4479
4535
|
type: ActionTypes.exclude([ActionTypes.enum.DELETE]),
|
|
4480
4536
|
status: z39.enum([
|
|
4481
4537
|
ActionStatus.Requested,
|
|
@@ -7073,6 +7129,369 @@ var ACTION_FILTERS = {
|
|
|
7073
7129
|
// ../commons/src/events/FileUtils.ts
|
|
7074
7130
|
var import_lodash7 = require("lodash");
|
|
7075
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
|
+
|
|
7076
7495
|
// ../commons/src/notification/UserNotifications.ts
|
|
7077
7496
|
var z44 = __toESM(require("zod/v4"));
|
|
7078
7497
|
var TriggerEvent = {
|
package/dist/scopes/index.js
CHANGED
|
@@ -365,7 +365,9 @@ var decodeScope = (query) => {
|
|
|
365
365
|
};
|
|
366
366
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
367
367
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
368
|
-
accessLevel: JurisdictionFilter.enum.all
|
|
368
|
+
accessLevel: JurisdictionFilter.enum.all,
|
|
369
|
+
registeredIn: JurisdictionFilter.enum.all,
|
|
370
|
+
declaredIn: JurisdictionFilter.enum.all
|
|
369
371
|
};
|
|
370
372
|
function getScopeOptionValue(scope, option) {
|
|
371
373
|
const options = "options" in scope ? scope.options : void 0;
|
|
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.aa3ef7c",
|
|
4
4
|
"description": "OpenCRVS toolkit for building country configurations",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"bin": {
|
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
"build": "./build.sh",
|
|
21
21
|
"build:all": "lerna run build --include-dependencies --scope @opencrvs/toolkit && ./build.sh"
|
|
22
22
|
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/opencrvs/opencrvs-core.git"
|
|
26
|
+
},
|
|
23
27
|
"dependencies": {
|
|
24
28
|
"@trpc/client": "11.4.3",
|
|
25
29
|
"@trpc/server": "^11.8.0",
|
|
Binary file
|