@opencrvs/toolkit 2.0.0-rc.b4498f2 → 2.0.0-rc.b60239a
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.
- package/dist/application-config/index.js +15 -20
- package/dist/commons/api/router.d.ts +243 -2788
- package/dist/commons/conditionals/validate.d.ts +0 -1
- package/dist/commons/events/ActionInput.d.ts +36 -72
- package/dist/commons/events/Draft.d.ts +1 -2
- package/dist/commons/events/EventIndex.d.ts +1 -0
- package/dist/commons/events/EventMetadata.d.ts +1 -0
- package/dist/commons/events/state/index.d.ts +2 -1
- package/dist/commons/events/utils.d.ts +1 -1
- package/dist/events/index.js +30 -35
- package/dist/notification/index.js +16 -22
- package/opencrvs-toolkit-2.0.0-rc.b60239a.tgz +0 -0
- package/package.json +1 -1
- package/opencrvs-toolkit-2.0.0-rc.b4498f2.tgz +0 -0
|
@@ -28,7 +28,6 @@ export type ValidatorContext = {
|
|
|
28
28
|
id: UUID;
|
|
29
29
|
}>;
|
|
30
30
|
event?: EventDocument;
|
|
31
|
-
baseFormState?: EventState;
|
|
32
31
|
};
|
|
33
32
|
export declare function isFieldVisible(field: FieldConfig, form: Partial<ActionUpdate | EventState>, context: ValidatorContext): boolean;
|
|
34
33
|
export declare function isFieldEnabled(field: FieldConfig, form: ActionUpdate | EventState, context: ValidatorContext): boolean;
|
|
@@ -6,8 +6,7 @@ export declare const BaseActionInput: z.ZodObject<{
|
|
|
6
6
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
7
7
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
8
8
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
-
|
|
10
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
11
10
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
12
11
|
}, z.core.$strip>;
|
|
13
12
|
export declare const RegisterActionInput: z.ZodObject<{
|
|
@@ -17,8 +16,7 @@ export declare const RegisterActionInput: z.ZodObject<{
|
|
|
17
16
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
18
17
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
19
18
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
-
|
|
21
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
22
20
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
23
21
|
type: z.ZodDefault<z.ZodLiteral<"REGISTER">>;
|
|
24
22
|
registrationNumber: z.ZodOptional<z.ZodString>;
|
|
@@ -31,8 +29,7 @@ export declare const NotifyActionInput: z.ZodObject<{
|
|
|
31
29
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
32
30
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
33
31
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
-
|
|
35
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
36
33
|
type: z.ZodDefault<z.ZodLiteral<"NOTIFY">>;
|
|
37
34
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
38
35
|
}, z.core.$strip>;
|
|
@@ -44,8 +41,7 @@ export declare const DeclareActionInput: z.ZodObject<{
|
|
|
44
41
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
45
42
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
46
43
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
-
|
|
48
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
44
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
49
45
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
50
46
|
type: z.ZodDefault<z.ZodLiteral<"DECLARE">>;
|
|
51
47
|
}, z.core.$strip>;
|
|
@@ -56,8 +52,7 @@ export declare const EditActionInput: z.ZodObject<{
|
|
|
56
52
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
57
53
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
58
54
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
59
|
-
|
|
60
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
55
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
61
56
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
62
57
|
type: z.ZodDefault<z.ZodLiteral<"EDIT">>;
|
|
63
58
|
content: z.ZodObject<{
|
|
@@ -72,8 +67,7 @@ export declare const PrintCertificateActionInput: z.ZodObject<{
|
|
|
72
67
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
73
68
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
74
69
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
-
|
|
76
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
70
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
77
71
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
78
72
|
type: z.ZodDefault<z.ZodLiteral<"PRINT_CERTIFICATE">>;
|
|
79
73
|
content: z.ZodOptional<z.ZodObject<{
|
|
@@ -88,8 +82,7 @@ export declare const RejectDeclarationActionInput: z.ZodObject<{
|
|
|
88
82
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
89
83
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
90
84
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
91
|
-
|
|
92
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
93
86
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
94
87
|
type: z.ZodDefault<z.ZodLiteral<"REJECT">>;
|
|
95
88
|
content: z.ZodObject<{
|
|
@@ -104,8 +97,7 @@ export declare const DuplicateDetectedActionInput: z.ZodObject<{
|
|
|
104
97
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
105
98
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
106
99
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
107
|
-
|
|
108
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
100
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
109
101
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
110
102
|
type: z.ZodDefault<z.ZodLiteral<"DUPLICATE_DETECTED">>;
|
|
111
103
|
content: z.ZodObject<{
|
|
@@ -122,8 +114,7 @@ export declare const MarkAsDuplicateActionInput: z.ZodObject<{
|
|
|
122
114
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
123
115
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
124
116
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
125
|
-
|
|
126
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
117
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
127
118
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
128
119
|
type: z.ZodDefault<z.ZodLiteral<"MARK_AS_DUPLICATE">>;
|
|
129
120
|
content: z.ZodOptional<z.ZodObject<{
|
|
@@ -138,8 +129,7 @@ export declare const MarkNotDuplicateActionInput: z.ZodObject<{
|
|
|
138
129
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
139
130
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
140
131
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
141
|
-
|
|
142
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
132
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
143
133
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
144
134
|
type: z.ZodDefault<z.ZodLiteral<"MARK_AS_NOT_DUPLICATE">>;
|
|
145
135
|
}, z.core.$strip>;
|
|
@@ -151,8 +141,7 @@ export declare const ArchiveActionInput: z.ZodObject<{
|
|
|
151
141
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
152
142
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
153
143
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
154
|
-
|
|
155
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
144
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
156
145
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
157
146
|
type: z.ZodDefault<z.ZodLiteral<"ARCHIVE">>;
|
|
158
147
|
content: z.ZodObject<{
|
|
@@ -167,8 +156,7 @@ export declare const AssignActionInput: z.ZodObject<{
|
|
|
167
156
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
168
157
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
169
158
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
170
|
-
|
|
171
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
159
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
172
160
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
173
161
|
type: z.ZodLiteral<"ASSIGN">;
|
|
174
162
|
assignedTo: z.ZodString;
|
|
@@ -181,8 +169,7 @@ export declare const UnassignActionInput: z.ZodObject<{
|
|
|
181
169
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
182
170
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
183
171
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
184
|
-
|
|
185
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
172
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
186
173
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
187
174
|
type: z.ZodDefault<z.ZodLiteral<"UNASSIGN">>;
|
|
188
175
|
assignedTo: z.ZodDefault<z.ZodLiteral<null>>;
|
|
@@ -195,8 +182,7 @@ export declare const RequestCorrectionActionInput: z.ZodObject<{
|
|
|
195
182
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
196
183
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
197
184
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
198
|
-
|
|
199
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
185
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
200
186
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
201
187
|
type: z.ZodDefault<z.ZodLiteral<"REQUEST_CORRECTION">>;
|
|
202
188
|
}, z.core.$strip>;
|
|
@@ -208,8 +194,7 @@ export declare const RejectCorrectionActionInput: z.ZodObject<{
|
|
|
208
194
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
209
195
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
210
196
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
211
|
-
|
|
212
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
197
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
213
198
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
214
199
|
requestId: z.ZodString;
|
|
215
200
|
type: z.ZodDefault<z.ZodLiteral<"REJECT_CORRECTION">>;
|
|
@@ -225,8 +210,7 @@ export declare const ApproveCorrectionActionInput: z.ZodObject<{
|
|
|
225
210
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
226
211
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
227
212
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
228
|
-
|
|
229
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
213
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
230
214
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
231
215
|
requestId: z.ZodString;
|
|
232
216
|
type: z.ZodDefault<z.ZodLiteral<"APPROVE_CORRECTION">>;
|
|
@@ -239,8 +223,7 @@ export declare const ReadActionInput: z.ZodObject<{
|
|
|
239
223
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
240
224
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
241
225
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
242
|
-
|
|
243
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
226
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
244
227
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
245
228
|
type: z.ZodDefault<z.ZodLiteral<"READ">>;
|
|
246
229
|
}, z.core.$strip>;
|
|
@@ -256,8 +239,7 @@ export declare const CustomActionInput: z.ZodObject<{
|
|
|
256
239
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
257
240
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
258
241
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
259
|
-
|
|
260
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
242
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
261
243
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
262
244
|
type: z.ZodDefault<z.ZodLiteral<"CUSTOM">>;
|
|
263
245
|
customActionType: z.ZodString;
|
|
@@ -278,8 +260,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
278
260
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
279
261
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
280
262
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
281
|
-
|
|
282
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
263
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
283
264
|
type: z.ZodDefault<z.ZodLiteral<"CREATE">>;
|
|
284
265
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
285
266
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -289,8 +270,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
289
270
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
290
271
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
291
272
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
292
|
-
|
|
293
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
273
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
294
274
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
295
275
|
type: z.ZodDefault<z.ZodLiteral<"REGISTER">>;
|
|
296
276
|
registrationNumber: z.ZodOptional<z.ZodString>;
|
|
@@ -301,8 +281,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
301
281
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
302
282
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
303
283
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
304
|
-
|
|
305
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
284
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
306
285
|
type: z.ZodDefault<z.ZodLiteral<"NOTIFY">>;
|
|
307
286
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
308
287
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -312,8 +291,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
312
291
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
313
292
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
314
293
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
315
|
-
|
|
316
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
294
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
317
295
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
318
296
|
type: z.ZodDefault<z.ZodLiteral<"DECLARE">>;
|
|
319
297
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -323,8 +301,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
323
301
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
324
302
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
325
303
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
326
|
-
|
|
327
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
304
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
328
305
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
329
306
|
type: z.ZodDefault<z.ZodLiteral<"REJECT">>;
|
|
330
307
|
content: z.ZodObject<{
|
|
@@ -337,8 +314,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
337
314
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
338
315
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
339
316
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
340
|
-
|
|
341
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
317
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
342
318
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
343
319
|
type: z.ZodDefault<z.ZodLiteral<"DUPLICATE_DETECTED">>;
|
|
344
320
|
content: z.ZodObject<{
|
|
@@ -354,8 +330,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
354
330
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
355
331
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
356
332
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
357
|
-
|
|
358
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
333
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
359
334
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
360
335
|
type: z.ZodDefault<z.ZodLiteral<"MARK_AS_DUPLICATE">>;
|
|
361
336
|
content: z.ZodOptional<z.ZodObject<{
|
|
@@ -368,8 +343,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
368
343
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
369
344
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
370
345
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
371
|
-
|
|
372
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
346
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
373
347
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
374
348
|
type: z.ZodDefault<z.ZodLiteral<"MARK_AS_NOT_DUPLICATE">>;
|
|
375
349
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -379,8 +353,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
379
353
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
380
354
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
381
355
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
382
|
-
|
|
383
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
356
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
384
357
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
385
358
|
type: z.ZodDefault<z.ZodLiteral<"ARCHIVE">>;
|
|
386
359
|
content: z.ZodObject<{
|
|
@@ -393,8 +366,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
393
366
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
394
367
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
395
368
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
396
|
-
|
|
397
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
369
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
398
370
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
399
371
|
type: z.ZodLiteral<"ASSIGN">;
|
|
400
372
|
assignedTo: z.ZodString;
|
|
@@ -405,8 +377,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
405
377
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
406
378
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
407
379
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
408
|
-
|
|
409
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
380
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
410
381
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
411
382
|
type: z.ZodDefault<z.ZodLiteral<"UNASSIGN">>;
|
|
412
383
|
assignedTo: z.ZodDefault<z.ZodLiteral<null>>;
|
|
@@ -417,8 +388,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
417
388
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
418
389
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
419
390
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
420
|
-
|
|
421
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
391
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
422
392
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
423
393
|
type: z.ZodDefault<z.ZodLiteral<"PRINT_CERTIFICATE">>;
|
|
424
394
|
content: z.ZodOptional<z.ZodObject<{
|
|
@@ -431,8 +401,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
431
401
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
432
402
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
433
403
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
434
|
-
|
|
435
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
404
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
436
405
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
437
406
|
type: z.ZodDefault<z.ZodLiteral<"REQUEST_CORRECTION">>;
|
|
438
407
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -442,8 +411,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
442
411
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
443
412
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
444
413
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
445
|
-
|
|
446
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
414
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
447
415
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
448
416
|
requestId: z.ZodString;
|
|
449
417
|
type: z.ZodDefault<z.ZodLiteral<"REJECT_CORRECTION">>;
|
|
@@ -457,8 +425,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
457
425
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
458
426
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
459
427
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
460
|
-
|
|
461
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
428
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
462
429
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
463
430
|
requestId: z.ZodString;
|
|
464
431
|
type: z.ZodDefault<z.ZodLiteral<"APPROVE_CORRECTION">>;
|
|
@@ -469,8 +436,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
469
436
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
470
437
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
471
438
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
472
|
-
|
|
473
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
439
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
474
440
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
475
441
|
type: z.ZodDefault<z.ZodLiteral<"READ">>;
|
|
476
442
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -480,8 +446,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
480
446
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
481
447
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
482
448
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
483
|
-
|
|
484
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
449
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
485
450
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
486
451
|
type: z.ZodDefault<z.ZodLiteral<"CUSTOM">>;
|
|
487
452
|
customActionType: z.ZodString;
|
|
@@ -492,8 +457,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
492
457
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
493
458
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
494
459
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
495
|
-
|
|
496
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
460
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
497
461
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
498
462
|
type: z.ZodDefault<z.ZodLiteral<"EDIT">>;
|
|
499
463
|
content: z.ZodObject<{
|
|
@@ -51,8 +51,7 @@ export declare const DraftInput: z.ZodObject<{
|
|
|
51
51
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
52
52
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
53
53
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
54
|
-
|
|
55
|
-
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
54
|
+
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
56
55
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
57
56
|
type: z.ZodEnum<{
|
|
58
57
|
CUSTOM: "CUSTOM";
|
|
@@ -50,6 +50,7 @@ export declare const EventIndex: z.ZodObject<{
|
|
|
50
50
|
updatedAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
51
51
|
updatedAt: z.ZodISODateTime;
|
|
52
52
|
assignedTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
53
|
+
assignedToSignature: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">>>;
|
|
53
54
|
updatedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
54
55
|
trackingId: z.ZodString;
|
|
55
56
|
potentialDuplicates: z.ZodArray<z.ZodObject<{
|
|
@@ -123,6 +123,7 @@ export declare const EventMetadata: z.ZodObject<{
|
|
|
123
123
|
updatedAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
124
124
|
updatedAt: z.ZodISODateTime;
|
|
125
125
|
assignedTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
126
|
+
assignedToSignature: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">>>;
|
|
126
127
|
updatedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
127
128
|
trackingId: z.ZodString;
|
|
128
129
|
potentialDuplicates: z.ZodArray<z.ZodObject<{
|
|
@@ -9,7 +9,7 @@ import { UUID } from '../../uuid';
|
|
|
9
9
|
import { DocumentPath } from '../../documents';
|
|
10
10
|
export declare function getStatusFromActions(actions: Array<Action>): "CREATED" | "NOTIFIED" | "DECLARED" | "REGISTERED" | "ARCHIVED";
|
|
11
11
|
export declare function getAssignedUserFromActions(actions: Array<ActionDocument>): string | null;
|
|
12
|
-
export declare function getAssignedUserSignatureFromActions(actions: Array<ActionDocument>): string | null;
|
|
12
|
+
export declare function getAssignedUserSignatureFromActions(actions: Array<ActionDocument>): (string & import("zod").$brand<"DocumentPath">) | null;
|
|
13
13
|
type NonNullableDeep<T> = T extends [unknown, ...unknown[]] ? {
|
|
14
14
|
[K in keyof T]: NonNullableDeep<NonNullable<T[K]>>;
|
|
15
15
|
} : T extends UUID ? T : T extends DocumentPath ? T : T extends string ? NonNullable<T> : T extends (infer U)[] ? NonNullableDeep<U>[] : T extends object ? {
|
|
@@ -104,6 +104,7 @@ export declare function applyDraftToEventIndex(eventIndex: EventIndex, draft: Dr
|
|
|
104
104
|
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
105
105
|
updatedAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
106
106
|
assignedTo?: string | null | undefined;
|
|
107
|
+
assignedToSignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
107
108
|
updatedBy?: string | null | undefined;
|
|
108
109
|
};
|
|
109
110
|
/**
|
|
@@ -131,7 +131,7 @@ export declare function isPageVisible(page: PageConfig, formValues: ActionUpdate
|
|
|
131
131
|
* * @param validatorContext - custom validation context
|
|
132
132
|
* @returns {Partial<T>} A new object containing only the values for visible fields
|
|
133
133
|
*/
|
|
134
|
-
export declare function omitHiddenFields<T extends EventState | ActionUpdate>(fields: FieldConfig[], formValues: T, validatorContext: ValidatorContext, includeHiddenFieldsWithNullValues?: boolean): Partial<T>;
|
|
134
|
+
export declare function omitHiddenFields<T extends EventState | ActionUpdate>(fields: FieldConfig[], formValues: T, validatorContext: ValidatorContext, includeHiddenFieldsWithNullValues?: boolean, declarationContext?: EventState): Partial<T>;
|
|
135
135
|
export declare function omitHiddenPaginatedFields<T extends EventState | ActionUpdate>(formConfig: FormConfig, values: T, validatorContext: ValidatorContext, includeHiddenFieldsWithNullValues?: boolean): Partial<Partial<T>>;
|
|
136
136
|
/**
|
|
137
137
|
*
|
package/dist/events/index.js
CHANGED
|
@@ -1414,28 +1414,20 @@ function schemaPriority(schema) {
|
|
|
1414
1414
|
return idx === -1 ? 9999 : idx;
|
|
1415
1415
|
}
|
|
1416
1416
|
function safeUnion(schemas) {
|
|
1417
|
+
const sortedSchemas = [...schemas].sort(
|
|
1418
|
+
(a, b) => schemaPriority(a) - schemaPriority(b)
|
|
1419
|
+
);
|
|
1417
1420
|
return z12.any().superRefine((val, ctx) => {
|
|
1418
|
-
const
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
if (successful.length === 0) {
|
|
1423
|
-
ctx.addIssue({
|
|
1424
|
-
code: "invalid_type",
|
|
1425
|
-
expected: "custom",
|
|
1426
|
-
message: "Value does not match any schema"
|
|
1427
|
-
});
|
|
1428
|
-
return;
|
|
1429
|
-
}
|
|
1430
|
-
successful.sort((a, b) => schemaPriority(a) - schemaPriority(b));
|
|
1431
|
-
const best = successful[0];
|
|
1432
|
-
if (!best.safeParse(val).success) {
|
|
1433
|
-
ctx.addIssue({
|
|
1434
|
-
expected: "custom",
|
|
1435
|
-
code: "invalid_type",
|
|
1436
|
-
message: "Value did not match the best schema"
|
|
1437
|
-
});
|
|
1421
|
+
for (const schema of sortedSchemas) {
|
|
1422
|
+
if (schema.safeParse(val).success) {
|
|
1423
|
+
return;
|
|
1424
|
+
}
|
|
1438
1425
|
}
|
|
1426
|
+
ctx.addIssue({
|
|
1427
|
+
code: "invalid_type",
|
|
1428
|
+
expected: "custom",
|
|
1429
|
+
message: "Value does not match any schema"
|
|
1430
|
+
});
|
|
1439
1431
|
}).meta({
|
|
1440
1432
|
description: "Value that matches exactly one of the possible schema types (TextValue, DateValue, DateRangeFieldValue). The best matching schema is chosen by priority."
|
|
1441
1433
|
});
|
|
@@ -1812,6 +1804,9 @@ var EventMetadata = z16.object({
|
|
|
1812
1804
|
"Timestamp of the most recent *accepted* status change. Possibly 3rd party update, if action is validation asynchronously."
|
|
1813
1805
|
),
|
|
1814
1806
|
assignedTo: z16.string().nullish().describe("ID of the user currently assigned to the event."),
|
|
1807
|
+
assignedToSignature: DocumentPath.nullish().describe(
|
|
1808
|
+
"Signature of the user who is currently assigned to the event."
|
|
1809
|
+
),
|
|
1815
1810
|
updatedBy: z16.string().nullish().describe("ID of the user who last changed the status."),
|
|
1816
1811
|
trackingId: z16.string().describe(
|
|
1817
1812
|
"System-generated tracking ID used by informants or registrars to look up the event."
|
|
@@ -3804,9 +3799,6 @@ function precompileActionSchemas(eventConfigurations) {
|
|
|
3804
3799
|
function isAgeValue(value) {
|
|
3805
3800
|
return typeof value === "object" && value !== null && "age" in value && typeof value.age === "number";
|
|
3806
3801
|
}
|
|
3807
|
-
function mergeWithBaseFormState(values, context) {
|
|
3808
|
-
return { ...context.baseFormState, ...values };
|
|
3809
|
-
}
|
|
3810
3802
|
function validate(schema, data) {
|
|
3811
3803
|
const validator = ajv.getSchema(schema.$id) || ajv.compile(schema);
|
|
3812
3804
|
if ("$form" in data) {
|
|
@@ -3845,7 +3837,7 @@ function isOnline() {
|
|
|
3845
3837
|
}
|
|
3846
3838
|
function isConditionMet(conditional, values, context, eventIndex) {
|
|
3847
3839
|
return validate(conditional, {
|
|
3848
|
-
$form:
|
|
3840
|
+
$form: values,
|
|
3849
3841
|
$now: (0, import_date_fns.formatISO)(/* @__PURE__ */ new Date(), { representation: "date" }),
|
|
3850
3842
|
$online: isOnline(),
|
|
3851
3843
|
$user: context.user,
|
|
@@ -3874,7 +3866,7 @@ function isFieldConditionMet(field3, form, conditionalType, context) {
|
|
|
3874
3866
|
return true;
|
|
3875
3867
|
}
|
|
3876
3868
|
const validConditionals = getConditionalActionsForField(field3, {
|
|
3877
|
-
$form:
|
|
3869
|
+
$form: form,
|
|
3878
3870
|
$now: (0, import_date_fns.formatISO)(/* @__PURE__ */ new Date(), { representation: "date" }),
|
|
3879
3871
|
$online: isOnline(),
|
|
3880
3872
|
$user: context.user,
|
|
@@ -4066,7 +4058,7 @@ function runFieldValidations({
|
|
|
4066
4058
|
return [];
|
|
4067
4059
|
}
|
|
4068
4060
|
const conditionalParameters = {
|
|
4069
|
-
$form:
|
|
4061
|
+
$form: form,
|
|
4070
4062
|
$now: (0, import_date_fns.formatISO)(/* @__PURE__ */ new Date(), { representation: "date" }),
|
|
4071
4063
|
/**
|
|
4072
4064
|
* In real use cases, there can be hundreds of thousands of locations.
|
|
@@ -4310,16 +4302,17 @@ function isPageVisible(page, formValues, context) {
|
|
|
4310
4302
|
}
|
|
4311
4303
|
return isConditionMet(page.conditional, formValues, context);
|
|
4312
4304
|
}
|
|
4313
|
-
function omitHiddenFields(fields, formValues, validatorContext, includeHiddenFieldsWithNullValues = false) {
|
|
4305
|
+
function omitHiddenFields(fields, formValues, validatorContext, includeHiddenFieldsWithNullValues = false, declarationContext) {
|
|
4314
4306
|
const base = (0, import_lodash.cloneDeep)(formValues);
|
|
4315
4307
|
function fn(prevVisibilityContext) {
|
|
4308
|
+
const visibilityForm = declarationContext ? { ...declarationContext, ...prevVisibilityContext } : prevVisibilityContext;
|
|
4316
4309
|
const cleaned = (0, import_lodash.omitBy)(base, (value, fieldId) => {
|
|
4317
4310
|
const fieldConfig = fields.filter((f) => f.id === fieldId);
|
|
4318
4311
|
if (!fieldConfig.length) {
|
|
4319
4312
|
return false;
|
|
4320
4313
|
}
|
|
4321
4314
|
const isHidden = fieldConfig.every(
|
|
4322
|
-
(f) => !isFieldVisible(f,
|
|
4315
|
+
(f) => !isFieldVisible(f, visibilityForm, validatorContext)
|
|
4323
4316
|
);
|
|
4324
4317
|
if (!isHidden) {
|
|
4325
4318
|
return false;
|
|
@@ -4337,7 +4330,7 @@ function omitHiddenPaginatedFields(formConfig, values, validatorContext, include
|
|
|
4337
4330
|
const visibleFields = formConfig.pages.filter((p) => isPageVisible(p, values, validatorContext)).flatMap((p) => p.fields);
|
|
4338
4331
|
const hiddenFields = formConfig.pages.filter((p) => !isPageVisible(p, values, validatorContext)).flatMap((p) => p.fields);
|
|
4339
4332
|
const valuesExceptHiddenPage = (0, import_lodash.omitBy)(values, (_2, fieldId) => {
|
|
4340
|
-
return hiddenFields.some((f) => f.id === fieldId)
|
|
4333
|
+
return hiddenFields.some((f) => f.id === fieldId);
|
|
4341
4334
|
});
|
|
4342
4335
|
return omitHiddenFields(
|
|
4343
4336
|
visibleFields,
|
|
@@ -4384,10 +4377,13 @@ function getVisibleVerificationPageIds(pages, annotation, context) {
|
|
|
4384
4377
|
}
|
|
4385
4378
|
function omitHiddenAnnotationFields(actionConfig, declaration, annotation, context) {
|
|
4386
4379
|
const annotationFields = getActionAnnotationFields(actionConfig);
|
|
4387
|
-
return omitHiddenFields(
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4380
|
+
return omitHiddenFields(
|
|
4381
|
+
annotationFields,
|
|
4382
|
+
annotation,
|
|
4383
|
+
context,
|
|
4384
|
+
false,
|
|
4385
|
+
declaration
|
|
4386
|
+
);
|
|
4391
4387
|
}
|
|
4392
4388
|
function deepMerge(currentDocument, actionDocument) {
|
|
4393
4389
|
const currentDocumentClone = (0, import_lodash.cloneDeep)(currentDocument);
|
|
@@ -5899,8 +5895,7 @@ var BaseActionInput = z38.object({
|
|
|
5899
5895
|
originalActionId: UUID.optional(),
|
|
5900
5896
|
// should not be part of base action.
|
|
5901
5897
|
keepAssignment: z38.boolean().optional(),
|
|
5902
|
-
|
|
5903
|
-
keepAssignmentIfRejected: z38.boolean().optional(),
|
|
5898
|
+
waitFor: z38.boolean().optional(),
|
|
5904
5899
|
// For normal users, the createdAtLocation is resolved on the backend from the user's primaryOfficeId.
|
|
5905
5900
|
// @TODO: createdAtLocation should be limited to actions that system users can perform. For normal users, it should not be part of the base action.
|
|
5906
5901
|
createdAtLocation: UUID.nullish().describe(
|
|
@@ -980,28 +980,20 @@ function schemaPriority(schema) {
|
|
|
980
980
|
return idx === -1 ? 9999 : idx;
|
|
981
981
|
}
|
|
982
982
|
function safeUnion(schemas) {
|
|
983
|
+
const sortedSchemas = [...schemas].sort(
|
|
984
|
+
(a, b) => schemaPriority(a) - schemaPriority(b)
|
|
985
|
+
);
|
|
983
986
|
return z12.any().superRefine((val, ctx) => {
|
|
984
|
-
const
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
if (successful.length === 0) {
|
|
989
|
-
ctx.addIssue({
|
|
990
|
-
code: "invalid_type",
|
|
991
|
-
expected: "custom",
|
|
992
|
-
message: "Value does not match any schema"
|
|
993
|
-
});
|
|
994
|
-
return;
|
|
995
|
-
}
|
|
996
|
-
successful.sort((a, b) => schemaPriority(a) - schemaPriority(b));
|
|
997
|
-
const best = successful[0];
|
|
998
|
-
if (!best.safeParse(val).success) {
|
|
999
|
-
ctx.addIssue({
|
|
1000
|
-
expected: "custom",
|
|
1001
|
-
code: "invalid_type",
|
|
1002
|
-
message: "Value did not match the best schema"
|
|
1003
|
-
});
|
|
987
|
+
for (const schema of sortedSchemas) {
|
|
988
|
+
if (schema.safeParse(val).success) {
|
|
989
|
+
return;
|
|
990
|
+
}
|
|
1004
991
|
}
|
|
992
|
+
ctx.addIssue({
|
|
993
|
+
code: "invalid_type",
|
|
994
|
+
expected: "custom",
|
|
995
|
+
message: "Value does not match any schema"
|
|
996
|
+
});
|
|
1005
997
|
}).meta({
|
|
1006
998
|
description: "Value that matches exactly one of the possible schema types (TextValue, DateValue, DateRangeFieldValue). The best matching schema is chosen by priority."
|
|
1007
999
|
});
|
|
@@ -1378,6 +1370,9 @@ var EventMetadata = z16.object({
|
|
|
1378
1370
|
"Timestamp of the most recent *accepted* status change. Possibly 3rd party update, if action is validation asynchronously."
|
|
1379
1371
|
),
|
|
1380
1372
|
assignedTo: z16.string().nullish().describe("ID of the user currently assigned to the event."),
|
|
1373
|
+
assignedToSignature: DocumentPath.nullish().describe(
|
|
1374
|
+
"Signature of the user who is currently assigned to the event."
|
|
1375
|
+
),
|
|
1381
1376
|
updatedBy: z16.string().nullish().describe("ID of the user who last changed the status."),
|
|
1382
1377
|
trackingId: z16.string().describe(
|
|
1383
1378
|
"System-generated tracking ID used by informants or registrars to look up the event."
|
|
@@ -4180,8 +4175,7 @@ var BaseActionInput = z38.object({
|
|
|
4180
4175
|
originalActionId: UUID.optional(),
|
|
4181
4176
|
// should not be part of base action.
|
|
4182
4177
|
keepAssignment: z38.boolean().optional(),
|
|
4183
|
-
|
|
4184
|
-
keepAssignmentIfRejected: z38.boolean().optional(),
|
|
4178
|
+
waitFor: z38.boolean().optional(),
|
|
4185
4179
|
// For normal users, the createdAtLocation is resolved on the backend from the user's primaryOfficeId.
|
|
4186
4180
|
// @TODO: createdAtLocation should be limited to actions that system users can perform. For normal users, it should not be part of the base action.
|
|
4187
4181
|
createdAtLocation: UUID.nullish().describe(
|
|
Binary file
|