@opencrvs/toolkit 2.1.0-rc.e773220 → 2.1.0-rc.e8dd933

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 (42) hide show
  1. package/dist/application-config/index.js +14 -1
  2. package/dist/cli.js +0 -48
  3. package/dist/commons/api/router.d.ts +758 -201
  4. package/dist/commons/conditionals/conditionals.d.ts +1589 -37
  5. package/dist/commons/events/ActionConfig.d.ts +33 -0
  6. package/dist/commons/events/ActionDocument.d.ts +50 -6
  7. package/dist/commons/events/ActionInput.d.ts +26 -6
  8. package/dist/commons/events/ActionType.d.ts +6 -1
  9. package/dist/commons/events/AdvancedSearchConfig.d.ts +6 -0
  10. package/dist/commons/events/AuditLog.d.ts +2 -0
  11. package/dist/commons/events/Draft.d.ts +2 -0
  12. package/dist/commons/events/EventDocument.d.ts +24 -2
  13. package/dist/commons/events/FieldConfig.d.ts +5 -0
  14. package/dist/commons/events/WorkqueueConfig.d.ts +5 -2
  15. package/dist/commons/events/field.d.ts +722 -34
  16. package/dist/commons/events/scopes.d.ts +1 -0
  17. package/dist/commons/events/test.utils.d.ts +9 -4
  18. package/dist/commons/events/utils.d.ts +26 -4
  19. package/dist/conditionals/index.js +2 -0
  20. package/dist/environment/derived-variables.d.ts +0 -12
  21. package/dist/environment/derived-variables.d.ts.map +1 -1
  22. package/dist/environment/derived-variables.js +0 -14
  23. package/dist/environment/logger.d.ts +3 -12
  24. package/dist/environment/logger.d.ts.map +1 -1
  25. package/dist/environment/manage-users.js +17 -7
  26. package/dist/environment/setup-environment.js +0 -14
  27. package/dist/environment/swarm-to-k8s.js +17 -7
  28. package/dist/environment/update-workflows.js +17 -7
  29. package/dist/environment/users.js +17 -7
  30. package/dist/environment/utils.js +17 -7
  31. package/dist/events/index.js +106 -29
  32. package/dist/migrations/v2.0/convert-config-files-to-ts.js +17 -7
  33. package/dist/migrations/v2.0/remove-hearth-migrations.js +17 -7
  34. package/dist/notification/index.js +58 -24
  35. package/dist/scopes/index.d.ts +7 -1
  36. package/dist/scopes/index.js +2 -0
  37. package/dist/templates/charts-values/dependencies/values.yaml +0 -3
  38. package/dist/templates/charts-values/opencrvs-services/values.yaml +0 -4
  39. package/opencrvs-toolkit-2.1.0-rc.e8dd933.tgz +0 -0
  40. package/package.json +3 -3
  41. package/tsconfig.tsbuildinfo +1 -1
  42. package/opencrvs-toolkit-2.1.0-rc.e773220.tgz +0 -0
