@opencrvs/toolkit 1.9.14 → 2.0.0-rc.013c085

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 (160) 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 +5238 -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 +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 -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/index.d.ts +5 -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 +37 -3
  57. package/dist/commons/events/state/index.d.ts +29 -30
  58. package/dist/commons/events/state/utils.d.ts +191 -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 +383 -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 +338 -14
  65. package/dist/events/deduplication.d.ts +3 -3
  66. package/dist/events/index.js +3680 -2227
  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 +146 -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 +11 -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 +123 -0
  88. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts +3 -0
  89. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts.map +1 -0
  90. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.js +110 -0
  91. package/dist/migrations/v2.0/index.d.ts +13 -0
  92. package/dist/migrations/v2.0/index.d.ts.map +1 -0
  93. package/dist/migrations/v2.0/index.js +5148 -0
  94. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts +3 -0
  95. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts.map +1 -0
  96. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.js +432 -0
  97. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts +13 -0
  98. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts.map +1 -0
  99. package/dist/migrations/v2.0/merge-infrastructure-directory.js +222 -0
  100. package/dist/migrations/v2.0/migrate-application-config-url.d.ts +3 -0
  101. package/dist/migrations/v2.0/migrate-application-config-url.d.ts.map +1 -0
  102. package/dist/migrations/v2.0/migrate-application-config-url.js +342 -0
  103. package/dist/migrations/v2.0/migrate-scopes.d.ts +3 -0
  104. package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -0
  105. package/dist/migrations/v2.0/migrate-scopes.js +305 -0
  106. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts +3 -0
  107. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts.map +1 -0
  108. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.js +267 -0
  109. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts +3 -0
  110. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +1 -0
  111. package/dist/migrations/v2.0/migrate-workqueue-configs.js +317 -0
  112. package/dist/migrations/v2.0/remove-delete-actions.d.ts +3 -0
  113. package/dist/migrations/v2.0/remove-delete-actions.d.ts.map +1 -0
  114. package/dist/migrations/v2.0/remove-delete-actions.js +156 -0
  115. package/dist/migrations/v2.0/remove-demo-scope.d.ts +3 -0
  116. package/dist/migrations/v2.0/remove-demo-scope.d.ts.map +1 -0
  117. package/dist/migrations/v2.0/remove-demo-scope.js +74 -0
  118. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts +3 -0
  119. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts.map +1 -0
  120. package/dist/migrations/v2.0/remove-deprecated-imports.js +96 -0
  121. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts +3 -0
  122. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts.map +1 -0
  123. package/dist/migrations/v2.0/remove-fhir-url-helpers.js +163 -0
  124. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts +3 -0
  125. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts.map +1 -0
  126. package/dist/migrations/v2.0/remove-hearth-migrations.js +77 -0
  127. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts +3 -0
  128. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts.map +1 -0
  129. package/dist/migrations/v2.0/remove-old-statistics-service.js +356 -0
  130. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts +3 -0
  131. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts.map +1 -0
  132. package/dist/migrations/v2.0/remove-pending-certification-flag.js +109 -0
  133. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts +3 -0
  134. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts.map +1 -0
  135. package/dist/migrations/v2.0/remove-review-from-register-action.js +163 -0
  136. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts +3 -0
  137. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts.map +1 -0
  138. package/dist/migrations/v2.0/remove-unused-environment-variables.js +186 -0
  139. package/dist/migrations/v2.0/rename-api-paths.d.ts +3 -0
  140. package/dist/migrations/v2.0/rename-api-paths.d.ts.map +1 -0
  141. package/dist/migrations/v2.0/rename-api-paths.js +187 -0
  142. package/dist/migrations/v2.0/rename-location-parent-id.d.ts +3 -0
  143. package/dist/migrations/v2.0/rename-location-parent-id.d.ts.map +1 -0
  144. package/dist/migrations/v2.0/rename-location-parent-id.js +180 -0
  145. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts +3 -0
  146. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts.map +1 -0
  147. package/dist/migrations/v2.0/simplify-analytics-precalculations.js +195 -0
  148. package/dist/migrations/v2.0/update-package-json.d.ts +3 -0
  149. package/dist/migrations/v2.0/update-package-json.d.ts.map +1 -0
  150. package/dist/migrations/v2.0/update-package-json.js +105 -0
  151. package/dist/notification/index.d.ts.map +1 -1
  152. package/dist/notification/index.js +2727 -1848
  153. package/dist/scopes/index.d.ts +716 -352
  154. package/dist/scopes/index.d.ts.map +1 -1
  155. package/dist/scopes/index.js +376 -299
  156. package/opencrvs-toolkit-2.0.0-rc.013c085.tgz +0 -0
  157. package/package.json +14 -4
  158. package/tsconfig.json +12 -2
  159. package/tsconfig.tsbuildinfo +1 -1
  160. package/dist/commons/events/CreatedAtLocation.d.ts +0 -2
