@opencrvs/toolkit 1.8.0-rc.fc43738 → 1.8.0-rc.fc76588
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/README.md +1 -1
- package/dist/commons/api/router.d.ts +17499 -10858
- package/dist/commons/conditionals/conditionals.d.ts +39 -8
- package/dist/commons/conditionals/validate-address.test.d.ts +2 -0
- package/dist/commons/conditionals/validate.d.ts +50 -22
- package/dist/commons/conditionals/validate.test.d.ts +2 -0
- package/dist/commons/events/ActionConfig.d.ts +116822 -2084
- package/dist/commons/events/ActionDocument.d.ts +12597 -1492
- package/dist/commons/events/ActionInput.d.ts +8325 -2272
- package/dist/commons/events/ActionType.d.ts +31 -12
- package/dist/commons/events/AdvancedSearchConfig.d.ts +1029 -22
- package/dist/commons/events/CompositeFieldValue.d.ts +445 -0
- package/dist/commons/events/Conditional.d.ts +21 -5
- package/dist/commons/events/Constants.d.ts +3 -0
- package/dist/commons/events/CountryConfigQueryInput.d.ts +2982 -0
- package/dist/commons/events/CreatedAtLocation.d.ts +2 -0
- package/dist/commons/events/Draft.d.ts +631 -217
- package/dist/commons/events/EventConfig.d.ts +56160 -1824
- package/dist/commons/events/EventConfigInput.d.ts +6 -3
- package/dist/commons/events/EventDocument.d.ts +5979 -1899
- package/dist/commons/events/EventIndex.d.ts +1595 -27
- package/dist/commons/events/EventMetadata.d.ts +304 -45
- package/dist/commons/events/FieldConfig.d.ts +5822 -969
- package/dist/commons/events/FieldType.d.ts +10 -2
- package/dist/commons/events/FieldTypeMapping.d.ts +335 -51
- package/dist/commons/events/FieldValue.d.ts +177 -65
- package/dist/commons/events/FormConfig.d.ts +49317 -90
- package/dist/commons/events/PageConfig.d.ts +12337 -0
- package/dist/commons/events/SummaryConfig.d.ts +93 -42
- package/dist/commons/events/TemplateConfig.d.ts +38 -0
- package/dist/commons/events/User.d.ts +31 -2
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +53 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +4803 -20
- package/dist/commons/events/defineConfig.d.ts +9111 -307
- package/dist/commons/events/event.d.ts +54 -0
- package/dist/commons/events/field.d.ts +77 -0
- package/dist/commons/events/index.d.ts +11 -1
- package/dist/commons/events/scopes.d.ts +45 -0
- package/dist/commons/events/serializer.d.ts +2 -0
- package/dist/commons/events/test.utils.d.ts +262 -259
- package/dist/commons/events/transactions.d.ts +1 -1
- package/dist/commons/events/utils.d.ts +13481 -70
- package/dist/commons/events/utils.test.d.ts +2 -0
- package/dist/commons/events/workqueueDefaultColumns.d.ts +3 -0
- package/dist/conditionals/index.js +233 -108
- package/dist/events/index.js +4955 -1910
- package/dist/scopes/index.d.ts +158 -1
- package/dist/scopes/index.js +152 -1
- package/package.json +3 -2
@@ -1,38 +1,27 @@
|
|
1
|
-
import {
|
1
|
+
import { UUID } from '../uuid';
|
2
|
+
import { ActionDocument, EventState } from './ActionDocument';
|
3
|
+
import { ArchiveActionInput, AssignActionInput, DeclareActionInput, NotifyActionInput, RegisterActionInput, RejectDeclarationActionInput, RequestCorrectionActionInput, UnassignActionInput, ValidateActionInput } from './ActionInput';
|
2
4
|
import { ActionType } from './ActionType';
|
3
5
|
import { Draft } from './Draft';
|
4
6
|
import { EventConfig } from './EventConfig';
|
5
7
|
import { EventDocument } from './EventDocument';
|
6
8
|
import { EventIndex } from './EventIndex';
|
7
9
|
import { EventInput } from './EventInput';
|
10
|
+
import { TranslationConfig } from './TranslationConfig';
|
11
|
+
import { FieldConfig } from './FieldConfig';
|
12
|
+
import { WorkqueueConfig } from './WorkqueueConfig';
|
8
13
|
import { FieldValue } from './FieldValue';
|
9
|
-
export declare function
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
residentialArea?: string | undefined;
|
21
|
-
street?: string | undefined;
|
22
|
-
zipCode?: string | undefined;
|
23
|
-
} | {
|
24
|
-
country: string;
|
25
|
-
district: string;
|
26
|
-
province: string;
|
27
|
-
urbanOrRural: "RURAL";
|
28
|
-
village?: string | undefined;
|
29
|
-
} | {
|
30
|
-
type: string;
|
31
|
-
option: string;
|
32
|
-
filename: string;
|
33
|
-
originalFilename: string;
|
34
|
-
}[]>;
|
35
|
-
export declare const eventPayloadGenerator: {
|
14
|
+
export declare function generateRandomName(rng: () => number): {
|
15
|
+
firstname: string;
|
16
|
+
surname: string;
|
17
|
+
};
|
18
|
+
/**
|
19
|
+
* Quick-and-dirty mock data generator for event actions.
|
20
|
+
*/
|
21
|
+
export declare function mapFieldTypeToMockValue(field: FieldConfig, i: number, rng: () => number): FieldValue;
|
22
|
+
export declare function generateActionDeclarationInput(configuration: EventConfig, action: ActionType, rng: () => number): EventState;
|
23
|
+
export declare function generateActionAnnotationInput(configuration: EventConfig, action: ActionType, rng: () => number): {};
|
24
|
+
export declare function eventPayloadGenerator(rng: () => number): {
|
36
25
|
create: (input?: Partial<EventInput>) => {
|
37
26
|
transactionId: string;
|
38
27
|
type: string;
|
@@ -42,388 +31,402 @@ export declare const eventPayloadGenerator: {
|
|
42
31
|
type: string;
|
43
32
|
id: string;
|
44
33
|
};
|
45
|
-
draft: (eventId
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
'applicant.firstname': string;
|
54
|
-
'applicant.surname': string;
|
55
|
-
'applicant.dob': string;
|
56
|
-
'recommender.none': boolean;
|
57
|
-
};
|
58
|
-
metadata: {
|
59
|
-
'correction.requester.relationship': string;
|
60
|
-
'correction.request.reason': string;
|
61
|
-
};
|
62
|
-
createdAt: string;
|
63
|
-
createdBy: string;
|
64
|
-
createdAtLocation: string;
|
65
|
-
};
|
66
|
-
} & Partial<{
|
67
|
-
id: string;
|
68
|
-
createdAt: string;
|
69
|
-
eventId: string;
|
70
|
-
transactionId: string;
|
71
|
-
action: {
|
72
|
-
type: ActionType;
|
73
|
-
data: Record<string, string | number | boolean | {
|
34
|
+
draft: ({ eventId, actionType }: {
|
35
|
+
eventId: UUID;
|
36
|
+
actionType: ActionType;
|
37
|
+
}, input?: Partial<Draft>) => Draft;
|
38
|
+
actions: {
|
39
|
+
declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
|
40
|
+
transactionId: string;
|
41
|
+
declaration: Record<string, string | number | boolean | {
|
74
42
|
type: string;
|
75
43
|
filename: string;
|
76
44
|
originalFilename: string;
|
77
45
|
} | {
|
78
46
|
country: string;
|
79
47
|
district: string;
|
48
|
+
addressType: "DOMESTIC";
|
80
49
|
province: string;
|
81
50
|
urbanOrRural: "URBAN";
|
82
|
-
number?: string | undefined;
|
83
|
-
town?: string | undefined;
|
84
|
-
residentialArea?: string | undefined;
|
85
|
-
street?: string | undefined;
|
86
|
-
zipCode?: string | undefined;
|
51
|
+
number?: string | null | undefined;
|
52
|
+
town?: string | null | undefined;
|
53
|
+
residentialArea?: string | null | undefined;
|
54
|
+
street?: string | null | undefined;
|
55
|
+
zipCode?: string | null | undefined;
|
87
56
|
} | {
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
urbanOrRural: "RURAL";
|
92
|
-
village?: string | undefined;
|
93
|
-
} | {
|
94
|
-
type: string;
|
95
|
-
option: string;
|
96
|
-
filename: string;
|
97
|
-
originalFilename: string;
|
98
|
-
}[]>;
|
99
|
-
createdAt: string;
|
100
|
-
createdBy: string;
|
101
|
-
createdAtLocation: string;
|
102
|
-
metadata?: Record<string, string | number | boolean | {
|
103
|
-
type: string;
|
104
|
-
filename: string;
|
105
|
-
originalFilename: string;
|
57
|
+
firstname: string;
|
58
|
+
surname: string;
|
59
|
+
middlename?: string | null | undefined;
|
106
60
|
} | {
|
107
61
|
country: string;
|
108
62
|
district: string;
|
63
|
+
addressType: "DOMESTIC";
|
109
64
|
province: string;
|
110
|
-
urbanOrRural: "
|
111
|
-
|
112
|
-
town?: string | undefined;
|
113
|
-
residentialArea?: string | undefined;
|
114
|
-
street?: string | undefined;
|
115
|
-
zipCode?: string | undefined;
|
65
|
+
urbanOrRural: "RURAL";
|
66
|
+
village?: string | null | undefined;
|
116
67
|
} | {
|
117
68
|
country: string;
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
69
|
+
state: string;
|
70
|
+
addressType: "INTERNATIONAL";
|
71
|
+
district2: string;
|
72
|
+
cityOrTown?: string | null | undefined;
|
73
|
+
addressLine1?: string | null | undefined;
|
74
|
+
addressLine2?: string | null | undefined;
|
75
|
+
addressLine3?: string | null | undefined;
|
76
|
+
postcodeOrZip?: string | null | undefined;
|
122
77
|
} | {
|
123
78
|
type: string;
|
124
79
|
option: string;
|
125
80
|
filename: string;
|
126
81
|
originalFilename: string;
|
127
|
-
}[]
|
128
|
-
|
129
|
-
|
130
|
-
actions: {
|
131
|
-
declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, "transactionId" | "data">>) => {
|
82
|
+
}[] | [string, string] | null | undefined>;
|
83
|
+
annotation: {};
|
84
|
+
keepAssignment?: boolean | undefined;
|
132
85
|
type: "DECLARE";
|
86
|
+
eventId: string;
|
87
|
+
};
|
88
|
+
/**
|
89
|
+
* Notify allows sending incomplete data. Think it as 'partial declare' for now.
|
90
|
+
*/
|
91
|
+
notify: (eventId: string, input?: Partial<Pick<NotifyActionInput, "transactionId" | "declaration" | "keepAssignment">>) => {
|
92
|
+
type: "NOTIFY";
|
133
93
|
transactionId: string;
|
134
|
-
|
94
|
+
declaration: Record<string, string | number | boolean | {
|
135
95
|
type: string;
|
136
96
|
filename: string;
|
137
97
|
originalFilename: string;
|
138
98
|
} | {
|
139
99
|
country: string;
|
140
100
|
district: string;
|
101
|
+
addressType: "DOMESTIC";
|
141
102
|
province: string;
|
142
103
|
urbanOrRural: "URBAN";
|
143
|
-
number?: string | undefined;
|
144
|
-
town?: string | undefined;
|
145
|
-
residentialArea?: string | undefined;
|
146
|
-
street?: string | undefined;
|
147
|
-
zipCode?: string | undefined;
|
104
|
+
number?: string | null | undefined;
|
105
|
+
town?: string | null | undefined;
|
106
|
+
residentialArea?: string | null | undefined;
|
107
|
+
street?: string | null | undefined;
|
108
|
+
zipCode?: string | null | undefined;
|
109
|
+
} | {
|
110
|
+
firstname: string;
|
111
|
+
surname: string;
|
112
|
+
middlename?: string | null | undefined;
|
148
113
|
} | {
|
149
114
|
country: string;
|
150
115
|
district: string;
|
116
|
+
addressType: "DOMESTIC";
|
151
117
|
province: string;
|
152
118
|
urbanOrRural: "RURAL";
|
153
|
-
village?: string | undefined;
|
119
|
+
village?: string | null | undefined;
|
120
|
+
} | {
|
121
|
+
country: string;
|
122
|
+
state: string;
|
123
|
+
addressType: "INTERNATIONAL";
|
124
|
+
district2: string;
|
125
|
+
cityOrTown?: string | null | undefined;
|
126
|
+
addressLine1?: string | null | undefined;
|
127
|
+
addressLine2?: string | null | undefined;
|
128
|
+
addressLine3?: string | null | undefined;
|
129
|
+
postcodeOrZip?: string | null | undefined;
|
154
130
|
} | {
|
155
131
|
type: string;
|
156
132
|
option: string;
|
157
133
|
filename: string;
|
158
134
|
originalFilename: string;
|
159
|
-
}[]>;
|
135
|
+
}[] | [string, string] | null | undefined>;
|
160
136
|
eventId: string;
|
137
|
+
keepAssignment: boolean | undefined;
|
161
138
|
};
|
162
|
-
validate: (eventId: string, input?: Partial<Pick<ValidateActionInput, "transactionId" | "
|
163
|
-
type: "VALIDATE";
|
139
|
+
validate: (eventId: string, input?: Partial<Pick<ValidateActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
|
164
140
|
transactionId: string;
|
165
|
-
|
141
|
+
declaration: Record<string, string | number | boolean | {
|
166
142
|
type: string;
|
167
143
|
filename: string;
|
168
144
|
originalFilename: string;
|
169
145
|
} | {
|
170
146
|
country: string;
|
171
147
|
district: string;
|
148
|
+
addressType: "DOMESTIC";
|
172
149
|
province: string;
|
173
150
|
urbanOrRural: "URBAN";
|
174
|
-
number?: string | undefined;
|
175
|
-
town?: string | undefined;
|
176
|
-
residentialArea?: string | undefined;
|
177
|
-
street?: string | undefined;
|
178
|
-
zipCode?: string | undefined;
|
151
|
+
number?: string | null | undefined;
|
152
|
+
town?: string | null | undefined;
|
153
|
+
residentialArea?: string | null | undefined;
|
154
|
+
street?: string | null | undefined;
|
155
|
+
zipCode?: string | null | undefined;
|
156
|
+
} | {
|
157
|
+
firstname: string;
|
158
|
+
surname: string;
|
159
|
+
middlename?: string | null | undefined;
|
179
160
|
} | {
|
180
161
|
country: string;
|
181
162
|
district: string;
|
163
|
+
addressType: "DOMESTIC";
|
182
164
|
province: string;
|
183
165
|
urbanOrRural: "RURAL";
|
184
|
-
village?: string | undefined;
|
166
|
+
village?: string | null | undefined;
|
167
|
+
} | {
|
168
|
+
country: string;
|
169
|
+
state: string;
|
170
|
+
addressType: "INTERNATIONAL";
|
171
|
+
district2: string;
|
172
|
+
cityOrTown?: string | null | undefined;
|
173
|
+
addressLine1?: string | null | undefined;
|
174
|
+
addressLine2?: string | null | undefined;
|
175
|
+
addressLine3?: string | null | undefined;
|
176
|
+
postcodeOrZip?: string | null | undefined;
|
185
177
|
} | {
|
186
178
|
type: string;
|
187
179
|
option: string;
|
188
180
|
filename: string;
|
189
181
|
originalFilename: string;
|
190
|
-
}[]>;
|
182
|
+
}[] | [string, string] | null | undefined>;
|
183
|
+
annotation: {};
|
184
|
+
keepAssignment?: boolean | undefined;
|
185
|
+
type: "VALIDATE";
|
191
186
|
duplicates: never[];
|
192
187
|
eventId: string;
|
193
188
|
};
|
194
|
-
|
195
|
-
type: "
|
189
|
+
assign: (eventId: string, input?: Partial<Pick<AssignActionInput, "transactionId" | "assignedTo">>) => {
|
190
|
+
type: "ASSIGN";
|
191
|
+
transactionId: string;
|
192
|
+
declaration: {};
|
193
|
+
assignedTo: string;
|
194
|
+
eventId: string;
|
195
|
+
};
|
196
|
+
unassign: (eventId: string, input?: Partial<Pick<UnassignActionInput, "transactionId">>) => {
|
197
|
+
type: "UNASSIGN";
|
196
198
|
transactionId: string;
|
197
|
-
|
199
|
+
declaration: {};
|
200
|
+
assignedTo: null;
|
201
|
+
eventId: string;
|
202
|
+
};
|
203
|
+
archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput, "transactionId" | "declaration" | "keepAssignment">>, isDuplicate?: boolean) => {
|
204
|
+
transactionId: string;
|
205
|
+
declaration: Record<string, string | number | boolean | {
|
198
206
|
type: string;
|
199
207
|
filename: string;
|
200
208
|
originalFilename: string;
|
201
209
|
} | {
|
202
210
|
country: string;
|
203
211
|
district: string;
|
212
|
+
addressType: "DOMESTIC";
|
204
213
|
province: string;
|
205
214
|
urbanOrRural: "URBAN";
|
206
|
-
number?: string | undefined;
|
207
|
-
town?: string | undefined;
|
208
|
-
residentialArea?: string | undefined;
|
209
|
-
street?: string | undefined;
|
210
|
-
zipCode?: string | undefined;
|
215
|
+
number?: string | null | undefined;
|
216
|
+
town?: string | null | undefined;
|
217
|
+
residentialArea?: string | null | undefined;
|
218
|
+
street?: string | null | undefined;
|
219
|
+
zipCode?: string | null | undefined;
|
220
|
+
} | {
|
221
|
+
firstname: string;
|
222
|
+
surname: string;
|
223
|
+
middlename?: string | null | undefined;
|
211
224
|
} | {
|
212
225
|
country: string;
|
213
226
|
district: string;
|
227
|
+
addressType: "DOMESTIC";
|
214
228
|
province: string;
|
215
229
|
urbanOrRural: "RURAL";
|
216
|
-
village?: string | undefined;
|
230
|
+
village?: string | null | undefined;
|
231
|
+
} | {
|
232
|
+
country: string;
|
233
|
+
state: string;
|
234
|
+
addressType: "INTERNATIONAL";
|
235
|
+
district2: string;
|
236
|
+
cityOrTown?: string | null | undefined;
|
237
|
+
addressLine1?: string | null | undefined;
|
238
|
+
addressLine2?: string | null | undefined;
|
239
|
+
addressLine3?: string | null | undefined;
|
240
|
+
postcodeOrZip?: string | null | undefined;
|
217
241
|
} | {
|
218
242
|
type: string;
|
219
243
|
option: string;
|
220
244
|
filename: string;
|
221
245
|
originalFilename: string;
|
222
|
-
}[]>;
|
223
|
-
|
224
|
-
|
225
|
-
};
|
246
|
+
}[] | [string, string] | null | undefined>;
|
247
|
+
keepAssignment?: boolean | undefined;
|
248
|
+
type: "ARCHIVE";
|
249
|
+
annotation: {};
|
226
250
|
duplicates: never[];
|
227
251
|
eventId: string;
|
252
|
+
reason: {
|
253
|
+
message: string;
|
254
|
+
isDuplicate: boolean;
|
255
|
+
};
|
228
256
|
};
|
229
|
-
reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, "transactionId" | "
|
230
|
-
type: "REJECT";
|
257
|
+
reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
|
231
258
|
transactionId: string;
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
} | {
|
237
|
-
country: string;
|
238
|
-
district: string;
|
239
|
-
province: string;
|
240
|
-
urbanOrRural: "URBAN";
|
241
|
-
number?: string | undefined;
|
242
|
-
town?: string | undefined;
|
243
|
-
residentialArea?: string | undefined;
|
244
|
-
street?: string | undefined;
|
245
|
-
zipCode?: string | undefined;
|
246
|
-
} | {
|
247
|
-
country: string;
|
248
|
-
district: string;
|
249
|
-
province: string;
|
250
|
-
urbanOrRural: "RURAL";
|
251
|
-
village?: string | undefined;
|
252
|
-
} | {
|
253
|
-
type: string;
|
254
|
-
option: string;
|
255
|
-
filename: string;
|
256
|
-
originalFilename: string;
|
257
|
-
}[]>;
|
259
|
+
annotation: {};
|
260
|
+
keepAssignment?: boolean | undefined;
|
261
|
+
type: "REJECT";
|
262
|
+
declaration: {};
|
258
263
|
duplicates: never[];
|
259
264
|
eventId: string;
|
265
|
+
reason: {
|
266
|
+
message: string;
|
267
|
+
};
|
260
268
|
};
|
261
|
-
register: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "
|
262
|
-
type: "REGISTER";
|
269
|
+
register: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
|
263
270
|
transactionId: string;
|
264
|
-
|
271
|
+
declaration: Record<string, string | number | boolean | {
|
265
272
|
type: string;
|
266
273
|
filename: string;
|
267
274
|
originalFilename: string;
|
268
275
|
} | {
|
269
276
|
country: string;
|
270
277
|
district: string;
|
278
|
+
addressType: "DOMESTIC";
|
271
279
|
province: string;
|
272
280
|
urbanOrRural: "URBAN";
|
273
|
-
number?: string | undefined;
|
274
|
-
town?: string | undefined;
|
275
|
-
residentialArea?: string | undefined;
|
276
|
-
street?: string | undefined;
|
277
|
-
zipCode?: string | undefined;
|
281
|
+
number?: string | null | undefined;
|
282
|
+
town?: string | null | undefined;
|
283
|
+
residentialArea?: string | null | undefined;
|
284
|
+
street?: string | null | undefined;
|
285
|
+
zipCode?: string | null | undefined;
|
286
|
+
} | {
|
287
|
+
firstname: string;
|
288
|
+
surname: string;
|
289
|
+
middlename?: string | null | undefined;
|
278
290
|
} | {
|
279
291
|
country: string;
|
280
292
|
district: string;
|
293
|
+
addressType: "DOMESTIC";
|
281
294
|
province: string;
|
282
295
|
urbanOrRural: "RURAL";
|
283
|
-
village?: string | undefined;
|
296
|
+
village?: string | null | undefined;
|
297
|
+
} | {
|
298
|
+
country: string;
|
299
|
+
state: string;
|
300
|
+
addressType: "INTERNATIONAL";
|
301
|
+
district2: string;
|
302
|
+
cityOrTown?: string | null | undefined;
|
303
|
+
addressLine1?: string | null | undefined;
|
304
|
+
addressLine2?: string | null | undefined;
|
305
|
+
addressLine3?: string | null | undefined;
|
306
|
+
postcodeOrZip?: string | null | undefined;
|
284
307
|
} | {
|
285
308
|
type: string;
|
286
309
|
option: string;
|
287
310
|
filename: string;
|
288
311
|
originalFilename: string;
|
289
|
-
}[]>;
|
312
|
+
}[] | [string, string] | null | undefined>;
|
313
|
+
annotation: {};
|
314
|
+
keepAssignment?: boolean | undefined;
|
315
|
+
type: "REGISTER";
|
290
316
|
eventId: string;
|
291
317
|
};
|
292
|
-
printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "
|
293
|
-
type: "PRINT_CERTIFICATE";
|
318
|
+
printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
|
294
319
|
transactionId: string;
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
} | {
|
300
|
-
country: string;
|
301
|
-
district: string;
|
302
|
-
province: string;
|
303
|
-
urbanOrRural: "URBAN";
|
304
|
-
number?: string | undefined;
|
305
|
-
town?: string | undefined;
|
306
|
-
residentialArea?: string | undefined;
|
307
|
-
street?: string | undefined;
|
308
|
-
zipCode?: string | undefined;
|
309
|
-
} | {
|
310
|
-
country: string;
|
311
|
-
district: string;
|
312
|
-
province: string;
|
313
|
-
urbanOrRural: "RURAL";
|
314
|
-
village?: string | undefined;
|
315
|
-
} | {
|
316
|
-
type: string;
|
317
|
-
option: string;
|
318
|
-
filename: string;
|
319
|
-
originalFilename: string;
|
320
|
-
}[]>;
|
320
|
+
annotation: {};
|
321
|
+
keepAssignment?: boolean | undefined;
|
322
|
+
type: "PRINT_CERTIFICATE";
|
323
|
+
declaration: {};
|
321
324
|
eventId: string;
|
322
325
|
};
|
323
326
|
correction: {
|
324
|
-
request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "
|
327
|
+
request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
|
325
328
|
type: "REQUEST_CORRECTION";
|
326
329
|
transactionId: string;
|
327
|
-
|
330
|
+
declaration: Record<string, string | number | boolean | {
|
328
331
|
type: string;
|
329
332
|
filename: string;
|
330
333
|
originalFilename: string;
|
331
334
|
} | {
|
332
335
|
country: string;
|
333
336
|
district: string;
|
337
|
+
addressType: "DOMESTIC";
|
334
338
|
province: string;
|
335
339
|
urbanOrRural: "URBAN";
|
336
|
-
number?: string | undefined;
|
337
|
-
town?: string | undefined;
|
338
|
-
residentialArea?: string | undefined;
|
339
|
-
street?: string | undefined;
|
340
|
-
zipCode?: string | undefined;
|
340
|
+
number?: string | null | undefined;
|
341
|
+
town?: string | null | undefined;
|
342
|
+
residentialArea?: string | null | undefined;
|
343
|
+
street?: string | null | undefined;
|
344
|
+
zipCode?: string | null | undefined;
|
345
|
+
} | {
|
346
|
+
firstname: string;
|
347
|
+
surname: string;
|
348
|
+
middlename?: string | null | undefined;
|
341
349
|
} | {
|
342
350
|
country: string;
|
343
351
|
district: string;
|
352
|
+
addressType: "DOMESTIC";
|
344
353
|
province: string;
|
345
354
|
urbanOrRural: "RURAL";
|
346
|
-
village?: string | undefined;
|
355
|
+
village?: string | null | undefined;
|
356
|
+
} | {
|
357
|
+
country: string;
|
358
|
+
state: string;
|
359
|
+
addressType: "INTERNATIONAL";
|
360
|
+
district2: string;
|
361
|
+
cityOrTown?: string | null | undefined;
|
362
|
+
addressLine1?: string | null | undefined;
|
363
|
+
addressLine2?: string | null | undefined;
|
364
|
+
addressLine3?: string | null | undefined;
|
365
|
+
postcodeOrZip?: string | null | undefined;
|
347
366
|
} | {
|
348
367
|
type: string;
|
349
368
|
option: string;
|
350
369
|
filename: string;
|
351
370
|
originalFilename: string;
|
352
|
-
}[]>;
|
353
|
-
|
371
|
+
}[] | [string, string] | null | undefined>;
|
372
|
+
annotation: {};
|
354
373
|
eventId: string;
|
374
|
+
keepAssignment: boolean | undefined;
|
355
375
|
};
|
356
|
-
approve: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "
|
376
|
+
approve: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
|
357
377
|
type: "APPROVE_CORRECTION";
|
358
378
|
transactionId: string;
|
359
|
-
|
360
|
-
|
361
|
-
filename: string;
|
362
|
-
originalFilename: string;
|
363
|
-
} | {
|
364
|
-
country: string;
|
365
|
-
district: string;
|
366
|
-
province: string;
|
367
|
-
urbanOrRural: "URBAN";
|
368
|
-
number?: string | undefined;
|
369
|
-
town?: string | undefined;
|
370
|
-
residentialArea?: string | undefined;
|
371
|
-
street?: string | undefined;
|
372
|
-
zipCode?: string | undefined;
|
373
|
-
} | {
|
374
|
-
country: string;
|
375
|
-
district: string;
|
376
|
-
province: string;
|
377
|
-
urbanOrRural: "RURAL";
|
378
|
-
village?: string | undefined;
|
379
|
-
} | {
|
380
|
-
type: string;
|
381
|
-
option: string;
|
382
|
-
filename: string;
|
383
|
-
originalFilename: string;
|
384
|
-
}[]>;
|
379
|
+
declaration: {};
|
380
|
+
annotation: {};
|
385
381
|
eventId: string;
|
386
382
|
requestId: string;
|
383
|
+
keepAssignment: boolean | undefined;
|
387
384
|
};
|
388
|
-
reject: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "
|
385
|
+
reject: (eventId: string, requestId: string, input?: Partial<Pick<RequestCorrectionActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
|
389
386
|
type: "REJECT_CORRECTION";
|
390
387
|
transactionId: string;
|
391
|
-
|
392
|
-
|
393
|
-
filename: string;
|
394
|
-
originalFilename: string;
|
395
|
-
} | {
|
396
|
-
country: string;
|
397
|
-
district: string;
|
398
|
-
province: string;
|
399
|
-
urbanOrRural: "URBAN";
|
400
|
-
number?: string | undefined;
|
401
|
-
town?: string | undefined;
|
402
|
-
residentialArea?: string | undefined;
|
403
|
-
street?: string | undefined;
|
404
|
-
zipCode?: string | undefined;
|
405
|
-
} | {
|
406
|
-
country: string;
|
407
|
-
district: string;
|
408
|
-
province: string;
|
409
|
-
urbanOrRural: "RURAL";
|
410
|
-
village?: string | undefined;
|
411
|
-
} | {
|
412
|
-
type: string;
|
413
|
-
option: string;
|
414
|
-
filename: string;
|
415
|
-
originalFilename: string;
|
416
|
-
}[]>;
|
388
|
+
declaration: {};
|
389
|
+
annotation: {};
|
417
390
|
eventId: string;
|
418
391
|
requestId: string;
|
392
|
+
keepAssignment: boolean | undefined;
|
419
393
|
};
|
420
394
|
};
|
421
395
|
};
|
422
396
|
};
|
423
|
-
export declare function
|
397
|
+
export declare function generateActionDocument({ configuration, action, rng, defaults }: {
|
398
|
+
configuration: EventConfig;
|
399
|
+
action: ActionType;
|
400
|
+
rng?: () => number;
|
401
|
+
defaults?: Partial<ActionDocument>;
|
402
|
+
}): ActionDocument;
|
403
|
+
export declare function generateEventDocument({ configuration, actions, rng }: {
|
424
404
|
configuration: EventConfig;
|
425
405
|
actions: ActionType[];
|
406
|
+
rng?: () => number;
|
426
407
|
}): EventDocument;
|
427
|
-
export declare function generateEventDraftDocument(eventId
|
428
|
-
|
408
|
+
export declare function generateEventDraftDocument({ eventId, actionType, rng, declaration }: {
|
409
|
+
eventId: UUID;
|
410
|
+
actionType: ActionType;
|
411
|
+
rng?: () => number;
|
412
|
+
declaration?: EventState;
|
413
|
+
}): Draft;
|
414
|
+
export declare function getRandomDatetime(rng: () => number, start: Date, end: Date): string;
|
415
|
+
export declare function getRandomDate(rng: () => number, start: string, end: string): string;
|
416
|
+
/**
|
417
|
+
* Useful for testing when we need deterministic outcome.
|
418
|
+
* @param seed - Seed value for the pseudo-random number generator
|
419
|
+
*
|
420
|
+
* @returns A function that generates pseudo-random numbers between 0 and 1 [0, 1)
|
421
|
+
*/
|
422
|
+
export declare function createPrng(seed: number): () => number;
|
423
|
+
export declare function generateRandomSignature(rng: () => number): string;
|
424
|
+
export declare const eventQueryDataGenerator: (overrides?: Partial<EventIndex>, seed?: number) => EventIndex;
|
425
|
+
export declare const generateTranslationConfig: (message: string) => TranslationConfig;
|
426
|
+
export declare const BearerTokenByUserType: {
|
427
|
+
fieldAgent: string;
|
428
|
+
registrationAgent: string;
|
429
|
+
localRegistrar: string;
|
430
|
+
};
|
431
|
+
export declare const generateWorkqueues: (slug?: string) => WorkqueueConfig[];
|
429
432
|
//# sourceMappingURL=test.utils.d.ts.map
|