@opencrvs/toolkit 1.8.0-rc.fe7c504 → 1.8.0-rc.fe8c092
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commons/api/router.d.ts +10468 -1335
- package/dist/commons/events/ActionConfig.d.ts +0 -2600
- package/dist/commons/events/ActionDocument.d.ts +1087 -1081
- package/dist/commons/events/ActionInput.d.ts +726 -726
- package/dist/commons/events/ActionType.d.ts +2 -0
- package/dist/commons/events/AdvancedSearchConfig.d.ts +18 -222
- package/dist/commons/events/CompositeFieldValue.d.ts +6 -6
- package/dist/commons/events/CountryConfigQueryInput.d.ts +572 -1234
- package/dist/commons/events/CreatedAtLocation.d.ts +2 -1
- package/dist/commons/events/Draft.d.ts +77 -77
- package/dist/commons/events/EventConfig.d.ts +0 -1458
- package/dist/commons/events/EventDocument.d.ts +711 -706
- package/dist/commons/events/EventIndex.d.ts +151 -135
- package/dist/commons/events/EventMetadata.d.ts +29 -38
- package/dist/commons/events/FieldConfig.d.ts +0 -178
- package/dist/commons/events/FieldTypeMapping.d.ts +16 -16
- package/dist/commons/events/FieldValue.d.ts +12 -12
- package/dist/commons/events/FormConfig.d.ts +0 -1092
- package/dist/commons/events/PageConfig.d.ts +0 -260
- package/dist/commons/events/User.d.ts +3 -6
- package/dist/commons/events/WorkqueueConfig.d.ts +1028 -2038
- package/dist/commons/events/defineConfig.d.ts +0 -294
- package/dist/commons/events/field.d.ts +0 -5
- package/dist/commons/events/test.utils.d.ts +19 -30
- package/dist/commons/events/transactions.d.ts +1 -1
- package/dist/commons/events/utils.d.ts +15 -440
- package/dist/conditionals/index.js +18 -22
- package/dist/events/index.js +185 -303
- package/dist/scopes/index.d.ts +6 -92
- package/dist/scopes/index.js +9 -38
- package/package.json +3 -3
@@ -1,6 +1,5 @@
|
|
1
1
|
import { FieldConditional } from './Conditional';
|
2
2
|
import { TranslationConfig } from './TranslationConfig';
|
3
|
-
import { ValidationConfig } from './FieldConfig';
|
4
3
|
/**
|
5
4
|
* Entry point for defining conditional logic or configuration for a form field.
|
6
5
|
* @param fieldId - The ID of the field to define rules or config for.
|
@@ -8,12 +7,10 @@ import { ValidationConfig } from './FieldConfig';
|
|
8
7
|
*/
|
9
8
|
export declare function field(fieldId: string, options?: {
|
10
9
|
conditionals?: FieldConditional[];
|
11
|
-
validations?: ValidationConfig[];
|
12
10
|
searchCriteriaLabelPrefix?: TranslationConfig;
|
13
11
|
}): {
|
14
12
|
range: () => {
|
15
13
|
conditionals?: FieldConditional[];
|
16
|
-
validations?: ValidationConfig[];
|
17
14
|
searchCriteriaLabelPrefix?: TranslationConfig;
|
18
15
|
fieldId: string;
|
19
16
|
fieldType: "field";
|
@@ -24,7 +21,6 @@ export declare function field(fieldId: string, options?: {
|
|
24
21
|
};
|
25
22
|
exact: () => {
|
26
23
|
conditionals?: FieldConditional[];
|
27
|
-
validations?: ValidationConfig[];
|
28
24
|
searchCriteriaLabelPrefix?: TranslationConfig;
|
29
25
|
fieldId: string;
|
30
26
|
fieldType: "field";
|
@@ -35,7 +31,6 @@ export declare function field(fieldId: string, options?: {
|
|
35
31
|
};
|
36
32
|
fuzzy: () => {
|
37
33
|
conditionals?: FieldConditional[];
|
38
|
-
validations?: ValidationConfig[];
|
39
34
|
searchCriteriaLabelPrefix?: TranslationConfig;
|
40
35
|
fieldId: string;
|
41
36
|
fieldType: "field";
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { UUID } from '../uuid';
|
2
1
|
import { ActionDocument, EventState } from './ActionDocument';
|
3
2
|
import { ArchiveActionInput, AssignActionInput, DeclareActionInput, NotifyActionInput, RegisterActionInput, RejectDeclarationActionInput, RequestCorrectionActionInput, UnassignActionInput, ValidateActionInput } from './ActionInput';
|
4
3
|
import { ActionType } from './ActionType';
|
@@ -38,10 +37,9 @@ export declare function eventPayloadGenerator(rng: () => number): {
|
|
38
37
|
type: string;
|
39
38
|
id: string;
|
40
39
|
};
|
41
|
-
draft: ({ eventId, actionType
|
42
|
-
eventId:
|
40
|
+
draft: ({ eventId, actionType }: {
|
41
|
+
eventId: string;
|
43
42
|
actionType: ActionType;
|
44
|
-
annotation?: Record<string, any>;
|
45
43
|
}, input?: Partial<Draft>) => Draft;
|
46
44
|
actions: {
|
47
45
|
declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
|
@@ -62,8 +60,8 @@ export declare function eventPayloadGenerator(rng: () => number): {
|
|
62
60
|
street?: string | null | undefined;
|
63
61
|
zipCode?: string | null | undefined;
|
64
62
|
} | {
|
65
|
-
firstname
|
66
|
-
surname
|
63
|
+
firstname: string;
|
64
|
+
surname: string;
|
67
65
|
middlename?: string | null | undefined;
|
68
66
|
} | {
|
69
67
|
country: string;
|
@@ -115,8 +113,8 @@ export declare function eventPayloadGenerator(rng: () => number): {
|
|
115
113
|
street?: string | null | undefined;
|
116
114
|
zipCode?: string | null | undefined;
|
117
115
|
} | {
|
118
|
-
firstname
|
119
|
-
surname
|
116
|
+
firstname: string;
|
117
|
+
surname: string;
|
120
118
|
middlename?: string | null | undefined;
|
121
119
|
} | {
|
122
120
|
country: string;
|
@@ -162,8 +160,8 @@ export declare function eventPayloadGenerator(rng: () => number): {
|
|
162
160
|
street?: string | null | undefined;
|
163
161
|
zipCode?: string | null | undefined;
|
164
162
|
} | {
|
165
|
-
firstname
|
166
|
-
surname
|
163
|
+
firstname: string;
|
164
|
+
surname: string;
|
167
165
|
middlename?: string | null | undefined;
|
168
166
|
} | {
|
169
167
|
country: string;
|
@@ -226,8 +224,8 @@ export declare function eventPayloadGenerator(rng: () => number): {
|
|
226
224
|
street?: string | null | undefined;
|
227
225
|
zipCode?: string | null | undefined;
|
228
226
|
} | {
|
229
|
-
firstname
|
230
|
-
surname
|
227
|
+
firstname: string;
|
228
|
+
surname: string;
|
231
229
|
middlename?: string | null | undefined;
|
232
230
|
} | {
|
233
231
|
country: string;
|
@@ -274,7 +272,7 @@ export declare function eventPayloadGenerator(rng: () => number): {
|
|
274
272
|
message: string;
|
275
273
|
};
|
276
274
|
};
|
277
|
-
register: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment"
|
275
|
+
register: (eventId: string, input?: Partial<Pick<RegisterActionInput, "transactionId" | "declaration" | "annotation" | "keepAssignment">>) => {
|
278
276
|
transactionId: string;
|
279
277
|
declaration: Record<string, string | number | boolean | {
|
280
278
|
type: string;
|
@@ -292,8 +290,8 @@ export declare function eventPayloadGenerator(rng: () => number): {
|
|
292
290
|
street?: string | null | undefined;
|
293
291
|
zipCode?: string | null | undefined;
|
294
292
|
} | {
|
295
|
-
firstname
|
296
|
-
surname
|
293
|
+
firstname: string;
|
294
|
+
surname: string;
|
297
295
|
middlename?: string | null | undefined;
|
298
296
|
} | {
|
299
297
|
country: string;
|
@@ -319,7 +317,6 @@ export declare function eventPayloadGenerator(rng: () => number): {
|
|
319
317
|
originalFilename: string;
|
320
318
|
}[] | [string, string] | null | undefined>;
|
321
319
|
annotation: {};
|
322
|
-
registrationNumber?: string | undefined;
|
323
320
|
keepAssignment?: boolean | undefined;
|
324
321
|
type: "REGISTER";
|
325
322
|
eventId: string;
|
@@ -352,8 +349,8 @@ export declare function eventPayloadGenerator(rng: () => number): {
|
|
352
349
|
street?: string | null | undefined;
|
353
350
|
zipCode?: string | null | undefined;
|
354
351
|
} | {
|
355
|
-
firstname
|
356
|
-
surname
|
352
|
+
firstname: string;
|
353
|
+
surname: string;
|
357
354
|
middlename?: string | null | undefined;
|
358
355
|
} | {
|
359
356
|
country: string;
|
@@ -403,31 +400,25 @@ export declare function eventPayloadGenerator(rng: () => number): {
|
|
403
400
|
};
|
404
401
|
};
|
405
402
|
};
|
406
|
-
export declare function generateActionDocument({ configuration, action, rng, defaults
|
403
|
+
export declare function generateActionDocument({ configuration, action, rng, defaults }: {
|
407
404
|
configuration: EventConfig;
|
408
405
|
action: ActionType;
|
409
406
|
rng?: () => number;
|
410
407
|
defaults?: Partial<ActionDocument>;
|
411
408
|
user?: Partial<{
|
412
409
|
signature: string;
|
413
|
-
primaryOfficeId:
|
410
|
+
primaryOfficeId: string;
|
414
411
|
role: TestUserRole;
|
415
412
|
id: string;
|
416
413
|
}>;
|
417
414
|
}): ActionDocument;
|
418
|
-
export declare function generateEventDocument({ configuration, actions, rng
|
415
|
+
export declare function generateEventDocument({ configuration, actions, rng }: {
|
419
416
|
configuration: EventConfig;
|
420
417
|
actions: ActionType[];
|
421
418
|
rng?: () => number;
|
422
|
-
user?: Partial<{
|
423
|
-
signature: string;
|
424
|
-
primaryOfficeId: UUID;
|
425
|
-
role: TestUserRole;
|
426
|
-
id: string;
|
427
|
-
}>;
|
428
419
|
}): EventDocument;
|
429
420
|
export declare function generateEventDraftDocument({ eventId, actionType, rng, declaration }: {
|
430
|
-
eventId:
|
421
|
+
eventId: string;
|
431
422
|
actionType: ActionType;
|
432
423
|
rng?: () => number;
|
433
424
|
declaration?: EventState;
|
@@ -441,8 +432,6 @@ export declare function getRandomDate(rng: () => number, start: string, end: str
|
|
441
432
|
* @returns A function that generates pseudo-random numbers between 0 and 1 [0, 1)
|
442
433
|
*/
|
443
434
|
export declare function createPrng(seed: number): () => number;
|
444
|
-
export declare function generateUuid(rng?: () => number): UUID;
|
445
|
-
export declare function generateRegistrationNumber(rng: () => number): string;
|
446
435
|
export declare function generateRandomSignature(rng: () => number): string;
|
447
436
|
export declare const eventQueryDataGenerator: (overrides?: Partial<EventIndex>, seed?: number) => EventIndex;
|
448
437
|
export declare const generateTranslationConfig: (message: string) => TranslationConfig;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare function generateTransactionId():
|
1
|
+
export declare function generateTransactionId(): import("../uuid").UUID;
|
2
2
|
//# sourceMappingURL=transactions.d.ts.map
|