@@ -1,174 +1,34 @@
1
- import { z } from 'zod';
2
- import { TranslationConfig } from './TranslationConfig';
3
- declare const FuzzyMatcher: z.ZodObject<z.objectUtil.extendShape<{
4
- /**
5
- * Reference to the field used in matching.
6
- *
7
- * For `dateRange` type matcher the value of this field will also
8
- * be used as the origin date to calculate the distance from.
9
- */
1
+ import * as z from 'zod/v4';
2
+ declare const FuzzyMatcher: z.ZodObject<{
10
3
  fieldId: z.ZodString;
11
- options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
12
- boost: z.ZodOptional<z.ZodNumber>;
13
- matchAgainst: z.ZodOptional<z.ZodString>;
14
- }, "strip", z.ZodTypeAny, {
15
- boost?: number | undefined;
16
- matchAgainst?: string | undefined;
17
- }, {
18
- boost?: number | undefined;
19
- matchAgainst?: string | undefined;
20
- }>>>;
21
- }, {
22
4
  type: z.ZodLiteral<"fuzzy">;
23
5
  options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
24
- /**
25
- * Names of length 3 or less characters = 0 edits allowed
26
- * Names of length 4 - 6 characters = 1 edit allowed
27
- * Names of length >7 characters = 2 edits allowed
28
- */
29
- fuzziness: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
6
+ fuzziness: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
30
7
  boost: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
31
8
  matchAgainst: z.ZodOptional<z.ZodString>;
32
- }, "strip", z.ZodTypeAny, {
33
- boost: number;
34
- fuzziness: string | number;
35
- matchAgainst?: string | undefined;
36
- }, {
37
- boost?: number | undefined;
38
- matchAgainst?: string | undefined;
39
- fuzziness?: string | number | undefined;
40
- }>>>;
41
- }>, "strip", z.ZodTypeAny, {
42
- type: "fuzzy";
43
- options: {
44
- boost: number;
45
- fuzziness: string | number;
46
- matchAgainst?: string | undefined;
47
- };
48
- fieldId: string;
49
- }, {
50
- type: "fuzzy";
51
- fieldId: string;
52
- options?: {
53
- boost?: number | undefined;
54
- matchAgainst?: string | undefined;
55
- fuzziness?: string | number | undefined;
56
- } | undefined;
57
- }>;
9
+ }, z.core.$strip>>>;
10
+ }, z.core.$strip>;
58
11
  export type FuzzyMatcherOptions = z.input<typeof FuzzyMatcher>['options'];
