@opencrvs/toolkit 1.8.0-rc.f97f8f2 → 1.8.0-rc.f988670
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 +10613 -8753
- package/dist/commons/conditionals/conditionals.d.ts +7 -14
- package/dist/commons/conditionals/validate.d.ts +14 -0
- package/dist/commons/events/ActionConfig.d.ts +82300 -42816
- package/dist/commons/events/ActionDocument.d.ts +3996 -1262
- package/dist/commons/events/ActionInput.d.ts +3139 -967
- package/dist/commons/events/ActionType.d.ts +4 -0
- package/dist/commons/events/AdvancedSearchConfig.d.ts +981 -47
- 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 +3069 -443
- package/dist/commons/events/CreatedAtLocation.d.ts +2 -0
- package/dist/commons/events/Draft.d.ts +273 -95
- package/dist/commons/events/EventConfig.d.ts +33357 -14451
- package/dist/commons/events/EventDocument.d.ts +2554 -848
- package/dist/commons/events/EventIndex.d.ts +1281 -495
- package/dist/commons/events/EventInput.d.ts +0 -13
- package/dist/commons/events/EventMetadata.d.ts +126 -92
- package/dist/commons/events/FieldConfig.d.ts +4564 -1588
- 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 +22178 -8396
- package/dist/commons/events/PageConfig.d.ts +5525 -2087
- package/dist/commons/events/SummaryConfig.d.ts +0 -5
- package/dist/commons/events/User.d.ts +6 -3
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +18 -7
- package/dist/commons/events/WorkqueueConfig.d.ts +6406 -1001
- package/dist/commons/events/defineConfig.d.ts +3797 -870
- package/dist/commons/events/event.d.ts +41 -14
- package/dist/commons/events/field.d.ts +55 -15
- package/dist/commons/events/index.d.ts +2 -0
- package/dist/commons/events/scopes.d.ts +21 -3
- package/dist/commons/events/test.utils.d.ts +208 -54
- package/dist/commons/events/transactions.d.ts +1 -1
- package/dist/commons/events/utils.d.ts +14039 -1170
- package/dist/conditionals/index.js +69 -62
- package/dist/events/index.js +3836 -1956
- package/dist/scopes/index.d.ts +147 -5
- package/dist/scopes/index.js +133 -43
- 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,156 +3,175 @@ 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.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
|
-
createdAtLocation: string;
|
49
37
|
acceptedAt: string;
|
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
|
-
createdAtLocation: string;
|
55
45
|
acceptedAt: string;
|
46
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
47
|
+
createdBySignature?: string | null | undefined;
|
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.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, {
|
67
62
|
createdAt: string;
|
68
63
|
createdBy: string;
|
69
64
|
createdByRole: string;
|
70
|
-
createdAtLocation: string;
|
71
65
|
registrationNumber: string;
|
72
66
|
acceptedAt: string;
|
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
|
-
createdAtLocation: string;
|
78
74
|
registrationNumber: string;
|
79
75
|
acceptedAt: string;
|
76
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
77
|
+
createdBySignature?: string | null | undefined;
|
78
|
+
createdAtLocation?: string | null | undefined;
|
80
79
|
}>;
|
81
80
|
export type RegistrationCreationMetadata = z.infer<typeof RegistrationCreationMetadata>;
|
82
81
|
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.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
|
-
createdAtLocation: string;
|
94
94
|
acceptedAt: string;
|
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
|
-
createdAtLocation: string;
|
100
102
|
acceptedAt: string;
|
103
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
104
|
+
createdBySignature?: string | null | undefined;
|
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.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, {
|
111
118
|
createdAt: string;
|
112
119
|
createdBy: string;
|
113
120
|
createdByRole: string;
|
114
|
-
createdAtLocation: string;
|
115
121
|
registrationNumber: string;
|
116
122
|
acceptedAt: string;
|
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
|
-
createdAtLocation: string;
|
122
130
|
registrationNumber: string;
|
123
131
|
acceptedAt: string;
|
132
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
133
|
+
createdBySignature?: string | null | undefined;
|
134
|
+
createdAtLocation?: string | null | undefined;
|
124
135
|
}>>>;
|
125
136
|
}, "strip", z.ZodTypeAny, {
|
126
137
|
DECLARED?: {
|
127
138
|
createdAt: string;
|
128
139
|
createdBy: string;
|
129
140
|
createdByRole: string;
|
130
|
-
createdAtLocation: string;
|
131
141
|
acceptedAt: string;
|
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;
|
135
148
|
createdBy: string;
|
136
149
|
createdByRole: string;
|
137
|
-
createdAtLocation: string;
|
138
150
|
registrationNumber: string;
|
139
151
|
acceptedAt: string;
|
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?: {
|
143
158
|
createdAt: string;
|
144
159
|
createdBy: string;
|
145
160
|
createdByRole: string;
|
146
|
-
createdAtLocation: string;
|
147
161
|
acceptedAt: string;
|
162
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
163
|
+
createdBySignature?: string | null | undefined;
|
164
|
+
createdAtLocation?: string | null | undefined;
|
148
165
|
} | null | undefined;
|
149
166
|
REGISTERED?: {
|
150
167
|
createdAt: string;
|
151
168
|
createdBy: string;
|
152
169
|
createdByRole: string;
|
153
|
-
createdAtLocation: string;
|
154
170
|
registrationNumber: string;
|
155
171
|
acceptedAt: string;
|
172
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
173
|
+
createdBySignature?: string | null | undefined;
|
174
|
+
createdAtLocation?: string | null | undefined;
|
156
175
|
} | null | undefined;
|
157
176
|
}>;
|
158
177
|
/**
|
@@ -161,116 +180,129 @@ 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
|
165
|
-
title: z.ZodString;
|
183
|
+
id: z.ZodBranded<z.ZodString, "UUID">;
|
166
184
|
type: z.ZodString;
|
167
|
-
status: z.
|
168
|
-
readonly CREATED: "CREATED";
|
169
|
-
readonly NOTIFIED: "NOTIFIED";
|
170
|
-
readonly DECLARED: "DECLARED";
|
171
|
-
readonly VALIDATED: "VALIDATED";
|
172
|
-
readonly REGISTERED: "REGISTERED";
|
173
|
-
readonly CERTIFIED: "CERTIFIED";
|
174
|
-
readonly REJECTED: "REJECTED";
|
175
|
-
readonly ARCHIVED: "ARCHIVED";
|
176
|
-
}>;
|
185
|
+
status: z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "ARCHIVED"]>;
|
177
186
|
legalStatuses: z.ZodObject<{
|
178
187
|
DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
179
188
|
createdAt: z.ZodString;
|
180
189
|
createdBy: z.ZodString;
|
181
|
-
createdAtLocation: z.ZodString
|
190
|
+
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
|
191
|
+
createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
|
182
192
|
acceptedAt: z.ZodString;
|
183
193
|
createdByRole: z.ZodString;
|
194
|
+
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
184
195
|
}, "strip", z.ZodTypeAny, {
|
185
196
|
createdAt: string;
|
186
197
|
createdBy: string;
|
187
198
|
createdByRole: string;
|
188
|
-
createdAtLocation: string;
|
189
199
|
acceptedAt: string;
|
200
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
201
|
+
createdBySignature?: string | null | undefined;
|
202
|
+
createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
|
190
203
|
}, {
|
191
204
|
createdAt: string;
|
192
205
|
createdBy: string;
|
193
206
|
createdByRole: string;
|
194
|
-
createdAtLocation: string;
|
195
207
|
acceptedAt: string;
|
208
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
209
|
+
createdBySignature?: string | null | undefined;
|
210
|
+
createdAtLocation?: string | null | undefined;
|
196
211
|
}>>>;
|
197
212
|
REGISTERED: z.ZodOptional<z.ZodNullable<z.ZodObject<z.objectUtil.extendShape<{
|
198
213
|
createdAt: z.ZodString;
|
199
214
|
createdBy: z.ZodString;
|
200
|
-
createdAtLocation: z.ZodString
|
215
|
+
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
|
216
|
+
createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
|
201
217
|
acceptedAt: z.ZodString;
|
202
218
|
createdByRole: z.ZodString;
|
219
|
+
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
203
220
|
}, {
|
204
221
|
registrationNumber: z.ZodString;
|
205
222
|
}>, "strip", z.ZodTypeAny, {
|
206
223
|
createdAt: string;
|
207
224
|
createdBy: string;
|
208
225
|
createdByRole: string;
|
209
|
-
createdAtLocation: string;
|
210
226
|
registrationNumber: string;
|
211
227
|
acceptedAt: string;
|
228
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
229
|
+
createdBySignature?: string | null | undefined;
|
230
|
+
createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
|
212
231
|
}, {
|
213
232
|
createdAt: string;
|
214
233
|
createdBy: string;
|
215
234
|
createdByRole: string;
|
216
|
-
createdAtLocation: string;
|
217
235
|
registrationNumber: string;
|
218
236
|
acceptedAt: string;
|
237
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
238
|
+
createdBySignature?: string | null | undefined;
|
239
|
+
createdAtLocation?: string | null | undefined;
|
219
240
|
}>>>;
|
220
241
|
}, "strip", z.ZodTypeAny, {
|
221
242
|
DECLARED?: {
|
222
243
|
createdAt: string;
|
223
244
|
createdBy: string;
|
224
245
|
createdByRole: string;
|
225
|
-
createdAtLocation: string;
|
226
246
|
acceptedAt: string;
|
247
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
248
|
+
createdBySignature?: string | null | undefined;
|
249
|
+
createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
|
227
250
|
} | null | undefined;
|
228
251
|
REGISTERED?: {
|
229
252
|
createdAt: string;
|
230
253
|
createdBy: string;
|
231
254
|
createdByRole: string;
|
232
|
-
createdAtLocation: string;
|
233
255
|
registrationNumber: string;
|
234
256
|
acceptedAt: string;
|
257
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
258
|
+
createdBySignature?: string | null | undefined;
|
259
|
+
createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
|
235
260
|
} | null | undefined;
|
236
261
|
}, {
|
237
262
|
DECLARED?: {
|
238
263
|
createdAt: string;
|
239
264
|
createdBy: string;
|
240
265
|
createdByRole: string;
|
241
|
-
createdAtLocation: string;
|
242
266
|
acceptedAt: string;
|
267
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
268
|
+
createdBySignature?: string | null | undefined;
|
269
|
+
createdAtLocation?: string | null | undefined;
|
243
270
|
} | null | undefined;
|
244
271
|
REGISTERED?: {
|
245
272
|
createdAt: string;
|
246
273
|
createdBy: string;
|
247
274
|
createdByRole: string;
|
248
|
-
createdAtLocation: string;
|
249
275
|
registrationNumber: string;
|
250
276
|
acceptedAt: string;
|
277
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
278
|
+
createdBySignature?: string | null | undefined;
|
279
|
+
createdAtLocation?: string | null | undefined;
|
251
280
|
} | null | undefined;
|
252
281
|
}>;
|
253
282
|
createdAt: z.ZodString;
|
254
283
|
dateOfEvent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
255
284
|
createdBy: z.ZodString;
|
285
|
+
createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["user", "system"]>>>;
|
256
286
|
updatedByUserRole: z.ZodString;
|
257
|
-
createdAtLocation: z.ZodString
|
258
|
-
|
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">>>;
|
259
290
|
updatedAt: z.ZodString;
|
260
291
|
assignedTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
261
292
|
updatedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
262
293
|
trackingId: z.ZodString;
|
263
294
|
flags: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNativeEnum<{
|
264
|
-
readonly
|
295
|
+
readonly PENDING_CERTIFICATION: "pending-certification";
|
296
|
+
readonly INCOMPLETE: "incomplete";
|
297
|
+
readonly REJECTED: "rejected";
|
298
|
+
readonly CORRECTION_REQUESTED: "correction-requested";
|
265
299
|
}>]>, "many">;
|
266
300
|
}, "strip", z.ZodTypeAny, {
|
267
301
|
type: string;
|
268
|
-
id: string
|
269
|
-
status: "ARCHIVED" | "
|
270
|
-
title: string;
|
302
|
+
id: string & z.BRAND<"UUID">;
|
303
|
+
status: "ARCHIVED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
|
271
304
|
createdAt: string;
|
272
305
|
createdBy: string;
|
273
|
-
createdAtLocation: string;
|
274
306
|
updatedAt: string;
|
275
307
|
trackingId: string;
|
276
308
|
legalStatuses: {
|
@@ -278,32 +310,37 @@ export declare const EventMetadata: z.ZodObject<{
|
|
278
310
|
createdAt: string;
|
279
311
|
createdBy: string;
|
280
312
|
createdByRole: string;
|
281
|
-
createdAtLocation: string;
|
282
313
|
acceptedAt: string;
|
314
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
315
|
+
createdBySignature?: string | null | undefined;
|
316
|
+
createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
|
283
317
|
} | null | undefined;
|
284
318
|
REGISTERED?: {
|
285
319
|
createdAt: string;
|
286
320
|
createdBy: string;
|
287
321
|
createdByRole: string;
|
288
|
-
createdAtLocation: string;
|
289
322
|
registrationNumber: string;
|
290
323
|
acceptedAt: string;
|
324
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
325
|
+
createdBySignature?: string | null | undefined;
|
326
|
+
createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
|
291
327
|
} | null | undefined;
|
292
328
|
};
|
293
329
|
updatedByUserRole: string;
|
294
330
|
flags: string[];
|
331
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
332
|
+
createdBySignature?: string | null | undefined;
|
333
|
+
createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
|
295
334
|
assignedTo?: string | null | undefined;
|
296
335
|
dateOfEvent?: string | null | undefined;
|
297
|
-
updatedAtLocation?: string | null | undefined;
|
336
|
+
updatedAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
|
298
337
|
updatedBy?: string | null | undefined;
|
299
338
|
}, {
|
300
339
|
type: string;
|
301
340
|
id: string;
|
302
|
-
status: "ARCHIVED" | "
|
303
|
-
title: string;
|
341
|
+
status: "ARCHIVED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
|
304
342
|
createdAt: string;
|
305
343
|
createdBy: string;
|
306
|
-
createdAtLocation: string;
|
307
344
|
updatedAt: string;
|
308
345
|
trackingId: string;
|
309
346
|
legalStatuses: {
|
@@ -311,39 +348,36 @@ export declare const EventMetadata: z.ZodObject<{
|
|
311
348
|
createdAt: string;
|
312
349
|
createdBy: string;
|
313
350
|
createdByRole: string;
|
314
|
-
createdAtLocation: string;
|
315
351
|
acceptedAt: string;
|
352
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
353
|
+
createdBySignature?: string | null | undefined;
|
354
|
+
createdAtLocation?: string | null | undefined;
|
316
355
|
} | null | undefined;
|
317
356
|
REGISTERED?: {
|
318
357
|
createdAt: string;
|
319
358
|
createdBy: string;
|
320
359
|
createdByRole: string;
|
321
|
-
createdAtLocation: string;
|
322
360
|
registrationNumber: string;
|
323
361
|
acceptedAt: string;
|
362
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
363
|
+
createdBySignature?: string | null | undefined;
|
364
|
+
createdAtLocation?: string | null | undefined;
|
324
365
|
} | null | undefined;
|
325
366
|
};
|
326
367
|
updatedByUserRole: string;
|
327
368
|
flags: string[];
|
369
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
370
|
+
createdBySignature?: string | null | undefined;
|
371
|
+
createdAtLocation?: string | null | undefined;
|
328
372
|
assignedTo?: string | null | undefined;
|
329
373
|
dateOfEvent?: string | null | undefined;
|
330
374
|
updatedAtLocation?: string | null | undefined;
|
331
375
|
updatedBy?: string | null | undefined;
|
332
376
|
}>;
|
333
377
|
export type EventMetadata = z.infer<typeof EventMetadata>;
|
334
|
-
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"]>;
|
335
380
|
export type EventMetadataKeys = z.infer<typeof EventMetadataKeys>;
|
336
|
-
/**
|
337
|
-
* This ensures `event.field()` takes a key from `EventMetadata`
|
338
|
-
*/
|
339
|
-
export declare const EventMetadataParameter: z.ZodObject<{
|
340
|
-
$event: z.ZodEnum<["id", "title", "type", "status", "createdAt", "dateOfEvent", "createdBy", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags"]>;
|
341
|
-
}, "strip", z.ZodTypeAny, {
|
342
|
-
$event: "type" | "id" | "status" | "title" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "dateOfEvent" | "updatedAt" | "trackingId" | "legalStatuses" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags";
|
343
|
-
}, {
|
344
|
-
$event: "type" | "id" | "status" | "title" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "dateOfEvent" | "updatedAt" | "trackingId" | "legalStatuses" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags";
|
345
|
-
}>;
|
346
|
-
export type EventMetadataParameter = z.infer<typeof EventMetadataParameter>;
|
347
381
|
/**
|
348
382
|
* Mapping of event metadata keys to translation configuration.
|
349
383
|
* Consider introducing type in same manner as we have in FieldConfig.
|