@opencrvs/toolkit 2.1.0-rc.83d4009 → 2.1.0-rc.86244fb
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/dist/application-config/index.js +0 -1
- package/dist/commons/api/router.d.ts +1516 -1706
- package/dist/commons/application-config/index.d.ts +6 -6
- package/dist/commons/conditionals/conditionals.d.ts +2102 -259
- package/dist/commons/events/ActionConfig.d.ts +105 -105
- package/dist/commons/events/ActionDocument.d.ts +113 -113
- package/dist/commons/events/ActionType.d.ts +62 -62
- package/dist/commons/events/AdvancedSearchConfig.d.ts +507 -513
- package/dist/commons/events/AuditLog.d.ts +42 -118
- package/dist/commons/events/CompositeFieldValue.d.ts +4 -4
- package/dist/commons/events/Conditional.d.ts +3 -3
- package/dist/commons/events/CountryConfigQueryInput.d.ts +590 -590
- package/dist/commons/events/Draft.d.ts +37 -37
- package/dist/commons/events/DynamicFieldValue.d.ts +9 -9
- package/dist/commons/events/EventConfig.d.ts +5 -5
- package/dist/commons/events/EventDocument.d.ts +46 -46
- package/dist/commons/events/EventIndex.d.ts +62 -62
- package/dist/commons/events/EventMetadata.d.ts +40 -40
- package/dist/commons/events/FieldConfig.d.ts +337 -342
- package/dist/commons/events/FieldType.d.ts +51 -51
- package/dist/commons/events/FieldTypeMapping.d.ts +100 -100
- package/dist/commons/events/FieldValue.d.ts +12 -12
- package/dist/commons/events/Flag.d.ts +15 -15
- package/dist/commons/events/TemplateConfig.d.ts +1 -1
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +40 -40
- package/dist/commons/events/WorkqueueConfig.d.ts +820 -820
- package/dist/commons/events/deduplication.d.ts +1 -1
- package/dist/commons/events/event.d.ts +2 -2
- package/dist/commons/events/field.d.ts +895 -78
- package/dist/commons/events/index.d.ts +0 -1
- package/dist/commons/events/locations.d.ts +6 -103
- package/dist/commons/events/mocks.test.utils.d.ts +4 -18
- package/dist/commons/events/scopes.d.ts +4 -4
- package/dist/commons/events/state/index.d.ts +17 -17
- package/dist/commons/events/state/utils.d.ts +7 -7
- package/dist/commons/events/test.utils.d.ts +40 -40
- package/dist/commons/events/utils.d.ts +114 -114
- package/dist/commons/notification/UserNotifications.d.ts +10 -10
- package/dist/conditionals/index.js +0 -1
- package/dist/environment/derived-variables.d.ts +119 -119
- package/dist/environment/derived-variables.d.ts.map +1 -1
- package/dist/environment/logger.d.ts.map +1 -1
- package/dist/environment/questions.d.ts +74 -75
- package/dist/environment/questions.d.ts.map +1 -1
- package/dist/environment/setup-environment.js +14 -8
- package/dist/environment/utils.d.ts +1 -1
- package/dist/events/deduplication.d.ts +1 -1
- package/dist/events/index.js +52 -176
- package/dist/migrations/v2.0/migrate-application-config-url.js +3 -4
- package/dist/notification/index.js +77 -173
- package/dist/scopes/index.d.ts +146 -148
- package/dist/scopes/index.js +0 -1
- package/opencrvs-toolkit-2.1.0-rc.86244fb.tgz +0 -0
- package/package.json +4 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/commons/events/locationPayloads.d.ts +0 -95
- package/opencrvs-toolkit-2.1.0-rc.83d4009.tgz +0 -0
package/dist/events/index.js
CHANGED
|
@@ -80,8 +80,6 @@ __export(events_exports, {
|
|
|
80
80
|
ConditionalType: () => ConditionalType,
|
|
81
81
|
ConfirmableActions: () => ConfirmableActions,
|
|
82
82
|
ContainsFlags: () => ContainsFlags,
|
|
83
|
-
CreateAdministrativeAreaPayload: () => CreateAdministrativeAreaPayload,
|
|
84
|
-
CreateLocationPayload: () => CreateLocationPayload,
|
|
85
83
|
CustomActionInput: () => CustomActionInput,
|
|
86
84
|
CustomFieldValue: () => CustomFieldValue,
|
|
87
85
|
CustomFlag: () => CustomFlag,
|
|
@@ -163,9 +161,7 @@ __export(events_exports, {
|
|
|
163
161
|
LanguageConfig: () => LanguageConfig,
|
|
164
162
|
LegalStatuses: () => LegalStatuses,
|
|
165
163
|
Location: () => Location,
|
|
166
|
-
LocationStatus: () => LocationStatus,
|
|
167
164
|
LocationTypeV1: () => LocationTypeV1,
|
|
168
|
-
LocationVersion: () => LocationVersion,
|
|
169
165
|
METADATA_FIELD_PREFIX: () => METADATA_FIELD_PREFIX,
|
|
170
166
|
MarkAsDuplicateActionInput: () => MarkAsDuplicateActionInput,
|
|
171
167
|
MarkNotDuplicateActionInput: () => MarkNotDuplicateActionInput,
|
|
@@ -205,8 +201,6 @@ __export(events_exports, {
|
|
|
205
201
|
SelectDateRangeOption: () => SelectDateRangeOption,
|
|
206
202
|
SelectDateRangeValue: () => SelectDateRangeValue,
|
|
207
203
|
SelectOption: () => SelectOption,
|
|
208
|
-
SetAdministrativeAreaPayload: () => SetAdministrativeAreaPayload,
|
|
209
|
-
SetLocationPayload: () => SetLocationPayload,
|
|
210
204
|
ShowConditional: () => ShowConditional,
|
|
211
205
|
SignatureFieldValue: () => SignatureFieldValue,
|
|
212
206
|
StaticDataEntry: () => StaticDataEntry,
|
|
@@ -222,8 +216,6 @@ __export(events_exports, {
|
|
|
222
216
|
UUID: () => UUID,
|
|
223
217
|
UnarchiveActionInput: () => UnarchiveActionInput,
|
|
224
218
|
UnassignActionInput: () => UnassignActionInput,
|
|
225
|
-
UpdateAdministrativeAreaPayload: () => UpdateAdministrativeAreaPayload,
|
|
226
|
-
UpdateLocationPayload: () => UpdateLocationPayload,
|
|
227
219
|
UserAuditRecordInput: () => UserAuditRecordInput,
|
|
228
220
|
V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS: () => V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS,
|
|
229
221
|
V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS_MAP: () => V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS_MAP,
|
|
@@ -233,8 +225,6 @@ __export(events_exports, {
|
|
|
233
225
|
VerificationActionConfig: () => VerificationActionConfig,
|
|
234
226
|
VerificationPageConfig: () => VerificationPageConfig,
|
|
235
227
|
VerificationStatusValue: () => VerificationStatusValue,
|
|
236
|
-
WithdrawAdministrativeAreaVersionPayload: () => WithdrawAdministrativeAreaVersionPayload,
|
|
237
|
-
WithdrawLocationVersionPayload: () => WithdrawLocationVersionPayload,
|
|
238
228
|
Within: () => Within,
|
|
239
229
|
WorkqueueActionType: () => WorkqueueActionType,
|
|
240
230
|
WorkqueueColumn: () => WorkqueueColumn,
|
|
@@ -353,7 +343,6 @@ __export(events_exports, {
|
|
|
353
343
|
getStatusFromActions: () => getStatusFromActions,
|
|
354
344
|
getValidatorsForField: () => getValidatorsForField,
|
|
355
345
|
getVisibleVerificationPageIds: () => getVisibleVerificationPageIds,
|
|
356
|
-
hasActiveExternalIdOnOrAfter: () => hasActiveExternalIdOnOrAfter,
|
|
357
346
|
hasAnyOfScopes: () => hasAnyOfScopes,
|
|
358
347
|
isActionAvailable: () => isActionAvailable,
|
|
359
348
|
isActionConfigType: () => isActionConfigType,
|
|
@@ -444,7 +433,6 @@ __export(events_exports, {
|
|
|
444
433
|
resolveDateOfEvent: () => resolveDateOfEvent,
|
|
445
434
|
resolveEventCustomFlags: () => resolveEventCustomFlags,
|
|
446
435
|
resolvePlaceOfEvent: () => resolvePlaceOfEvent,
|
|
447
|
-
resolveVersion: () => resolveVersion,
|
|
448
436
|
runClientFunction: () => runClientFunction,
|
|
449
437
|
runFieldValidations: () => runFieldValidations,
|
|
450
438
|
runStructuralValidations: () => runStructuralValidations,
|
|
@@ -512,7 +500,6 @@ var PlainScopeType = z2.enum([
|
|
|
512
500
|
"integration.create",
|
|
513
501
|
"record.import",
|
|
514
502
|
"config.update-all",
|
|
515
|
-
"location.edit",
|
|
516
503
|
"attachment.upload",
|
|
517
504
|
"profile.electronic-signature",
|
|
518
505
|
"user.read-only-my-audit",
|
|
@@ -995,57 +982,6 @@ var IntegrationRefreshSecretEntrySchema = AuditLogEntryBase.extend({
|
|
|
995
982
|
requestData: z5.object({ id: z5.string() }),
|
|
996
983
|
responseSummary: z5.object({ clientId: z5.string() })
|
|
997
984
|
});
|
|
998
|
-
var createdVersionFields = {
|
|
999
|
-
id: z5.string(),
|
|
1000
|
-
versionId: z5.string(),
|
|
1001
|
-
name: z5.string(),
|
|
1002
|
-
externalId: z5.string().nullish(),
|
|
1003
|
-
effectiveFrom: z5.string(),
|
|
1004
|
-
status: z5.string()
|
|
1005
|
-
};
|
|
1006
|
-
var LocationCreateEntrySchema = AuditLogEntryBase.extend({
|
|
1007
|
-
operation: z5.literal("locations.create"),
|
|
1008
|
-
requestData: z5.object({
|
|
1009
|
-
...createdVersionFields,
|
|
1010
|
-
administrativeAreaId: z5.string().nullish(),
|
|
1011
|
-
locationType: z5.string().nullish()
|
|
1012
|
-
})
|
|
1013
|
-
});
|
|
1014
|
-
var AdministrativeAreaCreateEntrySchema = AuditLogEntryBase.extend({
|
|
1015
|
-
operation: z5.literal("administrativeAreas.create"),
|
|
1016
|
-
requestData: z5.object({
|
|
1017
|
-
...createdVersionFields,
|
|
1018
|
-
parentId: z5.string().nullish()
|
|
1019
|
-
})
|
|
1020
|
-
});
|
|
1021
|
-
var ChangedStringField = z5.object({ from: z5.string(), to: z5.string() });
|
|
1022
|
-
var ChangedNullableStringField = z5.object({
|
|
1023
|
-
from: z5.string().nullable(),
|
|
1024
|
-
to: z5.string().nullable()
|
|
1025
|
-
});
|
|
1026
|
-
var LocationUpdateEntrySchema = AuditLogEntryBase.extend({
|
|
1027
|
-
operation: z5.enum(["locations.update", "administrativeAreas.update"]),
|
|
1028
|
-
/** The submitted snapshot, with server-resolved `versionId`/`effectiveFrom`. */
|
|
1029
|
-
requestData: z5.object({
|
|
1030
|
-
id: z5.string(),
|
|
1031
|
-
versionId: z5.string(),
|
|
1032
|
-
name: z5.string(),
|
|
1033
|
-
externalId: z5.string().nullish(),
|
|
1034
|
-
status: z5.string(),
|
|
1035
|
-
effectiveFrom: z5.string(),
|
|
1036
|
-
lastVersionId: z5.string()
|
|
1037
|
-
}),
|
|
1038
|
-
/** The diff against the previous version — only fields that changed. */
|
|
1039
|
-
responseSummary: z5.object({
|
|
1040
|
-
previousVersionId: z5.string(),
|
|
1041
|
-
versionId: z5.string(),
|
|
1042
|
-
changed: z5.object({
|
|
1043
|
-
name: ChangedStringField.optional(),
|
|
1044
|
-
externalId: ChangedNullableStringField.optional(),
|
|
1045
|
-
status: ChangedStringField.optional()
|
|
1046
|
-
})
|
|
1047
|
-
})
|
|
1048
|
-
});
|
|
1049
985
|
var AttachmentUploadEntrySchema = AuditLogEntryBase.extend({
|
|
1050
986
|
operation: z5.literal("attachments.upload"),
|
|
1051
987
|
requestData: z5.object({
|
|
@@ -1121,9 +1057,6 @@ var AuditLogEntrySchema = z5.discriminatedUnion("operation", [
|
|
|
1121
1057
|
IntegrationActivateEntrySchema,
|
|
1122
1058
|
IntegrationDeleteEntrySchema,
|
|
1123
1059
|
IntegrationRefreshSecretEntrySchema,
|
|
1124
|
-
LocationCreateEntrySchema,
|
|
1125
|
-
LocationUpdateEntrySchema,
|
|
1126
|
-
AdministrativeAreaCreateEntrySchema,
|
|
1127
1060
|
AttachmentUploadEntrySchema,
|
|
1128
1061
|
UserCreateEntrySchema,
|
|
1129
1062
|
UserReasonEntrySchema,
|
|
@@ -10533,60 +10466,21 @@ var LocationTypeV1 = z43.enum([
|
|
|
10533
10466
|
"CRVS_OFFICE",
|
|
10534
10467
|
"HEALTH_FACILITY"
|
|
10535
10468
|
]);
|
|
10536
|
-
var LocationStatus = z43.enum(["active", "inactive"]);
|
|
10537
|
-
var LocationVersion = z43.object({
|
|
10538
|
-
versionId: UUID,
|
|
10539
|
-
effectiveFrom: z43.iso.date(),
|
|
10540
|
-
name: z43.string(),
|
|
10541
|
-
externalId: z43.string().nullish(),
|
|
10542
|
-
status: LocationStatus
|
|
10543
|
-
});
|
|
10544
10469
|
var AdministrativeArea = z43.object({
|
|
10545
10470
|
id: UUID,
|
|
10546
10471
|
name: z43.string(),
|
|
10547
10472
|
externalId: z43.string().nullish(),
|
|
10548
10473
|
parentId: UUID.nullable(),
|
|
10549
|
-
|
|
10550
|
-
versions: z43.array(LocationVersion)
|
|
10474
|
+
validUntil: z43.iso.datetime().nullable()
|
|
10551
10475
|
});
|
|
10552
10476
|
var Location = z43.object({
|
|
10553
10477
|
id: UUID,
|
|
10554
10478
|
name: z43.string(),
|
|
10555
10479
|
externalId: z43.string().nullish(),
|
|
10556
10480
|
administrativeAreaId: UUID.nullable(),
|
|
10557
|
-
|
|
10558
|
-
status: LocationStatus,
|
|
10559
|
-
versions: z43.array(LocationVersion)
|
|
10560
|
-
});
|
|
10561
|
-
var SetLocationPayload = z43.object({
|
|
10562
|
-
id: UUID,
|
|
10563
|
-
name: z43.string(),
|
|
10564
|
-
externalId: z43.string().nullish(),
|
|
10565
|
-
administrativeAreaId: UUID.nullable(),
|
|
10481
|
+
validUntil: z43.iso.datetime().nullable(),
|
|
10566
10482
|
locationType: z43.string().nullable()
|
|
10567
10483
|
});
|
|
10568
|
-
var SetAdministrativeAreaPayload = z43.object({
|
|
10569
|
-
id: UUID,
|
|
10570
|
-
name: z43.string(),
|
|
10571
|
-
externalId: z43.string().nullish(),
|
|
10572
|
-
parentId: UUID.nullable()
|
|
10573
|
-
});
|
|
10574
|
-
function resolveVersion(versions, anchor) {
|
|
10575
|
-
let resolved = versions[0];
|
|
10576
|
-
for (const version of versions) {
|
|
10577
|
-
if (version.effectiveFrom <= anchor) {
|
|
10578
|
-
resolved = version;
|
|
10579
|
-
}
|
|
10580
|
-
}
|
|
10581
|
-
return resolved;
|
|
10582
|
-
}
|
|
10583
|
-
function hasActiveExternalIdOnOrAfter(versions, externalId, anchor) {
|
|
10584
|
-
const inEffectAtAnchor = resolveVersion(versions, anchor);
|
|
10585
|
-
const laterVersions = versions.filter((v) => v.effectiveFrom > anchor);
|
|
10586
|
-
return [inEffectAtAnchor, ...laterVersions].some(
|
|
10587
|
-
(v) => v.externalId === externalId && v.status === "active"
|
|
10588
|
-
);
|
|
10589
|
-
}
|
|
10590
10484
|
function matchesJurisdictionFilter(locationIds, filter, user2) {
|
|
10591
10485
|
if (!locationIds) {
|
|
10592
10486
|
return false;
|
|
@@ -11066,80 +10960,75 @@ function getFilePathsFromEvent(event2) {
|
|
|
11066
10960
|
}
|
|
11067
10961
|
|
|
11068
10962
|
// ../commons/src/events/mocks.test.utils.ts
|
|
11069
|
-
|
|
11070
|
-
return {
|
|
11071
|
-
...entity,
|
|
11072
|
-
status: "active",
|
|
11073
|
-
versions: [
|
|
11074
|
-
{
|
|
11075
|
-
versionId: entity.id,
|
|
11076
|
-
effectiveFrom: "0001-01-01",
|
|
11077
|
-
name: entity.name,
|
|
11078
|
-
externalId: entity.externalId ?? null,
|
|
11079
|
-
status: "active"
|
|
11080
|
-
}
|
|
11081
|
-
]
|
|
11082
|
-
};
|
|
11083
|
-
}
|
|
11084
|
-
var MOCK_ADMINISTRATIVE_AREAS_BASE = [
|
|
10963
|
+
var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS = [
|
|
11085
10964
|
{
|
|
11086
10965
|
id: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
11087
10966
|
name: "Central",
|
|
11088
10967
|
parentId: null,
|
|
10968
|
+
validUntil: null,
|
|
11089
10969
|
externalId: "ydyJb1RAy4U1"
|
|
11090
10970
|
},
|
|
11091
10971
|
{
|
|
11092
10972
|
id: "c599b691-fd2d-45e1-abf4-d185de727fb5",
|
|
11093
10973
|
name: "Sulaka",
|
|
11094
10974
|
parentId: null,
|
|
10975
|
+
validUntil: null,
|
|
11095
10976
|
externalId: "pQ8nGxWmZ2Q3"
|
|
11096
10977
|
},
|
|
11097
10978
|
{
|
|
11098
10979
|
id: "7ef2b9c7-5e6d-49f6-ae05-656207d0fc64",
|
|
11099
10980
|
name: "Pualula",
|
|
11100
10981
|
parentId: null,
|
|
10982
|
+
validUntil: null,
|
|
11101
10983
|
externalId: "Aq91DweLmT8k"
|
|
11102
10984
|
},
|
|
11103
10985
|
{
|
|
11104
10986
|
id: "6d1a59df-988c-4021-a846-ccbc021931a7",
|
|
11105
10987
|
name: "Chuminga",
|
|
11106
10988
|
parentId: null,
|
|
10989
|
+
validUntil: null,
|
|
11107
10990
|
externalId: "Rw0fYNh2Xk9a"
|
|
11108
10991
|
},
|
|
11109
10992
|
{
|
|
11110
10993
|
id: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
11111
10994
|
name: "Ibombo",
|
|
11112
10995
|
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
10996
|
+
validUntil: null,
|
|
11113
10997
|
externalId: "k7DsP4vbN1Qe"
|
|
11114
10998
|
},
|
|
11115
10999
|
{
|
|
11116
11000
|
id: "27160bbd-32d1-4625-812f-860226bfb92a",
|
|
11117
11001
|
name: "Isango",
|
|
11118
11002
|
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
11003
|
+
validUntil: null,
|
|
11119
11004
|
externalId: "Gm3Z9eQpHw4L"
|
|
11120
11005
|
},
|
|
11121
11006
|
{
|
|
11122
11007
|
id: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
11123
11008
|
name: "Isamba",
|
|
11124
11009
|
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
11010
|
+
validUntil: null,
|
|
11125
11011
|
externalId: "sT0xVu1KqJ7r"
|
|
11126
11012
|
},
|
|
11127
11013
|
{
|
|
11128
11014
|
id: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
11129
11015
|
name: "Itambo",
|
|
11130
11016
|
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
11017
|
+
validUntil: null,
|
|
11131
11018
|
externalId: "Nq6Bv2HpL9Te"
|
|
11132
11019
|
},
|
|
11133
11020
|
{
|
|
11134
11021
|
id: "d42ab2fe-e7ed-470e-8b31-4fb27f9b8250",
|
|
11135
11022
|
name: "Ezhi",
|
|
11136
11023
|
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
11024
|
+
validUntil: null,
|
|
11137
11025
|
externalId: "xK8cQ0ZRy5Wd"
|
|
11138
11026
|
},
|
|
11139
11027
|
{
|
|
11140
11028
|
id: "8fbd09d2-212b-47f4-beb3-5e1694931d9f",
|
|
11141
11029
|
name: "Ilanga",
|
|
11142
11030
|
parentId: "c599b691-fd2d-45e1-abf4-d185de727fb5",
|
|
11031
|
+
validUntil: null,
|
|
11143
11032
|
externalId: "Cq4Jm1XvN8Ls"
|
|
11144
11033
|
},
|
|
11145
11034
|
// Villages under Ibombo (62a0ccb4-880d-4f30-8882-f256007dfff9)
|
|
@@ -11147,42 +11036,49 @@ var MOCK_ADMINISTRATIVE_AREAS_BASE = [
|
|
|
11147
11036
|
id: "1d4e5f6a-7b8c-4912-8efa-345678901234",
|
|
11148
11037
|
name: "Klow",
|
|
11149
11038
|
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
11039
|
+
validUntil: null,
|
|
11150
11040
|
externalId: "IkYcYBUcyY2"
|
|
11151
11041
|
},
|
|
11152
11042
|
{
|
|
11153
11043
|
id: "2e5f6a7b-8c9d-4a23-8fab-456789012345",
|
|
11154
11044
|
name: "Mbondo",
|
|
11155
11045
|
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
11046
|
+
validUntil: null,
|
|
11156
11047
|
externalId: "Qhvv5hvo3mY"
|
|
11157
11048
|
},
|
|
11158
11049
|
{
|
|
11159
11050
|
id: "3f6a7b8c-9d0e-4b34-8abc-567890123456",
|
|
11160
11051
|
name: "Ndara",
|
|
11161
11052
|
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
11053
|
+
validUntil: null,
|
|
11162
11054
|
externalId: "crXh068O9TR"
|
|
11163
11055
|
},
|
|
11164
11056
|
{
|
|
11165
11057
|
id: "4a7b8c9d-0e1f-4c45-abcd-678901234567",
|
|
11166
11058
|
name: "Olani",
|
|
11167
11059
|
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
11060
|
+
validUntil: null,
|
|
11168
11061
|
externalId: "r00It8Tvvp7"
|
|
11169
11062
|
},
|
|
11170
11063
|
{
|
|
11171
11064
|
id: "5b8c9d0e-1f2a-4d56-bcde-789012345678",
|
|
11172
11065
|
name: "Pemba",
|
|
11173
11066
|
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
11067
|
+
validUntil: null,
|
|
11174
11068
|
externalId: "ZnUWsbONIaH"
|
|
11175
11069
|
},
|
|
11176
11070
|
{
|
|
11177
11071
|
id: "6c9d0e1f-2a3b-4e67-8def-890123456789",
|
|
11178
11072
|
name: "Quanza",
|
|
11179
11073
|
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
11074
|
+
validUntil: null,
|
|
11180
11075
|
externalId: "fDZycvQTa7l"
|
|
11181
11076
|
},
|
|
11182
11077
|
{
|
|
11183
11078
|
id: "7d0e1f2a-3b4c-4f78-8efa-901234567890",
|
|
11184
11079
|
name: "Rivka",
|
|
11185
11080
|
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
11081
|
+
validUntil: null,
|
|
11186
11082
|
externalId: "KqswxCGTELa"
|
|
11187
11083
|
},
|
|
11188
11084
|
// Villages under Isamba (967032fd-3f81-478a-826c-30cb8fe121bd)
|
|
@@ -11190,30 +11086,35 @@ var MOCK_ADMINISTRATIVE_AREAS_BASE = [
|
|
|
11190
11086
|
id: "8e1f2a3b-4c5d-4089-8fab-012345678901",
|
|
11191
11087
|
name: "Mbula",
|
|
11192
11088
|
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
11089
|
+
validUntil: null,
|
|
11193
11090
|
externalId: "osEbKjRc9Kg"
|
|
11194
11091
|
},
|
|
11195
11092
|
{
|
|
11196
11093
|
id: "9f2a3b4c-5d6e-4190-8abf-123456789012",
|
|
11197
11094
|
name: "Ndoki",
|
|
11198
11095
|
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
11096
|
+
validUntil: null,
|
|
11199
11097
|
externalId: "aq4daBUAGr3"
|
|
11200
11098
|
},
|
|
11201
11099
|
{
|
|
11202
11100
|
id: "0a3b4c5d-6e7f-4201-abcd-234567890123",
|
|
11203
11101
|
name: "Tsanga",
|
|
11204
11102
|
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
11103
|
+
validUntil: null,
|
|
11205
11104
|
externalId: "cqis6Y8trbJ"
|
|
11206
11105
|
},
|
|
11207
11106
|
{
|
|
11208
11107
|
id: "1b4c5d6e-7f8a-4312-bcde-345678901234",
|
|
11209
11108
|
name: "Waziri",
|
|
11210
11109
|
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
11110
|
+
validUntil: null,
|
|
11211
11111
|
externalId: "LMijHPyyx6d"
|
|
11212
11112
|
},
|
|
11213
11113
|
{
|
|
11214
11114
|
id: "2c5d6e7f-8a9b-4423-8def-456789012345",
|
|
11215
11115
|
name: "Zimbi",
|
|
11216
11116
|
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
11117
|
+
validUntil: null,
|
|
11217
11118
|
externalId: "pcQYbPuKGZ7"
|
|
11218
11119
|
},
|
|
11219
11120
|
// Villages under Itambo (89a33893-b17d-481d-a26d-6461e7ac1651)
|
|
@@ -11221,59 +11122,67 @@ var MOCK_ADMINISTRATIVE_AREAS_BASE = [
|
|
|
11221
11122
|
id: "3d6e7f8a-9b0c-4534-8efa-567890123456",
|
|
11222
11123
|
name: "Felani",
|
|
11223
11124
|
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
11125
|
+
validUntil: null,
|
|
11224
11126
|
externalId: "gSqpoCGdMXp"
|
|
11225
11127
|
},
|
|
11226
11128
|
{
|
|
11227
11129
|
id: "4e7f8a9b-0c1d-4645-8fab-678901234567",
|
|
11228
11130
|
name: "Goroma",
|
|
11229
11131
|
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
11132
|
+
validUntil: null,
|
|
11230
11133
|
externalId: "KvAAIaNqVrp"
|
|
11231
11134
|
},
|
|
11232
11135
|
{
|
|
11233
11136
|
id: "5f8a9b0c-1d2e-4756-8abc-789012345678",
|
|
11234
11137
|
name: "Halifu",
|
|
11235
11138
|
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
11139
|
+
validUntil: null,
|
|
11236
11140
|
externalId: "qe4UnEVt1hv"
|
|
11237
11141
|
},
|
|
11238
11142
|
{
|
|
11239
11143
|
id: "6a9b0c1d-2e3f-4867-abcd-890123456789",
|
|
11240
11144
|
name: "Jabari",
|
|
11241
11145
|
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
11146
|
+
validUntil: null,
|
|
11242
11147
|
externalId: "yHH9Nz4rLOt"
|
|
11243
11148
|
},
|
|
11244
11149
|
{
|
|
11245
11150
|
id: "7b0c1d2e-3f4a-4978-bcde-901234567890",
|
|
11246
11151
|
name: "Kifani",
|
|
11247
11152
|
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
11153
|
+
validUntil: null,
|
|
11248
11154
|
externalId: "eSWmXIGeu1I"
|
|
11249
11155
|
},
|
|
11250
11156
|
{
|
|
11251
11157
|
id: "8c1d2e3f-4a5b-4089-8def-012345678901",
|
|
11252
11158
|
name: "Lumela",
|
|
11253
11159
|
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
11160
|
+
validUntil: null,
|
|
11254
11161
|
externalId: "bh0b3aI1uP3"
|
|
11255
11162
|
}
|
|
11256
11163
|
];
|
|
11257
|
-
var
|
|
11258
|
-
var MOCK_LOCATIONS_BASE = [
|
|
11164
|
+
var V2_DEFAULT_MOCK_LOCATIONS = [
|
|
11259
11165
|
{
|
|
11260
11166
|
id: "6f6186ce-cd5f-4a5f-810a-2d99e7c4ba12",
|
|
11261
11167
|
name: "Central Provincial Office",
|
|
11262
11168
|
locationType: "CRVS_OFFICE",
|
|
11263
11169
|
administrativeAreaId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
11170
|
+
validUntil: null,
|
|
11264
11171
|
externalId: "Xr3Df8WpK6Ys"
|
|
11265
11172
|
},
|
|
11266
11173
|
{
|
|
11267
11174
|
id: "b1c2d3e4-f5a6-7890-bcde-f12345678901",
|
|
11268
11175
|
name: "Central Health Post",
|
|
11269
11176
|
locationType: "HEALTH_FACILITY",
|
|
11270
|
-
administrativeAreaId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c"
|
|
11177
|
+
administrativeAreaId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
11178
|
+
validUntil: null
|
|
11271
11179
|
},
|
|
11272
11180
|
{
|
|
11273
11181
|
id: "028d2c85-ca31-426d-b5d1-2cef545a4902",
|
|
11274
11182
|
name: "Ibombo District Office",
|
|
11275
11183
|
locationType: "CRVS_OFFICE",
|
|
11276
11184
|
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
11185
|
+
validUntil: null,
|
|
11277
11186
|
externalId: "Sm4Nw7GrD2Vy"
|
|
11278
11187
|
},
|
|
11279
11188
|
{
|
|
@@ -11281,6 +11190,7 @@ var MOCK_LOCATIONS_BASE = [
|
|
|
11281
11190
|
name: "Isamba District Office",
|
|
11282
11191
|
locationType: "CRVS_OFFICE",
|
|
11283
11192
|
administrativeAreaId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
11193
|
+
validUntil: null,
|
|
11284
11194
|
externalId: "Vg1Bq5XeH9Lt"
|
|
11285
11195
|
},
|
|
11286
11196
|
{
|
|
@@ -11288,6 +11198,7 @@ var MOCK_LOCATIONS_BASE = [
|
|
|
11288
11198
|
name: "Isango District Office",
|
|
11289
11199
|
locationType: "CRVS_OFFICE",
|
|
11290
11200
|
administrativeAreaId: "27160bbd-32d1-4625-812f-860226bfb92a",
|
|
11201
|
+
validUntil: null,
|
|
11291
11202
|
externalId: "Je7Lm2XqN9Vz"
|
|
11292
11203
|
},
|
|
11293
11204
|
{
|
|
@@ -11295,6 +11206,7 @@ var MOCK_LOCATIONS_BASE = [
|
|
|
11295
11206
|
name: "Sulaka Provincial Office",
|
|
11296
11207
|
locationType: "CRVS_OFFICE",
|
|
11297
11208
|
administrativeAreaId: "c599b691-fd2d-45e1-abf4-d185de727fb5",
|
|
11209
|
+
validUntil: null,
|
|
11298
11210
|
externalId: "Ht2Wp9KcX5Qv"
|
|
11299
11211
|
},
|
|
11300
11212
|
{
|
|
@@ -11302,6 +11214,7 @@ var MOCK_LOCATIONS_BASE = [
|
|
|
11302
11214
|
name: "Ilanga District Office",
|
|
11303
11215
|
locationType: "CRVS_OFFICE",
|
|
11304
11216
|
administrativeAreaId: "8fbd09d2-212b-47f4-beb3-5e1694931d9f",
|
|
11217
|
+
validUntil: null,
|
|
11305
11218
|
externalId: "Yp6Ds1WqN3Xz"
|
|
11306
11219
|
},
|
|
11307
11220
|
{
|
|
@@ -11309,6 +11222,7 @@ var MOCK_LOCATIONS_BASE = [
|
|
|
11309
11222
|
name: "Chamakubi Health Post",
|
|
11310
11223
|
locationType: "HEALTH_FACILITY",
|
|
11311
11224
|
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
11225
|
+
validUntil: null,
|
|
11312
11226
|
externalId: "M1nFr8LbC2Qy"
|
|
11313
11227
|
},
|
|
11314
11228
|
{
|
|
@@ -11316,6 +11230,7 @@ var MOCK_LOCATIONS_BASE = [
|
|
|
11316
11230
|
name: "Ibombo Rural Health Centre",
|
|
11317
11231
|
locationType: "HEALTH_FACILITY",
|
|
11318
11232
|
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
11233
|
+
validUntil: null,
|
|
11319
11234
|
externalId: "bT7pV6YrW0Xc"
|
|
11320
11235
|
},
|
|
11321
11236
|
{
|
|
@@ -11323,6 +11238,7 @@ var MOCK_LOCATIONS_BASE = [
|
|
|
11323
11238
|
name: "Chikobo Rural Health Centre",
|
|
11324
11239
|
locationType: "HEALTH_FACILITY",
|
|
11325
11240
|
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
11241
|
+
validUntil: null,
|
|
11326
11242
|
externalId: "zE4qPn2SgJ5d"
|
|
11327
11243
|
},
|
|
11328
11244
|
{
|
|
@@ -11330,6 +11246,7 @@ var MOCK_LOCATIONS_BASE = [
|
|
|
11330
11246
|
name: "Chilochabalenje Health Post",
|
|
11331
11247
|
locationType: "HEALTH_FACILITY",
|
|
11332
11248
|
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
11249
|
+
validUntil: null,
|
|
11333
11250
|
externalId: "H8vDs1MqR4Uf"
|
|
11334
11251
|
},
|
|
11335
11252
|
{
|
|
@@ -11337,6 +11254,7 @@ var MOCK_LOCATIONS_BASE = [
|
|
|
11337
11254
|
name: "Chipeso Rural Health Centre",
|
|
11338
11255
|
locationType: "HEALTH_FACILITY",
|
|
11339
11256
|
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
11257
|
+
validUntil: null,
|
|
11340
11258
|
externalId: "Qw3uZ9KfX6Lm"
|
|
11341
11259
|
},
|
|
11342
11260
|
{
|
|
@@ -11344,6 +11262,7 @@ var MOCK_LOCATIONS_BASE = [
|
|
|
11344
11262
|
name: "Chisamba Rural Health Centre",
|
|
11345
11263
|
locationType: "HEALTH_FACILITY",
|
|
11346
11264
|
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
11265
|
+
validUntil: null,
|
|
11347
11266
|
externalId: "Yr0pCg8LdM2s"
|
|
11348
11267
|
},
|
|
11349
11268
|
{
|
|
@@ -11351,6 +11270,7 @@ var MOCK_LOCATIONS_BASE = [
|
|
|
11351
11270
|
name: "Chitanda Rural Health Centre",
|
|
11352
11271
|
locationType: "HEALTH_FACILITY",
|
|
11353
11272
|
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
11273
|
+
validUntil: null,
|
|
11354
11274
|
externalId: "tS9gJ4PwB1Qx"
|
|
11355
11275
|
},
|
|
11356
11276
|
{
|
|
@@ -11358,6 +11278,7 @@ var MOCK_LOCATIONS_BASE = [
|
|
|
11358
11278
|
name: "Golden Valley Rural Health Centre",
|
|
11359
11279
|
locationType: "HEALTH_FACILITY",
|
|
11360
11280
|
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
11281
|
+
validUntil: null,
|
|
11361
11282
|
externalId: "Ld7Qm3XsA8Vr"
|
|
11362
11283
|
},
|
|
11363
11284
|
{
|
|
@@ -11365,6 +11286,7 @@ var MOCK_LOCATIONS_BASE = [
|
|
|
11365
11286
|
name: "Ipongo Rural Health Centre",
|
|
11366
11287
|
locationType: "HEALTH_FACILITY",
|
|
11367
11288
|
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
11289
|
+
validUntil: null,
|
|
11368
11290
|
externalId: "kF2sW9DmH0Bt"
|
|
11369
11291
|
},
|
|
11370
11292
|
{
|
|
@@ -11372,6 +11294,7 @@ var MOCK_LOCATIONS_BASE = [
|
|
|
11372
11294
|
name: "Itumbwe Health Post",
|
|
11373
11295
|
locationType: "HEALTH_FACILITY",
|
|
11374
11296
|
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
11297
|
+
validUntil: null,
|
|
11375
11298
|
externalId: "Ue5Xb3VaC7Pq"
|
|
11376
11299
|
},
|
|
11377
11300
|
{
|
|
@@ -11379,6 +11302,7 @@ var MOCK_LOCATIONS_BASE = [
|
|
|
11379
11302
|
name: "Kabangalala Rural Health Centre",
|
|
11380
11303
|
locationType: "HEALTH_FACILITY",
|
|
11381
11304
|
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
11305
|
+
validUntil: null,
|
|
11382
11306
|
externalId: "Pz8Kc1TqH6Jn"
|
|
11383
11307
|
},
|
|
11384
11308
|
// Village offices
|
|
@@ -11387,61 +11311,13 @@ var MOCK_LOCATIONS_BASE = [
|
|
|
11387
11311
|
name: "Klow Village Office",
|
|
11388
11312
|
locationType: "CRVS_OFFICE",
|
|
11389
11313
|
administrativeAreaId: "1d4e5f6a-7b8c-4912-8efa-345678901234",
|
|
11314
|
+
validUntil: null,
|
|
11390
11315
|
externalId: "PmAyxAJkxiJ"
|
|
11391
11316
|
}
|
|
11392
11317
|
];
|
|
11393
|
-
var V2_DEFAULT_MOCK_LOCATIONS = MOCK_LOCATIONS_BASE.map(withVersionFields);
|
|
11394
11318
|
var V2_DEFAULT_MOCK_LOCATIONS_MAP = new Map(
|
|
11395
11319
|
V2_DEFAULT_MOCK_LOCATIONS.map((l) => [l.id, l])
|
|
11396
11320
|
);
|
|
11397
11321
|
var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS_MAP = new Map(
|
|
11398
11322
|
V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS.map((a) => [a.id, a])
|
|
11399
11323
|
);
|
|
11400
|
-
|
|
11401
|
-
// ../commons/src/events/locationPayloads.ts
|
|
11402
|
-
var z44 = __toESM(require("zod/v4"));
|
|
11403
|
-
var CreateLocationPayload = z44.object({
|
|
11404
|
-
id: UUID.optional(),
|
|
11405
|
-
versionId: UUID.optional(),
|
|
11406
|
-
name: z44.string(),
|
|
11407
|
-
externalId: z44.string().nullish(),
|
|
11408
|
-
administrativeAreaId: UUID.nullable(),
|
|
11409
|
-
locationType: z44.string().nullable(),
|
|
11410
|
-
effectiveFrom: z44.iso.date().optional(),
|
|
11411
|
-
status: LocationStatus.default("active")
|
|
11412
|
-
});
|
|
11413
|
-
var UpdateLocationPayload = z44.strictObject({
|
|
11414
|
-
id: UUID,
|
|
11415
|
-
versionId: UUID.optional(),
|
|
11416
|
-
name: z44.string(),
|
|
11417
|
-
externalId: z44.string().nullish(),
|
|
11418
|
-
status: LocationStatus,
|
|
11419
|
-
effectiveFrom: z44.iso.date().optional(),
|
|
11420
|
-
lastVersionId: UUID
|
|
11421
|
-
});
|
|
11422
|
-
var WithdrawLocationVersionPayload = z44.object({
|
|
11423
|
-
id: UUID,
|
|
11424
|
-
versionId: UUID
|
|
11425
|
-
});
|
|
11426
|
-
var CreateAdministrativeAreaPayload = z44.object({
|
|
11427
|
-
id: UUID.optional(),
|
|
11428
|
-
versionId: UUID.optional(),
|
|
11429
|
-
name: z44.string(),
|
|
11430
|
-
externalId: z44.string().nullish(),
|
|
11431
|
-
parentId: UUID.nullable(),
|
|
11432
|
-
effectiveFrom: z44.iso.date().optional(),
|
|
11433
|
-
status: LocationStatus.default("active")
|
|
11434
|
-
});
|
|
11435
|
-
var UpdateAdministrativeAreaPayload = z44.strictObject({
|
|
11436
|
-
id: UUID,
|
|
11437
|
-
versionId: UUID.optional(),
|
|
11438
|
-
name: z44.string(),
|
|
11439
|
-
externalId: z44.string().nullish(),
|
|
11440
|
-
status: LocationStatus,
|
|
11441
|
-
effectiveFrom: z44.iso.date().optional(),
|
|
11442
|
-
lastVersionId: UUID
|
|
11443
|
-
});
|
|
11444
|
-
var WithdrawAdministrativeAreaVersionPayload = z44.object({
|
|
11445
|
-
id: UUID,
|
|
11446
|
-
versionId: UUID
|
|
11447
|
-
});
|
|
@@ -92,10 +92,9 @@ const FUNCTION_LIKE_KINDS = [
|
|
|
92
92
|
* Falls back to `<anonymous>` when nothing useful can be derived.
|
|
93
93
|
*/
|
|
94
94
|
function describeFunction(node) {
|
|
95
|
-
var _a;
|
|
96
|
-
var _b, _c;
|
|
95
|
+
var _a, _b, _c;
|
|
97
96
|
if (ts_morph_1.Node.isFunctionDeclaration(node) || ts_morph_1.Node.isMethodDeclaration(node)) {
|
|
98
|
-
return (
|
|
97
|
+
return (_a = node.getName()) !== null && _a !== void 0 ? _a : '<anonymous>';
|
|
99
98
|
}
|
|
100
99
|
// FunctionExpression / ArrowFunction: try to pick up the assignment target.
|
|
101
100
|
const parent = node.getParent();
|
|
@@ -107,7 +106,7 @@ function describeFunction(node) {
|
|
|
107
106
|
}
|
|
108
107
|
if (ts_morph_1.Node.isFunctionExpression(node) &&
|
|
109
108
|
node.getNameNode() !== undefined) {
|
|
110
|
-
return (_c = (
|
|
109
|
+
return (_c = (_b = node.getNameNode()) === null || _b === void 0 ? void 0 : _b.getText()) !== null && _c !== void 0 ? _c : '<anonymous>';
|
|
111
110
|
}
|
|
112
111
|
return '<anonymous>';
|
|
113
112
|
}
|