@opencrvs/toolkit 1.8.0-rc.fc43738 → 1.8.0-rc.feaeeb7

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.
@@ -1,3 +1,4 @@
1
+ import { ActionDocument } from './ActionDocument';
1
2
  import { ArchivedActionInput, DeclareActionInput, RegisterActionInput, RejectDeclarationActionInput, RequestCorrectionActionInput, ValidateActionInput } from './ActionInput';
2
3
  import { ActionType } from './ActionType';
3
4
  import { Draft } from './Draft';
@@ -79,17 +80,17 @@ export declare const eventPayloadGenerator: {
79
80
  district: string;
80
81
  province: string;
81
82
  urbanOrRural: "URBAN";
82
- number?: string | undefined;
83
- town?: string | undefined;
84
- residentialArea?: string | undefined;
85
- street?: string | undefined;
86
- zipCode?: string | undefined;
83
+ number?: string | null | undefined;
84
+ town?: string | null | undefined;
85
+ residentialArea?: string | null | undefined;
86
+ street?: string | null | undefined;
87
+ zipCode?: string | null | undefined;
87
88
  } | {
88
89
  country: string;
89
90
  district: string;
90
91
  province: string;
91
92
  urbanOrRural: "RURAL";
92
- village?: string | undefined;
93
+ village?: string | null | undefined;
93
94
  } | {
94
95
  type: string;
95
96
  option: string;
@@ -108,17 +109,17 @@ export declare const eventPayloadGenerator: {
108
109
  district: string;
109
110
  province: string;
110
111
  urbanOrRural: "URBAN";
111
- number?: string | undefined;
112
- town?: string | undefined;
113
- residentialArea?: string | undefined;
114
- street?: string | undefined;
115
- zipCode?: string | undefined;
112
+ number?: string | null | undefined;
113
+ town?: string | null | undefined;
114
+ residentialArea?: string | null | undefined;
115
+ street?: string | null | undefined;
116
+ zipCode?: string | null | undefined;
116
117
  } | {
117
118
  country: string;
118
119
  district: string;
119
120
  province: string;
120
121
  urbanOrRural: "RURAL";
121
- village?: string | undefined;
122
+ village?: string | null | undefined;
122
123
  } | {
123
124
  type: string;
124
125
  option: string;
@@ -140,17 +141,17 @@ export declare const eventPayloadGenerator: {
140
141
  district: string;
141
142
  province: string;
142
143
  urbanOrRural: "URBAN";
143
- number?: string | undefined;
144
- town?: string | undefined;
145
- residentialArea?: string | undefined;
146
- street?: string | undefined;
147
- zipCode?: string | undefined;
144
+ number?: string | null | undefined;
145
+ town?: string | null | undefined;
146
+ residentialArea?: string | null | undefined;
147
+ street?: string | null | undefined;
148
+ zipCode?: string | null | undefined;
148
149
  } | {
149
150
  country: string;
150
151
  district: string;
151
152
  province: string;
152
153
  urbanOrRural: "RURAL";
153
- village?: string | undefined;
154
+ village?: string | null | undefined;
154
155
  } | {
155
156
  type: string;
156
157
  option: string;
@@ -171,17 +172,17 @@ export declare const eventPayloadGenerator: {
171
172
  district: string;
172
173
  province: string;
173
174
  urbanOrRural: "URBAN";
174
- number?: string | undefined;
175
- town?: string | undefined;
176
- residentialArea?: string | undefined;
177
- street?: string | undefined;
178
- zipCode?: string | undefined;
175
+ number?: string | null | undefined;
176
+ town?: string | null | undefined;
177
+ residentialArea?: string | null | undefined;
178
+ street?: string | null | undefined;
179
+ zipCode?: string | null | undefined;
179
180
  } | {
180
181
  country: string;
181
182
  district: string;
182
183
  province: string;
183
184
  urbanOrRural: "RURAL";
184
- village?: string | undefined;
185
+ village?: string | null | undefined;
185
186
  } | {
186
187
  type: string;
187
188
  option: string;
@@ -203,17 +204,17 @@ export declare const eventPayloadGenerator: {
203
204
  district: string;
204
205
  province: string;
205
206
  urbanOrRural: "URBAN";
206
- number?: string | undefined;
207
- town?: string | undefined;
208
- residentialArea?: string | undefined;
209
- street?: string | undefined;
210
- zipCode?: string | undefined;
207
+ number?: string | null | undefined;
208
+ town?: string | null | undefined;
209
+ residentialArea?: string | null | undefined;
210
+ street?: string | null | undefined;
211
+ zipCode?: string | null | undefined;
211
212
  } | {
212
213
  country: string;
213
214
  district: string;
214
215
  province: string;
215
216
  urbanOrRural: "RURAL";
216
- village?: string | undefined;
217
+ village?: string | null | undefined;
217
218
  } | {
218
219
  type: string;
219
220
  option: string;
@@ -238,17 +239,17 @@ export declare const eventPayloadGenerator: {
238
239
  district: string;
239
240
  province: string;
240
241
  urbanOrRural: "URBAN";
241
- number?: string | undefined;
242
- town?: string | undefined;
243
- residentialArea?: string | undefined;
244
- street?: string | undefined;
245
- zipCode?: string | undefined;
242
+ number?: string | null | undefined;
243
+ town?: string | null | undefined;
244
+ residentialArea?: string | null | undefined;
245
+ street?: string | null | undefined;
246
+ zipCode?: string | null | undefined;
246
247
  } | {
247
248
  country: string;
248
249
  district: string;
249
250
  province: string;
250
251
  urbanOrRural: "RURAL";
251
- village?: string | undefined;
252
+ village?: string | null | undefined;
252
253
  } | {
253
254
  type: string;
254
255
  option: string;
@@ -270,17 +271,17 @@ export declare const eventPayloadGenerator: {
270
271
  district: string;
271
272
  province: string;
272
273
  urbanOrRural: "URBAN";
273
- number?: string | undefined;
274
- town?: string | undefined;
275
- residentialArea?: string | undefined;
276
- street?: string | undefined;
277
- zipCode?: string | undefined;
274
+ number?: string | null | undefined;
275
+ town?: string | null | undefined;
276
+ residentialArea?: string | null | undefined;
277
+ street?: string | null | undefined;
278
+ zipCode?: string | null | undefined;
278
279
  } | {
279
280
  country: string;
280
281
  district: string;
281
282
  province: string;
282
283
  urbanOrRural: "RURAL";
283
- village?: string | undefined;
284
+ village?: string | null | undefined;
284
285
  } | {
285
286
  type: string;
286
287
  option: string;
@@ -301,17 +302,17 @@ export declare const eventPayloadGenerator: {
301
302
  district: string;
302
303
  province: string;
303
304
  urbanOrRural: "URBAN";
304
- number?: string | undefined;
305
- town?: string | undefined;
306
- residentialArea?: string | undefined;
307
- street?: string | undefined;
308
- zipCode?: string | undefined;
305
+ number?: string | null | undefined;
306
+ town?: string | null | undefined;
307
+ residentialArea?: string | null | undefined;
308
+ street?: string | null | undefined;
309
+ zipCode?: string | null | undefined;
309
310
  } | {
310
311
  country: string;
311
312
  district: string;
312
313
  province: string;
313
314
  urbanOrRural: "RURAL";
314
- village?: string | undefined;
315
+ village?: string | null | undefined;
315
316
  } | {
316
317
  type: string;
317
318
  option: string;
@@ -333,17 +334,17 @@ export declare const eventPayloadGenerator: {
333
334
  district: string;
334
335
  province: string;
335
336
  urbanOrRural: "URBAN";
336
- number?: string | undefined;
337
- town?: string | undefined;
338
- residentialArea?: string | undefined;
339
- street?: string | undefined;
340
- zipCode?: string | undefined;
337
+ number?: string | null | undefined;
338
+ town?: string | null | undefined;
339
+ residentialArea?: string | null | undefined;
340
+ street?: string | null | undefined;
341
+ zipCode?: string | null | undefined;
341
342
  } | {
342
343
  country: string;
343
344
  district: string;
344
345
  province: string;
345
346
  urbanOrRural: "RURAL";
346
- village?: string | undefined;
347
+ village?: string | null | undefined;
347
348
  } | {
348
349
  type: string;
349
350
  option: string;
@@ -365,17 +366,17 @@ export declare const eventPayloadGenerator: {
365
366
  district: string;
366
367
  province: string;
367
368
  urbanOrRural: "URBAN";
368
- number?: string | undefined;
369
- town?: string | undefined;
370
- residentialArea?: string | undefined;
371
- street?: string | undefined;
372
- zipCode?: string | undefined;
369
+ number?: string | null | undefined;
370
+ town?: string | null | undefined;
371
+ residentialArea?: string | null | undefined;
372
+ street?: string | null | undefined;
373
+ zipCode?: string | null | undefined;
373
374
  } | {
374
375
  country: string;
375
376
  district: string;
376
377
  province: string;
377
378
  urbanOrRural: "RURAL";
378
- village?: string | undefined;
379
+ village?: string | null | undefined;
379
380
  } | {
380
381
  type: string;
381
382
  option: string;
@@ -397,17 +398,17 @@ export declare const eventPayloadGenerator: {
397
398
  district: string;
398
399
  province: string;
399
400
  urbanOrRural: "URBAN";
400
- number?: string | undefined;
401
- town?: string | undefined;
402
- residentialArea?: string | undefined;
403
- street?: string | undefined;
404
- zipCode?: string | undefined;
401
+ number?: string | null | undefined;
402
+ town?: string | null | undefined;
403
+ residentialArea?: string | null | undefined;
404
+ street?: string | null | undefined;
405
+ zipCode?: string | null | undefined;
405
406
  } | {
406
407
  country: string;
407
408
  district: string;
408
409
  province: string;
409
410
  urbanOrRural: "RURAL";
410
- village?: string | undefined;
411
+ village?: string | null | undefined;
411
412
  } | {
412
413
  type: string;
413
414
  option: string;
@@ -420,6 +421,11 @@ export declare const eventPayloadGenerator: {
420
421
  };
421
422
  };
422
423
  };
424
+ export declare function generateActionDocument({ configuration, action, defaults }: {
425
+ configuration: EventConfig;
426
+ action: ActionType;
427
+ defaults?: Partial<ActionDocument>;
428
+ }): ActionDocument;
423
429
  export declare function generateEventDocument({ configuration, actions }: {
424
430
  configuration: EventConfig;
425
431
  actions: ActionType[];
@@ -5,7 +5,7 @@ import { EventConfigInput } from './EventConfigInput';
5
5
  import { EventMetadataKeys } from './EventMetadata';
6
6
  import { FieldConfig } from './FieldConfig';
7
7
  import { WorkqueueConfig } from './WorkqueueConfig';
8
- import { ActionFormData } from './ActionDocument';
8
+ import { EventState } from './ActionDocument';
9
9
  import { FormConfig } from './FormConfig';
10
10
  /**
11
11
  * @returns All the fields in the event configuration input.
@@ -80,8 +80,7 @@ export declare const findActiveActionFields: (configuration: EventConfig, action
80
80
  */
81
81
  export declare function getActiveActionFields(configuration: EventConfig, action: ActionType): FieldConfig[];
82
82
  export declare function getEventConfiguration(eventConfigurations: EventConfig[], type: string): EventConfig;
83
- export declare function isOptionalUncheckedCheckbox(field: FieldConfig, form: ActionFormData): boolean;
84
- export declare function stripHiddenFields(fields: FieldConfig[], data: ActionFormData): import("lodash").Dictionary<string | number | boolean | {
83
+ export declare function stripHiddenFields(fields: FieldConfig[], data: EventState): import("lodash").Dictionary<string | number | boolean | {
85
84
  type: string;
86
85
  filename: string;
87
86
  originalFilename: string;