@opencrvs/toolkit 2.1.0-rc.99061f0 → 2.1.0-rc.9c06fd8

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 (69) hide show
  1. package/README.md +0 -1
  2. package/dist/application-config/index.js +1 -1
  3. package/dist/cli.js +58 -174
  4. package/dist/commons/api/router.d.ts +1570 -1589
  5. package/dist/commons/application-config/index.d.ts +6 -6
  6. package/dist/commons/conditionals/conditionals.d.ts +2102 -259
  7. package/dist/commons/events/ActionConfig.d.ts +105 -105
  8. package/dist/commons/events/ActionDocument.d.ts +119 -119
  9. package/dist/commons/events/ActionType.d.ts +62 -62
  10. package/dist/commons/events/AdvancedSearchConfig.d.ts +507 -507
  11. package/dist/commons/events/AuditLog.d.ts +43 -43
  12. package/dist/commons/events/CompositeFieldValue.d.ts +4 -4
  13. package/dist/commons/events/Conditional.d.ts +3 -3
  14. package/dist/commons/events/CountryConfigQueryInput.d.ts +590 -590
  15. package/dist/commons/events/Draft.d.ts +37 -37
  16. package/dist/commons/events/DynamicFieldValue.d.ts +9 -9
  17. package/dist/commons/events/EventConfig.d.ts +5 -5
  18. package/dist/commons/events/EventDocument.d.ts +48 -48
  19. package/dist/commons/events/EventIndex.d.ts +62 -62
  20. package/dist/commons/events/EventMetadata.d.ts +40 -40
  21. package/dist/commons/events/FieldConfig.d.ts +337 -337
  22. package/dist/commons/events/FieldType.d.ts +51 -51
  23. package/dist/commons/events/FieldTypeMapping.d.ts +100 -100
  24. package/dist/commons/events/FieldValue.d.ts +12 -12
  25. package/dist/commons/events/Flag.d.ts +15 -15
  26. package/dist/commons/events/TemplateConfig.d.ts +1 -1
  27. package/dist/commons/events/WorkqueueColumnConfig.d.ts +40 -40
  28. package/dist/commons/events/WorkqueueConfig.d.ts +820 -820
  29. package/dist/commons/events/deduplication.d.ts +1 -1
  30. package/dist/commons/events/event.d.ts +2 -2
  31. package/dist/commons/events/field.d.ts +895 -78
  32. package/dist/commons/events/locations.d.ts +6 -96
  33. package/dist/commons/events/mocks.test.utils.d.ts +4 -18
  34. package/dist/commons/events/scopes.d.ts +4 -4
  35. package/dist/commons/events/state/index.d.ts +17 -17
  36. package/dist/commons/events/state/utils.d.ts +7 -7
  37. package/dist/commons/events/test.utils.d.ts +43 -40
  38. package/dist/commons/events/utils.d.ts +114 -114
  39. package/dist/commons/notification/UserNotifications.d.ts +10 -10
  40. package/dist/environment/derived-variables.d.ts +119 -119
  41. package/dist/environment/derived-variables.d.ts.map +1 -1
  42. package/dist/environment/index.d.ts +0 -1
  43. package/dist/environment/index.d.ts.map +1 -1
  44. package/dist/environment/index.js +0 -10
  45. package/dist/environment/logger.d.ts.map +1 -1
  46. package/dist/environment/questions.d.ts +74 -75
  47. package/dist/environment/questions.d.ts.map +1 -1
  48. package/dist/environment/setup-environment.js +15 -10
  49. package/dist/environment/templates.d.ts.map +1 -1
  50. package/dist/environment/templates.js +1 -2
  51. package/dist/environment/update-workflows.d.ts.map +1 -1
  52. package/dist/environment/update-workflows.js +5 -17
  53. package/dist/environment/users.js +13 -11
  54. package/dist/environment/utils.d.ts +1 -1
  55. package/dist/events/deduplication.d.ts +1 -1
  56. package/dist/events/index.js +54 -60
  57. package/dist/migrations/v2.0/migrate-application-config-url.js +3 -4
  58. package/dist/notification/index.js +53 -46
  59. package/dist/scopes/index.d.ts +146 -146
  60. package/opencrvs-toolkit-2.1.0-rc.9c06fd8.tgz +0 -0
  61. package/package.json +4 -3
  62. package/tsconfig.tsbuildinfo +1 -1
  63. package/dist/environment/paths.d.ts +0 -7
  64. package/dist/environment/paths.d.ts.map +0 -1
  65. package/dist/environment/paths.js +0 -72
  66. package/dist/environment/upgrade.d.ts +0 -2
  67. package/dist/environment/upgrade.d.ts.map +0 -1
  68. package/dist/environment/upgrade.js +0 -82
  69. package/opencrvs-toolkit-2.1.0-rc.99061f0.tgz +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/environment/templates.ts"],"names":[],"mappings":"AAuBA,wBAAgB,QAAQ,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,CAKvC;AAID,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,CAYpD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM,CAWpD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM,CASnD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM,EAAE,CAStD;AAGD;;;;GAIG;AACH;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,QA0CzC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAsBzE"}
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/environment/templates.ts"],"names":[],"mappings":"AAsBA,wBAAgB,QAAQ,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,CAKvC;AAID,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,CAYpD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM,CAWpD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM,CASnD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM,EAAE,CAStD;AAGD;;;;GAIG;AACH;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,QA0CzC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QA4BzE"}
@@ -34,7 +34,6 @@ exports.generateInventory = generateInventory;
34
34
  const fs_1 = __importDefault(require("fs"));
