@opencrvs/toolkit 2.0.0-rc.c303fe9 → 2.0.0-rc.c30a093

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 (96) hide show
  1. package/README.md +15 -0
  2. package/build.sh +5 -4
  3. package/dist/application-config/index.js +17 -6
  4. package/dist/cli.js +3186 -4921
  5. package/dist/commons/api/router.d.ts +10 -0
  6. package/dist/commons/conditionals/conditionals.d.ts +3 -3
  7. package/dist/commons/events/ActionConfig.d.ts +176 -0
  8. package/dist/commons/events/AdvancedSearchConfig.d.ts +12 -0
  9. package/dist/commons/events/CountryConfigQueryInput.d.ts +42 -0
  10. package/dist/commons/events/EventConfig.d.ts +2 -0
  11. package/dist/commons/events/EventIndex.d.ts +25 -0
  12. package/dist/commons/events/EventMetadata.d.ts +26 -0
  13. package/dist/commons/events/FieldConfig.d.ts +10 -0
  14. package/dist/commons/events/WorkqueueConfig.d.ts +39 -0
  15. package/dist/commons/events/locations.d.ts +1 -0
  16. package/dist/commons/events/state/index.d.ts +8 -0
  17. package/dist/commons/events/state/utils.d.ts +9 -0
  18. package/dist/conditionals/index.js +10 -5
  19. package/dist/environment/custom-types.d.ts +33 -0
  20. package/dist/environment/custom-types.d.ts.map +1 -0
  21. package/dist/environment/custom-types.js +12 -0
  22. package/dist/environment/derived-variables.d.ts +134 -0
  23. package/dist/environment/derived-variables.d.ts.map +1 -0
  24. package/dist/environment/derived-variables.js +169 -0
  25. package/dist/environment/editor-questions.d.ts +4 -0
  26. package/dist/environment/editor-questions.d.ts.map +1 -0
  27. package/dist/environment/editor-questions.js +67 -0
  28. package/dist/environment/git.d.ts +5 -0
  29. package/dist/environment/git.d.ts.map +1 -0
  30. package/dist/environment/git.js +38 -0
  31. package/dist/environment/github.d.ts +26 -0
  32. package/dist/environment/github.d.ts.map +1 -0
  33. package/dist/environment/github.js +247 -0
  34. package/dist/environment/index.d.ts +5 -0
  35. package/dist/environment/index.d.ts.map +1 -0
  36. package/dist/environment/index.js +71 -0
  37. package/dist/environment/logger.d.ts +15 -0
  38. package/dist/environment/logger.d.ts.map +1 -0
  39. package/dist/environment/logger.js +25 -0
  40. package/dist/environment/manage-users.d.ts +11 -0
  41. package/dist/environment/manage-users.d.ts.map +1 -0
  42. package/dist/environment/manage-users.js +497 -0
  43. package/dist/environment/questions-helper.d.ts +15 -0
  44. package/dist/environment/questions-helper.d.ts.map +1 -0
  45. package/dist/environment/questions-helper.js +70 -0
  46. package/dist/environment/questions.d.ts +199 -0
  47. package/dist/environment/questions.d.ts.map +1 -0
  48. package/dist/environment/questions.js +412 -0
  49. package/dist/environment/setup-environment.d.ts +2 -0
  50. package/dist/environment/setup-environment.d.ts.map +1 -0
  51. package/dist/environment/setup-environment.js +794 -0
  52. package/dist/environment/ssh-keygen.d.ts +5 -0
  53. package/dist/environment/ssh-keygen.d.ts.map +1 -0
  54. package/dist/environment/ssh-keygen.js +21 -0
  55. package/dist/environment/swarm-to-k8s.d.ts +2 -0
  56. package/dist/environment/swarm-to-k8s.d.ts.map +1 -0
  57. package/dist/environment/swarm-to-k8s.js +173 -0
  58. package/dist/environment/templates.d.ts +27 -0
  59. package/dist/environment/templates.d.ts.map +1 -0
  60. package/dist/environment/templates.js +163 -0
  61. package/dist/environment/update-workflows.d.ts +2 -0
  62. package/dist/environment/update-workflows.d.ts.map +1 -0
  63. package/dist/environment/update-workflows.js +169 -0
  64. package/dist/environment/users.d.ts +2 -0
  65. package/dist/environment/users.d.ts.map +1 -0
  66. package/dist/environment/users.js +112 -0
  67. package/dist/environment/utils.d.ts +18 -0
  68. package/dist/environment/utils.d.ts.map +1 -0
  69. package/dist/environment/utils.js +100 -0
  70. package/dist/events/index.js +132 -13
  71. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +1 -1
  72. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
  73. package/dist/migrations/v2.0/checkout-upstream-files.js +1 -1
  74. package/dist/migrations/v2.0/index.js +88 -5139
  75. package/dist/migrations/v2.1/add-explicit-correction-flags.d.ts +3 -0
  76. package/dist/migrations/v2.1/add-explicit-correction-flags.d.ts.map +1 -0
  77. package/dist/migrations/v2.1/add-explicit-correction-flags.js +234 -0
  78. package/dist/migrations/v2.1/index.d.ts +6 -0
  79. package/dist/migrations/v2.1/index.d.ts.map +1 -0
  80. package/dist/migrations/v2.1/index.js +218 -0
  81. package/dist/notification/index.js +108 -9
  82. package/dist/scopes/index.d.ts +89 -1
  83. package/dist/scopes/index.js +10 -5
  84. package/dist/templates/charts-values/dependencies/values.override.yaml +4 -0
  85. package/dist/templates/charts-values/dependencies/values.yaml +83 -0
  86. package/dist/templates/charts-values/opencrvs-services/values.override.yaml +4 -0
  87. package/dist/templates/charts-values/opencrvs-services/values.yaml +81 -0
  88. package/dist/templates/charts-values/traefik/values.override.yaml +4 -0
  89. package/dist/templates/charts-values/traefik/values.yaml +115 -0
  90. package/dist/templates/inventory/inventory.template.yml +100 -0
  91. package/dist/templates/inventory/production.example.yml +77 -0
  92. package/dist/templates/inventory/qa.example.yml +48 -0
  93. package/opencrvs-toolkit-2.0.0-rc.c30a093.tgz +0 -0
  94. package/package.json +15 -1
  95. package/tsconfig.tsbuildinfo +1 -1
  96. package/opencrvs-toolkit-2.0.0-rc.c303fe9.tgz +0 -0
