@opencrvs/toolkit 1.9.7-rc.5cbeaf4 → 1.9.7-rc.672dd49
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 +2459 -29529
- package/dist/commons/conditionals/conditionals.d.ts +1 -10
- package/dist/commons/conditionals/validate.d.ts +4 -11
- package/dist/commons/events/ActionConfig.d.ts +1552 -24973
- package/dist/commons/events/ActionDocument.d.ts +1856 -803
- package/dist/commons/events/ActionInput.d.ts +1073 -277
- package/dist/commons/events/ActionType.d.ts +9 -86
- package/dist/commons/events/AdvancedSearchConfig.d.ts +1238 -228
- package/dist/commons/events/CompositeFieldValue.d.ts +190 -29
- package/dist/commons/events/Conditional.d.ts +38 -26
- package/dist/commons/events/Constants.d.ts +1 -1
- package/dist/commons/events/CountryConfigQueryInput.d.ts +4223 -1195
- package/dist/commons/events/CreatedAtLocation.d.ts +2 -0
- package/dist/commons/events/DeduplicationConfig.d.ts +171 -15
- package/dist/commons/events/Draft.d.ts +105 -70
- package/dist/commons/events/DynamicFieldValue.d.ts +91 -7
- package/dist/commons/events/EventConfig.d.ts +2120 -19932
- package/dist/commons/events/EventConfigInput.d.ts +1 -1
- package/dist/commons/events/EventDocument.d.ts +1332 -320
- package/dist/commons/events/EventIndex.d.ts +980 -193
- package/dist/commons/events/EventInput.d.ts +8 -3
- package/dist/commons/events/EventMetadata.d.ts +347 -106
- package/dist/commons/events/FieldConfig.d.ts +12296 -4517
- package/dist/commons/events/FieldType.d.ts +4 -20
- package/dist/commons/events/FieldTypeMapping.d.ts +897 -193
- package/dist/commons/events/FieldValue.d.ts +396 -87
- package/dist/commons/events/FormConfig.d.ts +721 -13980
- package/dist/commons/events/PageConfig.d.ts +319 -9340
- package/dist/commons/events/SummaryConfig.d.ts +161 -14
- package/dist/commons/events/TemplateConfig.d.ts +3 -2
- package/dist/commons/events/TranslationConfig.d.ts +2 -2
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +37 -74
- package/dist/commons/events/WorkqueueConfig.d.ts +7131 -1819
- package/dist/commons/events/deduplication.d.ts +3 -3
- package/dist/commons/events/defineConfig.d.ts +162 -26578
- package/dist/commons/events/index.d.ts +0 -1
- package/dist/commons/events/locations.d.ts +19 -26
- package/dist/commons/events/scopes.d.ts +4 -5
- package/dist/commons/events/state/availableActions.d.ts +2 -0
- package/dist/commons/events/state/flags.d.ts +3 -21
- package/dist/commons/events/state/index.d.ts +19 -22
- package/dist/commons/events/state/utils.d.ts +112 -130
- package/dist/commons/events/test.utils.d.ts +8 -31
- package/dist/commons/events/transactions.d.ts +1 -1
- package/dist/commons/events/utils.d.ts +381 -53178
- package/dist/commons/notification/UserNotifications.d.ts +636 -55
- package/dist/conditionals/index.d.ts.map +1 -1
- package/dist/conditionals/index.js +11 -45
- package/dist/events/deduplication.d.ts +3 -3
- package/dist/events/index.js +1719 -2044
- package/dist/notification/index.d.ts.map +1 -1
- package/dist/notification/index.js +1505 -1589
- package/dist/scopes/index.d.ts +132 -167
- package/dist/scopes/index.d.ts.map +1 -1
- package/dist/scopes/index.js +94 -133
- package/package.json +5 -5
- package/dist/commons/events/Flag.d.ts +0 -67
- package/dist/commons/events/eventConfigValidation.d.ts +0 -8
|
@@ -7,298 +7,280 @@ import { Action } from '../ActionDocument';
|
|
|
7
7
|
*
|
|
8
8
|
* */
|
|
9
9
|
export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
|
|
10
|
-
|
|
10
|
+
type: "ASSIGN";
|
|
11
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
12
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
11
13
|
transactionId: string;
|
|
12
14
|
createdByUserType: "system" | "user";
|
|
13
15
|
createdAt: string;
|
|
14
16
|
createdBy: string;
|
|
15
17
|
createdByRole: string;
|
|
16
18
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
17
|
-
|
|
18
|
-
type: "REGISTER";
|
|
19
|
+
assignedTo: string;
|
|
19
20
|
createdBySignature?: string | null | undefined;
|
|
20
|
-
createdAtLocation?: (string & import("zod")
|
|
21
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
21
22
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
22
|
-
originalActionId?: (string & import("zod")
|
|
23
|
-
registrationNumber?: string | undefined;
|
|
23
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
24
24
|
} | {
|
|
25
|
-
|
|
25
|
+
type: "UNASSIGN";
|
|
26
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
27
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
26
28
|
transactionId: string;
|
|
27
29
|
createdByUserType: "system" | "user";
|
|
28
30
|
createdAt: string;
|
|
29
31
|
createdBy: string;
|
|
30
32
|
createdByRole: string;
|
|
31
33
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
32
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
33
|
-
type: "DUPLICATE_DETECTED";
|
|
34
|
-
content: {
|
|
35
|
-
duplicates: {
|
|
36
|
-
id: string & import("zod").$brand<"UUID">;
|
|
37
|
-
trackingId: string;
|
|
38
|
-
}[];
|
|
39
|
-
};
|
|
40
34
|
createdBySignature?: string | null | undefined;
|
|
41
|
-
createdAtLocation?: (string & import("zod")
|
|
35
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
42
36
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
43
|
-
originalActionId?: (string & import("zod")
|
|
37
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
44
38
|
} | {
|
|
45
|
-
|
|
39
|
+
type: "REGISTER";
|
|
40
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
41
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
46
42
|
transactionId: string;
|
|
47
43
|
createdByUserType: "system" | "user";
|
|
48
44
|
createdAt: string;
|
|
49
45
|
createdBy: string;
|
|
50
46
|
createdByRole: string;
|
|
51
47
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
52
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
53
|
-
type: "EDIT";
|
|
54
|
-
content: {
|
|
55
|
-
comment?: string | undefined;
|
|
56
|
-
};
|
|
57
48
|
createdBySignature?: string | null | undefined;
|
|
58
|
-
createdAtLocation?: (string & import("zod")
|
|
49
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
59
50
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
60
|
-
originalActionId?: (string & import("zod")
|
|
51
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
52
|
+
registrationNumber?: string | undefined;
|
|
61
53
|
} | {
|
|
62
|
-
|
|
54
|
+
type: "DECLARE";
|
|
55
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
56
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
63
57
|
transactionId: string;
|
|
64
58
|
createdByUserType: "system" | "user";
|
|
65
59
|
createdAt: string;
|
|
66
60
|
createdBy: string;
|
|
67
61
|
createdByRole: string;
|
|
68
62
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
69
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
70
|
-
type: "PRINT_CERTIFICATE";
|
|
71
63
|
createdBySignature?: string | null | undefined;
|
|
72
|
-
createdAtLocation?: (string & import("zod")
|
|
64
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
73
65
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
74
|
-
originalActionId?: (string & import("zod")
|
|
75
|
-
content?: {
|
|
76
|
-
templateId?: string | undefined;
|
|
77
|
-
} | null | undefined;
|
|
66
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
78
67
|
} | {
|
|
79
|
-
|
|
68
|
+
type: "VALIDATE";
|
|
69
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
70
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
80
71
|
transactionId: string;
|
|
81
72
|
createdByUserType: "system" | "user";
|
|
82
73
|
createdAt: string;
|
|
83
74
|
createdBy: string;
|
|
84
75
|
createdByRole: string;
|
|
85
76
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
86
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
87
|
-
type: "REQUEST_CORRECTION";
|
|
88
77
|
createdBySignature?: string | null | undefined;
|
|
89
|
-
createdAtLocation?: (string & import("zod")
|
|
78
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
90
79
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
91
|
-
originalActionId?: (string & import("zod")
|
|
80
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
92
81
|
} | {
|
|
93
|
-
|
|
82
|
+
type: "REJECT";
|
|
83
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
84
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
85
|
+
content: {
|
|
86
|
+
reason: string;
|
|
87
|
+
};
|
|
94
88
|
transactionId: string;
|
|
95
89
|
createdByUserType: "system" | "user";
|
|
96
90
|
createdAt: string;
|
|
97
91
|
createdBy: string;
|
|
98
92
|
createdByRole: string;
|
|
99
93
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
100
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
101
|
-
type: "CUSTOM";
|
|
102
|
-
customActionType: string;
|
|
103
94
|
createdBySignature?: string | null | undefined;
|
|
104
|
-
createdAtLocation?: (string & import("zod")
|
|
95
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
105
96
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
106
|
-
originalActionId?: (string & import("zod")
|
|
97
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
107
98
|
} | {
|
|
108
|
-
|
|
99
|
+
type: "DUPLICATE_DETECTED";
|
|
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
|
+
};
|
|
109
108
|
transactionId: string;
|
|
110
109
|
createdByUserType: "system" | "user";
|
|
111
110
|
createdAt: string;
|
|
112
111
|
createdBy: string;
|
|
113
112
|
createdByRole: string;
|
|
114
113
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
115
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
116
|
-
type: "CREATE";
|
|
117
114
|
createdBySignature?: string | null | undefined;
|
|
118
|
-
createdAtLocation?: (string & import("zod")
|
|
115
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
119
116
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
120
|
-
originalActionId?: (string & import("zod")
|
|
117
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
121
118
|
} | {
|
|
122
|
-
|
|
119
|
+
type: "MARK_AS_NOT_DUPLICATE";
|
|
120
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
121
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
123
122
|
transactionId: string;
|
|
124
123
|
createdByUserType: "system" | "user";
|
|
125
124
|
createdAt: string;
|
|
126
125
|
createdBy: string;
|
|
127
126
|
createdByRole: string;
|
|
128
127
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
129
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
130
|
-
type: "REJECT";
|
|
131
|
-
content: {
|
|
132
|
-
reason: string;
|
|
133
|
-
};
|
|
134
128
|
createdBySignature?: string | null | undefined;
|
|
135
|
-
createdAtLocation?: (string & import("zod")
|
|
129
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
136
130
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
137
|
-
originalActionId?: (string & import("zod")
|
|
131
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
138
132
|
} | {
|
|
139
|
-
|
|
133
|
+
type: "MARK_AS_DUPLICATE";
|
|
134
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
135
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
140
136
|
transactionId: string;
|
|
141
137
|
createdByUserType: "system" | "user";
|
|
142
138
|
createdAt: string;
|
|
143
139
|
createdBy: string;
|
|
144
140
|
createdByRole: string;
|
|
145
141
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
146
|
-
|
|
147
|
-
|
|
142
|
+
content?: {
|
|
143
|
+
duplicateOf: string & import("zod").BRAND<"UUID">;
|
|
144
|
+
} | undefined;
|
|
148
145
|
createdBySignature?: string | null | undefined;
|
|
149
|
-
createdAtLocation?: (string & import("zod")
|
|
146
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
150
147
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
151
|
-
originalActionId?: (string & import("zod")
|
|
148
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
152
149
|
} | {
|
|
153
|
-
|
|
150
|
+
type: "ARCHIVE";
|
|
151
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
152
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
153
|
+
content: {
|
|
154
|
+
reason: string;
|
|
155
|
+
};
|
|
154
156
|
transactionId: string;
|
|
155
157
|
createdByUserType: "system" | "user";
|
|
156
158
|
createdAt: string;
|
|
157
159
|
createdBy: string;
|
|
158
160
|
createdByRole: string;
|
|
159
161
|
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").BRAND<"UUID">) | null | undefined;
|
|
164
164
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
165
|
-
originalActionId?: (string & import("zod")
|
|
166
|
-
content?: {
|
|
167
|
-
duplicateOf: string & import("zod").$brand<"UUID">;
|
|
168
|
-
} | undefined;
|
|
165
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
169
166
|
} | {
|
|
170
|
-
|
|
167
|
+
type: "CREATE";
|
|
168
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
169
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
171
170
|
transactionId: string;
|
|
172
171
|
createdByUserType: "system" | "user";
|
|
173
172
|
createdAt: string;
|
|
174
173
|
createdBy: string;
|
|
175
174
|
createdByRole: string;
|
|
176
175
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
177
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
178
|
-
type: "ARCHIVE";
|
|
179
|
-
content: {
|
|
180
|
-
reason: string;
|
|
181
|
-
};
|
|
182
176
|
createdBySignature?: string | null | undefined;
|
|
183
|
-
createdAtLocation?: (string & import("zod")
|
|
177
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
184
178
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
185
|
-
originalActionId?: (string & import("zod")
|
|
179
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
186
180
|
} | {
|
|
187
|
-
|
|
181
|
+
type: "NOTIFY";
|
|
182
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
183
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
188
184
|
transactionId: string;
|
|
189
185
|
createdByUserType: "system" | "user";
|
|
190
186
|
createdAt: string;
|
|
191
187
|
createdBy: string;
|
|
192
188
|
createdByRole: string;
|
|
193
189
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
194
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
195
|
-
type: "NOTIFY";
|
|
196
190
|
createdBySignature?: string | null | undefined;
|
|
197
|
-
createdAtLocation?: (string & import("zod")
|
|
191
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
198
192
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
199
|
-
originalActionId?: (string & import("zod")
|
|
193
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
200
194
|
} | {
|
|
201
|
-
|
|
195
|
+
type: "PRINT_CERTIFICATE";
|
|
196
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
197
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
202
198
|
transactionId: string;
|
|
203
199
|
createdByUserType: "system" | "user";
|
|
204
200
|
createdAt: string;
|
|
205
201
|
createdBy: string;
|
|
206
202
|
createdByRole: string;
|
|
207
203
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
208
|
-
|
|
209
|
-
|
|
204
|
+
content?: {
|
|
205
|
+
templateId?: string | undefined;
|
|
206
|
+
} | null | undefined;
|
|
210
207
|
createdBySignature?: string | null | undefined;
|
|
211
|
-
createdAtLocation?: (string & import("zod")
|
|
208
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
212
209
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
213
|
-
originalActionId?: (string & import("zod")
|
|
210
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
214
211
|
} | {
|
|
215
|
-
|
|
212
|
+
type: "REQUEST_CORRECTION";
|
|
213
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
214
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
216
215
|
transactionId: string;
|
|
217
216
|
createdByUserType: "system" | "user";
|
|
218
217
|
createdAt: string;
|
|
219
218
|
createdBy: string;
|
|
220
219
|
createdByRole: string;
|
|
221
220
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
222
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
223
|
-
type: "ASSIGN";
|
|
224
|
-
assignedTo: string;
|
|
225
221
|
createdBySignature?: string | null | undefined;
|
|
226
|
-
createdAtLocation?: (string & import("zod")
|
|
222
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
227
223
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
228
|
-
originalActionId?: (string & import("zod")
|
|
224
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
229
225
|
} | {
|
|
230
|
-
|
|
226
|
+
type: "APPROVE_CORRECTION";
|
|
227
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
228
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
231
229
|
transactionId: string;
|
|
232
230
|
createdByUserType: "system" | "user";
|
|
233
231
|
createdAt: string;
|
|
234
232
|
createdBy: string;
|
|
235
233
|
createdByRole: string;
|
|
236
234
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
237
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
238
|
-
type: "APPROVE_CORRECTION";
|
|
239
235
|
requestId: string;
|
|
240
236
|
createdBySignature?: string | null | undefined;
|
|
241
|
-
createdAtLocation?: (string & import("zod")
|
|
237
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
242
238
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
243
|
-
originalActionId?: (string & import("zod")
|
|
239
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
244
240
|
} | {
|
|
245
|
-
id: string & import("zod").$brand<"UUID">;
|
|
246
|
-
transactionId: string;
|
|
247
|
-
createdByUserType: "system" | "user";
|
|
248
|
-
createdAt: string;
|
|
249
|
-
createdBy: string;
|
|
250
|
-
createdByRole: string;
|
|
251
|
-
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
252
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
253
241
|
type: "REJECT_CORRECTION";
|
|
254
|
-
|
|
242
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
243
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
255
244
|
content: {
|
|
256
245
|
reason: string;
|
|
257
246
|
};
|
|
258
|
-
createdBySignature?: string | null | undefined;
|
|
259
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
260
|
-
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
261
|
-
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
262
|
-
} | {
|
|
263
|
-
id: string & import("zod").$brand<"UUID">;
|
|
264
247
|
transactionId: string;
|
|
265
248
|
createdByUserType: "system" | "user";
|
|
266
249
|
createdAt: string;
|
|
267
250
|
createdBy: string;
|
|
268
251
|
createdByRole: string;
|
|
269
252
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
270
|
-
|
|
271
|
-
type: "UNASSIGN";
|
|
253
|
+
requestId: string;
|
|
272
254
|
createdBySignature?: string | null | undefined;
|
|
273
|
-
createdAtLocation?: (string & import("zod")
|
|
255
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
274
256
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
275
|
-
originalActionId?: (string & import("zod")
|
|
257
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
276
258
|
} | {
|
|
277
|
-
|
|
259
|
+
type: "READ";
|
|
260
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
261
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
278
262
|
transactionId: string;
|
|
279
263
|
createdByUserType: "system" | "user";
|
|
280
264
|
createdAt: string;
|
|
281
265
|
createdBy: string;
|
|
282
266
|
createdByRole: string;
|
|
283
267
|
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
284
|
-
status: "Rejected" | "Requested" | "Accepted";
|
|
285
|
-
type: "READ";
|
|
286
268
|
createdBySignature?: string | null | undefined;
|
|
287
|
-
createdAtLocation?: (string & import("zod")
|
|
269
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
288
270
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
289
|
-
originalActionId?: (string & import("zod")
|
|
271
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
290
272
|
} | {
|
|
291
|
-
|
|
273
|
+
type: "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
|
|
274
|
+
id: string & import("zod").BRAND<"UUID">;
|
|
275
|
+
status: "Rejected";
|
|
292
276
|
transactionId: string;
|
|
293
277
|
createdByUserType: "system" | "user";
|
|
294
278
|
createdAt: string;
|
|
295
279
|
createdBy: string;
|
|
296
280
|
createdByRole: string;
|
|
297
|
-
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
298
|
-
status: "Rejected";
|
|
299
281
|
createdBySignature?: string | null | undefined;
|
|
300
|
-
createdAtLocation?: (string & import("zod")
|
|
301
|
-
originalActionId?: (string & import("zod")
|
|
282
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
283
|
+
originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
302
284
|
}>;
|
|
303
285
|
/**
|
|
304
286
|
* @returns the legal statuses of the event. Event is considered legal if it has been accepted.
|
|
@@ -309,7 +291,7 @@ export declare function getLegalStatuses(actions: Action[]): {
|
|
|
309
291
|
createdAt: string;
|
|
310
292
|
createdBy: string;
|
|
311
293
|
createdByUserType: "system" | "user";
|
|
312
|
-
createdAtLocation: (string & import("zod")
|
|
294
|
+
createdAtLocation: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
313
295
|
acceptedAt: string;
|
|
314
296
|
createdByRole: string;
|
|
315
297
|
createdBySignature: string | null | undefined;
|
|
@@ -319,7 +301,7 @@ export declare function getLegalStatuses(actions: Action[]): {
|
|
|
319
301
|
createdAt: string;
|
|
320
302
|
createdBy: string;
|
|
321
303
|
createdByUserType: "system" | "user";
|
|
322
|
-
createdAtLocation: (string & import("zod")
|
|
304
|
+
createdAtLocation: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
323
305
|
acceptedAt: string;
|
|
324
306
|
createdByRole: string;
|
|
325
307
|
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,
|
|
3
|
+
import { ApproveCorrectionActionInput, ArchiveActionInput, AssignActionInput, DeclareActionInput, 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 { z } from 'zod';
|
|
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,17 +20,8 @@ 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<
|
|
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
|
-
}>;
|
|
23
|
+
export declare const TestUserRole: z.ZodEnum<["FIELD_AGENT", "LOCAL_REGISTRAR", "LOCAL_SYSTEM_ADMIN", "NATIONAL_REGISTRAR", "REGISTRATION_AGENT", "NATIONAL_SYSTEM_ADMIN", "SOCIAL_WORKER"]>;
|
|
32
24
|
export type TestUserRole = z.infer<typeof TestUserRole>;
|
|
33
|
-
export declare function pickRandom<T>(rng: () => number, items: T[]): T;
|
|
34
25
|
export declare function generateRandomName(rng: () => number): {
|
|
35
26
|
firstname: string;
|
|
36
27
|
surname: string;
|
|
@@ -77,15 +68,13 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
77
68
|
eventId: string;
|
|
78
69
|
keepAssignment: boolean | undefined;
|
|
79
70
|
};
|
|
80
|
-
|
|
71
|
+
validate: (eventId: string, input?: Partial<Pick<ValidateActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
|
|
81
72
|
transactionId: string;
|
|
82
73
|
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
83
74
|
annotation: {};
|
|
84
75
|
keepAssignment?: boolean | undefined;
|
|
85
|
-
type: "
|
|
86
|
-
|
|
87
|
-
comment: string;
|
|
88
|
-
};
|
|
76
|
+
type: "VALIDATE";
|
|
77
|
+
duplicates: never[];
|
|
89
78
|
eventId: string;
|
|
90
79
|
};
|
|
91
80
|
assign: (eventId: string, input?: Partial<Pick<AssignActionInput, "transactionId" | "assignedTo">>) => {
|
|
@@ -108,6 +97,7 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
108
97
|
keepAssignment?: boolean | undefined;
|
|
109
98
|
type: "ARCHIVE";
|
|
110
99
|
annotation: {};
|
|
100
|
+
duplicates: never[];
|
|
111
101
|
eventId: string;
|
|
112
102
|
content: {
|
|
113
103
|
reason: string;
|
|
@@ -119,6 +109,7 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
119
109
|
keepAssignment?: boolean | undefined;
|
|
120
110
|
type: "REJECT";
|
|
121
111
|
declaration: {};
|
|
112
|
+
duplicates: never[];
|
|
122
113
|
eventId: string;
|
|
123
114
|
content: {
|
|
124
115
|
reason: string;
|
|
@@ -254,18 +245,4 @@ export declare const BearerTokenByUserType: {
|
|
|
254
245
|
localRegistrar: string;
|
|
255
246
|
};
|
|
256
247
|
export declare const generateWorkqueues: (slug?: string) => WorkqueueConfig[];
|
|
257
|
-
/**
|
|
258
|
-
* Backend focused event config generator for testing fields in a lightweight way.
|
|
259
|
-
*
|
|
260
|
-
* @param id - The unique identifier for the event.
|
|
261
|
-
* @param fields - Field configurations to include in the event declaration. Everything in a single page.
|
|
262
|
-
* @param placeOfEventId - Optional place of event field id.
|
|
263
|
-
* @param dateOfEventId - Optional date of event field id.
|
|
264
|
-
*/
|
|
265
|
-
export declare const generateEventConfig: ({ id, fields, placeOfEventId, dateOfEventId }: {
|
|
266
|
-
id: string;
|
|
267
|
-
fields: FieldConfig[];
|
|
268
|
-
placeOfEventId?: string;
|
|
269
|
-
dateOfEventId?: string;
|
|
270
|
-
}) => EventConfig;
|
|
271
248
|
//# sourceMappingURL=test.utils.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function generateTransactionId(): string & import("zod")
|
|
1
|
+
export declare function generateTransactionId(): string & import("zod").BRAND<"UUID">;
|
|
2
2
|
//# sourceMappingURL=transactions.d.ts.map
|