59
- declare const StrictMatcher: z.ZodObject<z.objectUtil.extendShape<{
60
- /**
61
- * Reference to the field used in matching.
62
- *
63
- * For `dateRange` type matcher the value of this field will also
64
- * be used as the origin date to calculate the distance from.
65
- */
12
+ declare const StrictMatcher: z.ZodObject<{
66
13
  fieldId: z.ZodString;
67
- options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
68
- boost: z.ZodOptional<z.ZodNumber>;
69
- matchAgainst: z.ZodOptional<z.ZodString>;
70
- }, "strip", z.ZodTypeAny, {
71
- boost?: number | undefined;
72
- matchAgainst?: string | undefined;
73
- }, {
74
- boost?: number | undefined;
75
- matchAgainst?: string | undefined;
76
- }>>>;
77
- }, {
78
14
  type: z.ZodLiteral<"strict">;
79
15
  options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
80
16
  boost: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
81
- /**
82
- * The constant value to be present in the field for both records
83
- */
84
17
  value: z.ZodOptional<z.ZodString>;
85
18
  matchAgainst: z.ZodOptional<z.ZodString>;
86
- }, "strip", z.ZodTypeAny, {
87
- boost: number;
88
- value?: string | undefined;
89
- matchAgainst?: string | undefined;
90
- }, {
91
- value?: string | undefined;
92
- boost?: number | undefined;
93
- matchAgainst?: string | undefined;
94
- }>>>;
95
- }>, "strip", z.ZodTypeAny, {
96
- type: "strict";
97
- options: {
98
- boost: number;
99
- value?: string | undefined;
100
- matchAgainst?: string | undefined;
101
- };
102
- fieldId: string;
103
- }, {
104
- type: "strict";
105
- fieldId: string;
106
- options?: {
107
- value?: string | undefined;
108
- boost?: number | undefined;
109
- matchAgainst?: string | undefined;
110
- } | undefined;
111
- }>;
19
+ }, z.core.$strip>>>;
20
+ }, z.core.$strip>;
112
21
  export type StrictMatcherOptions = z.input<typeof StrictMatcher>['options'];
113
- declare const DateRangeMatcher: z.ZodObject<z.objectUtil.extendShape<{
114
- /**
115
- * Reference to the field used in matching.
116
- *
117
- * For `dateRange` type matcher the value of this field will also
118
- * be used as the origin date to calculate the distance from.
119
- */
22
+ declare const DateRangeMatcher: z.ZodObject<{
120
23
  fieldId: z.ZodString;
121
- options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
122
- boost: z.ZodOptional<z.ZodNumber>;
123
- matchAgainst: z.ZodOptional<z.ZodString>;
124
- }, "strip", z.ZodTypeAny, {
125
- boost?: number | undefined;
126
- matchAgainst?: string | undefined;
127
- }, {
128
- boost?: number | undefined;
129
- matchAgainst?: string | undefined;
130
- }>>>;
131
- }, {
132
24
  type: z.ZodLiteral<"dateRange">;
133
25
  options: z.ZodObject<{
134
- /**
135
- * The distance pivot in days. Distance from the origin (the value of
136
- * fieldId) at which relevance scores receive half of the boost value
137
- */
138
26
  pivot: z.ZodOptional<z.ZodNumber>;
139
27
  days: z.ZodNumber;
140
28
  boost: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
141
29
  matchAgainst: z.ZodOptional<z.ZodString>;
142
- }, "strip", z.ZodTypeAny, {
143
- boost: number;
144
- days: number;
145
- matchAgainst?: string | undefined;
146
- pivot?: number | undefined;
147
- }, {
148
- days: number;
149
- boost?: number | undefined;
150
- matchAgainst?: string | undefined;
151
- pivot?: number | undefined;
152
- }>;
153
- }>, "strip", z.ZodTypeAny, {
154
- type: "dateRange";
155
- options: {
156
- boost: number;
157
- days: number;
158
- matchAgainst?: string | undefined;
159
- pivot?: number | undefined;
160
- };
161
- fieldId: string;
162
- }, {
163
- type: "dateRange";
164
- options: {
165
- days: number;
166
- boost?: number | undefined;
167
- matchAgainst?: string | undefined;
168
- pivot?: number | undefined;
169
- };
170
- fieldId: string;
171
- }>;
30
+ }, z.core.$strip>;
31
+ }, z.core.$strip>;
172
32
  export type DateRangeMatcherOptions = z.input<typeof DateRangeMatcher>['options'];
173
33
  export type NotInput = {
174
34
  type: 'not';
@@ -204,29 +64,13 @@ export type ClauseOutput = NotOutput | AndOutput | OrOutput | z.output<typeof Fu
204
64
  * Default assumption is that the ZodType is the input. Markers use default values, so we need to explicitly define output type, too.
205
65
  *
206
66
  */
207
- export declare const Clause: z.ZodType<ClauseOutput, z.ZodTypeDef, ClauseInput>;
67
+ export declare const Clause: z.ZodType<ClauseOutput, ClauseInput>;
208
68
  export type Clause = z.infer<typeof Clause>;
209
69
  export declare const DeduplicationConfig: z.ZodObject<{
210
70
  id: z.ZodString;
211
- label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
212
- id: string;
213
- description: string;
214
- defaultMessage: string;
215
- }>;
216
- query: z.ZodType<ClauseOutput, z.ZodTypeDef, ClauseInput>;
217
- }, "strip", z.ZodTypeAny, {
218
- id: string;
219
- label: TranslationConfig;
220
- query: ClauseOutput;
221
- }, {
222
- id: string;
223
- label: {
224
- id: string;
225
- description: string;
226
- defaultMessage: string;
227
- };
228
- query: ClauseInput;
229
- }>;
71
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
72
+ query: z.ZodType<ClauseOutput, ClauseInput, z.core.$ZodTypeInternals<ClauseOutput, ClauseInput>>;
73
+ }, z.core.$strip>;
230
74
  export type DeduplicationConfigInput = z.input<typeof DeduplicationConfig>;
