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