@opencrvs/toolkit 2.1.0-rc.ce802f4 → 2.1.0-rc.d04f6c3

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 (57) hide show
  1. package/dist/application-config/index.js +0 -1
  2. package/dist/commons/api/router.d.ts +1537 -1627
  3. package/dist/commons/application-config/index.d.ts +6 -6
  4. package/dist/commons/conditionals/conditionals.d.ts +2102 -259
  5. package/dist/commons/events/ActionConfig.d.ts +105 -105
  6. package/dist/commons/events/ActionDocument.d.ts +113 -113
  7. package/dist/commons/events/ActionType.d.ts +62 -62
  8. package/dist/commons/events/AdvancedSearchConfig.d.ts +507 -513
  9. package/dist/commons/events/AuditLog.d.ts +42 -65
  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 +46 -46
  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 +337 -342
  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 +820 -820
  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 +895 -78
  30. package/dist/commons/events/index.d.ts +0 -1
  31. package/dist/commons/events/locations.d.ts +6 -103
  32. package/dist/commons/events/mocks.test.utils.d.ts +4 -18
  33. package/dist/commons/events/scopes.d.ts +4 -4
  34. package/dist/commons/events/state/index.d.ts +17 -17
  35. package/dist/commons/events/state/utils.d.ts +7 -7
  36. package/dist/commons/events/test.utils.d.ts +40 -40
  37. package/dist/commons/events/utils.d.ts +114 -114
  38. package/dist/commons/notification/UserNotifications.d.ts +10 -10
  39. package/dist/conditionals/index.js +0 -1
  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/logger.d.ts.map +1 -1
  43. package/dist/environment/questions.d.ts +74 -75
  44. package/dist/environment/questions.d.ts.map +1 -1
  45. package/dist/environment/setup-environment.js +14 -8
  46. package/dist/environment/utils.d.ts +1 -1
  47. package/dist/events/deduplication.d.ts +1 -1
  48. package/dist/events/index.js +52 -140
  49. package/dist/migrations/v2.0/migrate-application-config-url.js +3 -4
  50. package/dist/notification/index.js +77 -137
  51. package/dist/scopes/index.d.ts +146 -148
  52. package/dist/scopes/index.js +0 -1
  53. package/opencrvs-toolkit-2.1.0-rc.d04f6c3.tgz +0 -0
  54. package/package.json +4 -3
  55. package/tsconfig.tsbuildinfo +1 -1
  56. package/dist/commons/events/locationPayloads.d.ts +0 -95
  57. package/opencrvs-toolkit-2.1.0-rc.ce802f4.tgz +0 -0
@@ -38,7 +38,7 @@ __export(notification_exports, {
38
38
  triggerUserEventNotification: () => triggerUserEventNotification
39
39
  });
40
40
  module.exports = __toCommonJS(notification_exports);
41
- var z46 = __toESM(require("zod/v4"));
41
+ var z45 = __toESM(require("zod/v4"));
42
42
 
43
43
  // ../commons/src/url.ts