231
75
  export type DeduplicationConfig = z.infer<typeof DeduplicationConfig>;
232
76
  export {};
@@ -1,124 +1,85 @@
1
- import { z } from 'zod';
1
+ import * as z from 'zod/v4';
2
2
  export declare const Draft: z.ZodObject<{
3
- id: z.ZodBranded<z.ZodString, "UUID">;
4
- eventId: z.ZodBranded<z.ZodString, "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
- action: z.ZodObject<Omit<z.objectUtil.extendShape<{
8
- id: z.ZodBranded<z.ZodString, "UUID">;
7
+ action: z.ZodObject<{
8
+ type: z.ZodEnum<{
9
+ CUSTOM: "CUSTOM";
10
+ CREATE: "CREATE";
11
+ NOTIFY: "NOTIFY";
12
+ DECLARE: "DECLARE";
13
+ REGISTER: "REGISTER";
14
+ EDIT: "EDIT";
15
+ DUPLICATE_DETECTED: "DUPLICATE_DETECTED";
16
+ REJECT: "REJECT";
17
+ MARK_AS_DUPLICATE: "MARK_AS_DUPLICATE";
18
+ MARK_AS_NOT_DUPLICATE: "MARK_AS_NOT_DUPLICATE";
19
+ ARCHIVE: "ARCHIVE";
20
+ PRINT_CERTIFICATE: "PRINT_CERTIFICATE";
21
+ REQUEST_CORRECTION: "REQUEST_CORRECTION";
22
+ REJECT_CORRECTION: "REJECT_CORRECTION";
23
+ APPROVE_CORRECTION: "APPROVE_CORRECTION";
24
+ READ: "READ";
25
+ ASSIGN: "ASSIGN";
26
+ UNASSIGN: "UNASSIGN";
27
+ }>;
9
28
  transactionId: z.ZodString;
10
- createdByUserType: z.ZodEnum<["user", "system"]>;
29
+ createdByUserType: z.ZodEnum<{
30
+ user: "user";
31
+ system: "system";
32
+ }>;
11
33
  createdAt: z.ZodString;
12
34
  createdBy: z.ZodString;
13
- createdByRole: z.ZodString;
14
- createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
16
- declaration: z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, z.ZodTypeDef, import("./FieldValue").FieldUpdateValue>>;
17
- annotation: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, z.ZodTypeDef, import("./FieldValue").FieldUpdateValue>>>>;
18
- status: z.ZodEnum<["Requested", "Accepted", "Rejected"]>;
19
- originalActionId: z.ZodNullable<z.ZodOptional<z.ZodBranded<z.ZodString, "UUID">>>;
20
- }, {
21
- type: z.ZodEnum<["CREATE", "NOTIFY", "DECLARE", "VALIDATE", "REGISTER", "DUPLICATE_DETECTED", "REJECT", "MARK_AS_DUPLICATE", "MARK_AS_NOT_DUPLICATE", "ARCHIVE", "PRINT_CERTIFICATE", "REQUEST_CORRECTION", "REJECT_CORRECTION", "APPROVE_CORRECTION", "READ", "ASSIGN", "UNASSIGN"]>;
22
- }>, "id" | "createdAtLocation">, "strip", z.ZodTypeAny, {
23
- type: "CREATE" | "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
24
- status: "Rejected" | "Requested" | "Accepted";
25
- transactionId: string;
26
- createdByUserType: "system" | "user";
27
- createdAt: string;
28
- createdBy: string;
29
- createdByRole: string;
30
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
31
- createdBySignature?: string | null | undefined;
32
- annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
33
- originalActionId?: (string & z.BRAND<"UUID">) | null | undefined;
34
- }, {
35
- type: "CREATE" | "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
36
- status: "Rejected" | "Requested" | "Accepted";
37
- transactionId: string;
38
- createdByUserType: "system" | "user";
39
- createdAt: string;
40
- createdBy: string;
41
- createdByRole: string;
42
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
43
- createdBySignature?: string | null | undefined;
44
- annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
45
- originalActionId?: string | null | undefined;
46
- }>;
47
- }, "strip", z.ZodTypeAny, {
48
- id: string & z.BRAND<"UUID">;
49
- transactionId: string;
50
- createdAt: string;
51
- eventId: string & z.BRAND<"UUID">;
52
- action: {
53
- type: "CREATE" | "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
54
- status: "Rejected" | "Requested" | "Accepted";
55
- transactionId: string;
56
- createdByUserType: "system" | "user";
57
- createdAt: string;
58
- createdBy: string;
59
- createdByRole: string;
60
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
61
- createdBySignature?: string | null | undefined;
62
- annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
63
- originalActionId?: (string & z.BRAND<"UUID">) | null | undefined;
64
- };
65
- }, {
66
- id: string;
67
- transactionId: string;
68
- createdAt: string;
69
- eventId: string;
70
- action: {
71
- type: "CREATE" | "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
72
- status: "Rejected" | "Requested" | "Accepted";
73
- transactionId: string;
74
- createdByUserType: "system" | "user";
75
- createdAt: string;
76
- createdBy: string;
77
- createdByRole: string;
78
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
79
- createdBySignature?: string | null | undefined;
80
- annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
81
- originalActionId?: string | null | undefined;
82
- };
83
- }>;
84
- export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
85
- eventId: z.ZodBranded<z.ZodString, "UUID">;
35
+ createdByRole: z.ZodOptional<z.ZodString>;
36
+ createdBySignature: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">>>;
37
+ declaration: z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>;
38
+ annotation: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>>;
39
+ status: z.ZodEnum<{
40
+ Requested: "Requested";
41
+ Accepted: "Accepted";
42
+ Rejected: "Rejected";
43
+ }>;
44
+ originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
45
+ }, z.core.$strip>;
46
+ }, z.core.$strip>;
47
+ export declare const DraftInput: z.ZodObject<{
86
48
  transactionId: z.ZodString;
87
- declaration: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, z.ZodTypeDef, import("./FieldValue").FieldUpdateValue>>>;
88
- annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, z.ZodTypeDef, import("./FieldValue").FieldUpdateValue>>>;
89
- originalActionId: z.ZodOptional<z.ZodBranded<z.ZodString, "UUID">>;
49
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
50
+ declaration: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
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", "out">>;
53
+ eventId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
90
54
  keepAssignment: z.ZodOptional<z.ZodBoolean>;
91
55
  keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
92
56
  keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
93
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
94
- }, {
95
- type: z.ZodEnum<["CREATE", "NOTIFY", "DECLARE", "VALIDATE", "REGISTER", "DUPLICATE_DETECTED", "REJECT", "MARK_AS_DUPLICATE", "MARK_AS_NOT_DUPLICATE", "ARCHIVE", "PRINT_CERTIFICATE", "REQUEST_CORRECTION", "REJECT_CORRECTION", "APPROVE_CORRECTION", "READ", "ASSIGN", "UNASSIGN"]>;
96
- status: z.ZodEnum<["Requested", "Accepted", "Rejected"]>;
97
- }>, "strip", z.ZodTypeAny, {
98
- type: "CREATE" | "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
99
- status: "Rejected" | "Requested" | "Accepted";
100
- transactionId: string;
101
- declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
102
- eventId: string & z.BRAND<"UUID">;
103
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
104
- annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | undefined;
105
- originalActionId?: (string & z.BRAND<"UUID">) | undefined;
106
- keepAssignment?: boolean | undefined;
107
- keepAssignmentIfAccepted?: boolean | undefined;
108
- keepAssignmentIfRejected?: boolean | undefined;
109
- }, {
110
- type: "CREATE" | "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
111
- status: "Rejected" | "Requested" | "Accepted";
112
- transactionId: string;
113
- eventId: string;
114
- createdAtLocation?: string | null | undefined;
115
- declaration?: Record<string, import("./FieldValue").FieldUpdateValue> | undefined;
116
- annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | undefined;
117
- originalActionId?: string | undefined;
118
- keepAssignment?: boolean | undefined;
119
- keepAssignmentIfAccepted?: boolean | undefined;
120
- keepAssignmentIfRejected?: boolean | undefined;
121
- }>;
57
+ type: z.ZodEnum<{
58
+ CUSTOM: "CUSTOM";
59
+ CREATE: "CREATE";
60
+ NOTIFY: "NOTIFY";
61
+ DECLARE: "DECLARE";
62
+ REGISTER: "REGISTER";
63
+ EDIT: "EDIT";
64
+ DUPLICATE_DETECTED: "DUPLICATE_DETECTED";
65
+ REJECT: "REJECT";
66
+ MARK_AS_DUPLICATE: "MARK_AS_DUPLICATE";
67
+ MARK_AS_NOT_DUPLICATE: "MARK_AS_NOT_DUPLICATE";
68
+ ARCHIVE: "ARCHIVE";
69
+ PRINT_CERTIFICATE: "PRINT_CERTIFICATE";
70
+ REQUEST_CORRECTION: "REQUEST_CORRECTION";
71
+ REJECT_CORRECTION: "REJECT_CORRECTION";
72
+ APPROVE_CORRECTION: "APPROVE_CORRECTION";
73
+ READ: "READ";
74
+ ASSIGN: "ASSIGN";
75
+ UNASSIGN: "UNASSIGN";
76
+ }>;
77
+ status: z.ZodEnum<{
78
+ Requested: "Requested";
79
+ Accepted: "Accepted";
80
+ Rejected: "Rejected";
81
+ }>;
82
+ }, z.core.$strip>;
122
83
  export type Draft = z.infer<typeof Draft>;
