@opencrvs/toolkit 1.9.12-rc.f5ca5e6 → 1.9.12-rc.f687751

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 (128) hide show
  1. package/build.sh +8 -0
  2. package/dist/application-config/index.js +2045 -41
  3. package/dist/cli.d.ts +2 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +4841 -0
  6. package/dist/commons/api/router.d.ts +475 -244
  7. package/dist/commons/application-config/index.d.ts +13 -16
  8. package/dist/commons/conditionals/conditionals.d.ts +8 -8
  9. package/dist/commons/events/ActionDocument.d.ts +196 -196
  10. package/dist/commons/events/ActionInput.d.ts +113 -113
  11. package/dist/commons/events/ActionType.d.ts +3 -3
  12. package/dist/commons/events/AdvancedSearchConfig.d.ts +6 -0
  13. package/dist/commons/events/AuditLog.d.ts +347 -163
  14. package/dist/commons/events/CompositeFieldValue.d.ts +4 -4
  15. package/dist/commons/events/CountryConfigQueryInput.d.ts +461 -190
  16. package/dist/commons/events/Draft.d.ts +9 -9
  17. package/dist/commons/events/DynamicFieldValue.d.ts +37 -19
  18. package/dist/commons/events/EventConfig.d.ts +3 -1
  19. package/dist/commons/events/EventDocument.d.ts +80 -80
  20. package/dist/commons/events/EventIndex.d.ts +35 -27
  21. package/dist/commons/events/EventInput.d.ts +1 -1
  22. package/dist/commons/events/EventMetadata.d.ts +19 -19
  23. package/dist/commons/events/FieldConfig.d.ts +287 -71
  24. package/dist/commons/events/FieldType.d.ts +2 -1
  25. package/dist/commons/events/FieldTypeMapping.d.ts +98 -72
  26. package/dist/commons/events/FieldValue.d.ts +54 -26
  27. package/dist/commons/events/PlainDate.d.ts +1 -1
  28. package/dist/commons/events/WorkqueueColumnConfig.d.ts +7 -7
  29. package/dist/commons/events/WorkqueueConfig.d.ts +443 -199
  30. package/dist/commons/events/defineConfig.d.ts +0 -4
  31. package/dist/commons/events/locations.d.ts +4 -4
  32. package/dist/commons/events/scopes.d.ts +4 -3
  33. package/dist/commons/events/state/index.d.ts +2 -2
  34. package/dist/commons/events/state/utils.d.ts +1 -1
  35. package/dist/commons/events/test.utils.d.ts +2 -2
  36. package/dist/commons/events/utils.d.ts +3 -175
  37. package/dist/commons/notification/UserNotifications.d.ts +21 -1
  38. package/dist/conditionals/index.js +74 -359
  39. package/dist/events/index.js +1207 -1260
  40. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts +3 -0
  41. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts.map +1 -0
  42. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.js +404 -0
  43. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts +3 -0
  44. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts.map +1 -0
  45. package/dist/migrations/v2.0/add-resend-invite-notification.js +345 -0
  46. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +22 -0
  47. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -0
  48. package/dist/migrations/v2.0/checkout-upstream-files.js +147 -0
  49. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts +2 -0
  50. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts.map +1 -0
  51. package/dist/migrations/v2.0/convert-config-files-to-ts.js +828 -0
  52. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts +3 -0
  53. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts.map +1 -0
  54. package/dist/migrations/v2.0/convert-paragraph-to-heading.js +158 -0
  55. package/dist/migrations/v2.0/create-events-index.d.ts +3 -0
  56. package/dist/migrations/v2.0/create-events-index.d.ts.map +1 -0
  57. package/dist/migrations/v2.0/create-events-index.js +325 -0
  58. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts +3 -0
  59. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts.map +1 -0
  60. package/dist/migrations/v2.0/delete-infrastructure-directory.js +77 -0
  61. package/dist/migrations/v2.0/index.d.ts +11 -0
  62. package/dist/migrations/v2.0/index.d.ts.map +1 -0
  63. package/dist/migrations/v2.0/index.js +4751 -0
  64. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts +3 -0
  65. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts.map +1 -0
  66. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.js +343 -0
  67. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts +3 -0
  68. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts.map +1 -0
  69. package/dist/migrations/v2.0/merge-infrastructure-directory.js +221 -0
  70. package/dist/migrations/v2.0/migrate-application-config-url.d.ts +3 -0
  71. package/dist/migrations/v2.0/migrate-application-config-url.d.ts.map +1 -0
  72. package/dist/migrations/v2.0/migrate-application-config-url.js +342 -0
  73. package/dist/migrations/v2.0/migrate-scopes.d.ts +3 -0
  74. package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -0
  75. package/dist/migrations/v2.0/migrate-scopes.js +281 -0
  76. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts +3 -0
  77. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts.map +1 -0
  78. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.js +267 -0
  79. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts +3 -0
  80. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +1 -0
  81. package/dist/migrations/v2.0/migrate-workqueue-configs.js +236 -0
  82. package/dist/migrations/v2.0/remove-delete-actions.d.ts +3 -0
  83. package/dist/migrations/v2.0/remove-delete-actions.d.ts.map +1 -0
  84. package/dist/migrations/v2.0/remove-delete-actions.js +156 -0
  85. package/dist/migrations/v2.0/remove-demo-scope.d.ts +3 -0
  86. package/dist/migrations/v2.0/remove-demo-scope.d.ts.map +1 -0
  87. package/dist/migrations/v2.0/remove-demo-scope.js +74 -0
  88. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts +3 -0
  89. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts.map +1 -0
  90. package/dist/migrations/v2.0/remove-deprecated-imports.js +96 -0
  91. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts +3 -0
  92. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts.map +1 -0
  93. package/dist/migrations/v2.0/remove-fhir-url-helpers.js +163 -0
  94. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts +3 -0
  95. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts.map +1 -0
  96. package/dist/migrations/v2.0/remove-hearth-migrations.js +77 -0
  97. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts +3 -0
  98. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts.map +1 -0
  99. package/dist/migrations/v2.0/remove-old-statistics-service.js +356 -0
  100. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts +3 -0
  101. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts.map +1 -0
  102. package/dist/migrations/v2.0/remove-pending-certification-flag.js +109 -0
  103. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts +3 -0
  104. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts.map +1 -0
  105. package/dist/migrations/v2.0/remove-review-from-register-action.js +163 -0
  106. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts +3 -0
  107. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts.map +1 -0
  108. package/dist/migrations/v2.0/remove-unused-environment-variables.js +186 -0
  109. package/dist/migrations/v2.0/rename-api-paths.d.ts +3 -0
  110. package/dist/migrations/v2.0/rename-api-paths.d.ts.map +1 -0
  111. package/dist/migrations/v2.0/rename-api-paths.js +187 -0
  112. package/dist/migrations/v2.0/rename-location-parent-id.d.ts +3 -0
  113. package/dist/migrations/v2.0/rename-location-parent-id.d.ts.map +1 -0
  114. package/dist/migrations/v2.0/rename-location-parent-id.js +180 -0
  115. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts +3 -0
  116. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts.map +1 -0
  117. package/dist/migrations/v2.0/simplify-analytics-precalculations.js +195 -0
  118. package/dist/migrations/v2.0/update-package-json.d.ts +3 -0
  119. package/dist/migrations/v2.0/update-package-json.d.ts.map +1 -0
  120. package/dist/migrations/v2.0/update-package-json.js +105 -0
  121. package/dist/notification/index.js +1013 -1135
  122. package/dist/scopes/index.d.ts +389 -152
  123. package/dist/scopes/index.js +128 -322
  124. package/opencrvs-toolkit-1.9.12-rc.f687751.tgz +0 -0
  125. package/package.json +11 -7
  126. package/tsconfig.json +3 -0
  127. package/tsconfig.tsbuildinfo +1 -1
  128. package/opencrvs-toolkit-1.9.12-rc.f5ca5e6.tgz +0 -0
