@opencrvs/toolkit 1.9.13-rc.fc5374d → 2.0.0-beta

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 (157) hide show
  1. package/build.sh +13 -0
  2. package/create-countryconfig/index.js +73 -0
  3. package/create-countryconfig/package.json +11 -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 +2158 -0
  8. package/dist/cli.d.ts +2 -0
  9. package/dist/cli.d.ts.map +1 -0
  10. package/dist/cli.js +4974 -0
  11. package/dist/commons/api/router.d.ts +3497 -2348
  12. package/dist/commons/application-config/index.d.ts +96 -0
  13. package/dist/commons/conditionals/conditionals.d.ts +27 -3
  14. package/dist/commons/conditionals/validate.d.ts +13 -3
  15. package/dist/commons/events/ActionConfig.d.ts +415 -1555
  16. package/dist/commons/events/ActionDocument.d.ts +888 -1941
  17. package/dist/commons/events/ActionInput.d.ts +277 -1073
  18. package/dist/commons/events/ActionType.d.ts +91 -11
  19. package/dist/commons/events/AdvancedSearchConfig.d.ts +294 -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 -107
  27. package/dist/commons/events/DynamicFieldValue.d.ts +12 -78
  28. package/dist/commons/events/EventConfig.d.ts +37 -2420
  29. package/dist/commons/events/EventConfigInput.d.ts +0 -3
  30. package/dist/commons/events/EventDocument.d.ts +354 -1366
  31. package/dist/commons/events/EventIndex.d.ts +212 -1010
  32. package/dist/commons/events/EventInput.d.ts +3 -8
  33. package/dist/commons/events/EventMetadata.d.ts +130 -357
  34. package/dist/commons/events/FieldConfig.d.ts +2902 -12892
  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 +149 -527
  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 +2208 -7553
  48. package/dist/commons/events/deduplication.d.ts +3 -3
  49. package/dist/commons/events/defineConfig.d.ts +2 -247
  50. package/dist/commons/events/eventConfigValidation.d.ts +8 -0
  51. package/dist/commons/events/index.d.ts +3 -0
  52. package/dist/commons/events/locations.d.ts +93 -19
  53. package/dist/commons/events/mocks.test.utils.d.ts +19 -0
  54. package/dist/commons/events/scopes.d.ts +56 -32
  55. package/dist/commons/events/state/availableActions.d.ts +7 -2
  56. package/dist/commons/events/state/flags.d.ts +21 -3
  57. package/dist/commons/events/state/index.d.ts +30 -27
  58. package/dist/commons/events/state/utils.d.ts +190 -172
  59. package/dist/commons/events/test.utils.d.ts +52 -11
  60. package/dist/commons/events/transactions.d.ts +1 -1
  61. package/dist/commons/events/utils.d.ts +373 -273
  62. package/dist/commons/notification/UserNotifications.d.ts +76 -637
  63. package/dist/conditionals/index.d.ts.map +1 -1
  64. package/dist/conditionals/index.js +332 -14
  65. package/dist/events/deduplication.d.ts +3 -3
  66. package/dist/events/index.js +2996 -2127
  67. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts +3 -0
  68. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts.map +1 -0
  69. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.js +429 -0
  70. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts +3 -0
  71. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts.map +1 -0
  72. package/dist/migrations/v2.0/add-resend-invite-notification.js +373 -0
  73. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +22 -0
  74. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -0
  75. package/dist/migrations/v2.0/checkout-upstream-files.js +147 -0
  76. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts +2 -0
  77. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts.map +1 -0
  78. package/dist/migrations/v2.0/convert-config-files-to-ts.js +828 -0
  79. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts +3 -0
  80. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts.map +1 -0
  81. package/dist/migrations/v2.0/convert-paragraph-to-heading.js +158 -0
  82. package/dist/migrations/v2.0/create-events-index.d.ts +3 -0
  83. package/dist/migrations/v2.0/create-events-index.d.ts.map +1 -0
  84. package/dist/migrations/v2.0/create-events-index.js +325 -0
  85. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts +3 -0
  86. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts.map +1 -0
  87. package/dist/migrations/v2.0/delete-infrastructure-directory.js +77 -0
  88. package/dist/migrations/v2.0/index.d.ts +11 -0
  89. package/dist/migrations/v2.0/index.d.ts.map +1 -0
  90. package/dist/migrations/v2.0/index.js +4884 -0
  91. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts +3 -0
  92. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts.map +1 -0
  93. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.js +432 -0
  94. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts +3 -0
  95. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts.map +1 -0
  96. package/dist/migrations/v2.0/merge-infrastructure-directory.js +221 -0
  97. package/dist/migrations/v2.0/migrate-application-config-url.d.ts +3 -0
  98. package/dist/migrations/v2.0/migrate-application-config-url.d.ts.map +1 -0
  99. package/dist/migrations/v2.0/migrate-application-config-url.js +342 -0
  100. package/dist/migrations/v2.0/migrate-scopes.d.ts +3 -0
  101. package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -0
  102. package/dist/migrations/v2.0/migrate-scopes.js +281 -0
  103. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts +3 -0
  104. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts.map +1 -0
  105. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.js +267 -0
  106. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts +3 -0
  107. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +1 -0
  108. package/dist/migrations/v2.0/migrate-workqueue-configs.js +236 -0
  109. package/dist/migrations/v2.0/remove-delete-actions.d.ts +3 -0
  110. package/dist/migrations/v2.0/remove-delete-actions.d.ts.map +1 -0
  111. package/dist/migrations/v2.0/remove-delete-actions.js +156 -0
  112. package/dist/migrations/v2.0/remove-demo-scope.d.ts +3 -0
  113. package/dist/migrations/v2.0/remove-demo-scope.d.ts.map +1 -0
  114. package/dist/migrations/v2.0/remove-demo-scope.js +74 -0
  115. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts +3 -0
  116. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts.map +1 -0
  117. package/dist/migrations/v2.0/remove-deprecated-imports.js +96 -0
  118. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts +3 -0
  119. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts.map +1 -0
  120. package/dist/migrations/v2.0/remove-fhir-url-helpers.js +163 -0
  121. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts +3 -0
  122. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts.map +1 -0
  123. package/dist/migrations/v2.0/remove-hearth-migrations.js +77 -0
  124. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts +3 -0
  125. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts.map +1 -0
  126. package/dist/migrations/v2.0/remove-old-statistics-service.js +356 -0
  127. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts +3 -0
  128. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts.map +1 -0
  129. package/dist/migrations/v2.0/remove-pending-certification-flag.js +109 -0
  130. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts +3 -0
  131. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts.map +1 -0
  132. package/dist/migrations/v2.0/remove-review-from-register-action.js +163 -0
  133. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts +3 -0
  134. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts.map +1 -0
  135. package/dist/migrations/v2.0/remove-unused-environment-variables.js +186 -0
  136. package/dist/migrations/v2.0/rename-api-paths.d.ts +3 -0
  137. package/dist/migrations/v2.0/rename-api-paths.d.ts.map +1 -0
  138. package/dist/migrations/v2.0/rename-api-paths.js +187 -0
  139. package/dist/migrations/v2.0/rename-location-parent-id.d.ts +3 -0
  140. package/dist/migrations/v2.0/rename-location-parent-id.d.ts.map +1 -0
  141. package/dist/migrations/v2.0/rename-location-parent-id.js +180 -0
  142. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts +3 -0
  143. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts.map +1 -0
  144. package/dist/migrations/v2.0/simplify-analytics-precalculations.js +195 -0
  145. package/dist/migrations/v2.0/update-package-json.d.ts +3 -0
  146. package/dist/migrations/v2.0/update-package-json.d.ts.map +1 -0
  147. package/dist/migrations/v2.0/update-package-json.js +105 -0
  148. package/dist/notification/index.d.ts.map +1 -1
  149. package/dist/notification/index.js +2112 -1767
  150. package/dist/scopes/index.d.ts +716 -352
  151. package/dist/scopes/index.d.ts.map +1 -1
  152. package/dist/scopes/index.js +374 -299
  153. package/opencrvs-toolkit-2.0.0-beta.tgz +0 -0
  154. package/package.json +18 -8
  155. package/tsconfig.json +12 -2
  156. package/tsconfig.tsbuildinfo +1 -1
  157. package/dist/commons/events/CreatedAtLocation.d.ts +0 -2