123
84
  export type DraftInput = z.infer<typeof DraftInput>;
124
85
  //# sourceMappingURL=Draft.d.ts.map
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import * as z from 'zod/v4';
2
2
  import { AddressField, NameField } from './FieldConfig';
3
3
  /**
4
4
  * Dynamically builds a Zod schema for a "NAME" field based on its configuration.
@@ -15,15 +15,7 @@ export declare function getDynamicNameValue(field: NameField): z.ZodObject<{
15
15
  firstname: z.ZodString;
16
16
  surname: z.ZodString;
17
17
  middlename: z.ZodString | z.ZodOptional<z.ZodString>;
18
- }, "strip", z.ZodTypeAny, {
19
- firstname: string;
20
- surname: string;
21
- middlename?: string | undefined;
22
- }, {
23
- firstname: string;
24
- surname: string;
25
- middlename?: string | undefined;
26
- }>;
18
+ }, z.core.$strip>;
27
19
  export type DynamicNameValue = ReturnType<typeof getDynamicNameValue>;
28
20
  /**
29
21
  * Dynamically builds a Zod schema for an "ADDRESS" field.
@@ -40,36 +32,7 @@ export type DynamicNameValue = ReturnType<typeof getDynamicNameValue>;
40
32
  * This prevents clients from sending unexpected data keys that don’t exist
41
33
  * in the configuration (a common data integrity issue).
42
34
  */