@@ -1,11 +1,12 @@
1
1
  import * as z from 'zod/v4';
2
2
  export declare const Draft: z.ZodObject<{
3
- id: z.core.$ZodBranded<z.ZodUUID, "UUID">;
4
- eventId: z.core.$ZodBranded<z.ZodUUID, "UUID">;
3
+ id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
4
+ eventId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
5
5
  transactionId: z.ZodString;
6
6
  createdAt: z.ZodString;
7
7
  action: z.ZodObject<{
8
8
  type: z.ZodEnum<{
9
+ CUSTOM: "CUSTOM";
9
10
  CREATE: "CREATE";
10
11
  NOTIFY: "NOTIFY";
11
12
  DECLARE: "DECLARE";
@@ -23,7 +24,6 @@ export declare const Draft: z.ZodObject<{
23
24
  READ: "READ";
24
25
  ASSIGN: "ASSIGN";
25
26
  UNASSIGN: "UNASSIGN";
26
- CUSTOM: "CUSTOM";
27
27
  }>;
28
28
  transactionId: z.ZodString;
29
29
  createdByUserType: z.ZodEnum<{
@@ -33,7 +33,7 @@ export declare const Draft: z.ZodObject<{
33
33
  createdAt: z.ZodString;
34
34
  createdBy: z.ZodString;
35
35
  createdByRole: z.ZodOptional<z.ZodString>;
36
- createdBySignature: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "DocumentPath">>>;
36
+ createdBySignature: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">>>;
37
37
  declaration: z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>;
38
38
  annotation: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>>;
39
39
  status: z.ZodEnum<{
@@ -41,18 +41,19 @@ export declare const Draft: z.ZodObject<{
41
41
  Accepted: "Accepted";
42
42
  Rejected: "Rejected";
43
43
  }>;
44
- originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID">>>;
44
+ originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
45
45
  }, z.core.$strip>;
46
46
  }, z.core.$strip>;
47
47
  export declare const DraftInput: z.ZodObject<{
48
- eventId: z.core.$ZodBranded<z.ZodUUID, "UUID">;
48
+ eventId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
49
49
  transactionId: z.ZodString;
50
50
  declaration: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
51
51
  annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
52
- originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID">>;
52
+ originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
53
53
  keepAssignment: z.ZodOptional<z.ZodBoolean>;
54
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID">>>;
54
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
55
55
  type: z.ZodEnum<{
56
+ CUSTOM: "CUSTOM";
56
57
  CREATE: "CREATE";
57
58
  NOTIFY: "NOTIFY";
58
59
  DECLARE: "DECLARE";
@@ -70,7 +71,6 @@ export declare const DraftInput: z.ZodObject<{
70
71
  READ: "READ";
71
72
  ASSIGN: "ASSIGN";
72
73
  UNASSIGN: "UNASSIGN";
73
- CUSTOM: "CUSTOM";
74
74
  }>;
75
75
  status: z.ZodEnum<{
76
76
  Requested: "Requested";
@@ -32,24 +32,42 @@ export type DynamicNameValue = ReturnType<typeof getDynamicNameValue>;
32
32
  * This prevents clients from sending unexpected data keys that don’t exist
33
33
  * in the configuration (a common data integrity issue).
34
34
  */
35
- export declare function getDynamicAddressFieldValue(field: AddressField): z.ZodDiscriminatedUnion<[z.ZodObject<{
36
- country: z.ZodString;
37
- streetLevelDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
38
- addressType: z.ZodLiteral<"DOMESTIC">;
39
- administrativeArea: z.ZodString;
40
- }, z.core.$strip>, z.ZodObject<{
41
- country: z.ZodString;
42
- streetLevelDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
43
- addressType: z.ZodLiteral<"INTERNATIONAL">;
44
- }, z.core.$strip>], "addressType"> | z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
45
- country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
46
- streetLevelDetails: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>>;
47
- addressType: z.ZodLiteral<"DOMESTIC">;
48
- administrativeArea: z.ZodOptional<z.ZodNullable<z.ZodString>>;
49
- }, z.core.$strip>, z.ZodObject<{
50
- country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
51
- streetLevelDetails: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>>;
52
- addressType: z.ZodLiteral<"INTERNATIONAL">;
53
- }, z.core.$strip>], "addressType">>>;
35
+ export declare function getDynamicAddressFieldValue(field: AddressField): z.ZodType<{
36
+ country: string;
37
+ addressType: "DOMESTIC";
38
+ administrativeArea: string;
39
+ streetLevelDetails?: Record<string, string> | undefined;
40
+ } | {
41
+ country: string;
42
+ addressType: "INTERNATIONAL";
43
+ streetLevelDetails?: Record<string, string> | undefined;
44
+ } | {
45
+ addressType: "DOMESTIC";
46
+ country?: string | null | undefined;
47
+ streetLevelDetails?: Record<string, string | null> | null | undefined;
48
+ administrativeArea?: string | null | undefined;
49
+ } | {
50
+ addressType: "INTERNATIONAL";
51
+ country?: string | null | undefined;
52
+ streetLevelDetails?: Record<string, string | null> | null | undefined;
53
+ } | null | undefined, unknown, z.core.$ZodTypeInternals<{
54
+ country: string;
55
+ addressType: "DOMESTIC";
56
+ administrativeArea: string;
57
+ streetLevelDetails?: Record<string, string> | undefined;
58
+ } | {
59
+ country: string;
60
+ addressType: "INTERNATIONAL";
61
+ streetLevelDetails?: Record<string, string> | undefined;
62
+ } | {
63
+ addressType: "DOMESTIC";
64
+ country?: string | null | undefined;
65
+ streetLevelDetails?: Record<string, string | null> | null | undefined;
66
+ administrativeArea?: string | null | undefined;
67
+ } | {
68
+ addressType: "INTERNATIONAL";
69
+ country?: string | null | undefined;
70
+ streetLevelDetails?: Record<string, string | null> | null | undefined;
71
+ } | null | undefined, unknown>>;
54
72
  export type DynamicAddressFieldValue = ReturnType<typeof getDynamicAddressFieldValue>;
55
73
  //# sourceMappingURL=DynamicFieldValue.d.ts.map
@@ -29,14 +29,16 @@ export type EventConfig = {
29
29
  declaration: DeclarationFormConfig;
30
30
  advancedSearch: AdvancedSearchConfig[];
31
31
  flags: FlagConfig[];
32
+ analytics: boolean;
32
33
  };
33
- export type EventConfigInput = Omit<EventConfig, 'advancedSearch' | 'flags' | 'declaration' | 'actions' | 'dateOfEvent' | 'placeOfEvent'> & {
34
+ export type EventConfigInput = Omit<EventConfig, 'advancedSearch' | 'flags' | 'declaration' | 'actions' | 'dateOfEvent' | 'placeOfEvent' | 'analytics'> & {
34
35
  dateOfEvent?: z.input<typeof FieldReference> | z.infer<typeof EventFieldReference>;
35
36
  placeOfEvent?: z.input<typeof FieldReference>;
36
37
  advancedSearch?: AdvancedSearchConfig[];
37
38
  flags?: FlagConfig[];
38
39
  declaration: DeclarationFormConfigInput;
39
40
  actions: z.input<typeof ActionConfig>[];
41
+ analytics?: boolean;
40
42
  };
41
43
  export declare const EventConfig: z.ZodType<EventConfig, EventConfigInput>;
42
44
  //# sourceMappingURL=EventConfig.d.ts.map