@opencrvs/toolkit 2.1.0-rc.5a25f37 → 2.1.0-rc.5d808c4

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.
Files changed (52) hide show
  1. package/dist/commons/api/router.d.ts +3267 -3248
  2. package/dist/commons/application-config/index.d.ts +6 -6
  3. package/dist/commons/conditionals/conditionals.d.ts +259 -2102
  4. package/dist/commons/events/ActionConfig.d.ts +105 -105
  5. package/dist/commons/events/ActionDocument.d.ts +113 -113
  6. package/dist/commons/events/ActionType.d.ts +62 -62
  7. package/dist/commons/events/AdvancedSearchConfig.d.ts +507 -507
  8. package/dist/commons/events/AuditLog.d.ts +43 -43
  9. package/dist/commons/events/CompositeFieldValue.d.ts +4 -4
  10. package/dist/commons/events/Conditional.d.ts +3 -3
  11. package/dist/commons/events/CountryConfigQueryInput.d.ts +590 -590
  12. package/dist/commons/events/Draft.d.ts +37 -37
  13. package/dist/commons/events/DynamicFieldValue.d.ts +9 -9
  14. package/dist/commons/events/EventConfig.d.ts +5 -5
  15. package/dist/commons/events/EventDocument.d.ts +46 -46
  16. package/dist/commons/events/EventIndex.d.ts +62 -62
  17. package/dist/commons/events/EventMetadata.d.ts +40 -40
  18. package/dist/commons/events/FieldConfig.d.ts +336 -336
  19. package/dist/commons/events/FieldType.d.ts +51 -51
  20. package/dist/commons/events/FieldTypeMapping.d.ts +100 -100
  21. package/dist/commons/events/FieldValue.d.ts +12 -12
  22. package/dist/commons/events/Flag.d.ts +15 -15
  23. package/dist/commons/events/TemplateConfig.d.ts +1 -1
  24. package/dist/commons/events/WorkqueueColumnConfig.d.ts +40 -40
  25. package/dist/commons/events/WorkqueueConfig.d.ts +826 -826
  26. package/dist/commons/events/deduplication.d.ts +1 -1
  27. package/dist/commons/events/event.d.ts +2 -2
  28. package/dist/commons/events/field.d.ts +78 -895
  29. package/dist/commons/events/locations.d.ts +96 -6
  30. package/dist/commons/events/mocks.test.utils.d.ts +18 -4
  31. package/dist/commons/events/scopes.d.ts +4 -4
  32. package/dist/commons/events/state/index.d.ts +17 -17
  33. package/dist/commons/events/state/utils.d.ts +7 -7
  34. package/dist/commons/events/test.utils.d.ts +40 -40
  35. package/dist/commons/events/utils.d.ts +114 -114
  36. package/dist/commons/notification/UserNotifications.d.ts +10 -10
  37. package/dist/environment/derived-variables.d.ts +119 -119
  38. package/dist/environment/derived-variables.d.ts.map +1 -1
  39. package/dist/environment/logger.d.ts.map +1 -1
  40. package/dist/environment/questions.d.ts +75 -74
  41. package/dist/environment/questions.d.ts.map +1 -1
  42. package/dist/environment/setup-environment.js +8 -14
  43. package/dist/environment/utils.d.ts +1 -1
  44. package/dist/events/deduplication.d.ts +1 -1
  45. package/dist/events/index.js +59 -52
  46. package/dist/migrations/v2.0/migrate-application-config-url.js +4 -3
  47. package/dist/notification/index.js +45 -52
  48. package/dist/scopes/index.d.ts +146 -146
  49. package/opencrvs-toolkit-2.1.0-rc.5d808c4.tgz +0 -0
  50. package/package.json +5 -5
  51. package/tsconfig.tsbuildinfo +1 -1
  52. package/opencrvs-toolkit-2.1.0-rc.5a25f37.tgz +0 -0
