@opencrvs/toolkit 1.9.4-rc.793f834 → 1.9.4-rc.f09603b
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 +28204 -2149
- package/dist/commons/conditionals/conditionals.d.ts +10 -1
- package/dist/commons/conditionals/validate.d.ts +11 -4
- package/dist/commons/events/ActionConfig.d.ts +23416 -1552
- package/dist/commons/events/ActionDocument.d.ts +803 -1856
- package/dist/commons/events/ActionInput.d.ts +277 -1073
- package/dist/commons/events/ActionType.d.ts +86 -9
- package/dist/commons/events/AdvancedSearchConfig.d.ts +228 -1238
- package/dist/commons/events/CompositeFieldValue.d.ts +27 -176
- package/dist/commons/events/Conditional.d.ts +26 -38
- package/dist/commons/events/Constants.d.ts +1 -1
- package/dist/commons/events/CountryConfigQueryInput.d.ts +931 -4169
- package/dist/commons/events/CreatedAtLocation.d.ts +1 -1
- package/dist/commons/events/DeduplicationConfig.d.ts +15 -150
- package/dist/commons/events/Draft.d.ts +70 -105
- package/dist/commons/events/DynamicFieldValue.d.ts +7 -91
- package/dist/commons/events/EventConfig.d.ts +18663 -2120
- package/dist/commons/events/EventConfigInput.d.ts +1 -1
- package/dist/commons/events/EventDocument.d.ts +320 -1332
- package/dist/commons/events/EventIndex.d.ts +197 -967
- package/dist/commons/events/EventInput.d.ts +2 -8
- package/dist/commons/events/EventMetadata.d.ts +106 -346
- package/dist/commons/events/FieldConfig.d.ts +4267 -11782
- package/dist/commons/events/FieldType.d.ts +20 -4
- package/dist/commons/events/FieldTypeMapping.d.ts +181 -813
- package/dist/commons/events/FieldValue.d.ts +83 -356
- package/dist/commons/events/Flag.d.ts +70 -0
- package/dist/commons/events/FormConfig.d.ts +13140 -721
- package/dist/commons/events/PageConfig.d.ts +8780 -319
- package/dist/commons/events/SummaryConfig.d.ts +14 -161
- package/dist/commons/events/TemplateConfig.d.ts +3 -3
- package/dist/commons/events/TranslationConfig.d.ts +2 -2
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +74 -37
- package/dist/commons/events/WorkqueueConfig.d.ts +1691 -7156
- package/dist/commons/events/deduplication.d.ts +3 -3
- package/dist/commons/events/defineConfig.d.ts +25626 -150
- package/dist/commons/events/event.d.ts +4 -4
- package/dist/commons/events/index.d.ts +1 -0
- package/dist/commons/events/locations.d.ts +15 -19
- package/dist/commons/events/scopes.d.ts +5 -4
- package/dist/commons/events/state/availableActions.d.ts +2 -1
- package/dist/commons/events/state/flags.d.ts +21 -3
- package/dist/commons/events/state/index.d.ts +23 -19
- package/dist/commons/events/state/utils.d.ts +130 -112
- package/dist/commons/events/test.utils.d.ts +17 -8
- package/dist/commons/events/transactions.d.ts +1 -1
- package/dist/commons/events/utils.d.ts +51339 -362
- package/dist/commons/notification/UserNotifications.d.ts +55 -636
- package/dist/conditionals/index.d.ts.map +1 -1
- package/dist/conditionals/index.js +38 -5
- package/dist/events/deduplication.d.ts +3 -3
- package/dist/events/index.js +1810 -1550
- package/dist/notification/index.d.ts.map +1 -1
- package/dist/notification/index.js +1430 -1412
- package/dist/scopes/index.d.ts +167 -132
- package/dist/scopes/index.d.ts.map +1 -1
- package/dist/scopes/index.js +133 -94
- package/package.json +5 -5
|
@@ -7,280 +7,298 @@ import { Action } from '../ActionDocument';
|
|
|
7
7
|
*
|
|
8
8
|
* */
|
|
9
9
|
export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
|
|
10
|
-
|
|
11
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
12
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
10
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
13
11
|
transactionId: string;
|
|
14
12
|
createdByUserType: "system" | "user";
|
|
15
13
|
createdAt: string;
|
|
16
14
|
createdBy: string;
|
|
17
15
|
createdByRole: string;
|
|
18
16
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
19
|
-
|
|
17
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
18
|
+
type: "REGISTER";
|
|
20
19
|
createdBySignature?: string | null | undefined;
|
|
21
|
-
createdAtLocation?: (string & import("zod")
|
|
20
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
22
21
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
23
|
-
originalActionId?: (string & import("zod")
|
|
22
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
23
|
+
registrationNumber?: string | undefined;
|
|
24
24
|
} | {
|
|
25
|
-
|
|
26
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
27
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
25
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
28
26
|
transactionId: string;
|
|
29
27
|
createdByUserType: "system" | "user";
|
|
30
28
|
createdAt: string;
|
|
31
29
|
createdBy: string;
|
|
32
30
|
createdByRole: string;
|
|
33
31
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
32
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
33
|
+
type: "DUPLICATE_DETECTED";
|
|
34
|
+
content: {
|
|
35
|
+
duplicates: {
|
|
36
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
37
|
+
trackingId: string;
|
|
38
|
+
}[];
|
|
39
|
+
};
|
|
34
40
|
createdBySignature?: string | null | undefined;
|
|
35
|
-
createdAtLocation?: (string & import("zod")
|
|
41
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
36
42
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
37
|
-
originalActionId?: (string & import("zod")
|
|
43
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
38
44
|
} | {
|
|
39
|
-
|
|
40
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
41
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
45
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
42
46
|
transactionId: string;
|
|
43
47
|
createdByUserType: "system" | "user";
|
|
44
48
|
createdAt: string;
|
|
45
49
|
createdBy: string;
|
|
46
50
|
createdByRole: string;
|
|
47
51
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
52
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
53
|
+
type: "EDIT";
|
|
54
|
+
content: {
|
|
55
|
+
comment?: string | undefined;
|
|
56
|
+
};
|
|
48
57
|
createdBySignature?: string | null | undefined;
|
|
49
|
-
createdAtLocation?: (string & import("zod")
|
|
58
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
50
59
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
51
|
-
originalActionId?: (string & import("zod")
|
|
52
|
-
registrationNumber?: string | undefined;
|
|
60
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
53
61
|
} | {
|
|
54
|
-
|
|
55
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
56
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
62
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
57
63
|
transactionId: string;
|
|
58
64
|
createdByUserType: "system" | "user";
|
|
59
65
|
createdAt: string;
|
|
60
66
|
createdBy: string;
|
|
61
67
|
createdByRole: string;
|
|
62
68
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
69
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
70
|
+
type: "PRINT_CERTIFICATE";
|
|
63
71
|
createdBySignature?: string | null | undefined;
|
|
64
|
-
createdAtLocation?: (string & import("zod")
|
|
72
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
65
73
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
66
|
-
originalActionId?: (string & import("zod")
|
|
74
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
75
|
+
content?: {
|
|
76
|
+
templateId?: string | undefined;
|
|
77
|
+
} | null | undefined;
|
|
67
78
|
} | {
|
|
68
|
-
|
|
69
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
70
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
79
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
71
80
|
transactionId: string;
|
|
72
81
|
createdByUserType: "system" | "user";
|
|
73
82
|
createdAt: string;
|
|
74
83
|
createdBy: string;
|
|
75
84
|
createdByRole: string;
|
|
76
85
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
86
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
87
|
+
type: "REQUEST_CORRECTION";
|
|
77
88
|
createdBySignature?: string | null | undefined;
|
|
78
|
-
createdAtLocation?: (string & import("zod")
|
|
89
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
79
90
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
80
|
-
originalActionId?: (string & import("zod")
|
|
91
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
81
92
|
} | {
|
|
82
|
-
|
|
83
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
84
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
85
|
-
content: {
|
|
86
|
-
reason: string;
|
|
87
|
-
};
|
|
93
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
88
94
|
transactionId: string;
|
|
89
95
|
createdByUserType: "system" | "user";
|
|
90
96
|
createdAt: string;
|
|
91
97
|
createdBy: string;
|
|
92
98
|
createdByRole: string;
|
|
93
99
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
100
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
101
|
+
type: "CUSTOM";
|
|
102
|
+
customActionType: string;
|
|
94
103
|
createdBySignature?: string | null | undefined;
|
|
95
|
-
createdAtLocation?: (string & import("zod")
|
|
104
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
96
105
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
97
|
-
originalActionId?: (string & import("zod")
|
|
106
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
98
107
|
} | {
|
|
99
|
-
|
|
100
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
101
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
102
|
-
content: {
|
|
103
|
-
duplicates: {
|
|
104
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
105
|
-
trackingId: string;
|
|
106
|
-
}[];
|
|
107
|
-
};
|
|
108
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
108
109
|
transactionId: string;
|
|
109
110
|
createdByUserType: "system" | "user";
|
|
110
111
|
createdAt: string;
|
|
111
112
|
createdBy: string;
|
|
112
113
|
createdByRole: string;
|
|
113
114
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
115
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
116
|
+
type: "CREATE";
|
|
114
117
|
createdBySignature?: string | null | undefined;
|
|
115
|
-
createdAtLocation?: (string & import("zod")
|
|
118
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
116
119
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
117
|
-
originalActionId?: (string & import("zod")
|
|
120
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
118
121
|
} | {
|
|
119
|
-
|
|
120
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
121
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
122
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
122
123
|
transactionId: string;
|
|
123
124
|
createdByUserType: "system" | "user";
|
|
124
125
|
createdAt: string;
|
|
125
126
|
createdBy: string;
|
|
126
127
|
createdByRole: string;
|
|
127
128
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
129
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
130
|
+
type: "REJECT";
|
|
131
|
+
content: {
|
|
132
|
+
reason: string;
|
|
133
|
+
};
|
|
128
134
|
createdBySignature?: string | null | undefined;
|
|
129
|
-
createdAtLocation?: (string & import("zod")
|
|
135
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
130
136
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
131
|
-
originalActionId?: (string & import("zod")
|
|
137
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
132
138
|
} | {
|
|
133
|
-
|
|
134
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
135
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
139
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
136
140
|
transactionId: string;
|
|
137
141
|
createdByUserType: "system" | "user";
|
|
138
142
|
createdAt: string;
|
|
139
143
|
createdBy: string;
|
|
140
144
|
createdByRole: string;
|
|
141
145
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
} | undefined;
|
|
146
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
147
|
+
type: "MARK_AS_NOT_DUPLICATE";
|
|
145
148
|
createdBySignature?: string | null | undefined;
|
|
146
|
-
createdAtLocation?: (string & import("zod")
|
|
149
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
147
150
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
148
|
-
originalActionId?: (string & import("zod")
|
|
151
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
149
152
|
} | {
|
|
150
|
-
|
|
151
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
152
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
153
|
-
content: {
|
|
154
|
-
reason: string;
|
|
155
|
-
};
|
|
153
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
156
154
|
transactionId: string;
|
|
157
155
|
createdByUserType: "system" | "user";
|
|
158
156
|
createdAt: string;
|
|
159
157
|
createdBy: string;
|
|
160
158
|
createdByRole: string;
|
|
161
159
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
160
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
161
|
+
type: "MARK_AS_DUPLICATE";
|
|
162
162
|
createdBySignature?: string | null | undefined;
|
|
163
|
-
createdAtLocation?: (string & import("zod")
|
|
163
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
164
164
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
165
|
-
originalActionId?: (string & import("zod")
|
|
165
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
166
|
+
content?: {
|
|
167
|
+
duplicateOf: string & import("zod/v4").$brand<"UUID">;
|
|
168
|
+
} | undefined;
|
|
166
169
|
} | {
|
|
167
|
-
|
|
168
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
169
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
170
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
170
171
|
transactionId: string;
|
|
171
172
|
createdByUserType: "system" | "user";
|
|
172
173
|
createdAt: string;
|
|
173
174
|
createdBy: string;
|
|
174
175
|
createdByRole: string;
|
|
175
176
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
177
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
178
|
+
type: "ARCHIVE";
|
|
179
|
+
content: {
|
|
180
|
+
reason: string;
|
|
181
|
+
};
|
|
176
182
|
createdBySignature?: string | null | undefined;
|
|
177
|
-
createdAtLocation?: (string & import("zod")
|
|
183
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
178
184
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
179
|
-
originalActionId?: (string & import("zod")
|
|
185
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
180
186
|
} | {
|
|
181
|
-
|
|
182
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
183
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
187
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
184
188
|
transactionId: string;
|
|
185
189
|
createdByUserType: "system" | "user";
|
|
186
190
|
createdAt: string;
|
|
187
191
|
createdBy: string;
|
|
188
192
|
createdByRole: string;
|
|
189
193
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
194
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
195
|
+
type: "NOTIFY";
|
|
190
196
|
createdBySignature?: string | null | undefined;
|
|
191
|
-
createdAtLocation?: (string & import("zod")
|
|
197
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
192
198
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
193
|
-
originalActionId?: (string & import("zod")
|
|
199
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
194
200
|
} | {
|
|
195
|
-
|
|
196
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
197
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
201
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
198
202
|
transactionId: string;
|
|
199
203
|
createdByUserType: "system" | "user";
|
|
200
204
|
createdAt: string;
|
|
201
205
|
createdBy: string;
|
|
202
206
|
createdByRole: string;
|
|
203
207
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
} | null | undefined;
|
|
208
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
209
|
+
type: "DECLARE";
|
|
207
210
|
createdBySignature?: string | null | undefined;
|
|
208
|
-
createdAtLocation?: (string & import("zod")
|
|
211
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
209
212
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
210
|
-
originalActionId?: (string & import("zod")
|
|
213
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
211
214
|
} | {
|
|
212
|
-
|
|
213
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
214
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
215
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
215
216
|
transactionId: string;
|
|
216
217
|
createdByUserType: "system" | "user";
|
|
217
218
|
createdAt: string;
|
|
218
219
|
createdBy: string;
|
|
219
220
|
createdByRole: string;
|
|
220
221
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
222
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
223
|
+
type: "ASSIGN";
|
|
224
|
+
assignedTo: string;
|
|
221
225
|
createdBySignature?: string | null | undefined;
|
|
222
|
-
createdAtLocation?: (string & import("zod")
|
|
226
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
223
227
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
224
|
-
originalActionId?: (string & import("zod")
|
|
228
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
225
229
|
} | {
|
|
226
|
-
|
|
227
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
228
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
230
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
229
231
|
transactionId: string;
|
|
230
232
|
createdByUserType: "system" | "user";
|
|
231
233
|
createdAt: string;
|
|
232
234
|
createdBy: string;
|
|
233
235
|
createdByRole: string;
|
|
234
236
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
237
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
238
|
+
type: "APPROVE_CORRECTION";
|
|
235
239
|
requestId: string;
|
|
236
240
|
createdBySignature?: string | null | undefined;
|
|
237
|
-
createdAtLocation?: (string & import("zod")
|
|
241
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
238
242
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
239
|
-
originalActionId?: (string & import("zod")
|
|
243
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
240
244
|
} | {
|
|
241
|
-
|
|
242
|
-
|
|
245
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
246
|
+
transactionId: string;
|
|
247
|
+
createdByUserType: "system" | "user";
|
|
248
|
+
createdAt: string;
|
|
249
|
+
createdBy: string;
|
|
250
|
+
createdByRole: string;
|
|
251
|
+
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
243
252
|
status: "Rejected" | "Requested" | "Accepted";
|
|
253
|
+
type: "REJECT_CORRECTION";
|
|
254
|
+
requestId: string;
|
|
244
255
|
content: {
|
|
245
256
|
reason: string;
|
|
246
257
|
};
|
|
258
|
+
createdBySignature?: string | null | undefined;
|
|
259
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
260
|
+
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
261
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
262
|
+
} | {
|
|
263
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
247
264
|
transactionId: string;
|
|
248
265
|
createdByUserType: "system" | "user";
|
|
249
266
|
createdAt: string;
|
|
250
267
|
createdBy: string;
|
|
251
268
|
createdByRole: string;
|
|
252
269
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
253
|
-
|
|
270
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
271
|
+
type: "UNASSIGN";
|
|
254
272
|
createdBySignature?: string | null | undefined;
|
|
255
|
-
createdAtLocation?: (string & import("zod")
|
|
273
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
256
274
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
257
|
-
originalActionId?: (string & import("zod")
|
|
275
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
258
276
|
} | {
|
|
259
|
-
|
|
260
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
261
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
277
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
262
278
|
transactionId: string;
|
|
263
279
|
createdByUserType: "system" | "user";
|
|
264
280
|
createdAt: string;
|
|
265
281
|
createdBy: string;
|
|
266
282
|
createdByRole: string;
|
|
267
283
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
284
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
285
|
+
type: "READ";
|
|
268
286
|
createdBySignature?: string | null | undefined;
|
|
269
|
-
createdAtLocation?: (string & import("zod")
|
|
287
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
270
288
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
271
|
-
originalActionId?: (string & import("zod")
|
|
289
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
272
290
|
} | {
|
|
273
|
-
|
|
274
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
275
|
-
status: "Rejected";
|
|
291
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
276
292
|
transactionId: string;
|
|
277
293
|
createdByUserType: "system" | "user";
|
|
278
294
|
createdAt: string;
|
|
279
295
|
createdBy: string;
|
|
280
296
|
createdByRole: string;
|
|
297
|
+
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
298
|
+
status: "Rejected";
|
|
281
299
|
createdBySignature?: string | null | undefined;
|
|
282
|
-
createdAtLocation?: (string & import("zod")
|
|
283
|
-
originalActionId?: (string & import("zod")
|
|
300
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
301
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
284
302
|
}>;
|
|
285
303
|
/**
|
|
286
304
|
* @returns the legal statuses of the event. Event is considered legal if it has been accepted.
|
|
@@ -291,7 +309,7 @@ export declare function getLegalStatuses(actions: Action[]): {
|
|
|
291
309
|
createdAt: string;
|
|
292
310
|
createdBy: string;
|
|
293
311
|
createdByUserType: "system" | "user";
|
|
294
|
-
createdAtLocation: (string & import("zod")
|
|
312
|
+
createdAtLocation: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
295
313
|
acceptedAt: string;
|
|
296
314
|
createdByRole: string;
|
|
297
315
|
createdBySignature: string | null | undefined;
|
|
@@ -301,7 +319,7 @@ export declare function getLegalStatuses(actions: Action[]): {
|
|
|
301
319
|
createdAt: string;
|
|
302
320
|
createdBy: string;
|
|
303
321
|
createdByUserType: "system" | "user";
|
|
304
|
-
createdAtLocation: (string & import("zod")
|
|
322
|
+
createdAtLocation: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
305
323
|
acceptedAt: string;
|
|
306
324
|
createdByRole: string;
|
|
307
325
|
createdBySignature: string | null | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UUID } from '../uuid';
|
|
2
2
|
import { ActionDocument, ActionUpdate } from './ActionDocument';
|
|
3
|
-
import { ApproveCorrectionActionInput, ArchiveActionInput, AssignActionInput, DeclareActionInput, MarkAsDuplicateActionInput, MarkNotDuplicateActionInput, NotifyActionInput, RegisterActionInput, RejectCorrectionActionInput, RejectDeclarationActionInput, RequestCorrectionActionInput, UnassignActionInput
|
|
3
|
+
import { ApproveCorrectionActionInput, ArchiveActionInput, AssignActionInput, DeclareActionInput, EditActionInput, MarkAsDuplicateActionInput, MarkNotDuplicateActionInput, NotifyActionInput, RegisterActionInput, RejectCorrectionActionInput, RejectDeclarationActionInput, RequestCorrectionActionInput, UnassignActionInput } from './ActionInput';
|
|
4
4
|
import { ActionType } from './ActionType';
|
|
5
5
|
import { Draft } from './Draft';
|
|
6
6
|
import { EventConfig } from './EventConfig';
|
|
@@ -10,7 +10,7 @@ import { EventInput } from './EventInput';
|
|
|
10
10
|
import { TranslationConfig } from './TranslationConfig';
|
|
11
11
|
import { FieldConfig } from './FieldConfig';
|
|
12
12
|
import { WorkqueueConfig } from './WorkqueueConfig';
|
|
13
|
-
import
|
|
13
|
+
import * as z from 'zod/v4';
|
|
14
14
|
/**
|
|
15
15
|
* IANA timezone used in testing. Used for queries that expect similar results independent of the users location (e.g. when event was registered.)
|
|
16
16
|
* Since we query by range, providing UTC offset will result to different results when DST changes during the range.
|
|
@@ -20,8 +20,17 @@ export declare const TEST_SYSTEM_IANA_TIMEZONE = "Asia/Dhaka";
|
|
|
20
20
|
* In real application, the roles are defined in the countryconfig.
|
|
21
21
|
* These are just for testing purposes to generate realistic mock data.
|
|
22
22
|
*/
|
|
23
|
-
export declare const TestUserRole: z.ZodEnum<
|
|
23
|
+
export declare const TestUserRole: z.ZodEnum<{
|
|
24
|
+
FIELD_AGENT: "FIELD_AGENT";
|
|
25
|
+
REGISTRATION_AGENT: "REGISTRATION_AGENT";
|
|
26
|
+
LOCAL_REGISTRAR: "LOCAL_REGISTRAR";
|
|
27
|
+
LOCAL_SYSTEM_ADMIN: "LOCAL_SYSTEM_ADMIN";
|
|
28
|
+
NATIONAL_SYSTEM_ADMIN: "NATIONAL_SYSTEM_ADMIN";
|
|
29
|
+
NATIONAL_REGISTRAR: "NATIONAL_REGISTRAR";
|
|
30
|
+
SOCIAL_WORKER: "SOCIAL_WORKER";
|
|
31
|
+
}>;
|
|
24
32
|
export type TestUserRole = z.infer<typeof TestUserRole>;
|
|
33
|
+
export declare function pickRandom<T>(rng: () => number, items: T[]): T;
|
|
25
34
|
export declare function generateRandomName(rng: () => number): {
|
|
26
35
|
firstname: string;
|
|
27
36
|
surname: string;
|
|
@@ -68,13 +77,15 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
68
77
|
eventId: string;
|
|
69
78
|
keepAssignment: boolean | undefined;
|
|
70
79
|
};
|
|
71
|
-
|
|
80
|
+
edit: (eventId: string, input?: Partial<Pick<EditActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
|
|
72
81
|
transactionId: string;
|
|
73
82
|
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
74
83
|
annotation: {};
|
|
75
84
|
keepAssignment?: boolean | undefined;
|
|
76
|
-
type: "
|
|
77
|
-
|
|
85
|
+
type: "EDIT";
|
|
86
|
+
content: {
|
|
87
|
+
comment: string;
|
|
88
|
+
};
|
|
78
89
|
eventId: string;
|
|
79
90
|
};
|
|
80
91
|
assign: (eventId: string, input?: Partial<Pick<AssignActionInput, "transactionId" | "assignedTo">>) => {
|
|
@@ -97,7 +108,6 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
97
108
|
keepAssignment?: boolean | undefined;
|
|
98
109
|
type: "ARCHIVE";
|
|
99
110
|
annotation: {};
|
|
100
|
-
duplicates: never[];
|
|
101
111
|
eventId: string;
|
|
102
112
|
content: {
|
|
103
113
|
reason: string;
|
|
@@ -109,7 +119,6 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
109
119
|
keepAssignment?: boolean | undefined;
|
|
110
120
|
type: "REJECT";
|
|
111
121
|
declaration: {};
|
|
112
|
-
duplicates: never[];
|
|
113
122
|
eventId: string;
|
|
114
123
|
content: {
|
|
115
124
|
reason: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function generateTransactionId(): string & import("zod")
|
|
1
|
+
export declare function generateTransactionId(): string & import("zod/v4").$brand<"UUID">;
|
|
2
2
|
//# sourceMappingURL=transactions.d.ts.map
|