@opencrvs/toolkit 1.9.15-rc.fc1c0fb → 2.0.0-rc.004e65c

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 (161) hide show
  1. package/build.sh +13 -0
  2. package/create-countryconfig/index.js +103 -0
  3. package/create-countryconfig/package.json +21 -0
  4. package/dist/api/index.d.ts.map +1 -1
  5. package/dist/application-config/index.d.ts +2 -0
  6. package/dist/application-config/index.d.ts.map +1 -0
  7. package/dist/application-config/index.js +2304 -0
  8. package/dist/cli.d.ts +2 -0
  9. package/dist/cli.d.ts.map +1 -0
  10. package/dist/cli.js +5244 -0
  11. package/dist/commons/api/router.d.ts +5630 -3673
  12. package/dist/commons/application-config/index.d.ts +97 -0
  13. package/dist/commons/conditionals/conditionals.d.ts +33 -3
  14. package/dist/commons/conditionals/validate.d.ts +20 -1
  15. package/dist/commons/events/ActionConfig.d.ts +415 -1555
  16. package/dist/commons/events/ActionDocument.d.ts +894 -1941
  17. package/dist/commons/events/ActionInput.d.ts +326 -1212
  18. package/dist/commons/events/ActionType.d.ts +91 -11
  19. package/dist/commons/events/AdvancedSearchConfig.d.ts +636 -1496
  20. package/dist/commons/events/AuditLog.d.ts +407 -0
  21. package/dist/commons/events/CompositeFieldValue.d.ts +30 -190
  22. package/dist/commons/events/Conditional.d.ts +26 -38
  23. package/dist/commons/events/Constants.d.ts +1 -1
  24. package/dist/commons/events/CountryConfigQueryInput.d.ts +1592 -4471
  25. package/dist/commons/events/DeduplicationConfig.d.ts +15 -171
  26. package/dist/commons/events/Draft.d.ts +72 -111
  27. package/dist/commons/events/DynamicFieldValue.d.ts +12 -78
  28. package/dist/commons/events/EventConfig.d.ts +37 -2427
  29. package/dist/commons/events/EventConfigInput.d.ts +0 -3
  30. package/dist/commons/events/EventDocument.d.ts +357 -1366
  31. package/dist/commons/events/EventIndex.d.ts +211 -1012
  32. package/dist/commons/events/EventInput.d.ts +3 -8
  33. package/dist/commons/events/EventMetadata.d.ts +129 -363
  34. package/dist/commons/events/FieldConfig.d.ts +3147 -14211
  35. package/dist/commons/events/FieldType.d.ts +26 -4
  36. package/dist/commons/events/FieldTypeMapping.d.ts +314 -906
  37. package/dist/commons/events/FieldValue.d.ts +154 -526
  38. package/dist/commons/events/FileUtils.d.ts +2 -2
  39. package/dist/commons/events/Flag.d.ts +67 -0
  40. package/dist/commons/events/FormConfig.d.ts +54 -721
  41. package/dist/commons/events/PageConfig.d.ts +58 -320
  42. package/dist/commons/events/PlainDate.d.ts +1 -1
  43. package/dist/commons/events/SummaryConfig.d.ts +14 -161
  44. package/dist/commons/events/TemplateConfig.d.ts +2 -3
  45. package/dist/commons/events/TranslationConfig.d.ts +2 -2
  46. package/dist/commons/events/WorkqueueColumnConfig.d.ts +74 -37
  47. package/dist/commons/events/WorkqueueConfig.d.ts +2232 -7577
  48. package/dist/commons/events/deduplication.d.ts +3 -3
  49. package/dist/commons/events/defineConfig.d.ts +2 -248
  50. package/dist/commons/events/eventConfigValidation.d.ts +8 -0
  51. package/dist/commons/events/field.d.ts +6 -0
  52. package/dist/commons/events/index.d.ts +5 -0
  53. package/dist/commons/events/locations.d.ts +93 -19
  54. package/dist/commons/events/mocks.test.utils.d.ts +19 -0
  55. package/dist/commons/events/scopes.d.ts +56 -32
  56. package/dist/commons/events/state/availableActions.d.ts +7 -2
  57. package/dist/commons/events/state/flags.d.ts +37 -3
  58. package/dist/commons/events/state/index.d.ts +29 -30
  59. package/dist/commons/events/state/utils.d.ts +25 -284
  60. package/dist/commons/events/test.utils.d.ts +52 -11
  61. package/dist/commons/events/transactions.d.ts +1 -1
  62. package/dist/commons/events/utils.d.ts +383 -273
  63. package/dist/commons/notification/UserNotifications.d.ts +76 -637
  64. package/dist/conditionals/index.d.ts.map +1 -1
  65. package/dist/conditionals/index.js +338 -14
  66. package/dist/events/deduplication.d.ts +3 -3
  67. package/dist/events/index.js +3700 -2236
  68. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts +3 -0
  69. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts.map +1 -0
  70. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.js +429 -0
  71. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts +3 -0
  72. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts.map +1 -0
  73. package/dist/migrations/v2.0/add-resend-invite-notification.js +373 -0
  74. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +22 -0
  75. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -0
  76. package/dist/migrations/v2.0/checkout-upstream-files.js +146 -0
  77. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts +2 -0
  78. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts.map +1 -0
  79. package/dist/migrations/v2.0/convert-config-files-to-ts.js +828 -0
  80. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts +3 -0
  81. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts.map +1 -0
  82. package/dist/migrations/v2.0/convert-paragraph-to-heading.js +158 -0
  83. package/dist/migrations/v2.0/create-events-index.d.ts +3 -0
  84. package/dist/migrations/v2.0/create-events-index.d.ts.map +1 -0
  85. package/dist/migrations/v2.0/create-events-index.js +325 -0
  86. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts +11 -0
  87. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts.map +1 -0
  88. package/dist/migrations/v2.0/delete-infrastructure-directory.js +123 -0
  89. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts +3 -0
  90. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts.map +1 -0
  91. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.js +110 -0
  92. package/dist/migrations/v2.0/index.d.ts +13 -0
  93. package/dist/migrations/v2.0/index.d.ts.map +1 -0
  94. package/dist/migrations/v2.0/index.js +5154 -0
  95. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts +3 -0
  96. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts.map +1 -0
  97. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.js +432 -0
  98. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts +13 -0
  99. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts.map +1 -0
  100. package/dist/migrations/v2.0/merge-infrastructure-directory.js +222 -0
  101. package/dist/migrations/v2.0/migrate-application-config-url.d.ts +3 -0
  102. package/dist/migrations/v2.0/migrate-application-config-url.d.ts.map +1 -0
  103. package/dist/migrations/v2.0/migrate-application-config-url.js +342 -0
  104. package/dist/migrations/v2.0/migrate-scopes.d.ts +3 -0
  105. package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -0
  106. package/dist/migrations/v2.0/migrate-scopes.js +305 -0
  107. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts +3 -0
  108. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts.map +1 -0
  109. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.js +267 -0
  110. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts +3 -0
  111. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +1 -0
  112. package/dist/migrations/v2.0/migrate-workqueue-configs.js +317 -0
  113. package/dist/migrations/v2.0/remove-delete-actions.d.ts +3 -0
  114. package/dist/migrations/v2.0/remove-delete-actions.d.ts.map +1 -0
  115. package/dist/migrations/v2.0/remove-delete-actions.js +156 -0
  116. package/dist/migrations/v2.0/remove-demo-scope.d.ts +3 -0
  117. package/dist/migrations/v2.0/remove-demo-scope.d.ts.map +1 -0
  118. package/dist/migrations/v2.0/remove-demo-scope.js +74 -0
  119. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts +3 -0
  120. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts.map +1 -0
  121. package/dist/migrations/v2.0/remove-deprecated-imports.js +96 -0
  122. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts +3 -0
  123. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts.map +1 -0
  124. package/dist/migrations/v2.0/remove-fhir-url-helpers.js +163 -0
  125. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts +3 -0
  126. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts.map +1 -0
  127. package/dist/migrations/v2.0/remove-hearth-migrations.js +77 -0
  128. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts +3 -0
  129. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts.map +1 -0
  130. package/dist/migrations/v2.0/remove-old-statistics-service.js +356 -0
  131. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts +3 -0
  132. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts.map +1 -0
  133. package/dist/migrations/v2.0/remove-pending-certification-flag.js +109 -0
  134. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts +3 -0
  135. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts.map +1 -0
  136. package/dist/migrations/v2.0/remove-review-from-register-action.js +163 -0
  137. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts +3 -0
  138. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts.map +1 -0
  139. package/dist/migrations/v2.0/remove-unused-environment-variables.js +186 -0
  140. package/dist/migrations/v2.0/rename-api-paths.d.ts +3 -0
  141. package/dist/migrations/v2.0/rename-api-paths.d.ts.map +1 -0
  142. package/dist/migrations/v2.0/rename-api-paths.js +187 -0
  143. package/dist/migrations/v2.0/rename-location-parent-id.d.ts +3 -0
  144. package/dist/migrations/v2.0/rename-location-parent-id.d.ts.map +1 -0
  145. package/dist/migrations/v2.0/rename-location-parent-id.js +180 -0
  146. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts +3 -0
  147. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts.map +1 -0
  148. package/dist/migrations/v2.0/simplify-analytics-precalculations.js +195 -0
  149. package/dist/migrations/v2.0/update-package-json.d.ts +3 -0
  150. package/dist/migrations/v2.0/update-package-json.d.ts.map +1 -0
  151. package/dist/migrations/v2.0/update-package-json.js +105 -0
  152. package/dist/notification/index.d.ts.map +1 -1
  153. package/dist/notification/index.js +2731 -1849
  154. package/dist/scopes/index.d.ts +714 -352
  155. package/dist/scopes/index.d.ts.map +1 -1
  156. package/dist/scopes/index.js +381 -298
  157. package/opencrvs-toolkit-2.0.0-rc.004e65c.tgz +0 -0
  158. package/package.json +14 -4
  159. package/tsconfig.json +12 -2
  160. package/tsconfig.tsbuildinfo +1 -1
  161. package/dist/commons/events/CreatedAtLocation.d.ts +0 -2
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import * as z from 'zod/v4';
2
2
  export declare const FieldType: {
3
3
  readonly NAME: "NAME";
4
4
  readonly PHONE: "PHONE";
@@ -14,7 +14,9 @@ export declare const FieldType: {
14
14
  readonly DATE_RANGE: "DATE_RANGE";
15
15
  readonly SELECT_DATE_RANGE: "SELECT_DATE_RANGE";
16
16
  readonly TIME: "TIME";
17
+ readonly IMAGE_VIEW: "IMAGE_VIEW";
17
18
  readonly PARAGRAPH: "PARAGRAPH";
19
+ readonly HEADING: "HEADING";
18
20
  readonly PAGE_HEADER: "PAGE_HEADER";
19
21
  readonly RADIO_GROUP: "RADIO_GROUP";
20
22
  readonly FIELD_GROUP: "FIELD_GROUP";
@@ -27,11 +29,14 @@ export declare const FieldType: {
27
29
  readonly LOCATION: "LOCATION";
28
30
  readonly DIVIDER: "DIVIDER";
29
31
  readonly ADMINISTRATIVE_AREA: "ADMINISTRATIVE_AREA";
32
+ /** @deprecated Use FieldType.LOCATION with locationTypes: ['HEALTH_FACILITY'] */
30
33
  readonly FACILITY: "FACILITY";
34
+ /** @deprecated Use FieldType.LOCATION with locationTypes: ['CRVS_OFFICE'] */
31
35
  readonly OFFICE: "OFFICE";
32
36
  readonly SIGNATURE: "SIGNATURE";
33
37
  readonly DATA: "DATA";
34
38
  readonly BUTTON: "BUTTON";
39
+ readonly AUTOCOMPLETE: "AUTOCOMPLETE";
35
40
  readonly SEARCH: "SEARCH";
36
41
  readonly ALPHA_PRINT_BUTTON: "ALPHA_PRINT_BUTTON";
37
42
  readonly HTTP: "HTTP";
@@ -41,16 +46,33 @@ export declare const FieldType: {
41
46
  readonly QR_READER: "QR_READER";
42
47
  readonly ID_READER: "ID_READER";
43
48
  readonly LOADER: "LOADER";
49
+ readonly ALPHA_HIDDEN: "ALPHA_HIDDEN";
50
+ readonly USER_ROLE: "USER_ROLE";
51
+ /**
52
+ * @internal
53
+ * @experimental
54
+ *
55
+ * Internal API used by the OpenCRVS core team for experimentation.
56
+ *
57
+ * This component is not part of the public, stable API.
58
+ * Its shape, behavior, or existence may change at any time or be removed
59
+ * entirely without notice.
60
+ */
61
+ readonly _EXPERIMENTAL_CUSTOM: "CUSTOM";
44
62
  };
45
63
  /**
46
64
  * Union of types that handle files. Using common type should help with compiler to know where to add new cases.
47
65
  */
48
- export declare const FileFieldType: z.ZodEnum<["FILE", "FILE_WITH_OPTIONS", "SIGNATURE"]>;
49
- export declare const fieldTypes: ("NAME" | "PHONE" | "ID" | "ADDRESS" | "TEXT" | "NUMBER" | "NUMBER_WITH_UNIT" | "TEXTAREA" | "EMAIL" | "DATE" | "AGE" | "DATE_RANGE" | "SELECT_DATE_RANGE" | "TIME" | "PARAGRAPH" | "PAGE_HEADER" | "RADIO_GROUP" | "FIELD_GROUP" | "FILE" | "FILE_WITH_OPTIONS" | "BULLET_LIST" | "CHECKBOX" | "SELECT" | "COUNTRY" | "LOCATION" | "DIVIDER" | "ADMINISTRATIVE_AREA" | "FACILITY" | "OFFICE" | "SIGNATURE" | "DATA" | "BUTTON" | "SEARCH" | "ALPHA_PRINT_BUTTON" | "HTTP" | "LINK_BUTTON" | "VERIFICATION_STATUS" | "QUERY_PARAM_READER" | "QR_READER" | "ID_READER" | "LOADER")[];
66
+ export declare const FileFieldType: z.ZodEnum<{
67
+ FILE: "FILE";
68
+ FILE_WITH_OPTIONS: "FILE_WITH_OPTIONS";
69
+ SIGNATURE: "SIGNATURE";
70
+ }>;
71
+ export declare const fieldTypes: ("NAME" | "PHONE" | "ID" | "ADDRESS" | "TEXT" | "NUMBER" | "NUMBER_WITH_UNIT" | "TEXTAREA" | "EMAIL" | "DATE" | "AGE" | "DATE_RANGE" | "SELECT_DATE_RANGE" | "TIME" | "IMAGE_VIEW" | "PARAGRAPH" | "HEADING" | "PAGE_HEADER" | "RADIO_GROUP" | "FIELD_GROUP" | "FILE" | "FILE_WITH_OPTIONS" | "BULLET_LIST" | "CHECKBOX" | "SELECT" | "COUNTRY" | "LOCATION" | "DIVIDER" | "ADMINISTRATIVE_AREA" | "FACILITY" | "OFFICE" | "SIGNATURE" | "DATA" | "BUTTON" | "AUTOCOMPLETE" | "SEARCH" | "ALPHA_PRINT_BUTTON" | "HTTP" | "LINK_BUTTON" | "VERIFICATION_STATUS" | "QUERY_PARAM_READER" | "QR_READER" | "ID_READER" | "LOADER" | "ALPHA_HIDDEN" | "USER_ROLE" | "CUSTOM")[];
50
72
  export type FieldType = (typeof fieldTypes)[number];
51
73
  /**
52
74
  * Composite field types are field types that consist of multiple field values.
53
75
  */
54
76
  export declare const compositeFieldTypes: ("NAME" | "ADDRESS" | "DATE_RANGE" | "FILE" | "FILE_WITH_OPTIONS" | "DATA" | "ID_READER")[];
55
- export declare const FieldTypesToHideInReview: ("PARAGRAPH" | "PAGE_HEADER" | "BULLET_LIST" | "DIVIDER" | "DATA" | "HTTP" | "QUERY_PARAM_READER" | "ID_READER" | "LOADER")[];
77
+ export declare const FieldTypesToHideInReview: ("IMAGE_VIEW" | "PARAGRAPH" | "PAGE_HEADER" | "BULLET_LIST" | "DIVIDER" | "DATA" | "ALPHA_PRINT_BUTTON" | "HTTP" | "QUERY_PARAM_READER" | "ID_READER" | "LOADER" | "ALPHA_HIDDEN")[];
56
78
  //# sourceMappingURL=FieldType.d.ts.map