@opencrvs/toolkit 1.8.0-rc.fcd89ec → 1.8.0-rc.fcf7cb3
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/commons/api/router.d.ts +8046 -8610
- package/dist/commons/conditionals/conditionals.d.ts +8 -15
- package/dist/commons/conditionals/validate.d.ts +14 -0
- package/dist/commons/events/ActionConfig.d.ts +68541 -36072
- package/dist/commons/events/ActionDocument.d.ts +3961 -1227
- package/dist/commons/events/ActionInput.d.ts +3138 -966
- package/dist/commons/events/ActionType.d.ts +4 -0
- package/dist/commons/events/AdvancedSearchConfig.d.ts +414 -71
- package/dist/commons/events/CompositeFieldValue.d.ts +37 -9
- package/dist/commons/events/Constants.d.ts +3 -0
- package/dist/commons/events/CountryConfigQueryInput.d.ts +4132 -0
- package/dist/commons/events/CreatedAtLocation.d.ts +1 -2
- package/dist/commons/events/Draft.d.ts +271 -93
- package/dist/commons/events/EventConfig.d.ts +33783 -18386
- package/dist/commons/events/EventDocument.d.ts +2522 -816
- package/dist/commons/events/EventIndex.d.ts +1411 -313
- package/dist/commons/events/EventInput.d.ts +0 -13
- package/dist/commons/events/EventMetadata.d.ts +113 -76
- package/dist/commons/events/FieldConfig.d.ts +4017 -1558
- package/dist/commons/events/FieldType.d.ts +10 -1
- package/dist/commons/events/FieldTypeMapping.d.ts +149 -75
- package/dist/commons/events/FieldValue.d.ts +87 -20
- package/dist/commons/events/FormConfig.d.ts +18663 -8055
- package/dist/commons/events/PageConfig.d.ts +4601 -1945
- package/dist/commons/events/SummaryConfig.d.ts +0 -5
- package/dist/commons/events/User.d.ts +34 -7
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +53 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +7802 -308
- package/dist/commons/events/defineConfig.d.ts +3535 -860
- package/dist/commons/events/event.d.ts +21 -21
- package/dist/commons/events/field.d.ts +36 -10
- package/dist/commons/events/index.d.ts +5 -0
- package/dist/commons/events/scopes.d.ts +1 -2
- package/dist/commons/events/serializer.d.ts +2 -0
- package/dist/commons/events/test.utils.d.ts +206 -52
- package/dist/commons/events/transactions.d.ts +1 -1
- package/dist/commons/events/utils.d.ts +14324 -1570
- package/dist/commons/events/workqueueDefaultColumns.d.ts +3 -0
- package/dist/conditionals/index.js +70 -62
- package/dist/events/index.js +3527 -1656
- package/dist/scopes/index.d.ts +96 -7
- package/dist/scopes/index.js +105 -26
- package/package.json +3 -3
- package/tsconfig.json +1 -1
- package/dist/commons/conditionals/conditionals.test.d.ts +0 -2
- package/dist/commons/conditionals/validate-address.test.d.ts +0 -2
- package/dist/commons/conditionals/validate.test.d.ts +0 -2
- package/dist/commons/events/utils.test.d.ts +0 -2
@@ -2,25 +2,12 @@ import { z } from 'zod';
|
|
2
2
|
export declare const EventInput: z.ZodObject<{
|
3
3
|
transactionId: z.ZodString;
|
4
4
|
type: z.ZodString;
|
5
|
-
dateOfEvent: z.ZodOptional<z.ZodObject<{
|
6
|
-
fieldId: z.ZodString;
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
8
|
-
fieldId: string;
|
9
|
-
}, {
|
10
|
-
fieldId: string;
|
11
|
-
}>>;
|
12
5
|
}, "strip", z.ZodTypeAny, {
|
13
6
|
type: string;
|
14
7
|
transactionId: string;
|
15
|
-
dateOfEvent?: {
|
16
|
-
fieldId: string;
|
17
|
-
} | undefined;
|
18
8
|
}, {
|
19
9
|
type: string;
|
20
10
|
transactionId: string;
|
21
|
-
dateOfEvent?: {
|
22
|
-
fieldId: string;
|
23
|
-
} | undefined;
|
24
11
|
}>;
|
25
12
|
export type EventInput = z.infer<typeof EventInput>;
|
26
13
|
//# sourceMappingURL=EventInput.d.ts.map
|
@@ -3,64 +3,59 @@ import { TranslationConfig } from './TranslationConfig';
|
|
3
3
|
/**
|
4
4
|
* Event statuses recognized by the system
|
5
5
|
*/
|
6
|
-
export declare const EventStatus:
|
7
|
-
|
8
|
-
|
9
|
-
readonly
|
10
|
-
readonly
|
11
|
-
readonly
|
12
|
-
readonly
|
13
|
-
readonly REJECTED: "REJECTED";
|
14
|
-
readonly ARCHIVED: "ARCHIVED";
|
6
|
+
export declare const EventStatus: z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "ARCHIVED"]>;
|
7
|
+
export type EventStatus = z.infer<typeof EventStatus>;
|
8
|
+
export declare const InherentFlags: {
|
9
|
+
readonly PENDING_CERTIFICATION: "pending-certification";
|
10
|
+
readonly INCOMPLETE: "incomplete";
|
11
|
+
readonly REJECTED: "rejected";
|
12
|
+
readonly CORRECTION_REQUESTED: "correction-requested";
|
15
13
|
};
|
16
|
-
export type
|
17
|
-
export declare const
|
18
|
-
export declare const CustomFlags: {
|
19
|
-
readonly CERTIFICATE_PRINTED: "certificate-printed";
|
20
|
-
};
|
21
|
-
export type CustomFlags = (typeof CustomFlags)[keyof typeof CustomFlags];
|
14
|
+
export type InherentFlags = (typeof InherentFlags)[keyof typeof InherentFlags];
|
15
|
+
export declare const ActionFlag: z.ZodString;
|
22
16
|
export declare const Flag: z.ZodUnion<[z.ZodString, z.ZodNativeEnum<{
|
23
|
-
readonly
|
17
|
+
readonly PENDING_CERTIFICATION: "pending-certification";
|
18
|
+
readonly INCOMPLETE: "incomplete";
|
19
|
+
readonly REJECTED: "rejected";
|
20
|
+
readonly CORRECTION_REQUESTED: "correction-requested";
|
24
21
|
}>]>;
|
22
|
+
export type ActionFlag = z.infer<typeof ActionFlag>;
|
25
23
|
export type Flag = z.infer<typeof Flag>;
|
26
|
-
export declare const eventStatuses: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
|
27
|
-
export declare const EventStatuses: z.ZodNativeEnum<{
|
28
|
-
readonly CREATED: "CREATED";
|
29
|
-
readonly NOTIFIED: "NOTIFIED";
|
30
|
-
readonly DECLARED: "DECLARED";
|
31
|
-
readonly VALIDATED: "VALIDATED";
|
32
|
-
readonly REGISTERED: "REGISTERED";
|
33
|
-
readonly CERTIFIED: "CERTIFIED";
|
34
|
-
readonly REJECTED: "REJECTED";
|
35
|
-
readonly ARCHIVED: "ARCHIVED";
|
36
|
-
}>;
|
37
24
|
export declare const ZodDate: z.ZodString;
|
38
25
|
export declare const ActionCreationMetadata: z.ZodObject<{
|
39
26
|
createdAt: z.ZodString;
|
40
27
|
createdBy: z.ZodString;
|
41
|
-
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString
|
28
|
+
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
|
29
|
+
createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
|
42
30
|
acceptedAt: z.ZodString;
|
43
31
|
createdByRole: z.ZodString;
|
32
|
+
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
44
33
|
}, "strip", z.ZodTypeAny, {
|
45
34
|
createdAt: string;
|
46
35
|
createdBy: string;
|
47
36
|
createdByRole: string;
|
48
37
|
acceptedAt: string;
|
49
|
-
|
38
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
39
|
+
createdBySignature?: string | null | undefined;
|
40
|
+
createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
|
50
41
|
}, {
|
51
42
|
createdAt: string;
|
52
43
|
createdBy: string;
|
53
44
|
createdByRole: string;
|
54
45
|
acceptedAt: string;
|
46
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
47
|
+
createdBySignature?: string | null | undefined;
|
55
48
|
createdAtLocation?: string | null | undefined;
|
56
49
|
}>;
|
57
50
|
export type ActionCreationMetadata = z.infer<typeof ActionCreationMetadata>;
|
58
51
|
export declare const RegistrationCreationMetadata: z.ZodObject<z.objectUtil.extendShape<{
|
59
52
|
createdAt: z.ZodString;
|
60
53
|
createdBy: z.ZodString;
|
61
|
-
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString
|
54
|
+
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
|
55
|
+
createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
|
62
56
|
acceptedAt: z.ZodString;
|
63
57
|
createdByRole: z.ZodString;
|
58
|
+
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
64
59
|
}, {
|
65
60
|
registrationNumber: z.ZodString;
|
66
61
|
}>, "strip", z.ZodTypeAny, {
|
@@ -69,13 +64,17 @@ export declare const RegistrationCreationMetadata: z.ZodObject<z.objectUtil.exte
|
|
69
64
|
createdByRole: string;
|
70
65
|
registrationNumber: string;
|
71
66
|
acceptedAt: string;
|
72
|
-
|
67
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
68
|
+
createdBySignature?: string | null | undefined;
|
69
|
+
createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
|
73
70
|
}, {
|
74
71
|
createdAt: string;
|
75
72
|
createdBy: string;
|
76
73
|
createdByRole: string;
|
77
74
|
registrationNumber: string;
|
78
75
|
acceptedAt: string;
|
76
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
77
|
+
createdBySignature?: string | null | undefined;
|
79
78
|
createdAtLocation?: string | null | undefined;
|
80
79
|
}>;
|
81
80
|
export type RegistrationCreationMetadata = z.infer<typeof RegistrationCreationMetadata>;
|
@@ -83,28 +82,36 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
83
82
|
DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
84
83
|
createdAt: z.ZodString;
|
85
84
|
createdBy: z.ZodString;
|
86
|
-
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString
|
85
|
+
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
|
86
|
+
createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
|
87
87
|
acceptedAt: z.ZodString;
|
88
88
|
createdByRole: z.ZodString;
|
89
|
+
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
89
90
|
}, "strip", z.ZodTypeAny, {
|
90
91
|
createdAt: string;
|
91
92
|
createdBy: string;
|
92
93
|
createdByRole: string;
|
93
94
|
acceptedAt: string;
|
94
|
-
|
95
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
96
|
+
createdBySignature?: string | null | undefined;
|
97
|
+
createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
|
95
98
|
}, {
|
96
99
|
createdAt: string;
|
97
100
|
createdBy: string;
|
98
101
|
createdByRole: string;
|
99
102
|
acceptedAt: string;
|
103
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
104
|
+
createdBySignature?: string | null | undefined;
|
100
105
|
createdAtLocation?: string | null | undefined;
|
101
106
|
}>>>;
|
102
107
|
REGISTERED: z.ZodOptional<z.ZodNullable<z.ZodObject<z.objectUtil.extendShape<{
|
103
108
|
createdAt: z.ZodString;
|
104
109
|
createdBy: z.ZodString;
|
105
|
-
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString
|
110
|
+
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
|
111
|
+
createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
|
106
112
|
acceptedAt: z.ZodString;
|
107
113
|
createdByRole: z.ZodString;
|
114
|
+
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
108
115
|
}, {
|
109
116
|
registrationNumber: z.ZodString;
|
110
117
|
}>, "strip", z.ZodTypeAny, {
|
@@ -113,13 +120,17 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
113
120
|
createdByRole: string;
|
114
121
|
registrationNumber: string;
|
115
122
|
acceptedAt: string;
|
116
|
-
|
123
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
124
|
+
createdBySignature?: string | null | undefined;
|
125
|
+
createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
|
117
126
|
}, {
|
118
127
|
createdAt: string;
|
119
128
|
createdBy: string;
|
120
129
|
createdByRole: string;
|
121
130
|
registrationNumber: string;
|
122
131
|
acceptedAt: string;
|
132
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
133
|
+
createdBySignature?: string | null | undefined;
|
123
134
|
createdAtLocation?: string | null | undefined;
|
124
135
|
}>>>;
|
125
136
|
}, "strip", z.ZodTypeAny, {
|
@@ -128,7 +139,9 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
128
139
|
createdBy: string;
|
129
140
|
createdByRole: string;
|
130
141
|
acceptedAt: string;
|
131
|
-
|
142
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
143
|
+
createdBySignature?: string | null | undefined;
|
144
|
+
createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
|
132
145
|
} | null | undefined;
|
133
146
|
REGISTERED?: {
|
134
147
|
createdAt: string;
|
@@ -136,7 +149,9 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
136
149
|
createdByRole: string;
|
137
150
|
registrationNumber: string;
|
138
151
|
acceptedAt: string;
|
139
|
-
|
152
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
153
|
+
createdBySignature?: string | null | undefined;
|
154
|
+
createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
|
140
155
|
} | null | undefined;
|
141
156
|
}, {
|
142
157
|
DECLARED?: {
|
@@ -144,6 +159,8 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
144
159
|
createdBy: string;
|
145
160
|
createdByRole: string;
|
146
161
|
acceptedAt: string;
|
162
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
163
|
+
createdBySignature?: string | null | undefined;
|
147
164
|
createdAtLocation?: string | null | undefined;
|
148
165
|
} | null | undefined;
|
149
166
|
REGISTERED?: {
|
@@ -152,6 +169,8 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
152
169
|
createdByRole: string;
|
153
170
|
registrationNumber: string;
|
154
171
|
acceptedAt: string;
|
172
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
173
|
+
createdBySignature?: string | null | undefined;
|
155
174
|
createdAtLocation?: string | null | undefined;
|
156
175
|
} | null | undefined;
|
157
176
|
}>;
|
@@ -161,44 +180,43 @@ export declare const LegalStatuses: z.ZodObject<{
|
|
161
180
|
* Accessed through `event.` in configuration.
|
162
181
|
*/
|
163
182
|
export declare const EventMetadata: z.ZodObject<{
|
164
|
-
id: z.ZodString
|
183
|
+
id: z.ZodBranded<z.ZodString, "UUID">;
|
165
184
|
type: z.ZodString;
|
166
|
-
status: z.
|
167
|
-
readonly CREATED: "CREATED";
|
168
|
-
readonly NOTIFIED: "NOTIFIED";
|
169
|
-
readonly DECLARED: "DECLARED";
|
170
|
-
readonly VALIDATED: "VALIDATED";
|
171
|
-
readonly REGISTERED: "REGISTERED";
|
172
|
-
readonly CERTIFIED: "CERTIFIED";
|
173
|
-
readonly REJECTED: "REJECTED";
|
174
|
-
readonly ARCHIVED: "ARCHIVED";
|
175
|
-
}>;
|
185
|
+
status: z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "ARCHIVED"]>;
|
176
186
|
legalStatuses: z.ZodObject<{
|
177
187
|
DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
178
188
|
createdAt: z.ZodString;
|
179
189
|
createdBy: z.ZodString;
|
180
|
-
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString
|
190
|
+
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
|
191
|
+
createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
|
181
192
|
acceptedAt: z.ZodString;
|
182
193
|
createdByRole: z.ZodString;
|
194
|
+
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
183
195
|
}, "strip", z.ZodTypeAny, {
|
184
196
|
createdAt: string;
|
185
197
|
createdBy: string;
|
186
198
|
createdByRole: string;
|
187
199
|
acceptedAt: string;
|
188
|
-
|
200
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
201
|
+
createdBySignature?: string | null | undefined;
|
202
|
+
createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
|
189
203
|
}, {
|
190
204
|
createdAt: string;
|
191
205
|
createdBy: string;
|
192
206
|
createdByRole: string;
|
193
207
|
acceptedAt: string;
|
208
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
209
|
+
createdBySignature?: string | null | undefined;
|
194
210
|
createdAtLocation?: string | null | undefined;
|
195
211
|
}>>>;
|
196
212
|
REGISTERED: z.ZodOptional<z.ZodNullable<z.ZodObject<z.objectUtil.extendShape<{
|
197
213
|
createdAt: z.ZodString;
|
198
214
|
createdBy: z.ZodString;
|
199
|
-
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString
|
215
|
+
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
|
216
|
+
createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
|
200
217
|
acceptedAt: z.ZodString;
|
201
218
|
createdByRole: z.ZodString;
|
219
|
+
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
202
220
|
}, {
|
203
221
|
registrationNumber: z.ZodString;
|
204
222
|
}>, "strip", z.ZodTypeAny, {
|
@@ -207,13 +225,17 @@ export declare const EventMetadata: z.ZodObject<{
|
|
207
225
|
createdByRole: string;
|
208
226
|
registrationNumber: string;
|
209
227
|
acceptedAt: string;
|
210
|
-
|
228
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
229
|
+
createdBySignature?: string | null | undefined;
|
230
|
+
createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
|
211
231
|
}, {
|
212
232
|
createdAt: string;
|
213
233
|
createdBy: string;
|
214
234
|
createdByRole: string;
|
215
235
|
registrationNumber: string;
|
216
236
|
acceptedAt: string;
|
237
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
238
|
+
createdBySignature?: string | null | undefined;
|
217
239
|
createdAtLocation?: string | null | undefined;
|
218
240
|
}>>>;
|
219
241
|
}, "strip", z.ZodTypeAny, {
|
@@ -222,7 +244,9 @@ export declare const EventMetadata: z.ZodObject<{
|
|
222
244
|
createdBy: string;
|
223
245
|
createdByRole: string;
|
224
246
|
acceptedAt: string;
|
225
|
-
|
247
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
248
|
+
createdBySignature?: string | null | undefined;
|
249
|
+
createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
|
226
250
|
} | null | undefined;
|
227
251
|
REGISTERED?: {
|
228
252
|
createdAt: string;
|
@@ -230,7 +254,9 @@ export declare const EventMetadata: z.ZodObject<{
|
|
230
254
|
createdByRole: string;
|
231
255
|
registrationNumber: string;
|
232
256
|
acceptedAt: string;
|
233
|
-
|
257
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
258
|
+
createdBySignature?: string | null | undefined;
|
259
|
+
createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
|
234
260
|
} | null | undefined;
|
235
261
|
}, {
|
236
262
|
DECLARED?: {
|
@@ -238,6 +264,8 @@ export declare const EventMetadata: z.ZodObject<{
|
|
238
264
|
createdBy: string;
|
239
265
|
createdByRole: string;
|
240
266
|
acceptedAt: string;
|
267
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
268
|
+
createdBySignature?: string | null | undefined;
|
241
269
|
createdAtLocation?: string | null | undefined;
|
242
270
|
} | null | undefined;
|
243
271
|
REGISTERED?: {
|
@@ -246,26 +274,33 @@ export declare const EventMetadata: z.ZodObject<{
|
|
246
274
|
createdByRole: string;
|
247
275
|
registrationNumber: string;
|
248
276
|
acceptedAt: string;
|
277
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
278
|
+
createdBySignature?: string | null | undefined;
|
249
279
|
createdAtLocation?: string | null | undefined;
|
250
280
|
} | null | undefined;
|
251
281
|
}>;
|
252
282
|
createdAt: z.ZodString;
|
253
283
|
dateOfEvent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
254
284
|
createdBy: z.ZodString;
|
285
|
+
createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
|
255
286
|
updatedByUserRole: z.ZodString;
|
256
|
-
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString
|
257
|
-
|
287
|
+
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
|
288
|
+
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
289
|
+
updatedAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
|
258
290
|
updatedAt: z.ZodString;
|
259
291
|
assignedTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
260
292
|
updatedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
261
293
|
trackingId: z.ZodString;
|
262
294
|
flags: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNativeEnum<{
|
263
|
-
readonly
|
295
|
+
readonly PENDING_CERTIFICATION: "pending-certification";
|
296
|
+
readonly INCOMPLETE: "incomplete";
|
297
|
+
readonly REJECTED: "rejected";
|
298
|
+
readonly CORRECTION_REQUESTED: "correction-requested";
|
264
299
|
}>]>, "many">;
|
265
300
|
}, "strip", z.ZodTypeAny, {
|
266
301
|
type: string;
|
267
|
-
id: string
|
268
|
-
status: "ARCHIVED" | "
|
302
|
+
id: string & z.BRAND<"UUID">;
|
303
|
+
status: "ARCHIVED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
|
269
304
|
createdAt: string;
|
270
305
|
createdBy: string;
|
271
306
|
updatedAt: string;
|
@@ -276,7 +311,9 @@ export declare const EventMetadata: z.ZodObject<{
|
|
276
311
|
createdBy: string;
|
277
312
|
createdByRole: string;
|
278
313
|
acceptedAt: string;
|
279
|
-
|
314
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
315
|
+
createdBySignature?: string | null | undefined;
|
316
|
+
createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
|
280
317
|
} | null | undefined;
|
281
318
|
REGISTERED?: {
|
282
319
|
createdAt: string;
|
@@ -284,20 +321,24 @@ export declare const EventMetadata: z.ZodObject<{
|
|
284
321
|
createdByRole: string;
|
285
322
|
registrationNumber: string;
|
286
323
|
acceptedAt: string;
|
287
|
-
|
324
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
325
|
+
createdBySignature?: string | null | undefined;
|
326
|
+
createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
|
288
327
|
} | null | undefined;
|
289
328
|
};
|
290
329
|
updatedByUserRole: string;
|
291
330
|
flags: string[];
|
292
|
-
|
331
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
332
|
+
createdBySignature?: string | null | undefined;
|
333
|
+
createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
|
293
334
|
assignedTo?: string | null | undefined;
|
294
335
|
dateOfEvent?: string | null | undefined;
|
295
|
-
updatedAtLocation?: string | null | undefined;
|
336
|
+
updatedAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
|
296
337
|
updatedBy?: string | null | undefined;
|
297
338
|
}, {
|
298
339
|
type: string;
|
299
340
|
id: string;
|
300
|
-
status: "ARCHIVED" | "
|
341
|
+
status: "ARCHIVED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
|
301
342
|
createdAt: string;
|
302
343
|
createdBy: string;
|
303
344
|
updatedAt: string;
|
@@ -308,6 +349,8 @@ export declare const EventMetadata: z.ZodObject<{
|
|
308
349
|
createdBy: string;
|
309
350
|
createdByRole: string;
|
310
351
|
acceptedAt: string;
|
352
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
353
|
+
createdBySignature?: string | null | undefined;
|
311
354
|
createdAtLocation?: string | null | undefined;
|
312
355
|
} | null | undefined;
|
313
356
|
REGISTERED?: {
|
@@ -316,11 +359,15 @@ export declare const EventMetadata: z.ZodObject<{
|
|
316
359
|
createdByRole: string;
|
317
360
|
registrationNumber: string;
|
318
361
|
acceptedAt: string;
|
362
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
363
|
+
createdBySignature?: string | null | undefined;
|
319
364
|
createdAtLocation?: string | null | undefined;
|
320
365
|
} | null | undefined;
|
321
366
|
};
|
322
367
|
updatedByUserRole: string;
|
323
368
|
flags: string[];
|
369
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
370
|
+
createdBySignature?: string | null | undefined;
|
324
371
|
createdAtLocation?: string | null | undefined;
|
325
372
|
assignedTo?: string | null | undefined;
|
326
373
|
dateOfEvent?: string | null | undefined;
|
@@ -328,19 +375,9 @@ export declare const EventMetadata: z.ZodObject<{
|
|
328
375
|
updatedBy?: string | null | undefined;
|
329
376
|
}>;
|
330
377
|
export type EventMetadata = z.infer<typeof EventMetadata>;
|
331
|
-
export declare const
|
378
|
+
export declare const EventMetadataKeysArray: readonly ["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags"];
|
379
|
+
export declare const EventMetadataKeys: z.ZodEnum<["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags"]>;
|
332
380
|
export type EventMetadataKeys = z.infer<typeof EventMetadataKeys>;
|
333
|
-
/**
|
334
|
-
* This ensures `event.field()` takes a key from `EventMetadata`
|
335
|
-
*/
|
336
|
-
export declare const EventMetadataParameter: z.ZodObject<{
|
337
|
-
$event: z.ZodEnum<["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags"]>;
|
338
|
-
}, "strip", z.ZodTypeAny, {
|
339
|
-
$event: "type" | "id" | "status" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "dateOfEvent" | "updatedAt" | "trackingId" | "legalStatuses" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags";
|
340
|
-
}, {
|
341
|
-
$event: "type" | "id" | "status" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "dateOfEvent" | "updatedAt" | "trackingId" | "legalStatuses" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags";
|
342
|
-
}>;
|
343
|
-
export type EventMetadataParameter = z.infer<typeof EventMetadataParameter>;
|
344
381
|
/**
|
345
382
|
* Mapping of event metadata keys to translation configuration.
|
346
383
|
* Consider introducing type in same manner as we have in FieldConfig.
|