@@ -118,11 +118,13 @@ var scopeOptionsPlaceEvent = z2.object({
118
118
  event: scopeByEvent,
119
119
  placeOfEvent: JurisdictionFilter.optional()
120
120
  }).describe("Options applicable to all record scopes.");
121
- var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
121
+ var scopeOptionsDeclaredOrNotified = scopeOptionsPlaceEvent.extend({
122
+ notifiedIn: JurisdictionFilter.optional(),
123
+ notifiedBy: UserFilter.optional(),
122
124
  declaredIn: JurisdictionFilter.optional(),
123
125
  declaredBy: UserFilter.optional()
124
126
  }).describe("Options applicable to actions that may take place after DECLARE");
125
- var AllRecordScopeOptions = scopeOptionsDeclared.extend({
127
+ var AllRecordScopeOptions = scopeOptionsDeclaredOrNotified.extend({
126
128
  registeredIn: JurisdictionFilter.optional(),
127
129
  registeredBy: UserFilter.optional()
128
130
  }).describe(
@@ -160,6 +162,8 @@ var ResolvedScopeOptionsPlaceEvent = z2.object({
160
162
  "Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
161
163
  );
162
164
  var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
165
+ notifiedIn: UUID.nullish(),
166
+ notifiedBy: z2.string().optional(),
163
167
  declaredIn: UUID.nullish(),
164
168
  declaredBy: z2.string().optional()
165
169
  }).describe(
@@ -205,7 +209,7 @@ var RecordScopeV2 = z2.discriminatedUnion("type", [
205
209
  }),
206
210
  z2.object({
207
211
  type: ScopesWithDeclaredOptions,
208
- options: scopeOptionsDeclared.optional()
212
+ options: scopeOptionsDeclaredOrNotified.optional()
209
213
  }),
210
214
  z2.object({
211
215
  type: ScopesWithFullOptions,
@@ -294,8 +298,9 @@ var EncodedScope = z2.string().brand("EncodedScope");
294
298
  var DEFAULT_SCOPE_OPTIONS = {
295
299
  placeOfEvent: JurisdictionFilter.enum.all,
296
300
  accessLevel: JurisdictionFilter.enum.all,
297
- registeredIn: JurisdictionFilter.enum.all,
298
- declaredIn: JurisdictionFilter.enum.all
301
+ notifiedIn: JurisdictionFilter.enum.all,
302
+ declaredIn: JurisdictionFilter.enum.all,
303
+ registeredIn: JurisdictionFilter.enum.all
299
304
  };
300
305
 
301
306
  // ../commons/src/authentication.ts
@@ -1357,6 +1362,7 @@ var RegistrationCreationMetadata = ActionCreationMetadata.extend({
1357
1362
  )
1358
1363
  });
1359
1364
  var LegalStatuses = z16.object({
1365
+ [EventStatus.enum.NOTIFIED]: ActionCreationMetadata.nullish(),
1360
1366
  [EventStatus.enum.DECLARED]: ActionCreationMetadata.nullish(),
1361
1367
  [EventStatus.enum.REGISTERED]: RegistrationCreationMetadata.nullish()
1362
1368
  });
@@ -1416,6 +1422,8 @@ var EventMetadataKeys = z16.enum(EventMetadataKeysArray);
1416
1422
  var EventMetadataDateFieldIdInput = z16.enum([
1417
1423
  "createdAt",
1418
1424
  "updatedAt",
1425
+ "legalStatuses.NOTIFIED.createdAt",
1426
+ "legalStatuses.NOTIFIED.acceptedAt",
1419
1427
  "legalStatuses.DECLARED.createdAt",
1420
1428
  "legalStatuses.DECLARED.acceptedAt",
1421
1429
  "legalStatuses.REGISTERED.createdAt",
@@ -1424,6 +1432,8 @@ var EventMetadataDateFieldIdInput = z16.enum([
1424
1432
  var EventMetadataDateFieldId = z16.enum([
1425
1433
  "event.createdAt",
1426
1434
  "event.updatedAt",
1435
+ "event.legalStatuses.NOTIFIED.createdAt",
1436
+ "event.legalStatuses.NOTIFIED.acceptedAt",
1427
1437
  "event.legalStatuses.DECLARED.createdAt",
1428
1438
  "event.legalStatuses.DECLARED.acceptedAt",
1429
1439
  "event.legalStatuses.REGISTERED.createdAt",
@@ -1483,7 +1493,8 @@ var Range = import_v4.z.object({
1483
1493
  });
1484
1494
  var ContainsFlags = import_v4.z.object({
1485
1495
  anyOf: import_v4.z.array(Flag).optional(),
1486
- noneOf: import_v4.z.array(Flag).optional()
1496
+ noneOf: import_v4.z.array(Flag).optional(),
1497
+ allOf: import_v4.z.array(Flag).optional()
1487
1498
  }).meta({
1488
1499
  id: "ContainsFlags"
1489
1500
  });
@@ -2684,6 +2695,52 @@ var NotifyConfig = ActionConfigBase.extend(
2684
2695
  type: z24.literal(ActionType.NOTIFY)
2685
2696
  }).shape
2686
2697
  );
2698
+ var DuplicateDetectedConfig = ActionConfigBase.extend(
2699
+ z24.object({
2700
+ type: z24.literal(ActionType.DUPLICATE_DETECTED),
2701
+ label: z24.never().optional().describe(
2702
+ "DUPLICATE_DETECTED is system-generated and never shown as a button, so it has no label."
2703
+ ),
2704
+ supportingCopy: z24.never().optional(),
2705
+ icon: z24.never().optional().describe(
2706
+ "DUPLICATE_DETECTED is system-generated and never shown as a button, so it has no icon."
2707
+ ),
2708
+ conditionals: z24.never().optional().describe(
2709
+ "DUPLICATE_DETECTED is system-generated and never shown as a button, so it cannot be disabled or hidden with conditionals."
2710
+ )
2711
+ }).shape
2712
+ );
2713
+ var MarkAsDuplicateConfig = ActionConfigBase.extend(
2714
+ z24.object({
2715
+ type: z24.literal(ActionType.MARK_AS_DUPLICATE)
2716
+ }).shape
2717
+ );
2718
+ var MarkAsNotDuplicateConfig = ActionConfigBase.extend(
2719
+ z24.object({
2720
+ type: z24.literal(ActionType.MARK_AS_NOT_DUPLICATE)
2721
+ }).shape
2722
+ );
2723
+ var AssignConfig = ActionConfigBase.extend(
2724
+ z24.object({
2725
+ type: z24.literal(ActionType.ASSIGN),
2726
+ flags: z24.never().optional().describe(
2727
+ "ASSIGN is a meta action excluded from flag resolution, so flags configured here would never apply."
2728
+ )
2729
+ }).shape
2730
+ );
2731
+ var UnassignConfig = ActionConfigBase.extend(
2732
+ z24.object({
2733
+ type: z24.literal(ActionType.UNASSIGN),
2734
+ flags: z24.never().optional().describe(
2735
+ "UNASSIGN is a meta action excluded from flag resolution, so flags configured here would never apply."
2736
+ )
2737
+ }).shape
2738
+ );
2739
+ var DeleteConfig = ActionConfigBase.extend(
2740
+ z24.object({
2741
+ type: z24.literal(ActionType.DELETE)
2742
+ }).shape
2743
+ );
2687
2744
  var DeclareConfig = DeclarationActionBase.extend(
2688
2745
  z24.object({
2689
2746
  type: z24.literal(ActionType.DECLARE),
@@ -2746,7 +2803,17 @@ var RequestCorrectionConfig = ActionConfigBase.extend(
2746
2803
  correctionForm: ActionFormConfig
2747
2804
  }).shape
2748
2805
  );
2749
- var CustomActionConfig = ActionConfigBase.merge(
2806
+ var ApproveCorrectionConfig = ActionConfigBase.extend(
2807
+ z24.object({
2808
+ type: z24.literal(ActionType.APPROVE_CORRECTION)
2809
+ }).shape
2810
+ );
2811
+ var RejectCorrectionConfig = ActionConfigBase.extend(
2812
+ z24.object({
2813
+ type: z24.literal(ActionType.REJECT_CORRECTION)
2814
+ }).shape
2815
+ );
2816
+ var CustomActionConfig = ActionConfigBase.extend(
2750
2817
  z24.object({
2751
2818
  type: z24.literal(ActionType.CUSTOM),
2752
2819
  customActionType: z24.string().describe("Type identifier of the custom action."),
@@ -2757,7 +2824,7 @@ var CustomActionConfig = ActionConfigBase.merge(
2757
2824
  auditHistoryLabel: TranslationConfig.describe(
2758
2825
  'The label to show in audit history for this action. For example "Approved".'
2759
2826
  )
2760
- })
2827
+ }).shape
2761
2828
  );
2762
2829
  var ActionConfig = z24.discriminatedUnion("type", [
2763
2830
  /*
@@ -2768,6 +2835,18 @@ var ActionConfig = z24.discriminatedUnion("type", [
2768
2835
  id: "ReadActionConfig",
2769
2836
  description: "Configuration for the read action \u2014 defines the record-tab content displayed on the event overview page."
2770
2837
  }),
2838
+ AssignConfig.meta({
2839
+ id: "AssignActionConfig",
2840
+ description: "Configuration for assigning a record to the current user."
2841
+ }),
2842
+ UnassignConfig.meta({
2843
+ id: "UnassignActionConfig",
2844
+ description: "Configuration for unassigning a record from its current assignee."
2845
+ }),
2846
+ DeleteConfig.meta({
2847
+ id: "DeleteActionConfig",
2848
+ description: "Configuration for deleting a draft record."
2849
+ }),
2771
2850
  NotifyConfig.meta({
2772
2851
  id: "NotifyActionConfig",
2773
2852
  description: "Configuration for the notify action. When present, NOTIFY uses this config independently from DECLARE. When absent, NOTIFY falls back to the DeclareActionConfig."
@@ -2776,6 +2855,18 @@ var ActionConfig = z24.discriminatedUnion("type", [
2776
2855
  id: "DeclareActionConfig",
2777
2856
  description: "Configuration for the declare action. Includes review-page fields. NOTIFY falls back to this config when no dedicated NotifyActionConfig is provided."
2778
2857
  }),
2858
+ DuplicateDetectedConfig.meta({
2859
+ id: "DuplicateDetectedActionConfig",
2860
+ description: "Configuration for the system-generated duplicate-detection action. Never shown as a button, so it only supports flags \u2014 not label, icon, or conditionals."
2861
+ }),
2862
+ MarkAsDuplicateConfig.meta({
2863
+ id: "MarkAsDuplicateActionConfig",
2864
+ description: "Configuration for marking a record as a duplicate."
2865
+ }),
2866
+ MarkAsNotDuplicateConfig.meta({
2867
+ id: "MarkAsNotDuplicateActionConfig",
2868
+ description: "Configuration for marking a record as not a duplicate, after it was previously flagged as one."
2869
+ }),
2779
2870
  RejectConfig.meta({
2780
2871
  id: "RejectActionConfig",
2781
2872
  description: "Configuration for rejecting a record before registration."
@@ -2792,6 +2883,14 @@ var ActionConfig = z24.discriminatedUnion("type", [
2792
2883
  id: "RequestCorrectionActionConfig",
2793
2884
  description: "Configuration for requesting a correction on a registered record."
2794
2885
  }),
2886
+ ApproveCorrectionConfig.meta({
2887
+ id: "ApproveCorrectionActionConfig",
2888
+ description: "Configuration for approving a requested correction."
2889
+ }),
2890
+ RejectCorrectionConfig.meta({
2891
+ id: "RejectCorrectionActionConfig",
2892
+ description: "Configuration for rejecting a requested correction."
2893
+ }),
2795
2894
  EditActionConfig.meta({
2796
2895
  id: "EditActionConfig",
2797
2896
  description: "Configuration for editing a record before registration."
@@ -3919,7 +4018,7 @@ function validateActionFlags(event2, ctx) {
3919
4018
  const isInherentFlag = (value) => Object.values(InherentFlags).includes(value);
3920
4019
  const configuredFlagIds = event2.flags.map((flag) => flag.id);
3921
4020
  const actionFlagIds = event2.actions.flatMap(
3922
- (action) => action.flags.map((flag) => flag.id)
4021
+ (action) => (action.flags ?? []).map((flag) => flag.id)
3923
4022
  );
3924
4023
  for (const actionFlagId of actionFlagIds) {
3925
4024
  const isConfigured = configuredFlagIds.includes(actionFlagId);
@@ -14,7 +14,7 @@ export type UserFilter = z.infer<typeof UserFilter>;
14
14
  * The different types of scopes that can be used to control access to records. Each type has different options that can be used to further filter the records that the scope applies to.
15
15
  * When adding new scope types, they should be added to the appropriate section based on the options they require.
16
16
  *
17
- * @see scopeOptionsPlaceEvent @see scopeOptionsDeclared @see scopeOptionsFull
17
+ * @see scopeOptionsPlaceEvent @see scopeOptionsDeclaredOrNotified @see scopeOptionsFull
18
18
  */
19
19
  export declare const RecordScopeTypeV2: z.ZodEnum<{
20
20
  "record.search": "record.search";
@@ -48,6 +48,14 @@ declare const AllScopeOptions: z.ZodObject<{
48
48
  location: "location";
49
49
  all: "all";
50
50
  }>>;
51
+ notifiedIn: z.ZodOptional<z.ZodEnum<{
52
+ administrativeArea: "administrativeArea";
53
+ location: "location";
54
+ all: "all";
55
+ }>>;
56
+ notifiedBy: z.ZodOptional<z.ZodEnum<{
57
+ user: "user";
58
+ }>>;
51
59
  declaredIn: z.ZodOptional<z.ZodEnum<{
52
60
  administrativeArea: "administrativeArea";
53
61
  location: "location";
@@ -70,6 +78,8 @@ export declare const ScopeOptionKey: z.ZodEnum<{
70
78
  role: "role";
71
79
  event: "event";
72
80
  placeOfEvent: "placeOfEvent";
81
+ notifiedIn: "notifiedIn";
82
+ notifiedBy: "notifiedBy";
73
83
  declaredIn: "declaredIn";
74
84
  declaredBy: "declaredBy";
75
85
  registeredIn: "registeredIn";
@@ -126,6 +136,14 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
126
136
  location: "location";
127
137
  all: "all";
128
138
  }>>;
139
+ notifiedIn: z.ZodOptional<z.ZodEnum<{
140
+ administrativeArea: "administrativeArea";
141
+ location: "location";
142
+ all: "all";
143
+ }>>;
144
+ notifiedBy: z.ZodOptional<z.ZodEnum<{
145
+ user: "user";
146
+ }>>;
129
147
  declaredIn: z.ZodOptional<z.ZodEnum<{
130
148
  administrativeArea: "administrativeArea";
131
149
  location: "location";
@@ -150,6 +168,14 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
150
168
  location: "location";
151
169
  all: "all";
152
170
  }>>;
171
+ notifiedIn: z.ZodOptional<z.ZodEnum<{
172
+ administrativeArea: "administrativeArea";
173
+ location: "location";
174
+ all: "all";
175
+ }>>;
176
+ notifiedBy: z.ZodOptional<z.ZodEnum<{
177
+ user: "user";
178
+ }>>;
153
179
  declaredIn: z.ZodOptional<z.ZodEnum<{
154
180
  administrativeArea: "administrativeArea";
155
181
  location: "location";
@@ -176,6 +202,14 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
176
202
  location: "location";
177
203
  all: "all";
178
204
  }>>;
205
+ notifiedIn: z.ZodOptional<z.ZodEnum<{
206
+ administrativeArea: "administrativeArea";
207
+ location: "location";
208
+ all: "all";
209
+ }>>;
210
+ notifiedBy: z.ZodOptional<z.ZodEnum<{
211
+ user: "user";
212
+ }>>;
179
213
  declaredIn: z.ZodOptional<z.ZodEnum<{
180
214
  administrativeArea: "administrativeArea";
181
215
  location: "location";
@@ -203,6 +237,14 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
203
237
  location: "location";
204
238
  all: "all";
205
239
  }>>;
240
+ notifiedIn: z.ZodOptional<z.ZodEnum<{
241
+ administrativeArea: "administrativeArea";
242
+ location: "location";
243
+ all: "all";
244
+ }>>;
245
+ notifiedBy: z.ZodOptional<z.ZodEnum<{
246
+ user: "user";
247
+ }>>;
206
248
  declaredIn: z.ZodOptional<z.ZodEnum<{
207
249
  administrativeArea: "administrativeArea";
208
250
  location: "location";
@@ -305,6 +347,8 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
305
347
  options: z.ZodOptional<z.ZodObject<{
306
348
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
307
349
  placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
350
+ notifiedIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
351
+ notifiedBy: z.ZodOptional<z.ZodString>;
308
352
  declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
309
353
  declaredBy: z.ZodOptional<z.ZodString>;
310
354
  }, z.core.$strip>>;
@@ -319,6 +363,8 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
319
363
  options: z.ZodOptional<z.ZodObject<{
320
364
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
321
365
  placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
366
+ notifiedIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
367
+ notifiedBy: z.ZodOptional<z.ZodString>;
322
368
  declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
323
369
  declaredBy: z.ZodOptional<z.ZodString>;
324
370
  registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
@@ -329,6 +375,8 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
329
375
  options: z.ZodOptional<z.ZodObject<{
330
376
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
331
377
  placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
378
+ notifiedIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
379
+ notifiedBy: z.ZodOptional<z.ZodString>;
332
380
  declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
333
381
  declaredBy: z.ZodOptional<z.ZodString>;
334
382
  registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
@@ -385,6 +433,14 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
385
433
  location: "location";
386
434
  all: "all";
387
435
  }>>;
436
+ notifiedIn: z.ZodOptional<z.ZodEnum<{
437
+ administrativeArea: "administrativeArea";
438
+ location: "location";
439
+ all: "all";
440
+ }>>;
441
+ notifiedBy: z.ZodOptional<z.ZodEnum<{
442
+ user: "user";
443
+ }>>;
388
444
  declaredIn: z.ZodOptional<z.ZodEnum<{
389
445
  administrativeArea: "administrativeArea";
390
446
  location: "location";
@@ -409,6 +465,14 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
409
465
  location: "location";
410
466
  all: "all";
411
467
  }>>;
468
+ notifiedIn: z.ZodOptional<z.ZodEnum<{
469
+ administrativeArea: "administrativeArea";
470
+ location: "location";
471
+ all: "all";
472
+ }>>;
473
+ notifiedBy: z.ZodOptional<z.ZodEnum<{
474
+ user: "user";
475
+ }>>;
412
476
  declaredIn: z.ZodOptional<z.ZodEnum<{
413
477
  administrativeArea: "administrativeArea";
414
478
  location: "location";
@@ -435,6 +499,14 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
435
499
  location: "location";
436
500
  all: "all";
437
501
  }>>;
502
+ notifiedIn: z.ZodOptional<z.ZodEnum<{
503
+ administrativeArea: "administrativeArea";
504
+ location: "location";
505
+ all: "all";
506
+ }>>;
507
+ notifiedBy: z.ZodOptional<z.ZodEnum<{
508
+ user: "user";
509
+ }>>;
438
510
  declaredIn: z.ZodOptional<z.ZodEnum<{
439
511
  administrativeArea: "administrativeArea";
440
512
  location: "location";
@@ -462,6 +534,14 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
462
534
  location: "location";
463
535
  all: "all";
464
536
  }>>;
537
+ notifiedIn: z.ZodOptional<z.ZodEnum<{
538
+ administrativeArea: "administrativeArea";
539
+ location: "location";
540
+ all: "all";
541
+ }>>;
542
+ notifiedBy: z.ZodOptional<z.ZodEnum<{
543
+ user: "user";
544
+ }>>;
465
545
  declaredIn: z.ZodOptional<z.ZodEnum<{
466
546
  administrativeArea: "administrativeArea";
467
547
  location: "location";
@@ -596,6 +676,8 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
596
676
  options?: {
597
677
  event?: string[] | undefined;
598
678
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
679
+ notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
680
+ notifiedBy?: "user" | undefined;
599
681
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
600
682
  declaredBy?: "user" | undefined;
601
683
  } | undefined;
@@ -604,6 +686,8 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
604
686
  options?: {
605
687
  event?: string[] | undefined;
606
688
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
689
+ notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
690
+ notifiedBy?: "user" | undefined;
607
691
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
608
692
  declaredBy?: "user" | undefined;
609
693
  registeredIn?: "administrativeArea" | "location" | "all" | undefined;
@@ -614,6 +698,8 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
614
698
  options?: {
615
699
  event?: string[] | undefined;
616
700
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
701
+ notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
702
+ notifiedBy?: "user" | undefined;
617
703
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
618
704
  declaredBy?: "user" | undefined;
619
705
  registeredIn?: "administrativeArea" | "location" | "all" | undefined;
@@ -625,6 +711,8 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
625
711
  options?: {
626
712
  event?: string[] | undefined;
627
713
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
714
+ notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
715
+ notifiedBy?: "user" | undefined;
628
716
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
629
717
  declaredBy?: "user" | undefined;
630
718
  registeredIn?: "administrativeArea" | "location" | "all" | undefined;
@@ -149,11 +149,13 @@ var scopeOptionsPlaceEvent = z3.object({
149
149
  event: scopeByEvent,
150
150
  placeOfEvent: JurisdictionFilter.optional()
151
151
  }).describe("Options applicable to all record scopes.");
152
- var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
152
+ var scopeOptionsDeclaredOrNotified = scopeOptionsPlaceEvent.extend({
153
+ notifiedIn: JurisdictionFilter.optional(),
154
+ notifiedBy: UserFilter.optional(),
153
155
  declaredIn: JurisdictionFilter.optional(),
154
156
  declaredBy: UserFilter.optional()
155
157
  }).describe("Options applicable to actions that may take place after DECLARE");
156
- var AllRecordScopeOptions = scopeOptionsDeclared.extend({
158
+ var AllRecordScopeOptions = scopeOptionsDeclaredOrNotified.extend({
157
159
  registeredIn: JurisdictionFilter.optional(),
158
160
  registeredBy: UserFilter.optional()
159
161
  }).describe(
@@ -191,6 +193,8 @@ var ResolvedScopeOptionsPlaceEvent = z3.object({
191
193
  "Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
192
194
  );
193
195
  var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
196
+ notifiedIn: UUID.nullish(),
197
+ notifiedBy: z3.string().optional(),
194
198
  declaredIn: UUID.nullish(),
195
199
  declaredBy: z3.string().optional()
196
200
  }).describe(
@@ -236,7 +240,7 @@ var RecordScopeV2 = z3.discriminatedUnion("type", [
236
240
  }),
237
241
  z3.object({
238
242
  type: ScopesWithDeclaredOptions,
239
- options: scopeOptionsDeclared.optional()
243
+ options: scopeOptionsDeclaredOrNotified.optional()
240
244
  }),
241
245
  z3.object({
242
246
  type: ScopesWithFullOptions,
@@ -372,8 +376,9 @@ var decodeScope = (encodedScope) => {
372
376
  var DEFAULT_SCOPE_OPTIONS = {
373
377
  placeOfEvent: JurisdictionFilter.enum.all,
374
378
  accessLevel: JurisdictionFilter.enum.all,
375
- registeredIn: JurisdictionFilter.enum.all,
376
- declaredIn: JurisdictionFilter.enum.all
379
+ notifiedIn: JurisdictionFilter.enum.all,
380
+ declaredIn: JurisdictionFilter.enum.all,
381
+ registeredIn: JurisdictionFilter.enum.all
377
382
  };
378
383
  function getScopeOptionValue(scope, option) {
379
384
  const options = "options" in scope ? scope.options : void 0;
@@ -0,0 +1,4 @@
1
+ ##################################################################################
2
+ # Use this file to customize helm chart behavior
3
+ # Please make sure your custom changes doesn't conflict with values.yaml
4
+ ##################################################################################
@@ -0,0 +1,83 @@
1
+ ##################################################################################
2
+ # GENERATED FILE — DO NOT EDIT
3
+ #
4
+ # This file is managed by `opencrvs environment init` and may be overwritten.
5
+ # Put all custom Helm values in values.override.yaml, preserving the same YAML
6
+ # hierarchy used here. To remove a generated section, set its top-level key to
7
+ # null in values.override.yaml.
8
+ ##################################################################################
9
+
10
+ # Default: storage_type: host_path
11
+ # host_path option is backward compatible with Docker Swarm,
12
+ # configured to use sub-directories within /data folder
13
+ # For new installations feel free to remove storage_type
14
+ storage_type: host_path
15
+
16
+ # All datastores are placed on first node (master1) for backward compatibility
17
+ # with Docker Swarm.
18
+ # For new installations feel free to remove node_selector
19
+ node_selector:
20
+ role: data1
21
+
22
+ minio:
23
+ use_default_credentials: false
24
+ {{#if restore_enabled}}
25
+ restore:
26
+ type: {{restore_type}}
27
+ {{/if}}
28
+ {{#if backup_enabled}}
29
+ backup:
30
+ type: {{backup_type}}
31
+ {{/if}}
32
+
33
+ elasticsearch:
34
+ use_default_credentials: false
35
+
36
+ mongodb:
37
+ use_default_credentials: false
38
+
39
+ postgres:
40
+ use_default_credentials: false
41
+ {{#if restore_enabled}}
42
+ restore:
43
+ type: {{restore_type}}
44
+ {{/if}}
45
+ {{#if backup_enabled}}
46
+ backup:
47
+ type: {{backup_type}}
48
+ {{/if}}
49
+
50
+ redis:
51
+ auth_mode: acl
52
+
53
+ monitoring:
54
+ enabled: true
55
+
56
+ elastalert:
57
+ env:
58
+ NOTIFICATION_TYPE: email
59
+ secrets:
60
+ smtp-config:
61
+ - ALERT_EMAIL
62
+ - SENDER_EMAIL_ADDRESS
63
+ - SMTP_HOST
64
+ - SMTP_PASSWORD
65
+ - SMTP_PORT
66
+ - SMTP_SECURE
67
+ - SMTP_USERNAME
68
+
69
+ # Backup configuration
70
+ backup:
71
+ enabled: {{backup_enabled}}
72
+ schedule: "0 1 * * *"
73
+ backup_server_secret: backup-server-ssh-credentials
74
+ backup_server_dir: /home/backup/{{env}}
75
+
76
+
77
+ # Restore configuration
78
+ restore:
79
+ enabled: {{restore_enabled}}
80
+ schedule: "0 0 * * *"
81
+ backup_server_secret: backup-server-ssh-credentials
82
+ backup_server_dir: /home/backup/{{restore_environment_name}}
83
+ backup_encryption_secret: restore-encryption-secret
@@ -0,0 +1,4 @@
1
+ ##################################################################################
2
+ # Use this file to customize helm chart behavior
3
+ # Please make sure your custom changes doesn't conflict with values.yaml
4
+ ##################################################################################
@@ -0,0 +1,81 @@
1
+ ##################################################################################
2
+ # GENERATED FILE — DO NOT EDIT
3
+ #
4
+ # This file is managed by `opencrvs environment init` and may be overwritten.
5
+ # Put all custom Helm values in values.override.yaml, preserving the same YAML
6
+ # hierarchy used here. To remove a generated section, set its top-level key to
7
+ # null in values.override.yaml.
8
+ ##################################################################################
9
+
10
+ ########################################################################################
11
+ # Initial configuration file for OpenCRVS installation
12
+ ########################################################################################
13
+ # Some properties are not defined in this file and should be provided as key/value at
14
+ # installation time:
15
+ # - hostname: valid DNS name for opencrvs
16
+ # - countryconfig.image.name: Countryconfig image repository
17
+ # - countryconfig.image.tag: Countryconfig image tag
18
+ environment_type: {{environment_type}}
19
+
20
+ hpa:
21
+ enabled: false
22
+
23
+ env:
24
+ APN_SERVICE_URL: "http://apm-server.opencrvs-deps-{{env}}.svc.cluster.local:8200"
25
+ MINIO_BUCKET: ocrvs
26
+ OPENCRVS_ENVIRONMENT: {{opencrvs_environment}}
27
+
28
+ influxdb:
29
+ host: influxdb-0.influxdb.opencrvs-deps-{{env}}.svc.cluster.local
30
+
31
+ elasticsearch:
32
+ auth_mode: auto
33
+ host: elasticsearch.opencrvs-deps-{{env}}.svc.cluster.local
34
+
35
+ minio:
36
+ auth_mode: use_secret
37
+ host: minio-0.minio.opencrvs-deps-{{env}}.svc.cluster.local
38
+
39
+ mongodb:
40
+ auth_mode: auto
41
+ host: mongodb-0.mongodb.opencrvs-deps-{{env}}.svc.cluster.local
42
+
43
+ redis:
44
+ auth_mode: use_secret
45
+ host: redis-0.redis.opencrvs-deps-{{env}}.svc.cluster.local
46
+
47
+ postgres:
48
+ auth_mode: auto
49
+ host: postgres-0.postgres.opencrvs-deps-{{env}}.svc.cluster.local
50
+
51
+ platform:
52
+ imagePullSecrets:
53
+ # Default value for credentials created while yarn environment:init
54
+ - name: dockerhub-credentials
55
+
56
+
57
+ auth:
58
+ env:
59
+ TWO_FA_ENABLED: {{two_fa_enabled}}
60
+
61
+ events:
62
+ env:
63
+ TWO_FA_ENABLED: {{two_fa_enabled}}
64
+
65
+ countryconfig:
66
+ secrets:
67
+ smtp-config:
68
+ - ALERT_EMAIL
69
+ - SENDER_EMAIL_ADDRESS
70
+ - SMTP_HOST
71
+ - SMTP_PASSWORD
72
+ - SMTP_PORT
73
+ - SMTP_SECURE
74
+ - SMTP_USERNAME
75
+
76
+ dashboards:
77
+ use_default_credentials: false
78
+ enabled: true
79
+
80
+ on_restore_cronjob:
81
+ enabled: {{restore_enabled}}
@@ -0,0 +1,4 @@
1
+ ##################################################################################
2
+ # Use this file to customize helm chart behavior
3
+ # Please make sure your custom changes doesn't conflict with values.yaml
4
+ ##################################################################################