@opencrvs/toolkit 2.0.0-rc.977e771 → 2.0.0-rc.9d1c7d2

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 (79) hide show
  1. package/dist/application-config/index.js +10 -11
  2. package/dist/cli.js +1389 -149
  3. package/dist/commons/api/router.d.ts +55 -54
  4. package/dist/commons/application-config/index.d.ts +16 -4
  5. package/dist/commons/conditionals/conditionals.d.ts +3 -3
  6. package/dist/commons/events/FieldConfig.d.ts +5 -0
  7. package/dist/conditionals/index.js +6 -7
  8. package/dist/events/index.js +6 -7
  9. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts.map +1 -1
  10. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.js +3 -4
  11. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts +3 -0
  12. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts.map +1 -0
  13. package/dist/migrations/v2.0/add-resend-invite-notification.js +373 -0
  14. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +19 -0
  15. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
  16. package/dist/migrations/v2.0/checkout-upstream-files.js +17 -13
  17. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts.map +1 -1
  18. package/dist/migrations/v2.0/convert-config-files-to-ts.js +4 -5
  19. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts.map +1 -1
  20. package/dist/migrations/v2.0/convert-paragraph-to-heading.js +4 -5
  21. package/dist/migrations/v2.0/create-events-index.d.ts.map +1 -1
  22. package/dist/migrations/v2.0/create-events-index.js +1 -2
  23. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts +3 -0
  24. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts.map +1 -0
  25. package/dist/migrations/v2.0/delete-infrastructure-directory.js +77 -0
  26. package/dist/migrations/v2.0/index.d.ts +8 -4
  27. package/dist/migrations/v2.0/index.d.ts.map +1 -1
  28. package/dist/migrations/v2.0/index.js +1357 -146
  29. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts.map +1 -1
  30. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.js +5 -6
  31. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts +3 -0
  32. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts.map +1 -0
  33. package/dist/migrations/v2.0/merge-infrastructure-directory.js +221 -0
  34. package/dist/migrations/v2.0/migrate-application-config-url.d.ts +3 -0
  35. package/dist/migrations/v2.0/migrate-application-config-url.d.ts.map +1 -0
  36. package/dist/migrations/v2.0/migrate-application-config-url.js +342 -0
  37. package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -1
  38. package/dist/migrations/v2.0/migrate-scopes.js +6 -7
  39. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts.map +1 -1
  40. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.js +3 -4
  41. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +1 -1
  42. package/dist/migrations/v2.0/migrate-workqueue-configs.js +3 -4
  43. package/dist/migrations/v2.0/remove-delete-actions.d.ts.map +1 -1
  44. package/dist/migrations/v2.0/remove-delete-actions.js +3 -4
  45. package/dist/migrations/v2.0/remove-demo-scope.d.ts.map +1 -1
  46. package/dist/migrations/v2.0/remove-demo-scope.js +2 -3
  47. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts.map +1 -1
  48. package/dist/migrations/v2.0/remove-deprecated-imports.js +3 -4
  49. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts +3 -0
  50. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts.map +1 -0
  51. package/dist/migrations/v2.0/remove-fhir-url-helpers.js +163 -0
  52. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts.map +1 -1
  53. package/dist/migrations/v2.0/remove-hearth-migrations.js +1 -2
  54. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts +3 -0
  55. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts.map +1 -0
  56. package/dist/migrations/v2.0/remove-old-statistics-service.js +356 -0
  57. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts.map +1 -1
  58. package/dist/migrations/v2.0/remove-pending-certification-flag.js +3 -4
  59. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts.map +1 -1
  60. package/dist/migrations/v2.0/remove-review-from-register-action.js +3 -4
  61. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts +3 -0
  62. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts.map +1 -0
  63. package/dist/migrations/v2.0/remove-unused-environment-variables.js +186 -0
  64. package/dist/migrations/v2.0/rename-api-paths.d.ts.map +1 -1
  65. package/dist/migrations/v2.0/rename-api-paths.js +3 -4
  66. package/dist/migrations/v2.0/rename-location-parent-id.d.ts.map +1 -1
  67. package/dist/migrations/v2.0/rename-location-parent-id.js +3 -4
  68. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts.map +1 -1
  69. package/dist/migrations/v2.0/simplify-analytics-precalculations.js +1 -2
  70. package/dist/migrations/v2.0/update-package-json.d.ts +3 -0
  71. package/dist/migrations/v2.0/update-package-json.d.ts.map +1 -0
  72. package/dist/migrations/v2.0/update-package-json.js +105 -0
  73. package/dist/notification/index.js +6 -7
  74. package/dist/scopes/index.d.ts +2 -0
  75. package/dist/scopes/index.js +6 -7
  76. package/opencrvs-toolkit-2.0.0-rc.9d1c7d2.tgz +0 -0
  77. package/package.json +1 -1
  78. package/tsconfig.tsbuildinfo +1 -1
  79. package/opencrvs-toolkit-2.0.0-rc.977e771.tgz +0 -0