44
44
  function joinUrl(base, path) {
@@ -96,7 +96,6 @@ var PlainScopeType = z2.enum([
96
96
  "integration.create",
97
97
  "record.import",
98
98
  "config.update-all",
99
- "location.edit",
100
99
  "attachment.upload",
101
100
  "profile.electronic-signature",
102
101
  "user.read-only-my-audit",
@@ -531,23 +530,6 @@ var IntegrationRefreshSecretEntrySchema = AuditLogEntryBase.extend({
531
530
  requestData: z5.object({ id: z5.string() }),
532
531
  responseSummary: z5.object({ clientId: z5.string() })
533
532
  });
534
- var LocationCreateEntrySchema = AuditLogEntryBase.extend({
535
- operation: z5.enum(["locations.create", "administrativeAreas.create"]),
536
- requestData: z5.object({
537
- id: z5.string(),
538
- versionId: z5.string(),
539
- name: z5.string(),
540
- externalId: z5.string().nullish(),
541
- administrativeAreaId: z5.string().nullish(),
542
- // locations only
543
- parentId: z5.string().nullish(),
544
- // administrative areas only
545
- locationType: z5.string().nullish(),
546
- // locations only
547
- effectiveFrom: z5.string(),
548
- status: z5.string()
549
- })
550
- });
551
533
  var AttachmentUploadEntrySchema = AuditLogEntryBase.extend({
552
534
  operation: z5.literal("attachments.upload"),
553
535
  requestData: z5.object({
@@ -623,7 +605,6 @@ var AuditLogEntrySchema = z5.discriminatedUnion("operation", [
623
605
  IntegrationActivateEntrySchema,
624
606
  IntegrationDeleteEntrySchema,
625
607
  IntegrationRefreshSecretEntrySchema,
626
- LocationCreateEntrySchema,
627
608
  AttachmentUploadEntrySchema,
628
609
  UserCreateEntrySchema,
629
610
  UserReasonEntrySchema,
@@ -7378,44 +7359,21 @@ var LocationTypeV1 = z43.enum([
7378
7359
  "CRVS_OFFICE",
7379
7360
  "HEALTH_FACILITY"
7380
7361
  ]);
7381
- var LocationStatus = z43.enum(["active", "inactive"]);
7382
- var LocationVersion = z43.object({
7383
- versionId: UUID,
7384
- effectiveFrom: z43.iso.date(),
7385
- name: z43.string(),
7386
- externalId: z43.string().nullish(),
7387
- status: LocationStatus
7388
- });
7389
7362
  var AdministrativeArea = z43.object({
7390
7363
  id: UUID,
7391
7364
  name: z43.string(),
7392
7365
  externalId: z43.string().nullish(),
7393
7366
  parentId: UUID.nullable(),
7394
- status: LocationStatus,
7395
- versions: z43.array(LocationVersion)
7367
+ validUntil: z43.iso.datetime().nullable()
7396
7368
  });
7397
7369
  var Location = z43.object({
7398
7370
  id: UUID,
7399
7371
  name: z43.string(),
7400
7372
  externalId: z43.string().nullish(),
7401
7373
  administrativeAreaId: UUID.nullable(),
7402
- locationType: z43.string().nullable(),
7403
- status: LocationStatus,
7404
- versions: z43.array(LocationVersion)
7405
- });
7406
- var SetLocationPayload = z43.object({
7407
- id: UUID,
7408
- name: z43.string(),
7409
- externalId: z43.string().nullish(),
7410
- administrativeAreaId: UUID.nullable(),
7374
+ validUntil: z43.iso.datetime().nullable(),
7411
7375
  locationType: z43.string().nullable()
7412
7376
  });
7413
- var SetAdministrativeAreaPayload = z43.object({
7414
- id: UUID,
7415
- name: z43.string(),
7416
- externalId: z43.string().nullish(),
7417
- parentId: UUID.nullable()
7418
- });
7419
7377
 
7420
7378
  // ../commons/src/events/scopes.ts
7421
7379
  var ACTION_SCOPE_MAP = {
@@ -7514,80 +7472,75 @@ var REJECTED_ACTIONS = [
7514
7472
  var import_lodash7 = require("lodash");
7515
7473
 
7516
7474
  // ../commons/src/events/mocks.test.utils.ts
7517
- function withVersionFields(entity) {
7518
- return {
7519
- ...entity,
7520
- status: "active",
7521
- versions: [
7522
- {
7523
- versionId: entity.id,
7524
- effectiveFrom: "0001-01-01",
7525
- name: entity.name,
7526
- externalId: entity.externalId ?? null,
7527
- status: "active"
7528
- }
7529
- ]
7530
- };
7531
- }
7532
- var MOCK_ADMINISTRATIVE_AREAS_BASE = [
7475
+ var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS = [
7533
7476
  {
7534
7477
  id: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
7535
7478
  name: "Central",
7536
7479
  parentId: null,
7480
+ validUntil: null,
7537
7481
  externalId: "ydyJb1RAy4U1"
7538
7482
  },
7539
7483
  {
7540
7484
  id: "c599b691-fd2d-45e1-abf4-d185de727fb5",
7541
7485
  name: "Sulaka",
7542
7486
  parentId: null,
7487
+ validUntil: null,
7543
7488
  externalId: "pQ8nGxWmZ2Q3"
7544
7489
  },
7545
7490
  {
7546
7491
  id: "7ef2b9c7-5e6d-49f6-ae05-656207d0fc64",
7547
7492
  name: "Pualula",
7548
7493
  parentId: null,
7494
+ validUntil: null,
7549
7495
  externalId: "Aq91DweLmT8k"
7550
7496
  },
7551
7497
  {
7552
7498
  id: "6d1a59df-988c-4021-a846-ccbc021931a7",
7553
7499
  name: "Chuminga",
7554
7500
  parentId: null,
7501
+ validUntil: null,
7555
7502
  externalId: "Rw0fYNh2Xk9a"
7556
7503
  },
7557
7504
  {
7558
7505
  id: "62a0ccb4-880d-4f30-8882-f256007dfff9",
7559
7506
  name: "Ibombo",
7560
7507
  parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
7508
+ validUntil: null,
7561
7509
  externalId: "k7DsP4vbN1Qe"
7562
7510
  },
7563
7511
  {
7564
7512
  id: "27160bbd-32d1-4625-812f-860226bfb92a",
7565
7513
  name: "Isango",
7566
7514
  parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
7515
+ validUntil: null,
7567
7516
  externalId: "Gm3Z9eQpHw4L"
7568
7517
  },
7569
7518
  {
7570
7519
  id: "967032fd-3f81-478a-826c-30cb8fe121bd",
7571
7520
  name: "Isamba",
7572
7521
  parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
7522
+ validUntil: null,
7573
7523
  externalId: "sT0xVu1KqJ7r"
7574
7524
  },
7575
7525
  {
7576
7526
  id: "89a33893-b17d-481d-a26d-6461e7ac1651",
7577
7527
  name: "Itambo",
7578
7528
  parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
7529
+ validUntil: null,
7579
7530
  externalId: "Nq6Bv2HpL9Te"
7580
7531
  },
7581
7532
  {
7582
7533
  id: "d42ab2fe-e7ed-470e-8b31-4fb27f9b8250",
7583
7534
  name: "Ezhi",
7584
7535
  parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
7536
+ validUntil: null,
7585
7537
  externalId: "xK8cQ0ZRy5Wd"
7586
7538
  },
7587
7539
  {
7588
7540
  id: "8fbd09d2-212b-47f4-beb3-5e1694931d9f",
7589
7541
  name: "Ilanga",
7590
7542
  parentId: "c599b691-fd2d-45e1-abf4-d185de727fb5",
7543
+ validUntil: null,
7591
7544
  externalId: "Cq4Jm1XvN8Ls"
7592
7545
  },
7593
7546
  // Villages under Ibombo (62a0ccb4-880d-4f30-8882-f256007dfff9)
@@ -7595,42 +7548,49 @@ var MOCK_ADMINISTRATIVE_AREAS_BASE = [
7595
7548
  id: "1d4e5f6a-7b8c-4912-8efa-345678901234",
7596
7549
  name: "Klow",
7597
7550
  parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
7551
+ validUntil: null,
7598
7552
  externalId: "IkYcYBUcyY2"
7599
7553
  },
7600
7554
  {
7601
7555
  id: "2e5f6a7b-8c9d-4a23-8fab-456789012345",
7602
7556
  name: "Mbondo",
7603
7557
  parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
7558
+ validUntil: null,
7604
7559
  externalId: "Qhvv5hvo3mY"
7605
7560
  },
7606
7561
  {
7607
7562
  id: "3f6a7b8c-9d0e-4b34-8abc-567890123456",
7608
7563
  name: "Ndara",
7609
7564
  parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
7565
+ validUntil: null,
7610
7566
  externalId: "crXh068O9TR"
7611
7567
  },
7612
7568
  {
7613
7569
  id: "4a7b8c9d-0e1f-4c45-abcd-678901234567",
7614
7570
  name: "Olani",
7615
7571
  parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
7572
+ validUntil: null,
7616
7573
  externalId: "r00It8Tvvp7"
7617
7574
  },
7618
7575
  {
7619
7576
  id: "5b8c9d0e-1f2a-4d56-bcde-789012345678",
7620
7577
  name: "Pemba",
7621
7578
  parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
7579
+ validUntil: null,
7622
7580
  externalId: "ZnUWsbONIaH"
7623
7581
  },
7624
7582
  {
7625
7583
  id: "6c9d0e1f-2a3b-4e67-8def-890123456789",
7626
7584
  name: "Quanza",
7627
7585
  parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
7586
+ validUntil: null,
7628
7587
  externalId: "fDZycvQTa7l"
7629
7588
  },
7630
7589
  {
7631
7590
  id: "7d0e1f2a-3b4c-4f78-8efa-901234567890",
7632
7591
  name: "Rivka",
7633
7592
  parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
7593
+ validUntil: null,
7634
7594
  externalId: "KqswxCGTELa"
7635
7595
  },
7636
7596
  // Villages under Isamba (967032fd-3f81-478a-826c-30cb8fe121bd)
@@ -7638,30 +7598,35 @@ var MOCK_ADMINISTRATIVE_AREAS_BASE = [
7638
7598
  id: "8e1f2a3b-4c5d-4089-8fab-012345678901",
7639
7599
  name: "Mbula",
7640
7600
  parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
7601
+ validUntil: null,
7641
7602
  externalId: "osEbKjRc9Kg"
7642
7603
  },
7643
7604
  {
7644
7605
  id: "9f2a3b4c-5d6e-4190-8abf-123456789012",
7645
7606
  name: "Ndoki",
7646
7607
  parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
7608
+ validUntil: null,
7647
7609
  externalId: "aq4daBUAGr3"
7648
7610
  },
7649
7611
  {
7650
7612
  id: "0a3b4c5d-6e7f-4201-abcd-234567890123",
7651
7613
  name: "Tsanga",
7652
7614
  parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
7615
+ validUntil: null,
7653
7616
  externalId: "cqis6Y8trbJ"
7654
7617
  },
7655
7618
  {
7656
7619
  id: "1b4c5d6e-7f8a-4312-bcde-345678901234",
7657
7620
  name: "Waziri",
7658
7621
  parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
7622
+ validUntil: null,
7659
7623
  externalId: "LMijHPyyx6d"
7660
7624
  },
7661
7625
  {
7662
7626
  id: "2c5d6e7f-8a9b-4423-8def-456789012345",
7663
7627
  name: "Zimbi",
7664
7628
  parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
7629
+ validUntil: null,
7665
7630
  externalId: "pcQYbPuKGZ7"
7666
7631
  },
7667
7632
  // Villages under Itambo (89a33893-b17d-481d-a26d-6461e7ac1651)
@@ -7669,59 +7634,67 @@ var MOCK_ADMINISTRATIVE_AREAS_BASE = [
7669
7634
  id: "3d6e7f8a-9b0c-4534-8efa-567890123456",
7670
7635
  name: "Felani",
7671
7636
  parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
7637
+ validUntil: null,
7672
7638
  externalId: "gSqpoCGdMXp"
7673
7639
  },
7674
7640
  {
7675
7641
  id: "4e7f8a9b-0c1d-4645-8fab-678901234567",
7676
7642
  name: "Goroma",
7677
7643
  parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
7644
+ validUntil: null,
7678
7645
  externalId: "KvAAIaNqVrp"
7679
7646
  },
7680
7647
  {
7681
7648
  id: "5f8a9b0c-1d2e-4756-8abc-789012345678",
7682
7649
  name: "Halifu",
7683
7650
  parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
7651
+ validUntil: null,
7684
7652
  externalId: "qe4UnEVt1hv"
7685
7653
  },
7686
7654
  {
7687
7655
  id: "6a9b0c1d-2e3f-4867-abcd-890123456789",
7688
7656
  name: "Jabari",
7689
7657
  parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
7658
+ validUntil: null,
7690
7659
  externalId: "yHH9Nz4rLOt"
7691
7660
  },
7692
7661
  {
7693
7662
  id: "7b0c1d2e-3f4a-4978-bcde-901234567890",
7694
7663
  name: "Kifani",
7695
7664
  parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
7665
+ validUntil: null,
7696
7666
  externalId: "eSWmXIGeu1I"
7697
7667
  },
7698
7668
  {
7699
7669
  id: "8c1d2e3f-4a5b-4089-8def-012345678901",
7700
7670
  name: "Lumela",
7701
7671
  parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
7672
+ validUntil: null,
7702
7673
  externalId: "bh0b3aI1uP3"
7703
7674
  }
7704
7675
  ];
7705
- var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS = MOCK_ADMINISTRATIVE_AREAS_BASE.map(withVersionFields);
7706
- var MOCK_LOCATIONS_BASE = [
7676
+ var V2_DEFAULT_MOCK_LOCATIONS = [
7707
7677
  {
7708
7678
  id: "6f6186ce-cd5f-4a5f-810a-2d99e7c4ba12",
7709
7679
  name: "Central Provincial Office",
7710
7680
  locationType: "CRVS_OFFICE",
7711
7681
  administrativeAreaId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
7682
+ validUntil: null,
7712
7683
  externalId: "Xr3Df8WpK6Ys"
7713
7684
  },
7714
7685
  {
7715
7686
  id: "b1c2d3e4-f5a6-7890-bcde-f12345678901",
7716
7687
  name: "Central Health Post",
7717
7688
  locationType: "HEALTH_FACILITY",
7718
- administrativeAreaId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c"
7689
+ administrativeAreaId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
7690
+ validUntil: null
7719
7691
  },
7720
7692
  {
7721
7693
  id: "028d2c85-ca31-426d-b5d1-2cef545a4902",
7722
7694
  name: "Ibombo District Office",
7723
7695
  locationType: "CRVS_OFFICE",
7724
7696
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
7697
+ validUntil: null,
7725
7698
  externalId: "Sm4Nw7GrD2Vy"
7726
7699
  },
7727
7700
  {
@@ -7729,6 +7702,7 @@ var MOCK_LOCATIONS_BASE = [
7729
7702
  name: "Isamba District Office",
7730
7703
  locationType: "CRVS_OFFICE",
7731
7704
  administrativeAreaId: "967032fd-3f81-478a-826c-30cb8fe121bd",
7705
+ validUntil: null,
7732
7706
  externalId: "Vg1Bq5XeH9Lt"
7733
7707
  },
7734
7708
  {
@@ -7736,6 +7710,7 @@ var MOCK_LOCATIONS_BASE = [
7736
7710
  name: "Isango District Office",
7737
7711
  locationType: "CRVS_OFFICE",
7738
7712
  administrativeAreaId: "27160bbd-32d1-4625-812f-860226bfb92a",
7713
+ validUntil: null,
7739
7714
  externalId: "Je7Lm2XqN9Vz"
7740
7715
  },
7741
7716
  {
@@ -7743,6 +7718,7 @@ var MOCK_LOCATIONS_BASE = [
7743
7718
  name: "Sulaka Provincial Office",
7744
7719
  locationType: "CRVS_OFFICE",
7745
7720
  administrativeAreaId: "c599b691-fd2d-45e1-abf4-d185de727fb5",
7721
+ validUntil: null,
7746
7722
  externalId: "Ht2Wp9KcX5Qv"
7747
7723
  },
7748
7724
  {
@@ -7750,6 +7726,7 @@ var MOCK_LOCATIONS_BASE = [
7750
7726
  name: "Ilanga District Office",
7751
7727
  locationType: "CRVS_OFFICE",
7752
7728
  administrativeAreaId: "8fbd09d2-212b-47f4-beb3-5e1694931d9f",
7729
+ validUntil: null,
7753
7730
  externalId: "Yp6Ds1WqN3Xz"
7754
7731
  },
7755
7732
  {
@@ -7757,6 +7734,7 @@ var MOCK_LOCATIONS_BASE = [
7757
7734
  name: "Chamakubi Health Post",
7758
7735
  locationType: "HEALTH_FACILITY",
7759
7736
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
7737
+ validUntil: null,
7760
7738
  externalId: "M1nFr8LbC2Qy"
7761
7739
  },
7762
7740
  {
@@ -7764,6 +7742,7 @@ var MOCK_LOCATIONS_BASE = [
7764
7742
  name: "Ibombo Rural Health Centre",
7765
7743
  locationType: "HEALTH_FACILITY",
7766
7744
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
7745
+ validUntil: null,
7767
7746
  externalId: "bT7pV6YrW0Xc"
7768
7747
  },
7769
7748
  {
@@ -7771,6 +7750,7 @@ var MOCK_LOCATIONS_BASE = [
7771
7750
  name: "Chikobo Rural Health Centre",
7772
7751
  locationType: "HEALTH_FACILITY",
7773
7752
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
7753
+ validUntil: null,
7774
7754
  externalId: "zE4qPn2SgJ5d"
7775
7755
  },
7776
7756
  {
@@ -7778,6 +7758,7 @@ var MOCK_LOCATIONS_BASE = [
7778
7758
  name: "Chilochabalenje Health Post",
7779
7759
  locationType: "HEALTH_FACILITY",
7780
7760
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
7761
+ validUntil: null,
7781
7762
  externalId: "H8vDs1MqR4Uf"
7782
7763
  },
7783
7764
  {
@@ -7785,6 +7766,7 @@ var MOCK_LOCATIONS_BASE = [
7785
7766
  name: "Chipeso Rural Health Centre",
7786
7767
  locationType: "HEALTH_FACILITY",
7787
7768
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
7769
+ validUntil: null,
7788
7770
  externalId: "Qw3uZ9KfX6Lm"
7789
7771
  },
7790
7772
  {
@@ -7792,6 +7774,7 @@ var MOCK_LOCATIONS_BASE = [
7792
7774
  name: "Chisamba Rural Health Centre",
7793
7775
  locationType: "HEALTH_FACILITY",
7794
7776
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
7777
+ validUntil: null,
7795
7778
  externalId: "Yr0pCg8LdM2s"
7796
7779
  },
7797
7780
  {
@@ -7799,6 +7782,7 @@ var MOCK_LOCATIONS_BASE = [
7799
7782
  name: "Chitanda Rural Health Centre",
7800
7783
  locationType: "HEALTH_FACILITY",
7801
7784
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
7785
+ validUntil: null,
7802
7786
  externalId: "tS9gJ4PwB1Qx"
7803
7787
  },
7804
7788
  {
@@ -7806,6 +7790,7 @@ var MOCK_LOCATIONS_BASE = [
7806
7790
  name: "Golden Valley Rural Health Centre",
7807
7791
  locationType: "HEALTH_FACILITY",
7808
7792
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
7793
+ validUntil: null,
7809
7794
  externalId: "Ld7Qm3XsA8Vr"
7810
7795
  },
7811
7796
  {
@@ -7813,6 +7798,7 @@ var MOCK_LOCATIONS_BASE = [
7813
7798
  name: "Ipongo Rural Health Centre",
7814
7799
  locationType: "HEALTH_FACILITY",
7815
7800
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
7801
+ validUntil: null,
7816
7802
  externalId: "kF2sW9DmH0Bt"
7817
7803
  },
7818
7804
  {
@@ -7820,6 +7806,7 @@ var MOCK_LOCATIONS_BASE = [
7820
7806
  name: "Itumbwe Health Post",
7821
7807
  locationType: "HEALTH_FACILITY",
7822
7808
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
7809
+ validUntil: null,
7823
7810
  externalId: "Ue5Xb3VaC7Pq"
7824
7811
  },
7825
7812
  {
@@ -7827,6 +7814,7 @@ var MOCK_LOCATIONS_BASE = [
7827
7814
  name: "Kabangalala Rural Health Centre",
7828
7815
  locationType: "HEALTH_FACILITY",
7829
7816
  administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
7817
+ validUntil: null,
7830
7818
  externalId: "Pz8Kc1TqH6Jn"
7831
7819
  },
7832
7820
  // Village offices
@@ -7835,10 +7823,10 @@ var MOCK_LOCATIONS_BASE = [
7835
7823
  name: "Klow Village Office",
7836
7824
  locationType: "CRVS_OFFICE",
7837
7825
  administrativeAreaId: "1d4e5f6a-7b8c-4912-8efa-345678901234",
7826
+ validUntil: null,
7838
7827
  externalId: "PmAyxAJkxiJ"
7839
7828
  }
7840
7829
  ];
7841
- var V2_DEFAULT_MOCK_LOCATIONS = MOCK_LOCATIONS_BASE.map(withVersionFields);
7842
7830
  var V2_DEFAULT_MOCK_LOCATIONS_MAP = new Map(
7843
7831
  V2_DEFAULT_MOCK_LOCATIONS.map((l) => [l.id, l])
7844
7832
  );
@@ -7846,56 +7834,8 @@ var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS_MAP = new Map(
7846
7834
  V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS.map((a) => [a.id, a])
7847
7835
  );
7848
7836
 
7849
- // ../commons/src/events/locationPayloads.ts
7850
- var z44 = __toESM(require("zod/v4"));
7851
- var CreateLocationPayload = z44.object({
7852
- id: UUID.optional(),
7853
- versionId: UUID.optional(),
7854
- name: z44.string(),
7855
- externalId: z44.string().nullish(),
7856
- administrativeAreaId: UUID.nullable(),
7857
- locationType: z44.string().nullable(),
7858
- effectiveFrom: z44.iso.date().optional(),
7859
- status: LocationStatus.default("active")
7860
- });
7861
- var UpdateLocationPayload = z44.strictObject({
7862
- id: UUID,
7863
- versionId: UUID.optional(),
7864
- name: z44.string(),
7865
- externalId: z44.string().nullish(),
7866
- status: LocationStatus,
7867
- effectiveFrom: z44.iso.date().optional(),
7868
- lastVersionId: UUID
7869
- });
7870
- var WithdrawLocationVersionPayload = z44.object({
7871
- id: UUID,
7872
- versionId: UUID
7873
- });
7874
- var CreateAdministrativeAreaPayload = z44.object({
7875
- id: UUID.optional(),
7876
- versionId: UUID.optional(),
7877
- name: z44.string(),
7878
- externalId: z44.string().nullish(),
7879
- parentId: UUID.nullable(),
7880
- effectiveFrom: z44.iso.date().optional(),
7881
- status: LocationStatus.default("active")
7882
- });
7883
- var UpdateAdministrativeAreaPayload = z44.strictObject({
7884
- id: UUID,
7885
- versionId: UUID.optional(),
7886
- name: z44.string(),
7887
- externalId: z44.string().nullish(),
7888
- status: LocationStatus,
7889
- effectiveFrom: z44.iso.date().optional(),
7890
- lastVersionId: UUID
7891
- });
7892
- var WithdrawAdministrativeAreaVersionPayload = z44.object({
7893
- id: UUID,
7894
- versionId: UUID
7895
- });
7896
-
7897
7837
  // ../commons/src/notification/UserNotifications.ts
7898
- var z45 = __toESM(require("zod/v4"));
7838
+ var z44 = __toESM(require("zod/v4"));
7899
7839
  var TriggerEvent = {
7900
7840
  USER_CREATED: "user-created",
7901
7841
  USER_UPDATED: "user-updated",
@@ -7908,54 +7848,54 @@ var TriggerEvent = {
7908
7848
  CHANGE_PHONE_NUMBER: "change-phone-number",
7909
7849
  CHANGE_EMAIL_ADDRESS: "change-email-address"
7910
7850
  };
7911
- var Recipient = z45.object({
7851
+ var Recipient = z44.object({
7912
7852
  name: NameFieldValue.optional(),
7913
- mobile: z45.string().optional(),
7914
- email: z45.string().optional(),
7915
- bcc: z45.array(z45.string()).optional()
7853
+ mobile: z44.string().optional(),
7854
+ email: z44.string().optional(),
7855
+ bcc: z44.array(z44.string()).optional()
7916
7856
  });
7917
- var BasePayload = z45.object({
7857
+ var BasePayload = z44.object({
7918
7858
  recipient: Recipient
7919
7859
  });
7920
7860
  var TriggerPayload = {
7921
7861
  [TriggerEvent.USER_CREATED]: BasePayload.extend({
7922
- username: z45.string(),
7923
- temporaryPassword: z45.string()
7862
+ username: z44.string(),
7863
+ temporaryPassword: z44.string()
7924
7864
  }),
7925
7865
  [TriggerEvent.USER_UPDATED]: BasePayload.extend({
7926
- oldUsername: z45.string(),
7927
- newUsername: z45.string()
7866
+ oldUsername: z44.string(),
7867
+ newUsername: z44.string()
7928
7868
  }),
7929
7869
  [TriggerEvent.USERNAME_REMINDER]: BasePayload.extend({
7930
- username: z45.string()
7870
+ username: z44.string()
7931
7871
  }),
7932
7872
  [TriggerEvent.RESET_PASSWORD]: BasePayload.extend({
7933
- code: z45.string()
7873
+ code: z44.string()
7934
7874
  }),
7935
7875
  [TriggerEvent.RESET_PASSWORD_BY_ADMIN]: BasePayload.extend({
7936
- temporaryPassword: z45.string(),
7937
- admin: z45.object({
7938
- id: z45.string(),
7876
+ temporaryPassword: z44.string(),
7877
+ admin: z44.object({
7878
+ id: z44.string(),
7939
7879
  name: NameFieldValue,
7940
- role: z45.string()
7880
+ role: z44.string()
7941
7881
  })
7942
7882
  }),
7943
7883
  [TriggerEvent.RESEND_INVITE]: BasePayload.extend({
7944
- username: z45.string(),
7945
- temporaryPassword: z45.string()
7884
+ username: z44.string(),
7885
+ temporaryPassword: z44.string()
7946
7886
  }),
7947
7887
  [TriggerEvent.TWO_FA]: BasePayload.extend({
7948
- code: z45.string()
7888
+ code: z44.string()
7949
7889
  }),
7950
7890
  [TriggerEvent.ALL_USER_NOTIFICATION]: BasePayload.extend({
7951
- subject: z45.string(),
7952
- body: z45.string()
7891
+ subject: z44.string(),
7892
+ body: z44.string()
7953
7893
  }),
7954
7894
  [TriggerEvent.CHANGE_PHONE_NUMBER]: BasePayload.extend({
7955
- code: z45.string()
7895
+ code: z44.string()
7956
7896
  }),
7957
7897
  [TriggerEvent.CHANGE_EMAIL_ADDRESS]: BasePayload.extend({
7958
- code: z45.string()
7898
+ code: z44.string()
7959
7899
  })
7960
7900
  };
7961
7901
  async function triggerUserEventNotification({
@@ -7979,4 +7919,4 @@ function parseUserEventTrigger(event2, body) {
7979
7919
  }
7980
7920
 
7981
7921
  // src/notification/index.ts
7982
- z46.globalRegistry.clear();
7922
+ z45.globalRegistry.clear();