@opencrvs/toolkit 2.1.0-rc.9c06fd8 → 2.1.0-rc.9cfaa26

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