35
35
  const path_1 = __importDefault(require("path"));
36
36
  const logger_1 = require("./logger");
37
- const paths_1 = require("./paths");
38
37
  const handlebars_1 = __importDefault(require("handlebars"));
39
38
  // Register a helper to increment numbers
40
39
  handlebars_1.default.registerHelper('data_label_idx', function (value) {
@@ -150,7 +149,7 @@ function copyChartsValues(env, values) {
150
149
  function generateInventory(env, values) {
151
150
  // Template and output paths
152
151
  const templatePath = path_1.default.join(__dirname, 'templates', 'inventory', 'inventory.template.yml');
153
- const outputPath = path_1.default.resolve(process.cwd(), (0, paths_1.getEnvironmentInventoryPath)(env));
152
+ const outputPath = path_1.default.join(process.cwd(), 'infrastructure', 'server-setup', 'inventory', `${env}.yml`);
154
153
  const templateFile = fs_1.default.readFileSync(templatePath, 'utf-8');
155
154
  const template = handlebars_1.default.compile(templateFile);
156
155
  values['single_node'] =
@@ -1 +1 @@
1
- {"version":3,"file":"update-workflows.d.ts","sourceRoot":"","sources":["../../src/environment/update-workflows.ts"],"names":[],"mappings":"AA+HA,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,IAAI,CAAC,CAgDhE"}
1
+ {"version":3,"file":"update-workflows.d.ts","sourceRoot":"","sources":["../../src/environment/update-workflows.ts"],"names":[],"mappings":"AAgHA,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,IAAI,CAAC,CAgDhE"}
@@ -60,21 +60,12 @@ const path_1 = require("path");
60
60
  const glob = __importStar(require("glob"));
61
61
  const yaml = __importStar(require("js-yaml"));
62
62
  const logger_1 = require("./logger");
63
- const paths_1 = require("./paths");
64
- function isDirectory(path) {
65
- try {
66
- return (0, fs_1.statSync)(path).isDirectory();
67
- }
68
- catch (_a) {
69
- return false;
70
- }
71
- }
72
63
  function extractInfrastructureNames() {
73
64
  return __awaiter(this, void 0, void 0, function* () {
74
- const files = glob.sync((0, path_1.join)('environments', '*', paths_1.INVENTORY_FILE_NAME));
75
- const infraEnvironments = files.map((file) => (0, path_1.basename)((0, path_1.dirname)(file)));
65
+ const files = glob.sync('infrastructure/server-setup/inventory/*.yml');
66
+ const infraEnvironments = files.map((file) => (0, path_1.basename)(file, '.yml'));
76
67
  if (infraEnvironments.length === 0) {
77
- console.log(`⚠️ Warning: No environment inventory files found at environments/*/${paths_1.INVENTORY_FILE_NAME}`);
68
+ console.log('⚠️ Warning: No environment directories found in infrastructure/server-setup/inventory/');
78
69
  return [];
79
70
  }
80
71
  (0, logger_1.log)('🔍 Found infrastructure configurations:', infraEnvironments.join(', '));
@@ -86,11 +77,8 @@ function extractEnvironmentNames() {
86
77
  const entries = yield (0, promises_1.readdir)('environments');
87
78
  // Filter only directories
88
79
  const environments = entries.filter((entry) => {
89
- const environmentPath = (0, path_1.join)('environments', entry);
90
- const opencrvsServicesPath = (0, path_1.join)(environmentPath, 'opencrvs-services');
91
- return (isDirectory(environmentPath) &&
92
- (0, fs_1.existsSync)(opencrvsServicesPath) &&
93
- isDirectory(opencrvsServicesPath));
80
+ const fullPath = (0, path_1.join)('environments', entry);
81
+ return (0, fs_1.statSync)(fullPath).isDirectory();
94
82
  });
95
83
  if (environments.length === 0) {
96
84
  console.log('⚠️ Warning: No environment directories found in environments/');
@@ -62,7 +62,6 @@ const path = __importStar(require("path"));
62
62
  const kleur_1 = __importDefault(require("kleur"));
63
63
  const manage_users_1 = require("./manage-users");
64
64
  const logger_1 = require("./logger");
65
- const paths_1 = require("./paths");
66
65
  function select(options) {
67
66
  return __awaiter(this, void 0, void 0, function* () {
68
67
  const inquirer = yield import('@inquirer/prompts');
@@ -77,29 +76,32 @@ function select(options) {
77
76
  * * @returns {string} Inventory file
78
77
  */
79
78
  function selectInventoryFile() {
80
- return __awaiter(this, arguments, void 0, function* (dirPath = './environments') {
79
+ return __awaiter(this, arguments, void 0, function* (dirPath = './infrastructure/server-setup/inventory/') {
81
80
  // Check if directory exists
82
81
  if (!fs.existsSync(dirPath)) {
83
82
  (0, logger_1.warn)(`⚠️ No environment configuration directory found at ${dirPath}`);
84
83
  (0, logger_1.warn)('Hint: If this is a new infrastructure repository, run `opencrvs environment init` first.');
85
84
  return null;
86
85
  }
87
- const environments = fs
86
+ // Read and filter files
87
+ const files = fs
88
88
  .readdirSync(dirPath)
89
- .filter((entry) => {
90
- const filePath = path.join(dirPath, entry);
91
- return (fs.statSync(filePath).isDirectory() &&
92
- fs.existsSync((0, paths_1.getEnvironmentInventoryPath)(entry)));
89
+ .filter((file) => {
90
+ const filePath = path.join(dirPath, file);
91
+ const isFile = fs.statSync(filePath).isFile();
92
+ const ext = path.extname(file).slice(1).toLowerCase();
93
+ return isFile && (ext === 'yml' || ext === 'yaml');
93
94
  })
94
95
  .sort();
95
- if (environments.length === 0) {
96
+ if (files.length === 0) {
96
97
  (0, logger_1.warn)(`⚠️ No environment configuration files found at ${dirPath}`);
97
98
  (0, logger_1.warn)('Hint: If this is a new infrastructure repository, run `opencrvs environment init` first.');
98
99
  return null;
99
100
  }
100
- const choices = environments.map((environment) => ({
101
- name: environment,
102
- value: (0, paths_1.getEnvironmentInventoryPath)(environment)
101
+ // Create choices - remove extension from display
102
+ const choices = files.map((file) => ({
103
+ name: path.basename(file, path.extname(file)),
104
+ value: path.join(dirPath, file)
103
105
  }));
104
106
  const selectedFile = yield select({
105
107
  message: 'Select environment (inventory file) to load users:',
@@ -1,7 +1,7 @@
1
1
  import { Secret, Variable } from './github';
2
2
  import { Answers } from './custom-types';
3
3
  export declare function generateLongPassword(): string;
4
- export declare function findExistingValue<T extends string>(name: string, type: T, scope: 'ENVIRONMENT' | 'REPOSITORY', existingValues: Array<Secret | Variable>): (T extends 'SECRET' ? Secret : T extends 'VARIABLE' ? Variable : never) | undefined;
4
+ export declare function findExistingValue<T extends string>(name: string, type: T, scope: 'ENVIRONMENT' | 'REPOSITORY', existingValues: Array<Secret | Variable>): (T extends "SECRET" ? Secret : T extends "VARIABLE" ? Variable : never) | undefined;
5
5
  /**
6
6
  * Merges and stores secrets in `.env.{environment}` file.
7
7
  * Updates existing variables, preserves unchanged ones, adds new ones.
@@ -59,8 +59,8 @@ export declare function field(fieldId: string): {
59
59
  fieldId: string;
60
60
  type: "dateRange";
61
61
  options: {
62
- pivot?: number | undefined;
63
62
  days: number;
63
+ pivot?: number | undefined;
64
64
  boost?: number | undefined;
65
65
  matchAgainst?: string | undefined;
66
66
  };
@@ -161,9 +161,7 @@ __export(events_exports, {
161
161
  LanguageConfig: () => LanguageConfig,
162
162
  LegalStatuses: () => LegalStatuses,
163
163
  Location: () => Location,
164
- LocationStatus: () => LocationStatus,
165
164
  LocationTypeV1: () => LocationTypeV1,
166
- LocationVersion: () => LocationVersion,
167
165
  METADATA_FIELD_PREFIX: () => METADATA_FIELD_PREFIX,
168
166
  MarkAsDuplicateActionInput: () => MarkAsDuplicateActionInput,
169
167
  MarkNotDuplicateActionInput: () => MarkNotDuplicateActionInput,
@@ -203,8 +201,6 @@ __export(events_exports, {
203
201
  SelectDateRangeOption: () => SelectDateRangeOption,
204
202
  SelectDateRangeValue: () => SelectDateRangeValue,
205
203
  SelectOption: () => SelectOption,
206
- SetAdministrativeAreaPayload: () => SetAdministrativeAreaPayload,
207
- SetLocationPayload: () => SetLocationPayload,
208
204
  ShowConditional: () => ShowConditional,
209
205
  SignatureFieldValue: () => SignatureFieldValue,
210
206
  StaticDataEntry: () => StaticDataEntry,
@@ -437,7 +433,6 @@ __export(events_exports, {
437
433
  resolveDateOfEvent: () => resolveDateOfEvent,
438
434
  resolveEventCustomFlags: () => resolveEventCustomFlags,
439
435
  resolvePlaceOfEvent: () => resolvePlaceOfEvent,
440
- resolveVersion: () => resolveVersion,
441
436
  runClientFunction: () => runClientFunction,
442
437
  runFieldValidations: () => runFieldValidations,
443
438
  runStructuralValidations: () => runStructuralValidations,
@@ -1684,7 +1679,7 @@ var EditAction = ActionBase.extend(
1684
1679
  /** @deprecated New Edit-actions should no longer contain content. This is kept for old 2.0 edits. */
1685
1680
  content: z14.object({
1686
1681
  comment: z14.string().describe("Comment for the edit action.").optional()
1687
- }).optional()
1682
+ })
1688
1683
  }).shape
1689
1684
  );
1690
1685
  var PrintContent = z14.object({
@@ -9966,6 +9961,7 @@ function eventPayloadGenerator(rng, configuration = tennisClubMembershipEvent) {
9966
9961
  },
9967
9962
  edit: (eventId, input = {}) => ({
9968
9963
  type: ActionType.EDIT,
9964
+ content: { comment: "Test comment" },
9969
9965
  transactionId: input.transactionId ?? getUUID(),
9970
9966
  declaration: input.declaration ?? generateActionDeclarationInput(configuration, ActionType.EDIT, rng),
9971
9967
  annotation: input.annotation ?? generateActionAnnotationInput(configuration, ActionType.EDIT, rng),
@@ -10471,53 +10467,21 @@ var LocationTypeV1 = z43.enum([
10471
10467
  "CRVS_OFFICE",
10472
10468
  "HEALTH_FACILITY"
10473
10469
  ]);
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
- });
10482
10470
  var AdministrativeArea = z43.object({
10483
10471
  id: UUID,
10484
10472
  name: z43.string(),
10485
10473
  externalId: z43.string().nullish(),
10486
10474
  parentId: UUID.nullable(),
10487
- status: LocationStatus,
10488
- versions: z43.array(LocationVersion)
10475
+ validUntil: z43.iso.datetime().nullable()
10489
10476
  });
10490
10477
  var Location = z43.object({
10491
10478
  id: UUID,
10492
10479
  name: z43.string(),
10493
10480
  externalId: z43.string().nullish(),
10494
10481
  administrativeAreaId: UUID.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
+ validUntil: z43.iso.datetime().nullable(),
10504
10483
  locationType: z43.string().nullable()
10505
10484
  });
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
- }
10521
10485
  function matchesJurisdictionFilter(locationIds, filter, user2) {
10522
10486
  if (!locationIds) {
10523
10487
  return false;
@@ -10997,80 +10961,75 @@ function getFilePathsFromEvent(event2) {
10997
10961
  }
10998
10962
 
10999
10963
  // ../commons/src/events/mocks.test.utils.ts
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
+ var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS = [
11016
10965
  {
11017
10966
  id: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
11018
10967
  name: "Central",
11019
10968
  parentId: null,
10969
+ validUntil: null,
11020
10970
  externalId: "ydyJb1RAy4U1"
11021
10971
  },
11022
10972
  {
11023
10973
  id: "c599b691-fd2d-45e1-abf4-d185de727fb5",
11024
10974
  name: "Sulaka",
11025
10975
  parentId: null,
10976
+ validUntil: null,
11026
10977
  externalId: "pQ8nGxWmZ2Q3"
11027
10978
  },
11028
10979
  {
11029
10980
  id: "7ef2b9c7-5e6d-49f6-ae05-656207d0fc64",
11030
10981
  name: "Pualula",
11031
10982
  parentId: null,
10983
+ validUntil: null,
11032
10984
  externalId: "Aq91DweLmT8k"
11033
10985
  },
11034
10986
  {
11035
10987
  id: "6d1a59df-988c-4021-a846-ccbc021931a7",
11036
10988
  name: "Chuminga",
11037
10989
  parentId: null,
10990
+ validUntil: null,
11038
10991
  externalId: "Rw0fYNh2Xk9a"
11039
10992
  },
11040
10993
  {
11041
10994
  id: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11042
10995
  name: "Ibombo",
11043
10996
  parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
10997
+ validUntil: null,
11044
10998
  externalId: "k7DsP4vbN1Qe"
11045
10999
  },
11046
11000
  {
11047
11001
  id: "27160bbd-32d1-4625-812f-860226bfb92a",
11048
11002
  name: "Isango",
11049
11003
  parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
11004
+ validUntil: null,
11050
11005
  externalId: "Gm3Z9eQpHw4L"
11051
11006
  },
11052
11007
  {
11053
11008
  id: "967032fd-3f81-478a-826c-30cb8fe121bd",
11054
11009
  name: "Isamba",
11055
11010
  parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
11011
+ validUntil: null,
11056
11012
  externalId: "sT0xVu1KqJ7r"
11057
11013
  },
11058
11014
  {
11059
11015
  id: "89a33893-b17d-481d-a26d-6461e7ac1651",
11060
11016
  name: "Itambo",
11061
11017
  parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
11018
+ validUntil: null,
11062
11019
  externalId: "Nq6Bv2HpL9Te"
11063
11020
  },
11064
11021
  {
11065
11022
  id: "d42ab2fe-e7ed-470e-8b31-4fb27f9b8250",
11066
11023
  name: "Ezhi",
11067
11024
  parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
11025
+ validUntil: null,
11068
11026
  externalId: "xK8cQ0ZRy5Wd"
11069
11027
  },
11070
11028
  {
11071
11029
  id: "8fbd09d2-212b-47f4-beb3-5e1694931d9f",
11072
11030
  name: "Ilanga",
11073
11031
  parentId: "c599b691-fd2d-45e1-abf4-d185de727fb5",
11032
+ validUntil: null,
11074
11033
  externalId: "Cq4Jm1XvN8Ls"
11075
11034
  },
11076
11035
  // Villages under Ibombo (62a0ccb4-880d-4f30-8882-f256007dfff9)
@@ -11078,42 +11037,49 @@ var MOCK_ADMINISTRATIVE_AREAS_BASE = [
11078
11037
  id: "1d4e5f6a-7b8c-4912-8efa-345678901234",
11079
11038
  name: "Klow",
11080
11039
  parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11040
+ validUntil: null,
11081
11041
  externalId: "IkYcYBUcyY2"
11082
11042
  },
11083
11043
  {
11084
11044
  id: "2e5f6a7b-8c9d-4a23-8fab-456789012345",
11085
11045
  name: "Mbondo",
11086
11046
  parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11047
+ validUntil: null,
11087
11048
  externalId: "Qhvv5hvo3mY"
11088
11049
  },
11089
11050
  {
11090
11051
  id: "3f6a7b8c-9d0e-4b34-8abc-567890123456",
11091
11052
  name: "Ndara",
11092
11053
  parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11054
+ validUntil: null,
11093
11055
  externalId: "crXh068O9TR"
11094
11056
  },
11095
11057
  {
11096
11058
  id: "4a7b8c9d-0e1f-4c45-abcd-678901234567",
11097
11059
  name: "Olani",
11098
11060
  parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11061
+ validUntil: null,
11099
11062
  externalId: "r00It8Tvvp7"
11100
11063
  },
11101
11064
  {
11102
11065
  id: "5b8c9d0e-1f2a-4d56-bcde-789012345678",
11103
11066
  name: "Pemba",
11104
11067
  parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11068
+ validUntil: null,
11105
11069
  externalId: "ZnUWsbONIaH"
11106
11070
  },
11107
11071
  {
11108
11072
  id: "6c9d0e1f-2a3b-4e67-8def-890123456789",
11109
11073
  name: "Quanza",
11110
11074
  parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11075
+ validUntil: null,
11111
11076
  externalId: "fDZycvQTa7l"
11112
11077
  },
11113
11078
  {
11114
11079
  id: "7d0e1f2a-3b4c-4f78-8efa-901234567890",
11115
11080
  name: "Rivka",
11116
11081
  parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11082
+ validUntil: null,
11117
11083
  externalId: "KqswxCGTELa"
11118
11084
  },
11119
11085
  // Villages under Isamba (967032fd-3f81-478a-826c-30cb8fe121bd)
@@ -11121,30 +11087,35 @@ var MOCK_ADMINISTRATIVE_AREAS_BASE = [
11121
11087
  id: "8e1f2a3b-4c5d-4089-8fab-012345678901",
11122
11088
  name: "Mbula",
11123
11089
  parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
11090
+ validUntil: null,
11124
11091
  externalId: "osEbKjRc9Kg"
11125
11092
  },
11126
11093
  {
11127
11094
  id: "9f2a3b4c-5d6e-4190-8abf-123456789012",
11128
11095
  name: "Ndoki",
11129
11096
  parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
11097
+ validUntil: null,
11130
11098
  externalId: "aq4daBUAGr3"
11131
11099
  },
11132
11100
  {
11133
11101
  id: "0a3b4c5d-6e7f-4201-abcd-234567890123",
11134
11102
  name: "Tsanga",
11135
11103
  parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
11104
+ validUntil: null,
11136
11105
  externalId: "cqis6Y8trbJ"
11137
11106
  },
11138
11107
  {
11139
11108
  id: "1b4c5d6e-7f8a-4312-bcde-345678901234",
11140
11109
  name: "Waziri",
11141
11110
  parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
11111
+ validUntil: null,
11142
11112
  externalId: "LMijHPyyx6d"
11143
11113
  },
11144
11114
  {
11145
11115
  id: "2c5d6e7f-8a9b-4423-8def-456789012345",
11146
11116
  name: "Zimbi",
11147
11117
  parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
11118
+ validUntil: null,
11148
11119
  externalId: "pcQYbPuKGZ7"
11149
11120
  },
11150
11121
  // Villages under Itambo (89a33893-b17d-481d-a26d-6461e7ac1651)
@@ -11152,59 +11123,67 @@ var MOCK_ADMINISTRATIVE_AREAS_BASE = [
11152
11123
  id: "3d6e7f8a-9b0c-4534-8efa-567890123456",
11153
11124
  name: "Felani",
11154
11125
  parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
11126
+ validUntil: null,
11155
11127
  externalId: "gSqpoCGdMXp"
11156
11128
  },
11157
11129
  {
11158
11130
  id: "4e7f8a9b-0c1d-4645-8fab-678901234567",
11159
11131
  name: "Goroma",
11160
11132
  parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
11133
+ validUntil: null,
11161
11134
  externalId: "KvAAIaNqVrp"
11162
11135
  },
11163
11136
  {
11164
11137
  id: "5f8a9b0c-1d2e-4756-8abc-789012345678",
11165
11138
  name: "Halifu",
11166
11139
  parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
11140
+ validUntil: null,
11167
11141
  externalId: "qe4UnEVt1hv"
11168
11142
  },
11169
11143
  {
11170
11144
  id: "6a9b0c1d-2e3f-4867-abcd-890123456789",
11171
11145
  name: "Jabari",
11172
11146
  parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
11147
+ validUntil: null,
11173
11148
  externalId: "yHH9Nz4rLOt"
11174
11149
  },
11175
11150
  {
11176
11151
  id: "7b0c1d2e-3f4a-4978-bcde-901234567890",
11177
11152
  name: "Kifani",
11178
11153
  parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
11154
+ validUntil: null,
11179
11155
  externalId: "eSWmXIGeu1I"
11180
11156
  },
11181
11157
  {
11182
11158
  id: "8c1d2e3f-4a5b-4089-8def-012345678901",
11183
11159
  name: "Lumela",
11184
11160
  parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
11161
+ validUntil: null,
11185
11162
  externalId: "bh0b3aI1uP3"
11186
11163
  }
11187
11164
  ];
11188
- var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS = MOCK_ADMINISTRATIVE_AREAS_BASE.map(withVersionFields);
11189
- var MOCK_LOCATIONS_BASE = [
11165
+ var V2_DEFAULT_MOCK_LOCATIONS = [
11190
11166
  {
11191
11167
  id: "6f6186ce-cd5f-4a5f-810a-2d99e7c4ba12",
11192
11168
  name: "Central Provincial Office",
11193
11169
  locationType: "CRVS_OFFICE",
11194
11170
  administrativeAreaId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
11171
+ validUntil: null,
11195
11172
  externalId: "Xr3Df8WpK6Ys"
11196
11173
  },
11197
11174
  {
11198
11175
  id: "b1c2d3e4-f5a6-7890-bcde-f12345678901",
11199
11176
  name: "Central Health Post",
11200
11177
  locationType: "HEALTH_FACILITY",
11201
- administrativeAreaId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c"
11178
+ administrativeAreaId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
11179
+ validUntil: null
11202
11180
  },
11203
11181
  {
11204
11182
  id: "028d2c85-ca31-426d-b5d1-2cef545a4902",
11205
11183
  name: "Ibombo District Office",
11206
11184
  locationType: "CRVS_OFFICE",
11207
11185
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11186
+ validUntil: null,
11208
11187
  externalId: "Sm4Nw7GrD2Vy"
11209
11188
  },
11210
11189
  {
@@ -11212,6 +11191,7 @@ var MOCK_LOCATIONS_BASE = [
11212
11191
  name: "Isamba District Office",
11213
11192
  locationType: "CRVS_OFFICE",
11214
11193
  administrativeAreaId: "967032fd-3f81-478a-826c-30cb8fe121bd",
11194
+ validUntil: null,
11215
11195
  externalId: "Vg1Bq5XeH9Lt"
11216
11196
  },
11217
11197
  {
@@ -11219,6 +11199,7 @@ var MOCK_LOCATIONS_BASE = [
11219
11199
  name: "Isango District Office",
11220
11200
  locationType: "CRVS_OFFICE",
11221
11201
  administrativeAreaId: "27160bbd-32d1-4625-812f-860226bfb92a",
11202
+ validUntil: null,
11222
11203
  externalId: "Je7Lm2XqN9Vz"
11223
11204
  },
11224
11205
  {
@@ -11226,6 +11207,7 @@ var MOCK_LOCATIONS_BASE = [
11226
11207
  name: "Sulaka Provincial Office",
11227
11208
  locationType: "CRVS_OFFICE",
11228
11209
  administrativeAreaId: "c599b691-fd2d-45e1-abf4-d185de727fb5",
11210
+ validUntil: null,
11229
11211
  externalId: "Ht2Wp9KcX5Qv"
11230
11212
  },
11231
11213
  {
@@ -11233,6 +11215,7 @@ var MOCK_LOCATIONS_BASE = [
11233
11215
  name: "Ilanga District Office",
11234
11216
  locationType: "CRVS_OFFICE",
11235
11217
  administrativeAreaId: "8fbd09d2-212b-47f4-beb3-5e1694931d9f",
11218
+ validUntil: null,
11236
11219
  externalId: "Yp6Ds1WqN3Xz"
11237
11220
  },
11238
11221
  {
@@ -11240,6 +11223,7 @@ var MOCK_LOCATIONS_BASE = [
11240
11223
  name: "Chamakubi Health Post",
11241
11224
  locationType: "HEALTH_FACILITY",
11242
11225
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11226
+ validUntil: null,
11243
11227
  externalId: "M1nFr8LbC2Qy"
11244
11228
  },
11245
11229
  {
@@ -11247,6 +11231,7 @@ var MOCK_LOCATIONS_BASE = [
11247
11231
  name: "Ibombo Rural Health Centre",
11248
11232
  locationType: "HEALTH_FACILITY",
11249
11233
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11234
+ validUntil: null,
11250
11235
  externalId: "bT7pV6YrW0Xc"
11251
11236
  },
11252
11237
  {
@@ -11254,6 +11239,7 @@ var MOCK_LOCATIONS_BASE = [
11254
11239
  name: "Chikobo Rural Health Centre",
11255
11240
  locationType: "HEALTH_FACILITY",
11256
11241
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11242
+ validUntil: null,
11257
11243
  externalId: "zE4qPn2SgJ5d"
11258
11244
  },
11259
11245
  {
@@ -11261,6 +11247,7 @@ var MOCK_LOCATIONS_BASE = [
11261
11247
  name: "Chilochabalenje Health Post",
11262
11248
  locationType: "HEALTH_FACILITY",
11263
11249
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11250
+ validUntil: null,
11264
11251
  externalId: "H8vDs1MqR4Uf"
11265
11252
  },
11266
11253
  {
@@ -11268,6 +11255,7 @@ var MOCK_LOCATIONS_BASE = [
11268
11255
  name: "Chipeso Rural Health Centre",
11269
11256
  locationType: "HEALTH_FACILITY",
11270
11257
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11258
+ validUntil: null,
11271
11259
  externalId: "Qw3uZ9KfX6Lm"
11272
11260
  },
11273
11261
  {
@@ -11275,6 +11263,7 @@ var MOCK_LOCATIONS_BASE = [
11275
11263
  name: "Chisamba Rural Health Centre",
11276
11264
  locationType: "HEALTH_FACILITY",
11277
11265
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11266
+ validUntil: null,
11278
11267
  externalId: "Yr0pCg8LdM2s"
11279
11268
  },
11280
11269
  {
@@ -11282,6 +11271,7 @@ var MOCK_LOCATIONS_BASE = [
11282
11271
  name: "Chitanda Rural Health Centre",
11283
11272
  locationType: "HEALTH_FACILITY",
11284
11273
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11274
+ validUntil: null,
11285
11275
  externalId: "tS9gJ4PwB1Qx"
11286
11276
  },
11287
11277
  {
@@ -11289,6 +11279,7 @@ var MOCK_LOCATIONS_BASE = [
11289
11279
  name: "Golden Valley Rural Health Centre",
11290
11280
  locationType: "HEALTH_FACILITY",
11291
11281
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11282
+ validUntil: null,
11292
11283
  externalId: "Ld7Qm3XsA8Vr"
11293
11284
  },
11294
11285
  {
@@ -11296,6 +11287,7 @@ var MOCK_LOCATIONS_BASE = [
11296
11287
  name: "Ipongo Rural Health Centre",
11297
11288
  locationType: "HEALTH_FACILITY",
11298
11289
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11290
+ validUntil: null,
11299
11291
  externalId: "kF2sW9DmH0Bt"
11300
11292
  },
11301
11293
  {
@@ -11303,6 +11295,7 @@ var MOCK_LOCATIONS_BASE = [
11303
11295
  name: "Itumbwe Health Post",
11304
11296
  locationType: "HEALTH_FACILITY",
11305
11297
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11298
+ validUntil: null,
11306
11299
  externalId: "Ue5Xb3VaC7Pq"
11307
11300
  },
11308
11301
  {
@@ -11310,6 +11303,7 @@ var MOCK_LOCATIONS_BASE = [
11310
11303
  name: "Kabangalala Rural Health Centre",
11311
11304
  locationType: "HEALTH_FACILITY",
11312
11305
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
11306
+ validUntil: null,
11313
11307
  externalId: "Pz8Kc1TqH6Jn"
11314
11308
  },
11315
11309
  // Village offices
@@ -11318,10 +11312,10 @@ var MOCK_LOCATIONS_BASE = [
11318
11312
  name: "Klow Village Office",
11319
11313
  locationType: "CRVS_OFFICE",
11320
11314
  administrativeAreaId: "1d4e5f6a-7b8c-4912-8efa-345678901234",
11315
+ validUntil: null,
11321
11316
  externalId: "PmAyxAJkxiJ"
11322
11317
  }
11323
11318
  ];
11324
- var V2_DEFAULT_MOCK_LOCATIONS = MOCK_LOCATIONS_BASE.map(withVersionFields);
11325
11319
  var V2_DEFAULT_MOCK_LOCATIONS_MAP = new Map(
11326
11320
  V2_DEFAULT_MOCK_LOCATIONS.map((l) => [l.id, l])
11327
11321
  );
@@ -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 (_b = node.getName()) !== null && _b !== void 0 ? _b : '<anonymous>';
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 = (_a = node.getNameNode()) === null || _a === void 0 ? void 0 : _a.getText()) !== null && _c !== void 0 ? _c : '<anonymous>';
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
  }