@@ -683,6 +683,9 @@ var CustomActionScopeOptions = AllRecordScopeOptions.extend({
683
683
  var AccessLevelOptions = z11.object({
684
684
  accessLevel: JurisdictionFilter.optional()
685
685
  });
686
+ var AllUserScopeOptions = AccessLevelOptions.extend({
687
+ role: userRole.optional()
688
+ });
686
689
  var WorkqueueOrDashboardOptions = z11.object({
687
690
  ids: z11.preprocess(
688
691
  (val) => val === void 0 ? void 0 : [val].flat(),
@@ -692,6 +695,7 @@ var WorkqueueOrDashboardOptions = z11.object({
692
695
  var AllScopeOptions = z11.object({
693
696
  ...AllRecordScopeOptions.shape,
694
697
  ...AccessLevelOptions.shape,
698
+ ...AllUserScopeOptions.shape,
695
699
  ...WorkqueueOrDashboardOptions.shape
696
700
  });
697
701
  var ScopeOptionKey = AllScopeOptions.keyof();
@@ -779,16 +783,11 @@ var ScopesWithRoleOption = UserScopeType.extract(["user.edit", "user.create"]);
779
783
  var UserScopeV2 = z11.discriminatedUnion("type", [
780
784
  z11.object({
781
785
  type: ScopesWithRoleOption,
782
- options: z11.object({
783
- accessLevel: JurisdictionFilter.optional(),
784
- role: userRole.optional()
785
- }).optional()
786
+ options: AllUserScopeOptions.optional()
786
787
  }),
787
788
  z11.object({
788
789
  type: UserScopeType.extract(["user.read"]),
789
- options: z11.object({
790
- accessLevel: JurisdictionFilter.optional()
791
- }).optional()
790
+ options: AccessLevelOptions.optional()
792
791
  })
793
792
  ]);
794
793
  var ResolvedRecordScopeV2 = z11.discriminatedUnion("type", [
@@ -2107,8 +2106,8 @@ var ApplicationConfig = z20.object({
2107
2106
  })
2108
2107
  ),
2109
2108
  PHONE_NUMBER_PATTERN: z20.string().or(z20.instanceof(RegExp)),
2110
- USER_NOTIFICATION_DELIVERY_METHOD: z20.string(),
2111
- INFORMANT_NOTIFICATION_DELIVERY_METHOD: z20.string(),
2109
+ USER_NOTIFICATION_DELIVERY_METHOD: z20.enum(["email", "sms"]),
2110
+ INFORMANT_NOTIFICATION_DELIVERY_METHOD: z20.enum(["email", "sms"]),
2112
2111
  SEARCH_DEFAULT_CRITERIA: SearchCriteria.optional().default("TRACKING_ID"),
2113
2112
  ADDITIONAL_USER_FIELDS: z20.array(FieldConfig).optional().default([])
2114
2113
  });
@@ -2126,8 +2125,8 @@ var BackgroundConfig = z20.object({
2126
2125
  var LoginConfig = z20.object({
2127
2126
  COUNTRY: z20.string(),
2128
2127
  LANGUAGES: z20.array(z20.string()),
2129
- USER_NOTIFICATION_DELIVERY_METHOD: z20.string(),
2130
- INFORMANT_NOTIFICATION_DELIVERY_METHOD: z20.string(),
2128
+ USER_NOTIFICATION_DELIVERY_METHOD: z20.enum(["email", "sms"]),
2129
+ INFORMANT_NOTIFICATION_DELIVERY_METHOD: z20.enum(["email", "sms"]),
2131
2130
  PHONE_NUMBER_PATTERN: z20.string().or(z20.instanceof(RegExp)),
2132
2131
  LOGIN_BACKGROUND: BackgroundConfig,
2133
2132
  SENTRY: z20.string().optional()