@@ -520,6 +520,7 @@ var ActionType = {
520
520
  MARK_AS_DUPLICATE: "MARK_AS_DUPLICATE",
521
521
  MARK_AS_NOT_DUPLICATE: "MARK_AS_NOT_DUPLICATE",
522
522
  ARCHIVE: "ARCHIVE",
523
+ UNARCHIVE: "UNARCHIVE",
523
524
  // Record actions
524
525
  PRINT_CERTIFICATE: "PRINT_CERTIFICATE",
525
526
  REQUEST_CORRECTION: "REQUEST_CORRECTION",
@@ -539,6 +540,7 @@ var ConfirmableActions = [
539
540
  ActionType.REGISTER,
540
541
  ActionType.REJECT,
541
542
  ActionType.ARCHIVE,
543
+ ActionType.UNARCHIVE,
542
544
  ActionType.PRINT_CERTIFICATE,
543
545
  ActionType.REQUEST_CORRECTION,
544
546
  ActionType.APPROVE_CORRECTION,
@@ -557,6 +559,7 @@ var ActionTypes = z10.enum([
557
559
  "MARK_AS_DUPLICATE",
558
560
  "MARK_AS_NOT_DUPLICATE",
559
561
  "ARCHIVE",
562
+ "UNARCHIVE",
560
563
  "PRINT_CERTIFICATE",
561
564
  "REQUEST_CORRECTION",
562
565
  "REJECT_CORRECTION",
@@ -597,6 +600,7 @@ var WorkqueueActionType = ActionTypes.extract([
597
600
  ActionType.REJECT,
598
601
  ActionType.MARK_AS_DUPLICATE,
599
602
  ActionType.ARCHIVE,
603
+ ActionType.UNARCHIVE,
600
604
  ActionType.PRINT_CERTIFICATE,
601
605
  ActionType.REQUEST_CORRECTION
602
606
  ]);
@@ -626,6 +630,7 @@ var RecordScopeTypeV2 = z11.enum([
626
630
  "record.edit",
627
631
  "record.reject",
628
632
  "record.archive",
633
+ "record.unarchive",
629
634
  "record.review-duplicates",
630
635
  "record.register",
631
636
  "record.print-certified-copies",
@@ -731,6 +736,7 @@ var ScopesWithDeclaredOptions = RecordScopeTypeV2.extract([
731
736
  "record.edit",
732
737
  "record.reject",
733
738
  "record.archive",
739
+ "record.unarchive",
734
740
  "record.review-duplicates",
735
741
  "record.register"
736
742
  ]);
@@ -965,6 +971,11 @@ var ArchiveAction = ActionBase.extend(
965
971
  content: ReasonContent
966
972
  }).shape
967
973
  );
974
+ var UnarchiveAction = ActionBase.extend(
975
+ z13.object({
976
+ type: z13.literal(ActionType.UNARCHIVE)
977
+ }).shape
978
+ );
968
979
  var CreatedAction = ActionBase.extend(
969
980
  z13.object({
970
981
  type: z13.literal(ActionType.CREATE)
@@ -978,9 +989,10 @@ var NotifiedAction = ActionBase.extend(
978
989
  var EditAction = ActionBase.extend(
979
990
  z13.object({
980
991
  type: z13.literal(ActionType.EDIT),
992
+ /** @deprecated New Edit-actions should no longer contain content. This is kept for old 2.0 edits. */
981
993
  content: z13.object({
982
994
  comment: z13.string().describe("Comment for the edit action.").optional()
983
- })
995
+ }).optional()
984
996
  }).shape
985
997
  );
986
998
  var PrintContent = z13.object({
@@ -1031,6 +1043,7 @@ var ActionDocument = z13.discriminatedUnion("type", [
1031
1043
  MarkNotDuplicateAction.meta({ id: "MarkNotDuplicateAction" }),
1032
1044
  MarkAsDuplicateAction.meta({ id: "MarkAsDuplicateAction" }),
1033
1045
  ArchiveAction.meta({ id: "ArchiveAction" }),
1046
+ UnarchiveAction.meta({ id: "UnarchiveAction" }),
1034
1047
  NotifiedAction.meta({ id: "NotifiedAction" }),
1035
1048
  RegisterAction.meta({ id: "RegisterAction" }),
1036
1049
  DeclareAction.meta({ id: "DeclareAction" }),
package/dist/cli.js CHANGED
@@ -380,20 +380,6 @@ var init_derived_variables = __esm({
380
380
  type: "disabled",
381
381
  scope: "ENVIRONMENT"
382
382
  },
383
- {
384
- name: "MONGODB_ADMIN_USER",
385
- valueLabel: "MONGODB_ADMIN_USER",
386
- valueType: "SECRET",
387
- type: "disabled",
388
- scope: "ENVIRONMENT"
389
- },
390
- {
391
- name: "MONGODB_ADMIN_PASSWORD",
392
- valueLabel: "MONGODB_ADMIN_PASSWORD",
393
- valueType: "SECRET",
394
- type: "disabled",
395
- scope: "ENVIRONMENT"
396
- },
397
383
  {
398
384
  name: "POSTGRES_USER",
399
385
  valueLabel: "POSTGRES_USER",
@@ -2290,40 +2276,6 @@ var init_setup_environment = __esm({
2290
2276
  ),
2291
2277
  scope: "ENVIRONMENT"
2292
2278
  },
2293
- {
2294
- name: "MONGODB_ADMIN_USER",
2295
- type: "SECRET",
2296
- didExist: findExistingValue(
2297
- "MONGODB_ADMIN_USER",
2298
- "SECRET",
2299
- "ENVIRONMENT",
2300
- existingValues
2301
- ),
2302
- value: findExistingOrDefine(
2303
- "MONGODB_ADMIN_USER",
2304
- "SECRET",
2305
- "ENVIRONMENT",
2306
- generateLongPassword()
2307
- ),
2308
- scope: "ENVIRONMENT"
2309
- },
2310
- {
2311
- name: "MONGODB_ADMIN_PASSWORD",
2312
- type: "SECRET",
2313
- didExist: findExistingValue(
2314
- "MONGODB_ADMIN_PASSWORD",
2315
- "SECRET",
2316
- "ENVIRONMENT",
2317
- existingValues
2318
- ),
2319
- value: findExistingOrDefine(
2320
- "MONGODB_ADMIN_PASSWORD",
2321
- "SECRET",
2322
- "ENVIRONMENT",
2323
- generateLongPassword()
2324
- ),
2325
- scope: "ENVIRONMENT"
2326
- },
2327
2279
  {
2328
2280
  name: "POSTGRES_USER",
2329
2281
  type: "SECRET",