@nira-opencrvs/toolkit 1.9.11-rc.39d8d68
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 +70 -0
- package/build.sh +56 -0
- package/dist/api/index.d.ts +11 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +52 -0
- package/dist/commons/api/router.d.ts +4125 -0
- package/dist/commons/conditionals/conditionals.d.ts +824 -0
- package/dist/commons/conditionals/index.d.ts +2 -0
- package/dist/commons/conditionals/validate.d.ts +101 -0
- package/dist/commons/events/ActionConfig.d.ts +1609 -0
- package/dist/commons/events/ActionDocument.d.ts +2180 -0
- package/dist/commons/events/ActionInput.d.ts +1229 -0
- package/dist/commons/events/ActionType.d.ts +52 -0
- package/dist/commons/events/AdvancedSearchConfig.d.ts +1538 -0
- package/dist/commons/events/CompositeFieldValue.d.ts +280 -0
- package/dist/commons/events/Conditional.d.ts +55 -0
- package/dist/commons/events/Constants.d.ts +3 -0
- package/dist/commons/events/CountryConfigQueryInput.d.ts +4784 -0
- package/dist/commons/events/CreatedAtLocation.d.ts +2 -0
- package/dist/commons/events/DeduplicationConfig.d.ts +233 -0
- package/dist/commons/events/Draft.d.ts +118 -0
- package/dist/commons/events/DynamicFieldValue.d.ts +139 -0
- package/dist/commons/events/EventConfig.d.ts +2255 -0
- package/dist/commons/events/EventConfigInput.d.ts +10 -0
- package/dist/commons/events/EventDocument.d.ts +1457 -0
- package/dist/commons/events/EventIndex.d.ts +1134 -0
- package/dist/commons/events/EventInput.d.ts +13 -0
- package/dist/commons/events/EventMetadata.d.ts +413 -0
- package/dist/commons/events/FieldConfig.d.ts +12935 -0
- package/dist/commons/events/FieldType.d.ts +55 -0
- package/dist/commons/events/FieldTypeMapping.d.ts +1289 -0
- package/dist/commons/events/FieldValue.d.ts +512 -0
- package/dist/commons/events/FileUtils.d.ts +4 -0
- package/dist/commons/events/FormConfig.d.ts +755 -0
- package/dist/commons/events/PageConfig.d.ts +342 -0
- package/dist/commons/events/PlainDate.d.ts +19 -0
- package/dist/commons/events/SummaryConfig.d.ts +170 -0
- package/dist/commons/events/TemplateConfig.d.ts +66 -0
- package/dist/commons/events/TranslationConfig.d.ts +15 -0
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +53 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +7957 -0
- package/dist/commons/events/deduplication.d.ts +69 -0
- package/dist/commons/events/defineConfig.d.ts +234 -0
- package/dist/commons/events/event.d.ts +80 -0
- package/dist/commons/events/field.d.ts +514 -0
- package/dist/commons/events/index.d.ts +45 -0
- package/dist/commons/events/locations.d.ts +24 -0
- package/dist/commons/events/scopes.d.ts +55 -0
- package/dist/commons/events/serializer.d.ts +2 -0
- package/dist/commons/events/state/availableActions.d.ts +6 -0
- package/dist/commons/events/state/flags.d.ts +4 -0
- package/dist/commons/events/state/index.d.ts +119 -0
- package/dist/commons/events/state/utils.d.ts +311 -0
- package/dist/commons/events/test.utils.d.ts +248 -0
- package/dist/commons/events/transactions.d.ts +2 -0
- package/dist/commons/events/utils.d.ts +486 -0
- package/dist/commons/events/workqueueDefaultColumns.d.ts +3 -0
- package/dist/commons/notification/UserNotifications.d.ts +762 -0
- package/dist/commons/notification/index.d.ts +2 -0
- package/dist/conditionals/index.d.ts +2 -0
- package/dist/conditionals/index.d.ts.map +1 -0
- package/dist/conditionals/index.js +689 -0
- package/dist/events/deduplication.d.ts +69 -0
- package/dist/events/deduplication.d.ts.map +1 -0
- package/dist/events/deduplication.js +101 -0
- package/dist/events/index.d.ts +2 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +9327 -0
- package/dist/notification/index.d.ts +2 -0
- package/dist/notification/index.d.ts.map +1 -0
- package/dist/notification/index.js +6674 -0
- package/dist/scopes/index.d.ts +385 -0
- package/dist/scopes/index.d.ts.map +1 -0
- package/dist/scopes/index.js +349 -0
- package/package.json +40 -0
- package/tsconfig.json +27 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
import { ActionType, DeclarationActionType } from './ActionType';
|
|
2
|
+
import { EventConfig } from './EventConfig';
|
|
3
|
+
import { FieldConfig } from './FieldConfig';
|
|
4
|
+
import { Action, ActionDocument, ActionUpdate, EventState } from './ActionDocument';
|
|
5
|
+
import { PageConfig, VerificationPageConfig } from './PageConfig';
|
|
6
|
+
import { ValidatorContext } from '../conditionals/validate';
|
|
7
|
+
import { Draft } from './Draft';
|
|
8
|
+
import { EventDocument } from './EventDocument';
|
|
9
|
+
import { UUID } from '../uuid';
|
|
10
|
+
import { ActionConfig } from './ActionConfig';
|
|
11
|
+
import { FormConfig } from './FormConfig';
|
|
12
|
+
import { PlainDate, SelectDateRangeValue } from './FieldValue';
|
|
13
|
+
export declare function ageToDate(age: number, asOfDate: PlainDate): string & import("zod").BRAND<"PlainDate">;
|
|
14
|
+
export declare function getDeclarationFields(configuration: EventConfig): FieldConfig[];
|
|
15
|
+
export declare function getDeclarationPages(configuration: EventConfig): {
|
|
16
|
+
type: "FORM";
|
|
17
|
+
id: string;
|
|
18
|
+
title: import("./TranslationConfig").TranslationConfig;
|
|
19
|
+
fields: FieldConfig[];
|
|
20
|
+
requireCompletionToContinue: boolean;
|
|
21
|
+
conditional?: import(".").JSONSchema | undefined;
|
|
22
|
+
}[];
|
|
23
|
+
export declare function getDeclaration(configuration: EventConfig): {
|
|
24
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
25
|
+
pages: {
|
|
26
|
+
type: "FORM";
|
|
27
|
+
id: string;
|
|
28
|
+
title: import("./TranslationConfig").TranslationConfig;
|
|
29
|
+
fields: FieldConfig[];
|
|
30
|
+
requireCompletionToContinue: boolean;
|
|
31
|
+
conditional?: import(".").JSONSchema | undefined;
|
|
32
|
+
}[];
|
|
33
|
+
};
|
|
34
|
+
export declare function getPrintCertificatePages(configuration: EventConfig): ({
|
|
35
|
+
type: "FORM";
|
|
36
|
+
id: string;
|
|
37
|
+
title: import("./TranslationConfig").TranslationConfig;
|
|
38
|
+
fields: FieldConfig[];
|
|
39
|
+
requireCompletionToContinue: boolean;
|
|
40
|
+
conditional?: import(".").JSONSchema | undefined;
|
|
41
|
+
} | {
|
|
42
|
+
type: "VERIFICATION";
|
|
43
|
+
id: string;
|
|
44
|
+
title: import("./TranslationConfig").TranslationConfig;
|
|
45
|
+
actions: {
|
|
46
|
+
cancel: {
|
|
47
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
48
|
+
confirmation: {
|
|
49
|
+
title: import("./TranslationConfig").TranslationConfig;
|
|
50
|
+
body: import("./TranslationConfig").TranslationConfig;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
verify: {
|
|
54
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
fields: FieldConfig[];
|
|
58
|
+
requireCompletionToContinue: boolean;
|
|
59
|
+
conditional?: import(".").JSONSchema | undefined;
|
|
60
|
+
})[];
|
|
61
|
+
export declare const getActionAnnotationFields: (actionConfig: ActionConfig) => FieldConfig[];
|
|
62
|
+
export declare function getAllUniqueFields(eventConfig: EventConfig): FieldConfig[];
|
|
63
|
+
export declare function getDeclarationFieldById(config: EventConfig, fieldId: string): FieldConfig;
|
|
64
|
+
/**
|
|
65
|
+
* @TODO: Request correction should have same format as print certificate
|
|
66
|
+
*/
|
|
67
|
+
export declare const findRecordActionPages: (config: EventConfig, actionType: ActionType) => PageConfig[];
|
|
68
|
+
export declare function getActionReview(configuration: EventConfig, actionType: ActionType): {
|
|
69
|
+
title: import("./TranslationConfig").TranslationConfig;
|
|
70
|
+
fields: FieldConfig[];
|
|
71
|
+
};
|
|
72
|
+
export declare function getActionReviewFields(configuration: EventConfig, actionType: DeclarationActionType): FieldConfig[];
|
|
73
|
+
export declare function isPageVisible(page: PageConfig, formValues: ActionUpdate, context: ValidatorContext): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Removes values from the form that correspond to hidden fields.
|
|
76
|
+
* This function recursively omits any fields from the form values that are not visible
|
|
77
|
+
* according to their FieldConfig and the current form state. It ensures that only values
|
|
78
|
+
* for visible fields are retained, which is useful for conditional forms where hidden field
|
|
79
|
+
* values should not affect validation or submission.
|
|
80
|
+
*
|
|
81
|
+
* @template T - The type of the form values
|
|
82
|
+
* @param {T} formValues - The current form values
|
|
83
|
+
* @param {FieldConfig[]} fields - The list of field configurations to check visibility against
|
|
84
|
+
* * @param validatorContext - custom validation context
|
|
85
|
+
* @returns {Partial<T>} A new object containing only the values for visible fields
|
|
86
|
+
*/
|
|
87
|
+
export declare function omitHiddenFields<T extends EventState | ActionUpdate>(fields: FieldConfig[], formValues: T, validatorContext: ValidatorContext, includeHiddenFieldsWithNullValues?: boolean): Partial<T>;
|
|
88
|
+
export declare function omitHiddenPaginatedFields<T extends EventState | ActionUpdate>(formConfig: FormConfig, values: T, validatorContext: ValidatorContext, includeHiddenFieldsWithNullValues?: boolean): Partial<Partial<T>>;
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @returns a draft for the event that has been created since the last non-read action.
|
|
92
|
+
*/
|
|
93
|
+
export declare function findActiveDraftForEvent(event: EventDocument, draft: Draft): Draft | undefined;
|
|
94
|
+
export declare function createEmptyDraft(eventId: UUID, draftId: UUID, actionType: Exclude<ActionType, 'DELETE'>): Draft;
|
|
95
|
+
export declare function isVerificationPage(page: PageConfig): page is VerificationPageConfig;
|
|
96
|
+
export declare function getVisibleVerificationPageIds(pages: PageConfig[], annotation: ActionUpdate, context: ValidatorContext): string[];
|
|
97
|
+
export declare function omitHiddenAnnotationFields(actionConfig: ActionConfig, declaration: EventState, annotation: ActionUpdate, context: ValidatorContext): Partial<{
|
|
98
|
+
[x: string]: string | number | boolean | {
|
|
99
|
+
type: string;
|
|
100
|
+
path: string;
|
|
101
|
+
originalFilename: string;
|
|
102
|
+
} | {
|
|
103
|
+
firstname: string;
|
|
104
|
+
surname: string;
|
|
105
|
+
middlename?: string | undefined;
|
|
106
|
+
} | {
|
|
107
|
+
firstname?: string | null | undefined;
|
|
108
|
+
surname?: string | null | undefined;
|
|
109
|
+
middlename?: string | null | undefined;
|
|
110
|
+
} | {
|
|
111
|
+
country: string;
|
|
112
|
+
addressType: "DOMESTIC";
|
|
113
|
+
administrativeArea: string;
|
|
114
|
+
streetLevelDetails?: Record<string, string> | undefined;
|
|
115
|
+
} | {
|
|
116
|
+
country: string;
|
|
117
|
+
addressType: "INTERNATIONAL";
|
|
118
|
+
streetLevelDetails?: Record<string, string> | undefined;
|
|
119
|
+
} | {
|
|
120
|
+
addressType: "DOMESTIC";
|
|
121
|
+
country?: string | null | undefined;
|
|
122
|
+
streetLevelDetails?: Record<string, string | null> | null | undefined;
|
|
123
|
+
administrativeArea?: string | null | undefined;
|
|
124
|
+
} | {
|
|
125
|
+
addressType: "INTERNATIONAL";
|
|
126
|
+
country?: string | null | undefined;
|
|
127
|
+
streetLevelDetails?: Record<string, string | null> | null | undefined;
|
|
128
|
+
} | {
|
|
129
|
+
type: string;
|
|
130
|
+
option: string;
|
|
131
|
+
path: string;
|
|
132
|
+
originalFilename: string;
|
|
133
|
+
}[] | {
|
|
134
|
+
loading: boolean;
|
|
135
|
+
data?: any;
|
|
136
|
+
error?: {
|
|
137
|
+
message: string;
|
|
138
|
+
statusCode: number;
|
|
139
|
+
} | null | undefined;
|
|
140
|
+
} | {
|
|
141
|
+
data?: any;
|
|
142
|
+
error?: {
|
|
143
|
+
message: string;
|
|
144
|
+
statusCode: number;
|
|
145
|
+
} | null | undefined;
|
|
146
|
+
loading?: boolean | null | undefined;
|
|
147
|
+
} | {
|
|
148
|
+
data: Record<string, string>;
|
|
149
|
+
} | {
|
|
150
|
+
data: Record<string, string>;
|
|
151
|
+
} | {
|
|
152
|
+
data?: any;
|
|
153
|
+
} | {
|
|
154
|
+
numericValue: number;
|
|
155
|
+
unit: string;
|
|
156
|
+
} | {
|
|
157
|
+
numericValue?: number | undefined;
|
|
158
|
+
unit?: string | undefined;
|
|
159
|
+
} | (string & import("zod").BRAND<"PlainDate">) | {
|
|
160
|
+
age: number;
|
|
161
|
+
asOfDateRef: string;
|
|
162
|
+
} | {
|
|
163
|
+
start: string & import("zod").BRAND<"PlainDate">;
|
|
164
|
+
end: string & import("zod").BRAND<"PlainDate">;
|
|
165
|
+
} | {
|
|
166
|
+
data: Record<string, string | number | boolean | {
|
|
167
|
+
type: string;
|
|
168
|
+
path: string;
|
|
169
|
+
originalFilename: string;
|
|
170
|
+
} | {
|
|
171
|
+
firstname: string;
|
|
172
|
+
surname: string;
|
|
173
|
+
middlename?: string | undefined;
|
|
174
|
+
} | {
|
|
175
|
+
firstname?: string | null | undefined;
|
|
176
|
+
surname?: string | null | undefined;
|
|
177
|
+
middlename?: string | null | undefined;
|
|
178
|
+
} | {
|
|
179
|
+
country: string;
|
|
180
|
+
addressType: "DOMESTIC";
|
|
181
|
+
administrativeArea: string;
|
|
182
|
+
streetLevelDetails?: Record<string, string> | undefined;
|
|
183
|
+
} | {
|
|
184
|
+
country: string;
|
|
185
|
+
addressType: "INTERNATIONAL";
|
|
186
|
+
streetLevelDetails?: Record<string, string> | undefined;
|
|
187
|
+
} | {
|
|
188
|
+
type: string;
|
|
189
|
+
option: string;
|
|
190
|
+
path: string;
|
|
191
|
+
originalFilename: string;
|
|
192
|
+
}[] | {
|
|
193
|
+
loading: boolean;
|
|
194
|
+
data?: any;
|
|
195
|
+
error?: {
|
|
196
|
+
message: string;
|
|
197
|
+
statusCode: number;
|
|
198
|
+
} | null | undefined;
|
|
199
|
+
} | {
|
|
200
|
+
data: Record<string, string>;
|
|
201
|
+
} | {
|
|
202
|
+
data?: any;
|
|
203
|
+
} | {
|
|
204
|
+
numericValue: number;
|
|
205
|
+
unit: string;
|
|
206
|
+
} | {
|
|
207
|
+
numericValue?: number | undefined;
|
|
208
|
+
unit?: string | undefined;
|
|
209
|
+
} | (string & import("zod").BRAND<"PlainDate">) | {
|
|
210
|
+
age: number;
|
|
211
|
+
asOfDateRef: string;
|
|
212
|
+
} | {
|
|
213
|
+
start: string & import("zod").BRAND<"PlainDate">;
|
|
214
|
+
end: string & import("zod").BRAND<"PlainDate">;
|
|
215
|
+
} | null | undefined>;
|
|
216
|
+
} | null | undefined;
|
|
217
|
+
}>;
|
|
218
|
+
/**
|
|
219
|
+
* Merges two documents together.
|
|
220
|
+
*
|
|
221
|
+
* @example deepMerge({'review.signature': { path: '/path.png', type: 'image/png' }}, { foo: 'bar'}) } => { 'review.signature': { path: '/path.png', type: 'image/png' }, foo: 'bar' }
|
|
222
|
+
*
|
|
223
|
+
* NOTE: When merging deep objects, the values from the second object will override the first one.
|
|
224
|
+
* @example { annotation: {'review.signature': { path: '/path.png', type: 'image/png' }}, { annotation: { foo: 'bar'}) } } => { annotation: { foo: 'bar' } }
|
|
225
|
+
*/
|
|
226
|
+
export declare function deepMerge<T extends Record<string, unknown>, K extends Record<string, unknown>>(currentDocument: T, actionDocument: K): T & K;
|
|
227
|
+
export declare function findLastAssignmentAction(actions: Action[]): Action | undefined;
|
|
228
|
+
/** Tell compiler that accessing record with arbitrary key might result to undefined
|
|
229
|
+
* Use when you **cannot guarantee** that key exists in the record
|
|
230
|
+
*/
|
|
231
|
+
export type IndexMap<T> = {
|
|
232
|
+
[id: string]: T | undefined;
|
|
233
|
+
};
|
|
234
|
+
export declare function isWriteAction(actionType: ActionType): boolean;
|
|
235
|
+
/**
|
|
236
|
+
* @returns All the fields in the event configuration.
|
|
237
|
+
*/
|
|
238
|
+
export declare const findAllFields: (config: EventConfig) => FieldConfig[];
|
|
239
|
+
/**
|
|
240
|
+
* Returns the value of the object at the given path with the ability of resolving mixed paths. See examples.
|
|
241
|
+
*
|
|
242
|
+
* @param obj Entity we want to get the value from
|
|
243
|
+
* @param path property path e.g. `a.b.c`
|
|
244
|
+
* @param defaultValue
|
|
245
|
+
* @returns the value of the object at the given path.
|
|
246
|
+
*/
|
|
247
|
+
export declare function getMixedPath<T = unknown>(obj: Record<string, unknown>, path: string, defaultValue?: T | undefined): T | undefined;
|
|
248
|
+
export declare function getEventConfigById(eventConfigs: EventConfig[], id: string): {
|
|
249
|
+
id: string;
|
|
250
|
+
title: import("./TranslationConfig").TranslationConfig;
|
|
251
|
+
declaration: {
|
|
252
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
253
|
+
pages: {
|
|
254
|
+
type: "FORM";
|
|
255
|
+
id: string;
|
|
256
|
+
title: import("./TranslationConfig").TranslationConfig;
|
|
257
|
+
fields: FieldConfig[];
|
|
258
|
+
requireCompletionToContinue: boolean;
|
|
259
|
+
conditional?: import(".").JSONSchema | undefined;
|
|
260
|
+
}[];
|
|
261
|
+
};
|
|
262
|
+
actions: ({
|
|
263
|
+
type: "READ";
|
|
264
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
265
|
+
review: {
|
|
266
|
+
title: import("./TranslationConfig").TranslationConfig;
|
|
267
|
+
fields: FieldConfig[];
|
|
268
|
+
};
|
|
269
|
+
} | {
|
|
270
|
+
type: "DECLARE";
|
|
271
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
272
|
+
review: {
|
|
273
|
+
title: import("./TranslationConfig").TranslationConfig;
|
|
274
|
+
fields: FieldConfig[];
|
|
275
|
+
};
|
|
276
|
+
deduplication?: {
|
|
277
|
+
id: string;
|
|
278
|
+
query: import("./DeduplicationConfig").ClauseOutput;
|
|
279
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
280
|
+
} | undefined;
|
|
281
|
+
} | {
|
|
282
|
+
type: "VALIDATE";
|
|
283
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
284
|
+
review: {
|
|
285
|
+
title: import("./TranslationConfig").TranslationConfig;
|
|
286
|
+
fields: FieldConfig[];
|
|
287
|
+
};
|
|
288
|
+
deduplication?: {
|
|
289
|
+
id: string;
|
|
290
|
+
query: import("./DeduplicationConfig").ClauseOutput;
|
|
291
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
292
|
+
} | undefined;
|
|
293
|
+
} | {
|
|
294
|
+
type: "REJECT";
|
|
295
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
296
|
+
} | {
|
|
297
|
+
type: "ARCHIVE";
|
|
298
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
299
|
+
} | {
|
|
300
|
+
type: "REGISTER";
|
|
301
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
302
|
+
review: {
|
|
303
|
+
title: import("./TranslationConfig").TranslationConfig;
|
|
304
|
+
fields: FieldConfig[];
|
|
305
|
+
};
|
|
306
|
+
deduplication?: {
|
|
307
|
+
id: string;
|
|
308
|
+
query: import("./DeduplicationConfig").ClauseOutput;
|
|
309
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
310
|
+
} | undefined;
|
|
311
|
+
} | {
|
|
312
|
+
type: "DELETE";
|
|
313
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
314
|
+
} | {
|
|
315
|
+
type: "PRINT_CERTIFICATE";
|
|
316
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
317
|
+
printForm: {
|
|
318
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
319
|
+
pages: ({
|
|
320
|
+
type: "FORM";
|
|
321
|
+
id: string;
|
|
322
|
+
title: import("./TranslationConfig").TranslationConfig;
|
|
323
|
+
fields: FieldConfig[];
|
|
324
|
+
requireCompletionToContinue: boolean;
|
|
325
|
+
conditional?: import(".").JSONSchema | undefined;
|
|
326
|
+
} | {
|
|
327
|
+
type: "VERIFICATION";
|
|
328
|
+
id: string;
|
|
329
|
+
title: import("./TranslationConfig").TranslationConfig;
|
|
330
|
+
actions: {
|
|
331
|
+
cancel: {
|
|
332
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
333
|
+
confirmation: {
|
|
334
|
+
title: import("./TranslationConfig").TranslationConfig;
|
|
335
|
+
body: import("./TranslationConfig").TranslationConfig;
|
|
336
|
+
};
|
|
337
|
+
};
|
|
338
|
+
verify: {
|
|
339
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
fields: FieldConfig[];
|
|
343
|
+
requireCompletionToContinue: boolean;
|
|
344
|
+
conditional?: import(".").JSONSchema | undefined;
|
|
345
|
+
})[];
|
|
346
|
+
};
|
|
347
|
+
} | {
|
|
348
|
+
type: "REQUEST_CORRECTION";
|
|
349
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
350
|
+
correctionForm: {
|
|
351
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
352
|
+
pages: ({
|
|
353
|
+
type: "FORM";
|
|
354
|
+
id: string;
|
|
355
|
+
title: import("./TranslationConfig").TranslationConfig;
|
|
356
|
+
fields: FieldConfig[];
|
|
357
|
+
requireCompletionToContinue: boolean;
|
|
358
|
+
conditional?: import(".").JSONSchema | undefined;
|
|
359
|
+
} | {
|
|
360
|
+
type: "VERIFICATION";
|
|
361
|
+
id: string;
|
|
362
|
+
title: import("./TranslationConfig").TranslationConfig;
|
|
363
|
+
actions: {
|
|
364
|
+
cancel: {
|
|
365
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
366
|
+
confirmation: {
|
|
367
|
+
title: import("./TranslationConfig").TranslationConfig;
|
|
368
|
+
body: import("./TranslationConfig").TranslationConfig;
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
verify: {
|
|
372
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
fields: FieldConfig[];
|
|
376
|
+
requireCompletionToContinue: boolean;
|
|
377
|
+
conditional?: import(".").JSONSchema | undefined;
|
|
378
|
+
})[];
|
|
379
|
+
};
|
|
380
|
+
} | {
|
|
381
|
+
type: "REJECT_CORRECTION";
|
|
382
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
383
|
+
} | {
|
|
384
|
+
type: "APPROVE_CORRECTION";
|
|
385
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
386
|
+
})[];
|
|
387
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
388
|
+
summary: {
|
|
389
|
+
fields: ({
|
|
390
|
+
fieldId: string;
|
|
391
|
+
label?: import("./TranslationConfig").TranslationConfig | undefined;
|
|
392
|
+
conditionals?: {
|
|
393
|
+
type: "SHOW";
|
|
394
|
+
conditional: import(".").JSONSchema;
|
|
395
|
+
}[] | undefined;
|
|
396
|
+
emptyValueMessage?: import("./TranslationConfig").TranslationConfig | undefined;
|
|
397
|
+
} | {
|
|
398
|
+
id: string;
|
|
399
|
+
value: import("./TranslationConfig").TranslationConfig;
|
|
400
|
+
label: import("./TranslationConfig").TranslationConfig;
|
|
401
|
+
conditionals?: {
|
|
402
|
+
type: "SHOW";
|
|
403
|
+
conditional: import(".").JSONSchema;
|
|
404
|
+
}[] | undefined;
|
|
405
|
+
emptyValueMessage?: import("./TranslationConfig").TranslationConfig | undefined;
|
|
406
|
+
})[];
|
|
407
|
+
};
|
|
408
|
+
advancedSearch: {
|
|
409
|
+
title: import("./TranslationConfig").TranslationConfig;
|
|
410
|
+
fields: ({
|
|
411
|
+
config: {
|
|
412
|
+
type: "exact" | "fuzzy" | "range" | "within";
|
|
413
|
+
searchFields?: string[] | undefined;
|
|
414
|
+
};
|
|
415
|
+
fieldId: string;
|
|
416
|
+
fieldType: "field";
|
|
417
|
+
type?: "NAME" | "PHONE" | "ID" | "ADDRESS" | "TEXT" | "NUMBER" | "NUMBER_WITH_UNIT" | "TEXTAREA" | "EMAIL" | "DATE" | "AGE" | "DATE_RANGE" | "SELECT_DATE_RANGE" | "TIME" | "PARAGRAPH" | "PAGE_HEADER" | "RADIO_GROUP" | "FILE" | "FILE_WITH_OPTIONS" | "BULLET_LIST" | "CHECKBOX" | "SELECT" | "COUNTRY" | "LOCATION" | "DIVIDER" | "ADMINISTRATIVE_AREA" | "FACILITY" | "OFFICE" | "SIGNATURE" | "DATA" | "BUTTON" | "SEARCH" | "ALPHA_PRINT_BUTTON" | "HTTP" | "LINK_BUTTON" | "VERIFICATION_STATUS" | "QUERY_PARAM_READER" | "QR_READER" | "ID_READER" | "LOADER" | undefined;
|
|
418
|
+
options?: {
|
|
419
|
+
value: string;
|
|
420
|
+
label: string | import("./TranslationConfig").TranslationConfig;
|
|
421
|
+
}[] | undefined;
|
|
422
|
+
label?: import("./TranslationConfig").TranslationConfig | undefined;
|
|
423
|
+
conditionals?: ({
|
|
424
|
+
type: "SHOW";
|
|
425
|
+
conditional: import(".").JSONSchema;
|
|
426
|
+
} | {
|
|
427
|
+
type: "ENABLE";
|
|
428
|
+
conditional: import(".").JSONSchema;
|
|
429
|
+
} | {
|
|
430
|
+
type: "DISPLAY_ON_REVIEW";
|
|
431
|
+
conditional: import(".").JSONSchema;
|
|
432
|
+
})[] | undefined;
|
|
433
|
+
searchCriteriaLabelPrefix?: import("./TranslationConfig").TranslationConfig | undefined;
|
|
434
|
+
validations?: {
|
|
435
|
+
message: import("./TranslationConfig").TranslationConfig;
|
|
436
|
+
validator: import(".").JSONSchema;
|
|
437
|
+
}[] | undefined;
|
|
438
|
+
} | {
|
|
439
|
+
config: {
|
|
440
|
+
type: "exact" | "fuzzy" | "range" | "within";
|
|
441
|
+
searchFields?: string[] | undefined;
|
|
442
|
+
};
|
|
443
|
+
fieldId: "event.status" | "event.trackingId" | "event.updatedAt" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation" | "event.legalStatuses.REGISTERED.registrationNumber";
|
|
444
|
+
fieldType: "event";
|
|
445
|
+
type?: "NAME" | "PHONE" | "ID" | "ADDRESS" | "TEXT" | "NUMBER" | "NUMBER_WITH_UNIT" | "TEXTAREA" | "EMAIL" | "DATE" | "AGE" | "DATE_RANGE" | "SELECT_DATE_RANGE" | "TIME" | "PARAGRAPH" | "PAGE_HEADER" | "RADIO_GROUP" | "FILE" | "FILE_WITH_OPTIONS" | "BULLET_LIST" | "CHECKBOX" | "SELECT" | "COUNTRY" | "LOCATION" | "DIVIDER" | "ADMINISTRATIVE_AREA" | "FACILITY" | "OFFICE" | "SIGNATURE" | "DATA" | "BUTTON" | "SEARCH" | "ALPHA_PRINT_BUTTON" | "HTTP" | "LINK_BUTTON" | "VERIFICATION_STATUS" | "QUERY_PARAM_READER" | "QR_READER" | "ID_READER" | "LOADER" | undefined;
|
|
446
|
+
options?: {
|
|
447
|
+
value: string;
|
|
448
|
+
label: string | import("./TranslationConfig").TranslationConfig;
|
|
449
|
+
}[] | undefined;
|
|
450
|
+
label?: import("./TranslationConfig").TranslationConfig | undefined;
|
|
451
|
+
conditionals?: ({
|
|
452
|
+
type: "SHOW";
|
|
453
|
+
conditional: import(".").JSONSchema;
|
|
454
|
+
} | {
|
|
455
|
+
type: "ENABLE";
|
|
456
|
+
conditional: import(".").JSONSchema;
|
|
457
|
+
} | {
|
|
458
|
+
type: "DISPLAY_ON_REVIEW";
|
|
459
|
+
conditional: import(".").JSONSchema;
|
|
460
|
+
})[] | undefined;
|
|
461
|
+
searchCriteriaLabelPrefix?: import("./TranslationConfig").TranslationConfig | undefined;
|
|
462
|
+
validations?: {
|
|
463
|
+
message: import("./TranslationConfig").TranslationConfig;
|
|
464
|
+
validator: import(".").JSONSchema;
|
|
465
|
+
}[] | undefined;
|
|
466
|
+
})[];
|
|
467
|
+
}[];
|
|
468
|
+
dateOfEvent?: {
|
|
469
|
+
$$field: string;
|
|
470
|
+
$$subfield: string[];
|
|
471
|
+
} | {
|
|
472
|
+
$$event: "createdAt" | "updatedAt" | "legalStatuses.DECLARED.createdAt" | "legalStatuses.DECLARED.acceptedAt" | "legalStatuses.REGISTERED.createdAt" | "legalStatuses.REGISTERED.acceptedAt";
|
|
473
|
+
} | undefined;
|
|
474
|
+
fallbackTitle?: import("./TranslationConfig").TranslationConfig | undefined;
|
|
475
|
+
};
|
|
476
|
+
export declare function timePeriodToDateRange(value: SelectDateRangeValue): {
|
|
477
|
+
startDate: string;
|
|
478
|
+
endDate: string;
|
|
479
|
+
};
|
|
480
|
+
export declare function mergeDrafts(currentDraft: Draft, incomingDraft: Draft): Draft;
|
|
481
|
+
export declare function getPendingAction(actions: Action[]): ActionDocument;
|
|
482
|
+
export declare function getCompleteActionAnnotation(annotation: ActionUpdate, event: EventDocument, action: ActionDocument): ActionUpdate;
|
|
483
|
+
export declare function getCompleteActionDeclaration<T extends EventState | ActionUpdate>(declaration: T, event: EventDocument, action: ActionDocument): T;
|
|
484
|
+
export declare function getAcceptedActions(event: EventDocument): ActionDocument[];
|
|
485
|
+
export declare function aggregateActionDeclarations(event: EventDocument): EventState;
|
|
486
|
+
//# sourceMappingURL=utils.d.ts.map
|