@@ -1,4 +1,4 @@
1
- import { FullDocumentPath } from '../documents';
1
+ import { DocumentPath } from '../documents';
2
2
  import { EventDocument } from './EventDocument';
3
- export declare function getFilePathsFromEvent(event: EventDocument): FullDocumentPath[];
3
+ export declare function getFilePathsFromEvent(event: EventDocument): DocumentPath[];
4
4
  //# sourceMappingURL=FileUtils.d.ts.map
@@ -0,0 +1,67 @@
1
+ import * as z from 'zod/v4';
2
+ export declare const InherentFlags: {
3
+ readonly INCOMPLETE: "incomplete";
4
+ readonly REJECTED: "rejected";
5
+ readonly CORRECTION_REQUESTED: "correction-requested";
6
+ readonly POTENTIAL_DUPLICATE: "potential-duplicate";
7
+ /**
8
+ * This flag is set by the Edit-action and removed after the declaration or registration.
9
+ * A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
10
+ *
11
+ * We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
12
+ */
13
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
14
+ };
15
+ export type InherentFlags = (typeof InherentFlags)[keyof typeof InherentFlags];
16
+ export declare const ActionFlag: z.ZodString;
17
+ export type ActionFlag = z.infer<typeof ActionFlag>;
18
+ /** Custom flag identifier defined by the country config. These may not match any InherentFlags or ActionFlag patterns. */
19
+ export declare const CustomFlag: z.ZodString;
20
+ export type CustomFlag = z.infer<typeof CustomFlag>;
21
+ export declare const Flag: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
22
+ readonly INCOMPLETE: "incomplete";
23
+ readonly REJECTED: "rejected";
24
+ readonly CORRECTION_REQUESTED: "correction-requested";
25
+ readonly POTENTIAL_DUPLICATE: "potential-duplicate";
26
+ /**
27
+ * This flag is set by the Edit-action and removed after the declaration or registration.
28
+ * A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
29
+ *
30
+ * We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
31
+ */
32
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
33
+ }>]>, z.ZodString]>;
34
+ export type Flag = z.infer<typeof Flag>;
35
+ /**
36
+ * Configuration of a custom flag that can be associated with a certain event type.
37
+ */
38
+ export declare const FlagConfig: z.ZodObject<{
39
+ id: z.ZodString;
40
+ requiresAction: z.ZodBoolean;
41
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
42
+ }, z.core.$strip>;
43
+ export type FlagConfig = z.infer<typeof FlagConfig>;
44
+ /**
45
+ * Configuration for a flag action, which is executed when the action is performed.
46
+ */
47
+ export declare const ActionFlagConfig: z.ZodObject<{
48
+ id: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
49
+ readonly INCOMPLETE: "incomplete";
50
+ readonly REJECTED: "rejected";
51
+ readonly CORRECTION_REQUESTED: "correction-requested";
52
+ readonly POTENTIAL_DUPLICATE: "potential-duplicate";
53
+ /**
54
+ * This flag is set by the Edit-action and removed after the declaration or registration.
55
+ * A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
56
+ *
57
+ * We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
58
+ */
59
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
60
+ }>]>, z.ZodString]>;
61
+ operation: z.ZodEnum<{
62
+ add: "add";
63
+ remove: "remove";
64
+ }>;
65
+ conditional: z.ZodOptional<z.ZodAny>;
66
+ }, z.core.$strip>;
67
+ //# sourceMappingURL=Flag.d.ts.map