43
- export declare function getDynamicAddressFieldValue(field: AddressField): z.ZodEffects<z.ZodDiscriminatedUnion<"addressType", [z.ZodObject<z.objectUtil.extendShape<{
44
- country: z.ZodString;
45
- streetLevelDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
46
- }, {
47
- addressType: z.ZodLiteral<"DOMESTIC">;
48
- administrativeArea: z.ZodString;
49
- }>, "strip", z.ZodTypeAny, {
50
- country: string;
51
- addressType: "DOMESTIC";
52
- administrativeArea: string;
53
- streetLevelDetails?: Record<string, string> | undefined;
54
- }, {
55
- country: string;
56
- addressType: "DOMESTIC";
57
- administrativeArea: string;
58
- streetLevelDetails?: Record<string, string> | undefined;
59
- }>, z.ZodObject<z.objectUtil.extendShape<{
60
- country: z.ZodString;
61
- streetLevelDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
62
- }, {
63
- addressType: z.ZodLiteral<"INTERNATIONAL">;
64
- }>, "strip", z.ZodTypeAny, {
65
- country: string;
66
- addressType: "INTERNATIONAL";
67
- streetLevelDetails?: Record<string, string> | undefined;
68
- }, {
69
- country: string;
70
- addressType: "INTERNATIONAL";
71
- streetLevelDetails?: Record<string, string> | undefined;
72
- }>]>, {
35
+ export declare function getDynamicAddressFieldValue(field: AddressField): z.ZodType<{
73
36
  country: string;
74
37
  addressType: "DOMESTIC";
75
38
  administrativeArea: string;
@@ -78,54 +41,25 @@ export declare function getDynamicAddressFieldValue(field: AddressField): z.ZodE
78
41
  country: string;
79
42
  addressType: "INTERNATIONAL";
80
43
  streetLevelDetails?: Record<string, string> | undefined;
81
- }, {
82
- country: string;
83
- addressType: "DOMESTIC";
84
- administrativeArea: string;
85
- streetLevelDetails?: Record<string, string> | undefined;
86
44
  } | {
87
- country: string;
88
- addressType: "INTERNATIONAL";
89
- streetLevelDetails?: Record<string, string> | undefined;
90
- }> | z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"addressType", [z.ZodObject<z.objectUtil.extendShape<{
91
- country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
92
- streetLevelDetails: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>>;
93
- }, {
94
- addressType: z.ZodLiteral<"DOMESTIC">;
95
- administrativeArea: z.ZodOptional<z.ZodNullable<z.ZodString>>;
96
- }>, "strip", z.ZodTypeAny, {
97
- addressType: "DOMESTIC";
98
- country?: string | null | undefined;
99
- streetLevelDetails?: Record<string, string | null> | null | undefined;
100
- administrativeArea?: string | null | undefined;
101
- }, {
102
45
  addressType: "DOMESTIC";
103
46
  country?: string | null | undefined;
104
47
  streetLevelDetails?: Record<string, string | null> | null | undefined;
105
48
  administrativeArea?: string | null | undefined;
106
- }>, z.ZodObject<z.objectUtil.extendShape<{
107
- country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
108
- streetLevelDetails: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>>;
109
- }, {
110
- addressType: z.ZodLiteral<"INTERNATIONAL">;
111
- }>, "strip", z.ZodTypeAny, {
112
- addressType: "INTERNATIONAL";
113
- country?: string | null | undefined;
114
- streetLevelDetails?: Record<string, string | null> | null | undefined;
115
- }, {
49
+ } | {
116
50
  addressType: "INTERNATIONAL";
117
51
  country?: string | null | undefined;
118
52
  streetLevelDetails?: Record<string, string | null> | null | undefined;
119
- }>]>>>, {
53
+ } | null | undefined, unknown, z.core.$ZodTypeInternals<{
54
+ country: string;
120
55
  addressType: "DOMESTIC";
121
- country?: string | null | undefined;
122
- streetLevelDetails?: Record<string, string | null> | null | undefined;
123
- administrativeArea?: string | null | undefined;
56
+ administrativeArea: string;
57
+ streetLevelDetails?: Record<string, string> | undefined;
124
58
  } | {
59
+ country: string;
125
60
  addressType: "INTERNATIONAL";
126
- country?: string | null | undefined;
127
- streetLevelDetails?: Record<string, string | null> | null | undefined;
128
- } | null | undefined, {
61
+ streetLevelDetails?: Record<string, string> | undefined;
62
+ } | {
129
63
  addressType: "DOMESTIC";
130
64
  country?: string | null | undefined;
131
65
  streetLevelDetails?: Record<string, string | null> | null | undefined;
@@ -134,6 +68,6 @@ export declare function getDynamicAddressFieldValue(field: AddressField): z.ZodE
134
68
  addressType: "INTERNATIONAL";
135
69
  country?: string | null | undefined;
136
70
  streetLevelDetails?: Record<string, string | null> | null | undefined;
137
- } | null | undefined>;
71
+ } | null | undefined, unknown>>;
138
72
  export type DynamicAddressFieldValue = ReturnType<typeof getDynamicAddressFieldValue>;
139
73
  //# sourceMappingURL=DynamicFieldValue.d.ts.map