@opencrvs/toolkit 1.9.3-rc.c5b6285 → 1.9.3-rc.da977ad
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 +28089 -2317
- 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 +23121 -1547
- package/dist/commons/events/ActionDocument.d.ts +840 -1849
- package/dist/commons/events/ActionInput.d.ts +290 -1066
- package/dist/commons/events/ActionType.d.ts +91 -8
- package/dist/commons/events/AdvancedSearchConfig.d.ts +222 -1238
- package/dist/commons/events/CompositeFieldValue.d.ts +25 -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 +72 -105
- package/dist/commons/events/DynamicFieldValue.d.ts +7 -91
- package/dist/commons/events/EventConfig.d.ts +18321 -2120
- package/dist/commons/events/EventConfigInput.d.ts +1 -1
- package/dist/commons/events/EventDocument.d.ts +336 -1326
- 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 +4173 -11778
- package/dist/commons/events/FieldType.d.ts +9 -4
- package/dist/commons/events/FieldTypeMapping.d.ts +172 -811
- package/dist/commons/events/FieldValue.d.ts +82 -355
- package/dist/commons/events/Flag.d.ts +70 -0
- package/dist/commons/events/FormConfig.d.ts +12876 -721
- package/dist/commons/events/PageConfig.d.ts +8604 -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 +1695 -7156
- package/dist/commons/events/deduplication.d.ts +3 -3
- package/dist/commons/events/defineConfig.d.ts +25160 -152
- 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 +3 -1
- 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 +142 -110
- package/dist/commons/events/test.utils.d.ts +23 -6
- package/dist/commons/events/transactions.d.ts +1 -1
- package/dist/commons/events/utils.d.ts +50372 -361
- 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 +1813 -1709
- package/dist/notification/index.d.ts.map +1 -1
- package/dist/notification/index.js +1462 -1602
- package/dist/scopes/index.d.ts +138 -138
- package/dist/scopes/index.d.ts.map +1 -1
- package/dist/scopes/index.js +123 -93
- package/package.json +5 -5
|
@@ -7,280 +7,312 @@ 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: "VALIDATE";
|
|
128
131
|
createdBySignature?: string | null | undefined;
|
|
129
|
-
createdAtLocation?: (string & import("zod")
|
|
132
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
130
133
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
131
|
-
originalActionId?: (string & import("zod")
|
|
134
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
132
135
|
} | {
|
|
133
|
-
|
|
134
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
135
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
136
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
136
137
|
transactionId: string;
|
|
137
138
|
createdByUserType: "system" | "user";
|
|
138
139
|
createdAt: string;
|
|
139
140
|
createdBy: string;
|
|
140
141
|
createdByRole: string;
|
|
141
142
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
142
|
-
content?: {
|
|
143
|
-
duplicateOf: string & import("zod").BRAND<"UUID">;
|
|
144
|
-
} | undefined;
|
|
145
|
-
createdBySignature?: string | null | undefined;
|
|
146
|
-
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
147
|
-
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
148
|
-
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
149
|
-
} | {
|
|
150
|
-
type: "ARCHIVE";
|
|
151
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
152
143
|
status: "Rejected" | "Requested" | "Accepted";
|
|
144
|
+
type: "REJECT";
|
|
153
145
|
content: {
|
|
154
146
|
reason: string;
|
|
155
147
|
};
|
|
148
|
+
createdBySignature?: string | null | undefined;
|
|
149
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
150
|
+
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
151
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
152
|
+
} | {
|
|
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_NOT_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
166
|
} | {
|
|
167
|
-
|
|
168
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
169
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
167
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
170
168
|
transactionId: string;
|
|
171
169
|
createdByUserType: "system" | "user";
|
|
172
170
|
createdAt: string;
|
|
173
171
|
createdBy: string;
|
|
174
172
|
createdByRole: string;
|
|
175
173
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
174
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
175
|
+
type: "MARK_AS_DUPLICATE";
|
|
176
176
|
createdBySignature?: string | null | undefined;
|
|
177
|
-
createdAtLocation?: (string & import("zod")
|
|
177
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
178
178
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
179
|
-
originalActionId?: (string & import("zod")
|
|
179
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
180
|
+
content?: {
|
|
181
|
+
duplicateOf: string & import("zod/v4").$brand<"UUID">;
|
|
182
|
+
} | undefined;
|
|
180
183
|
} | {
|
|
181
|
-
|
|
182
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
183
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
184
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
184
185
|
transactionId: string;
|
|
185
186
|
createdByUserType: "system" | "user";
|
|
186
187
|
createdAt: string;
|
|
187
188
|
createdBy: string;
|
|
188
189
|
createdByRole: string;
|
|
189
190
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
191
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
192
|
+
type: "ARCHIVE";
|
|
193
|
+
content: {
|
|
194
|
+
reason: string;
|
|
195
|
+
};
|
|
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: "NOTIFY";
|
|
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: "DECLARE";
|
|
221
224
|
createdBySignature?: string | null | undefined;
|
|
222
|
-
createdAtLocation?: (string & import("zod")
|
|
225
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
223
226
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
224
|
-
originalActionId?: (string & import("zod")
|
|
227
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
225
228
|
} | {
|
|
226
|
-
|
|
227
|
-
|
|
229
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
230
|
+
transactionId: string;
|
|
231
|
+
createdByUserType: "system" | "user";
|
|
232
|
+
createdAt: string;
|
|
233
|
+
createdBy: string;
|
|
234
|
+
createdByRole: string;
|
|
235
|
+
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
228
236
|
status: "Rejected" | "Requested" | "Accepted";
|
|
237
|
+
type: "ASSIGN";
|
|
238
|
+
assignedTo: string;
|
|
239
|
+
createdBySignature?: string | null | undefined;
|
|
240
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
241
|
+
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
242
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
243
|
+
} | {
|
|
244
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
229
245
|
transactionId: string;
|
|
230
246
|
createdByUserType: "system" | "user";
|
|
231
247
|
createdAt: string;
|
|
232
248
|
createdBy: string;
|
|
233
249
|
createdByRole: string;
|
|
234
250
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
251
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
252
|
+
type: "APPROVE_CORRECTION";
|
|
235
253
|
requestId: string;
|
|
236
254
|
createdBySignature?: string | null | undefined;
|
|
237
|
-
createdAtLocation?: (string & import("zod")
|
|
255
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
238
256
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
239
|
-
originalActionId?: (string & import("zod")
|
|
257
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
240
258
|
} | {
|
|
241
|
-
|
|
242
|
-
|
|
259
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
260
|
+
transactionId: string;
|
|
261
|
+
createdByUserType: "system" | "user";
|
|
262
|
+
createdAt: string;
|
|
263
|
+
createdBy: string;
|
|
264
|
+
createdByRole: string;
|
|
265
|
+
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
243
266
|
status: "Rejected" | "Requested" | "Accepted";
|
|
267
|
+
type: "REJECT_CORRECTION";
|
|
268
|
+
requestId: string;
|
|
244
269
|
content: {
|
|
245
270
|
reason: string;
|
|
246
271
|
};
|
|
272
|
+
createdBySignature?: string | null | undefined;
|
|
273
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
274
|
+
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
275
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
276
|
+
} | {
|
|
277
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
247
278
|
transactionId: string;
|
|
248
279
|
createdByUserType: "system" | "user";
|
|
249
280
|
createdAt: string;
|
|
250
281
|
createdBy: string;
|
|
251
282
|
createdByRole: string;
|
|
252
283
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
253
|
-
|
|
284
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
285
|
+
type: "UNASSIGN";
|
|
254
286
|
createdBySignature?: string | null | undefined;
|
|
255
|
-
createdAtLocation?: (string & import("zod")
|
|
287
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
256
288
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
257
|
-
originalActionId?: (string & import("zod")
|
|
289
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
258
290
|
} | {
|
|
259
|
-
|
|
260
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
261
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
291
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
262
292
|
transactionId: string;
|
|
263
293
|
createdByUserType: "system" | "user";
|
|
264
294
|
createdAt: string;
|
|
265
295
|
createdBy: string;
|
|
266
296
|
createdByRole: string;
|
|
267
297
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
298
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
299
|
+
type: "READ";
|
|
268
300
|
createdBySignature?: string | null | undefined;
|
|
269
|
-
createdAtLocation?: (string & import("zod")
|
|
301
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
270
302
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
271
|
-
originalActionId?: (string & import("zod")
|
|
303
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
272
304
|
} | {
|
|
273
|
-
|
|
274
|
-
id: string & import("zod").BRAND<"UUID">;
|
|
275
|
-
status: "Rejected";
|
|
305
|
+
id: string & import("zod/v4").$brand<"UUID">;
|
|
276
306
|
transactionId: string;
|
|
277
307
|
createdByUserType: "system" | "user";
|
|
278
308
|
createdAt: string;
|
|
279
309
|
createdBy: string;
|
|
280
310
|
createdByRole: string;
|
|
311
|
+
type: "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
312
|
+
status: "Rejected";
|
|
281
313
|
createdBySignature?: string | null | undefined;
|
|
282
|
-
createdAtLocation?: (string & import("zod")
|
|
283
|
-
originalActionId?: (string & import("zod")
|
|
314
|
+
createdAtLocation?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
315
|
+
originalActionId?: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
284
316
|
}>;
|
|
285
317
|
/**
|
|
286
318
|
* @returns the legal statuses of the event. Event is considered legal if it has been accepted.
|
|
@@ -291,7 +323,7 @@ export declare function getLegalStatuses(actions: Action[]): {
|
|
|
291
323
|
createdAt: string;
|
|
292
324
|
createdBy: string;
|
|
293
325
|
createdByUserType: "system" | "user";
|
|
294
|
-
createdAtLocation: (string & import("zod")
|
|
326
|
+
createdAtLocation: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
295
327
|
acceptedAt: string;
|
|
296
328
|
createdByRole: string;
|
|
297
329
|
createdBySignature: string | null | undefined;
|
|
@@ -301,7 +333,7 @@ export declare function getLegalStatuses(actions: Action[]): {
|
|
|
301
333
|
createdAt: string;
|
|
302
334
|
createdBy: string;
|
|
303
335
|
createdByUserType: "system" | "user";
|
|
304
|
-
createdAtLocation: (string & import("zod")
|
|
336
|
+
createdAtLocation: (string & import("zod/v4").$brand<"UUID">) | null | undefined;
|
|
305
337
|
acceptedAt: string;
|
|
306
338
|
createdByRole: string;
|
|
307
339
|
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, ValidateActionInput } from './ActionInput';
|
|
3
|
+
import { ApproveCorrectionActionInput, ArchiveActionInput, AssignActionInput, DeclareActionInput, EditActionInput, MarkAsDuplicateActionInput, MarkNotDuplicateActionInput, NotifyActionInput, RegisterActionInput, RejectCorrectionActionInput, RejectDeclarationActionInput, RequestCorrectionActionInput, UnassignActionInput, ValidateActionInput } 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,23 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
68
77
|
eventId: string;
|
|
69
78
|
keepAssignment: boolean | undefined;
|
|
70
79
|
};
|
|
80
|
+
edit: (eventId: string, input?: Partial<Pick<EditActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
|
|
81
|
+
transactionId: string;
|
|
82
|
+
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
83
|
+
annotation: {};
|
|
84
|
+
keepAssignment?: boolean | undefined;
|
|
85
|
+
type: "EDIT";
|
|
86
|
+
content: {
|
|
87
|
+
comment: string;
|
|
88
|
+
};
|
|
89
|
+
eventId: string;
|
|
90
|
+
};
|
|
71
91
|
validate: (eventId: string, input?: Partial<Pick<ValidateActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
|
|
72
92
|
transactionId: string;
|
|
73
93
|
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
74
94
|
annotation: {};
|
|
75
95
|
keepAssignment?: boolean | undefined;
|
|
76
96
|
type: "VALIDATE";
|
|
77
|
-
duplicates: never[];
|
|
78
97
|
eventId: string;
|
|
79
98
|
};
|
|
80
99
|
assign: (eventId: string, input?: Partial<Pick<AssignActionInput, "transactionId" | "assignedTo">>) => {
|
|
@@ -97,7 +116,6 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
97
116
|
keepAssignment?: boolean | undefined;
|
|
98
117
|
type: "ARCHIVE";
|
|
99
118
|
annotation: {};
|
|
100
|
-
duplicates: never[];
|
|
101
119
|
eventId: string;
|
|
102
120
|
content: {
|
|
103
121
|
reason: string;
|
|
@@ -109,7 +127,6 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
109
127
|
keepAssignment?: boolean | undefined;
|
|
110
128
|
type: "REJECT";
|
|
111
129
|
declaration: {};
|
|
112
|
-
duplicates: never[];
|
|
113
130
|
eventId: string;
|
|
114
131
|
content: {
|
|
115
132
|
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
|