@opencrvs/toolkit 1.8.0-rc.f7a451a → 1.8.0-rc.f7bcb31
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 +4206 -8342
- package/dist/commons/conditionals/conditionals.d.ts +7 -11
- package/dist/commons/conditionals/validate.d.ts +6 -4
- package/dist/commons/events/ActionConfig.d.ts +1727 -97087
- package/dist/commons/events/ActionDocument.d.ts +211 -542
- package/dist/commons/events/ActionInput.d.ts +240 -248
- package/dist/commons/events/AdvancedSearchConfig.d.ts +22 -957
- package/dist/commons/events/CompositeFieldValue.d.ts +0 -3
- package/dist/commons/events/Draft.d.ts +20 -33
- package/dist/commons/events/EventConfig.d.ts +1350 -46327
- package/dist/commons/events/EventDocument.d.ts +156 -324
- package/dist/commons/events/EventIndex.d.ts +13 -1821
- package/dist/commons/events/EventMetadata.d.ts +11 -277
- package/dist/commons/events/FieldConfig.d.ts +754 -4280
- package/dist/commons/events/FieldType.d.ts +3 -3
- package/dist/commons/events/FieldTypeMapping.d.ts +4 -11
- package/dist/commons/events/FieldValue.d.ts +4 -7
- package/dist/commons/events/FormConfig.d.ts +441 -43593
- package/dist/commons/events/PageConfig.d.ts +208 -10864
- package/dist/commons/events/SummaryConfig.d.ts +39 -95
- package/dist/commons/events/User.d.ts +2 -31
- package/dist/commons/events/WorkqueueConfig.d.ts +20 -5341
- package/dist/commons/events/defineConfig.d.ts +35 -7218
- package/dist/commons/events/index.d.ts +0 -6
- package/dist/commons/events/test.utils.d.ts +46 -10
- package/dist/commons/events/utils.d.ts +67 -3665
- package/dist/conditionals/index.js +35 -55
- package/dist/events/index.js +1075 -2461
- package/dist/scopes/index.d.ts +4 -91
- package/dist/scopes/index.js +21 -39
- package/package.json +2 -3
- package/dist/commons/events/CountryConfigQueryInput.d.ts +0 -3008
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +0 -42
- package/dist/commons/events/event.d.ts +0 -54
- package/dist/commons/events/field.d.ts +0 -82
- package/dist/commons/events/scopes.d.ts +0 -45
- package/dist/commons/events/serializer.d.ts +0 -2
- package/dist/commons/events/workqueueDefaultColumns.d.ts +0 -3
@@ -1,42 +0,0 @@
|
|
1
|
-
import { z } from 'zod';
|
2
|
-
import { TranslationConfig } from './TranslationConfig';
|
3
|
-
/**
|
4
|
-
* Configuration for column header and value of cell of workqueue.
|
5
|
-
*/
|
6
|
-
export declare const WorkqueueColumn: z.ZodObject<{
|
7
|
-
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
8
|
-
id: string;
|
9
|
-
description: string;
|
10
|
-
defaultMessage: string;
|
11
|
-
}>;
|
12
|
-
value: z.ZodObject<{
|
13
|
-
$event: z.ZodEnum<["id", "title", "type", "status", "createdAt", "dateOfEvent", "createdBy", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags"]>;
|
14
|
-
}, "strip", z.ZodTypeAny, {
|
15
|
-
$event: "type" | "id" | "status" | "title" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "updatedAt" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags";
|
16
|
-
}, {
|
17
|
-
$event: "type" | "id" | "status" | "title" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "updatedAt" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags";
|
18
|
-
}>;
|
19
|
-
}, "strip", z.ZodTypeAny, {
|
20
|
-
value: {
|
21
|
-
$event: "type" | "id" | "status" | "title" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "updatedAt" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags";
|
22
|
-
};
|
23
|
-
label: TranslationConfig;
|
24
|
-
}, {
|
25
|
-
value: {
|
26
|
-
$event: "type" | "id" | "status" | "title" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "updatedAt" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags";
|
27
|
-
};
|
28
|
-
label: {
|
29
|
-
id: string;
|
30
|
-
description: string;
|
31
|
-
defaultMessage: string;
|
32
|
-
};
|
33
|
-
}>;
|
34
|
-
export type WorkqueueColumn = z.infer<typeof WorkqueueColumn>;
|
35
|
-
export type WorkqueueColumnInput = z.infer<typeof WorkqueueColumn>;
|
36
|
-
export declare function defineWorkqueuesColumns(workqueueColumns: WorkqueueColumnInput[]): {
|
37
|
-
value: {
|
38
|
-
$event: "type" | "id" | "status" | "title" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "updatedAt" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags";
|
39
|
-
};
|
40
|
-
label: TranslationConfig;
|
41
|
-
}[];
|
42
|
-
//# sourceMappingURL=WorkqueueColumnConfig.d.ts.map
|
@@ -1,54 +0,0 @@
|
|
1
|
-
import { EventFieldId } from './AdvancedSearchConfig';
|
2
|
-
import { EventMetadataKeys, EventMetadataParameter } from './EventMetadata';
|
3
|
-
import { SelectOption } from './FieldConfig';
|
4
|
-
/**
|
5
|
-
* Creates a function that acts like a callable + static method container.
|
6
|
-
*
|
7
|
-
* @example
|
8
|
-
* event('status') // → returns search config
|
9
|
-
* event.hasAction('CLICKED') // → returns conditional
|
10
|
-
*/
|
11
|
-
declare function eventFn(fieldId: EventFieldId, options?: SelectOption[]): {
|
12
|
-
range: () => {
|
13
|
-
fieldId: "status" | "updatedAt" | "trackingId" | "legalStatus.REGISTERED.createdAt" | "legalStatus.REGISTERED.createdAtLocation";
|
14
|
-
options: {
|
15
|
-
value: string;
|
16
|
-
label: import("./TranslationConfig").TranslationConfig;
|
17
|
-
}[] | undefined;
|
18
|
-
fieldType: "event";
|
19
|
-
} & {
|
20
|
-
config: {
|
21
|
-
type: "range";
|
22
|
-
};
|
23
|
-
};
|
24
|
-
exact: () => {
|
25
|
-
fieldId: "status" | "updatedAt" | "trackingId" | "legalStatus.REGISTERED.createdAt" | "legalStatus.REGISTERED.createdAtLocation";
|
26
|
-
options: {
|
27
|
-
value: string;
|
28
|
-
label: import("./TranslationConfig").TranslationConfig;
|
29
|
-
}[] | undefined;
|
30
|
-
fieldType: "event";
|
31
|
-
} & {
|
32
|
-
config: {
|
33
|
-
type: "exact";
|
34
|
-
};
|
35
|
-
};
|
36
|
-
fuzzy: () => {
|
37
|
-
fieldId: "status" | "updatedAt" | "trackingId" | "legalStatus.REGISTERED.createdAt" | "legalStatus.REGISTERED.createdAtLocation";
|
38
|
-
options: {
|
39
|
-
value: string;
|
40
|
-
label: import("./TranslationConfig").TranslationConfig;
|
41
|
-
}[] | undefined;
|
42
|
-
fieldType: "event";
|
43
|
-
} & {
|
44
|
-
config: {
|
45
|
-
type: "fuzzy";
|
46
|
-
};
|
47
|
-
};
|
48
|
-
};
|
49
|
-
declare const event: typeof eventFn & {
|
50
|
-
field(field: EventMetadataKeys): EventMetadataParameter;
|
51
|
-
hasAction: (action: import("./ActionType").ActionType) => import("../conditionals/conditionals").JSONSchema;
|
52
|
-
};
|
53
|
-
export { event };
|
54
|
-
//# sourceMappingURL=event.d.ts.map
|
@@ -1,82 +0,0 @@
|
|
1
|
-
import { FieldConditional } from './Conditional';
|
2
|
-
import { TranslationConfig } from './TranslationConfig';
|
3
|
-
/**
|
4
|
-
* Entry point for defining conditional logic or configuration for a form field.
|
5
|
-
* @param fieldId - The ID of the field to define rules or config for.
|
6
|
-
* @returns An object combining conditional methods and configuration builders.
|
7
|
-
*/
|
8
|
-
export declare function field(fieldId: string, options?: {
|
9
|
-
conditionals?: FieldConditional[];
|
10
|
-
searchCriteriaLabelPrefix?: TranslationConfig;
|
11
|
-
}): {
|
12
|
-
range: () => {
|
13
|
-
conditionals?: FieldConditional[];
|
14
|
-
searchCriteriaLabelPrefix?: TranslationConfig;
|
15
|
-
fieldId: string;
|
16
|
-
fieldType: "field";
|
17
|
-
} & {
|
18
|
-
config: {
|
19
|
-
type: "range";
|
20
|
-
};
|
21
|
-
};
|
22
|
-
exact: () => {
|
23
|
-
conditionals?: FieldConditional[];
|
24
|
-
searchCriteriaLabelPrefix?: TranslationConfig;
|
25
|
-
fieldId: string;
|
26
|
-
fieldType: "field";
|
27
|
-
} & {
|
28
|
-
config: {
|
29
|
-
type: "exact";
|
30
|
-
};
|
31
|
-
};
|
32
|
-
fuzzy: () => {
|
33
|
-
conditionals?: FieldConditional[];
|
34
|
-
searchCriteriaLabelPrefix?: TranslationConfig;
|
35
|
-
fieldId: string;
|
36
|
-
fieldType: "field";
|
37
|
-
} & {
|
38
|
-
config: {
|
39
|
-
type: "fuzzy";
|
40
|
-
};
|
41
|
-
};
|
42
|
-
isAfter: () => {
|
43
|
-
days: (days: number) => {
|
44
|
-
inPast: () => import("../conditionals/conditionals").JSONSchema;
|
45
|
-
inFuture: () => import("../conditionals/conditionals").JSONSchema;
|
46
|
-
};
|
47
|
-
date: (date: string | {
|
48
|
-
[key: string]: unknown;
|
49
|
-
_fieldId: string;
|
50
|
-
}) => import("../conditionals/conditionals").JSONSchema;
|
51
|
-
now: () => import("../conditionals/conditionals").JSONSchema;
|
52
|
-
};
|
53
|
-
isBefore: () => {
|
54
|
-
days: (days: number) => {
|
55
|
-
inPast: () => import("../conditionals/conditionals").JSONSchema;
|
56
|
-
inFuture: () => import("../conditionals/conditionals").JSONSchema;
|
57
|
-
};
|
58
|
-
date: (date: string | {
|
59
|
-
[key: string]: unknown;
|
60
|
-
_fieldId: string;
|
61
|
-
}) => import("../conditionals/conditionals").JSONSchema;
|
62
|
-
now: () => import("../conditionals/conditionals").JSONSchema;
|
63
|
-
};
|
64
|
-
isEqualTo: (value: string | boolean | {
|
65
|
-
[key: string]: unknown;
|
66
|
-
_fieldId: string;
|
67
|
-
}) => import("../conditionals/conditionals").JSONSchema;
|
68
|
-
isFalsy: () => import("../conditionals/conditionals").JSONSchema;
|
69
|
-
isUndefined: () => import("../conditionals/conditionals").JSONSchema;
|
70
|
-
inArray: (values: string[]) => import("../conditionals/conditionals").JSONSchema;
|
71
|
-
isValidEnglishName: () => import("../conditionals/conditionals").JSONSchema;
|
72
|
-
matches: (pattern: string) => import("../conditionals/conditionals").JSONSchema;
|
73
|
-
isBetween: (min: number, max: number) => import("../conditionals/conditionals").JSONSchema;
|
74
|
-
getId: () => {
|
75
|
-
fieldId: string;
|
76
|
-
};
|
77
|
-
/**
|
78
|
-
* @private Internal property used for field reference tracking.
|
79
|
-
*/
|
80
|
-
_fieldId: string;
|
81
|
-
};
|
82
|
-
//# sourceMappingURL=field.d.ts.map
|
@@ -1,45 +0,0 @@
|
|
1
|
-
import { Scope } from '../scopes';
|
2
|
-
import { ActionType } from './ActionType';
|
3
|
-
export declare const CONFIG_GET_ALLOWED_SCOPES: ["record.declare-birth", "record.read", "record.declaration-submit-incomplete", "record.declaration-submit-for-review", "record.register", "record.export-records", "config", "config.update:all"];
|
4
|
-
export declare const CONFIG_SEARCH_ALLOWED_SCOPES: ("search.birth:my-jurisdiction" | "search.birth" | "search.death:my-jurisdiction" | "search.death" | "search.marriage:my-jurisdiction" | "search.marriage")[];
|
5
|
-
export declare const ACTION_ALLOWED_SCOPES: {
|
6
|
-
READ: ["record.declare-birth", "record.read", "record.declaration-submit-incomplete", "record.declaration-submit-for-review", "record.register", "record.export-records"];
|
7
|
-
CREATE: ["record.declare-birth", "record.declaration-submit-incomplete", "record.declaration-submit-for-review"];
|
8
|
-
NOTIFY: ["record.declaration-submit-incomplete"];
|
9
|
-
DECLARE: ["record.declare-birth", "record.declaration-submit-for-approval", "record.register"];
|
10
|
-
DELETE: ["record.declare-birth"];
|
11
|
-
VALIDATE: ["record.declaration-submit-for-approval", "record.register"];
|
12
|
-
REGISTER: ["record.register"];
|
13
|
-
PRINT_CERTIFICATE: ["record.registration-print&issue-certified-copies"];
|
14
|
-
REQUEST_CORRECTION: ["record.registration-request-correction"];
|
15
|
-
REJECT_CORRECTION: ["record.registration-correct"];
|
16
|
-
APPROVE_CORRECTION: ["record.registration-correct"];
|
17
|
-
MARKED_AS_DUPLICATE: ["record.declaration-archive"];
|
18
|
-
ARCHIVE: ["record.declaration-archive"];
|
19
|
-
REJECT: ["record.declaration-submit-for-updates"];
|
20
|
-
ASSIGN: null;
|
21
|
-
UNASSIGN: null;
|
22
|
-
DETECT_DUPLICATE: [];
|
23
|
-
};
|
24
|
-
export declare const ACTION_ALLOWED_CONFIGURABLE_SCOPES: {
|
25
|
-
READ: never[];
|
26
|
-
CREATE: "record.notify"[];
|
27
|
-
NOTIFY: "record.notify"[];
|
28
|
-
DECLARE: never[];
|
29
|
-
DELETE: never[];
|
30
|
-
VALIDATE: never[];
|
31
|
-
REGISTER: never[];
|
32
|
-
PRINT_CERTIFICATE: never[];
|
33
|
-
REQUEST_CORRECTION: never[];
|
34
|
-
REJECT_CORRECTION: never[];
|
35
|
-
APPROVE_CORRECTION: never[];
|
36
|
-
MARKED_AS_DUPLICATE: never[];
|
37
|
-
ARCHIVE: never[];
|
38
|
-
REJECT: never[];
|
39
|
-
ASSIGN: never[];
|
40
|
-
UNASSIGN: never[];
|
41
|
-
DETECT_DUPLICATE: never[];
|
42
|
-
};
|
43
|
-
export declare function hasAnyOfScopes(a: Scope[], b: Scope[]): boolean;
|
44
|
-
export declare function filterUnallowedActions(actions: ActionType[], userScopes: Scope[]): ActionType[];
|
45
|
-
//# sourceMappingURL=scopes.d.ts.map
|