@@ -161,7 +161,9 @@ __export(events_exports, {
161
161
  LanguageConfig: () => LanguageConfig,
162
162
  LegalStatuses: () => LegalStatuses,
163
163
  Location: () => Location,
164
+ LocationStatus: () => LocationStatus,
164
165
  LocationTypeV1: () => LocationTypeV1,
166
+ LocationVersion: () => LocationVersion,
165
167
  METADATA_FIELD_PREFIX: () => METADATA_FIELD_PREFIX,
166
168
  MarkAsDuplicateActionInput: () => MarkAsDuplicateActionInput,
167
169
  MarkNotDuplicateActionInput: () => MarkNotDuplicateActionInput,
@@ -201,6 +203,8 @@ __export(events_exports, {
201
203
  SelectDateRangeOption: () => SelectDateRangeOption,
202
204
  SelectDateRangeValue: () => SelectDateRangeValue,
203
205
  SelectOption: () => SelectOption,
206
+ SetAdministrativeAreaPayload: () => SetAdministrativeAreaPayload,
207
+ SetLocationPayload: () => SetLocationPayload,
204
208
  ShowConditional: () => ShowConditional,
205
209
  SignatureFieldValue: () => SignatureFieldValue,
206
210
  StaticDataEntry: () => StaticDataEntry,
@@ -433,6 +437,7 @@ __export(events_exports, {
433
437
  resolveDateOfEvent: () => resolveDateOfEvent,
434
438
  resolveEventCustomFlags: () => resolveEventCustomFlags,
435
439
  resolvePlaceOfEvent: () => resolvePlaceOfEvent,
440
+ resolveVersion: () => resolveVersion,
436
441
  runClientFunction: () => runClientFunction,
437
442
  runFieldValidations: () => runFieldValidations,
438
443
  runStructuralValidations: () => runStructuralValidations,
@@ -10466,21 +10471,53 @@ var LocationTypeV1 = z43.enum([
10466
10471
  "CRVS_OFFICE",
10467
10472
  "HEALTH_FACILITY"
10468
10473
  ]);
10474
+ var LocationStatus = z43.enum(["active", "inactive"]);
10475
+ var LocationVersion = z43.object({
10476
+ versionId: UUID,
10477
+ effectiveFrom: z43.iso.date(),
10478
+ name: z43.string(),
10479
+ externalId: z43.string().nullish(),
10480
+ status: LocationStatus
10481
+ });
10469
10482
  var AdministrativeArea = z43.object({
10470
10483
  id: UUID,
10471
10484
  name: z43.string(),
10472
10485
  externalId: z43.string().nullish(),
10473
10486
  parentId: UUID.nullable(),
10474
- validUntil: z43.iso.datetime().nullable()
10487
+ status: LocationStatus,
10488
+ versions: z43.array(LocationVersion)
10475
10489
  });
10476
10490
  var Location = z43.object({
10477
10491
  id: UUID,
10478
10492
  name: z43.string(),
10479
10493
  externalId: z43.string().nullish(),
10480
10494
  administrativeAreaId: UUID.nullable(),
10481
- validUntil: z43.iso.datetime().nullable(),
10495
+ locationType: z43.string().nullable(),
10496
+ status: LocationStatus,
10497
+ versions: z43.array(LocationVersion)
10498
+ });
10499
+ var SetLocationPayload = z43.object({
10500
+ id: UUID,
10501
+ name: z43.string(),
10502
+ externalId: z43.string().nullish(),
10503
+ administrativeAreaId: UUID.nullable(),
10482
10504
  locationType: z43.string().nullable()
10483
10505
  });
10506
+ var SetAdministrativeAreaPayload = z43.object({
10507
+ id: UUID,
10508
+ name: z43.string(),
10509
+ externalId: z43.string().nullish(),
10510
+ parentId: UUID.nullable()
10511
+ });
10512
+ function resolveVersion(versions, anchor) {
10513
+ let resolved = versions[0];
10514
+ for (const version of versions) {
10515
+ if (version.effectiveFrom <= anchor) {
10516
+ resolved = version;
10517
+ }
10518
+ }
10519
+ return resolved;
10520
+ }
10484
10521
  function matchesJurisdictionFilter(locationIds, filter, user2) {
10485
10522
  if (!locationIds) {
10486
10523
  return false;
@@ -10960,75 +10997,80 @@ function getFilePathsFromEvent(event2) {
10960
10997
  }
10961
10998
 
10962
10999
  // ../commons/src/events/mocks.test.utils.ts
10963
- var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS = [
11000
+ function withVersionFields(entity) {
11001
+ return {
11002
+ ...entity,
11003
+ status: "active",
11004
+ versions: [
11005
+ {
11006
+ versionId: entity.id,
11007
+ effectiveFrom: "0001-01-01",
11008
+ name: entity.name,
11009
+ externalId: entity.externalId ?? null,
11010
+ status: "active"
11011
+ }
11012
+ ]
11013
+ };
11014
+ }
11015
+ var MOCK_ADMINISTRATIVE_AREAS_BASE = [
10964
11016
  {
10965
11017
  id: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
10966
11018
  name: "Central",
10967
11019
  parentId: null,
10968
- validUntil: null,
10969
11020
  externalId: "ydyJb1RAy4U1"
10970
11021
  },
10971
11022
  {
10972
11023
  id: "c599b691-fd2d-45e1-abf4-d185de727fb5",
10973
11024
  name: "Sulaka",
10974
11025
  parentId: null,
10975
- validUntil: null,
10976
11026
  externalId: "pQ8nGxWmZ2Q3"
10977
11027
  },
10978
11028
  {
10979
11029
  id: "7ef2b9c7-5e6d-49f6-ae05-656207d0fc64",
10980
11030
  name: "Pualula",
10981
11031
  parentId: null,
10982
- validUntil: null,
10983
11032
  externalId: "Aq91DweLmT8k"
10984
11033
  },
10985
11034
  {
10986
11035
  id: "6d1a59df-988c-4021-a846-ccbc021931a7",
10987
11036
  name: "Chuminga",
10988
11037
  parentId: null,
10989
- validUntil: null,
10990
11038
  externalId: "Rw0fYNh2Xk9a"
10991
11039
  },
10992
11040
  {
10993
11041
  id: "62a0ccb4-880d-4f30-8882-f256007dfff9",
10994
11042
  name: "Ibombo",
10995
11043
  parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
10996
- validUntil: null,
10997
11044
  externalId: "k7DsP4vbN1Qe"
10998
11045
  },
10999
11046
  {
11000
11047
  id: "27160bbd-32d1-4625-812f-860226bfb92a",
11001
11048
  name: "Isango",
11002
11049
  parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
11003
- validUntil: null,
11004
11050
  externalId: "Gm3Z9eQpHw4L"
11005
11051
  },
11006
11052
  {
11007
11053
  id: "967032fd-3f81-478a-826c-30cb8fe121bd",
11008
11054
  name: "Isamba",
11009
11055
  parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
11010
- validUntil: null,
11011
11056
  externalId: "sT0xVu1KqJ7r"
11012
11057
  },
11013
11058
  {
11014
11059
  id: "89a33893-b17d-481d-a26d-6461e7ac1651",
11015
11060
  name: "Itambo",
11016
11061
  parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
11017
- validUntil: null,
11018
11062
  externalId: "Nq6Bv2HpL9Te"
11019
11063
  },
11020
11064
  {
11021
11065
  id: "d42ab2fe-e7ed-470e-8b31-4fb27f9b8250",
11022
11066
  name: "Ezhi",
11023
11067
  parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
11024
- validUntil: null,
11025
11068
  externalId: "xK8cQ0ZRy5Wd"
11026
11069
  },
11027
11070
  {
11028
11071
  id: "8fbd09d2-212b-47f4-beb3-5e1694931d9f",
11029
11072
  name: "Ilanga",
11030
11073
  parentId: "c599b691-fd2d-45e1-abf4-d185de727fb5",
11031
- validUntil: null,
11032
11074
  externalId: "Cq4Jm1XvN8Ls"
11033
11075
  },
11034
11076
  // Villages under Ibombo (62a0ccb4-880d-4f30-8882-f256007dfff9)
@@ -11036,49 +11078,42 @@ var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS = [
11036
11078
  id: "1d4e5f6a-7b8c-4912-8efa-345678901234",
11037
11079
  name: "Klow",
11038
11080
  parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11039
- validUntil: null,
11040
11081
  externalId: "IkYcYBUcyY2"
11041
11082
  },
11042
11083
  {
11043
11084
  id: "2e5f6a7b-8c9d-4a23-8fab-456789012345",
11044
11085
  name: "Mbondo",
11045
11086
  parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11046
- validUntil: null,
11047
11087
  externalId: "Qhvv5hvo3mY"
11048
11088
  },
11049
11089
  {
11050
11090
  id: "3f6a7b8c-9d0e-4b34-8abc-567890123456",
11051
11091
  name: "Ndara",
11052
11092
  parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11053
- validUntil: null,
11054
11093
  externalId: "crXh068O9TR"
11055
11094
  },
11056
11095
  {
11057
11096
  id: "4a7b8c9d-0e1f-4c45-abcd-678901234567",
11058
11097
  name: "Olani",
11059
11098
  parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11060
- validUntil: null,
11061
11099
  externalId: "r00It8Tvvp7"
11062
11100
  },
11063
11101
  {
11064
11102
  id: "5b8c9d0e-1f2a-4d56-bcde-789012345678",
11065
11103
  name: "Pemba",
11066
11104
  parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11067
- validUntil: null,
11068
11105
  externalId: "ZnUWsbONIaH"
11069
11106
  },
11070
11107
  {
11071
11108
  id: "6c9d0e1f-2a3b-4e67-8def-890123456789",
11072
11109
  name: "Quanza",
11073
11110
  parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11074
- validUntil: null,
11075
11111
  externalId: "fDZycvQTa7l"
11076
11112
  },
11077
11113
  {
11078
11114
  id: "7d0e1f2a-3b4c-4f78-8efa-901234567890",
11079
11115
  name: "Rivka",
11080
11116
  parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11081
- validUntil: null,
11082
11117
  externalId: "KqswxCGTELa"
11083
11118
  },
11084
11119
  // Villages under Isamba (967032fd-3f81-478a-826c-30cb8fe121bd)
@@ -11086,35 +11121,30 @@ var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS = [
11086
11121
  id: "8e1f2a3b-4c5d-4089-8fab-012345678901",
11087
11122
  name: "Mbula",
11088
11123
  parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
11089
- validUntil: null,
11090
11124
  externalId: "osEbKjRc9Kg"
11091
11125
  },
11092
11126
  {
11093
11127
  id: "9f2a3b4c-5d6e-4190-8abf-123456789012",
11094
11128
  name: "Ndoki",
11095
11129
  parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
11096
- validUntil: null,
11097
11130
  externalId: "aq4daBUAGr3"
11098
11131
  },
11099
11132
  {
11100
11133
  id: "0a3b4c5d-6e7f-4201-abcd-234567890123",
11101
11134
  name: "Tsanga",
11102
11135
  parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
11103
- validUntil: null,
11104
11136
  externalId: "cqis6Y8trbJ"
11105
11137
  },
11106
11138
  {
11107
11139
  id: "1b4c5d6e-7f8a-4312-bcde-345678901234",
11108
11140
  name: "Waziri",
11109
11141
  parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
11110
- validUntil: null,
11111
11142
  externalId: "LMijHPyyx6d"
11112
11143
  },
11113
11144
  {
11114
11145
  id: "2c5d6e7f-8a9b-4423-8def-456789012345",
11115
11146
  name: "Zimbi",
11116
11147
  parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
11117
- validUntil: null,
11118
11148
  externalId: "pcQYbPuKGZ7"
11119
11149
  },
11120
11150
  // Villages under Itambo (89a33893-b17d-481d-a26d-6461e7ac1651)
@@ -11122,67 +11152,59 @@ var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS = [
11122
11152
  id: "3d6e7f8a-9b0c-4534-8efa-567890123456",
11123
11153
  name: "Felani",
11124
11154
  parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
11125
- validUntil: null,
11126
11155
  externalId: "gSqpoCGdMXp"
11127
11156
  },
11128
11157
  {
11129
11158
  id: "4e7f8a9b-0c1d-4645-8fab-678901234567",
11130
11159
  name: "Goroma",
11131
11160
  parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
11132
- validUntil: null,
11133
11161
  externalId: "KvAAIaNqVrp"
11134
11162
  },
11135
11163
  {
11136
11164
  id: "5f8a9b0c-1d2e-4756-8abc-789012345678",
11137
11165
  name: "Halifu",
11138
11166
  parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
11139
- validUntil: null,
11140
11167
  externalId: "qe4UnEVt1hv"
11141
11168
  },
11142
11169
  {
11143
11170
  id: "6a9b0c1d-2e3f-4867-abcd-890123456789",
11144
11171
  name: "Jabari",
11145
11172
  parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
11146
- validUntil: null,
11147
11173
  externalId: "yHH9Nz4rLOt"
11148
11174
  },
11149
11175
  {
11150
11176
  id: "7b0c1d2e-3f4a-4978-bcde-901234567890",
11151
11177
  name: "Kifani",
11152
11178
  parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
11153
- validUntil: null,
11154
11179
  externalId: "eSWmXIGeu1I"
11155
11180
  },
11156
11181
  {
11157
11182
  id: "8c1d2e3f-4a5b-4089-8def-012345678901",
11158
11183
  name: "Lumela",
11159
11184
  parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
11160
- validUntil: null,
11161
11185
  externalId: "bh0b3aI1uP3"
11162
11186
  }
11163
11187
  ];
11164
- var V2_DEFAULT_MOCK_LOCATIONS = [
11188
+ var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS = MOCK_ADMINISTRATIVE_AREAS_BASE.map(withVersionFields);
11189
+ var MOCK_LOCATIONS_BASE = [
11165
11190
  {
11166
11191
  id: "6f6186ce-cd5f-4a5f-810a-2d99e7c4ba12",
11167
11192
  name: "Central Provincial Office",
11168
11193
  locationType: "CRVS_OFFICE",
11169
11194
  administrativeAreaId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
11170
- validUntil: null,
11171
11195
  externalId: "Xr3Df8WpK6Ys"
11172
11196
  },
11173
11197
  {
11174
11198
  id: "b1c2d3e4-f5a6-7890-bcde-f12345678901",
11175
11199
  name: "Central Health Post",
11176
11200
  locationType: "HEALTH_FACILITY",
11177
- administrativeAreaId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
11178
- validUntil: null
11201
+ administrativeAreaId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c"
11179
11202
  },
11180
11203
  {
11181
11204
  id: "028d2c85-ca31-426d-b5d1-2cef545a4902",
11182
11205
  name: "Ibombo District Office",
11183
11206
  locationType: "CRVS_OFFICE",
11184
11207
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11185
- validUntil: null,
11186
11208
  externalId: "Sm4Nw7GrD2Vy"
11187
11209
  },
11188
11210
  {
@@ -11190,7 +11212,6 @@ var V2_DEFAULT_MOCK_LOCATIONS = [
11190
11212
  name: "Isamba District Office",
11191
11213
  locationType: "CRVS_OFFICE",
11192
11214
  administrativeAreaId: "967032fd-3f81-478a-826c-30cb8fe121bd",
11193
- validUntil: null,
11194
11215
  externalId: "Vg1Bq5XeH9Lt"
11195
11216
  },
11196
11217
  {
@@ -11198,7 +11219,6 @@ var V2_DEFAULT_MOCK_LOCATIONS = [
11198
11219
  name: "Isango District Office",
11199
11220
  locationType: "CRVS_OFFICE",
11200
11221
  administrativeAreaId: "27160bbd-32d1-4625-812f-860226bfb92a",
11201
- validUntil: null,
11202
11222
  externalId: "Je7Lm2XqN9Vz"
11203
11223
  },
11204
11224
  {
@@ -11206,7 +11226,6 @@ var V2_DEFAULT_MOCK_LOCATIONS = [
11206
11226
  name: "Sulaka Provincial Office",
11207
11227
  locationType: "CRVS_OFFICE",
11208
11228
  administrativeAreaId: "c599b691-fd2d-45e1-abf4-d185de727fb5",
11209
- validUntil: null,
11210
11229
  externalId: "Ht2Wp9KcX5Qv"
11211
11230
  },
11212
11231
  {
@@ -11214,7 +11233,6 @@ var V2_DEFAULT_MOCK_LOCATIONS = [
11214
11233
  name: "Ilanga District Office",
11215
11234
  locationType: "CRVS_OFFICE",
11216
11235
  administrativeAreaId: "8fbd09d2-212b-47f4-beb3-5e1694931d9f",
11217
- validUntil: null,
11218
11236
  externalId: "Yp6Ds1WqN3Xz"
11219
11237
  },
11220
11238
  {
@@ -11222,7 +11240,6 @@ var V2_DEFAULT_MOCK_LOCATIONS = [
11222
11240
  name: "Chamakubi Health Post",
11223
11241
  locationType: "HEALTH_FACILITY",
11224
11242
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11225
- validUntil: null,
11226
11243
  externalId: "M1nFr8LbC2Qy"
11227
11244
  },
11228
11245
  {
@@ -11230,7 +11247,6 @@ var V2_DEFAULT_MOCK_LOCATIONS = [
11230
11247
  name: "Ibombo Rural Health Centre",
11231
11248
  locationType: "HEALTH_FACILITY",
11232
11249
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11233
- validUntil: null,
11234
11250
  externalId: "bT7pV6YrW0Xc"
11235
11251
  },
11236
11252
  {
@@ -11238,7 +11254,6 @@ var V2_DEFAULT_MOCK_LOCATIONS = [
11238
11254
  name: "Chikobo Rural Health Centre",
11239
11255
  locationType: "HEALTH_FACILITY",
11240
11256
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11241
- validUntil: null,
11242
11257
  externalId: "zE4qPn2SgJ5d"
11243
11258
  },
11244
11259
  {
@@ -11246,7 +11261,6 @@ var V2_DEFAULT_MOCK_LOCATIONS = [
11246
11261
  name: "Chilochabalenje Health Post",
11247
11262
  locationType: "HEALTH_FACILITY",
11248
11263
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11249
- validUntil: null,
11250
11264
  externalId: "H8vDs1MqR4Uf"
11251
11265
  },
11252
11266
  {
@@ -11254,7 +11268,6 @@ var V2_DEFAULT_MOCK_LOCATIONS = [
11254
11268
  name: "Chipeso Rural Health Centre",
11255
11269
  locationType: "HEALTH_FACILITY",
11256
11270
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11257
- validUntil: null,
11258
11271
  externalId: "Qw3uZ9KfX6Lm"
11259
11272
  },
11260
11273
  {
@@ -11262,7 +11275,6 @@ var V2_DEFAULT_MOCK_LOCATIONS = [
11262
11275
  name: "Chisamba Rural Health Centre",
11263
11276
  locationType: "HEALTH_FACILITY",
11264
11277
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11265
- validUntil: null,
11266
11278
  externalId: "Yr0pCg8LdM2s"
11267
11279
  },
11268
11280
  {
@@ -11270,7 +11282,6 @@ var V2_DEFAULT_MOCK_LOCATIONS = [
11270
11282
  name: "Chitanda Rural Health Centre",
11271
11283
  locationType: "HEALTH_FACILITY",
11272
11284
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11273
- validUntil: null,
11274
11285
  externalId: "tS9gJ4PwB1Qx"
11275
11286
  },
11276
11287
  {
@@ -11278,7 +11289,6 @@ var V2_DEFAULT_MOCK_LOCATIONS = [
11278
11289
  name: "Golden Valley Rural Health Centre",
11279
11290
  locationType: "HEALTH_FACILITY",
11280
11291
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11281
- validUntil: null,
11282
11292
  externalId: "Ld7Qm3XsA8Vr"
11283
11293
  },
11284
11294
  {
@@ -11286,7 +11296,6 @@ var V2_DEFAULT_MOCK_LOCATIONS = [
11286
11296
  name: "Ipongo Rural Health Centre",
11287
11297
  locationType: "HEALTH_FACILITY",
11288
11298
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11289
- validUntil: null,
11290
11299
  externalId: "kF2sW9DmH0Bt"
11291
11300
  },
11292
11301
  {
@@ -11294,7 +11303,6 @@ var V2_DEFAULT_MOCK_LOCATIONS = [
11294
11303
  name: "Itumbwe Health Post",
11295
11304
  locationType: "HEALTH_FACILITY",
11296
11305
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11297
- validUntil: null,
11298
11306
  externalId: "Ue5Xb3VaC7Pq"
11299
11307
  },
11300
11308
  {
@@ -11302,7 +11310,6 @@ var V2_DEFAULT_MOCK_LOCATIONS = [
11302
11310
  name: "Kabangalala Rural Health Centre",
11303
11311
  locationType: "HEALTH_FACILITY",
11304
11312
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11305
- validUntil: null,
11306
11313
  externalId: "Pz8Kc1TqH6Jn"
11307
11314
  },
11308
11315
  // Village offices
@@ -11311,10 +11318,10 @@ var V2_DEFAULT_MOCK_LOCATIONS = [
11311
11318
  name: "Klow Village Office",
11312
11319
  locationType: "CRVS_OFFICE",
11313
11320
  administrativeAreaId: "1d4e5f6a-7b8c-4912-8efa-345678901234",
11314
- validUntil: null,
11315
11321
  externalId: "PmAyxAJkxiJ"
11316
11322
  }
11317
11323
  ];
11324
+ var V2_DEFAULT_MOCK_LOCATIONS = MOCK_LOCATIONS_BASE.map(withVersionFields);
11318
11325
  var V2_DEFAULT_MOCK_LOCATIONS_MAP = new Map(
11319
11326
  V2_DEFAULT_MOCK_LOCATIONS.map((l) => [l.id, l])
11320
11327
  );
@@ -92,9 +92,10 @@ 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, _b, _c;
95
+ var _a;
96
+ var _b, _c;
96
97
  if (ts_morph_1.Node.isFunctionDeclaration(node) || ts_morph_1.Node.isMethodDeclaration(node)) {
97
- return (_a = node.getName()) !== null && _a !== void 0 ? _a : '<anonymous>';
98
+ return (_b = node.getName()) !== null && _b !== void 0 ? _b : '<anonymous>';
98
99
  }
99
100
  // FunctionExpression / ArrowFunction: try to pick up the assignment target.
100
101
  const parent = node.getParent();
@@ -106,7 +107,7 @@ function describeFunction(node) {
106
107
  }
107
108
  if (ts_morph_1.Node.isFunctionExpression(node) &&
108
109
  node.getNameNode() !== undefined) {
109
- return (_c = (_b = node.getNameNode()) === null || _b === void 0 ? void 0 : _b.getText()) !== null && _c !== void 0 ? _c : '<anonymous>';
110
+ return (_c = (_a = node.getNameNode()) === null || _a === void 0 ? void 0 : _a.getText()) !== null && _c !== void 0 ? _c : '<anonymous>';
110
111
  }
111
112
  return '<anonymous>';
112
113
  }