@opencrvs/toolkit 1.8.1-rc.8c25e85 → 1.8.1-rc.a372970
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 +5078 -5910
- package/dist/commons/conditionals/conditionals.d.ts +13 -9
- package/dist/commons/conditionals/validate.d.ts +6 -15
- package/dist/commons/events/ActionConfig.d.ts +1718 -119315
- package/dist/commons/events/ActionDocument.d.ts +1325 -4879
- package/dist/commons/events/ActionInput.d.ts +1025 -3205
- package/dist/commons/events/ActionType.d.ts +1 -10
- package/dist/commons/events/AdvancedSearchConfig.d.ts +22 -1282
- package/dist/commons/events/CompositeFieldValue.d.ts +9 -40
- package/dist/commons/events/Draft.d.ts +97 -288
- package/dist/commons/events/EventConfig.d.ts +1359 -54365
- package/dist/commons/events/EventDocument.d.ts +833 -2720
- package/dist/commons/events/EventIndex.d.ts +29 -2228
- package/dist/commons/events/EventMetadata.d.ts +47 -347
- package/dist/commons/events/FieldConfig.d.ts +1250 -6746
- package/dist/commons/events/FieldType.d.ts +3 -8
- package/dist/commons/events/FieldTypeMapping.d.ts +73 -161
- package/dist/commons/events/FieldValue.d.ts +20 -91
- package/dist/commons/events/FormConfig.d.ts +533 -55781
- package/dist/commons/events/PageConfig.d.ts +208 -13824
- package/dist/commons/events/SummaryConfig.d.ts +42 -93
- package/dist/commons/events/User.d.ts +2 -34
- package/dist/commons/events/WorkqueueConfig.d.ts +20 -8116
- package/dist/commons/events/defineConfig.d.ts +99 -8551
- package/dist/commons/events/index.d.ts +0 -8
- package/dist/commons/events/test.utils.d.ts +90 -206
- package/dist/commons/events/transactions.d.ts +1 -1
- package/dist/commons/events/utils.d.ts +94 -15442
- package/dist/conditionals/index.js +56 -66
- package/dist/events/index.js +1835 -4707
- package/dist/scopes/index.d.ts +7 -184
- package/dist/scopes/index.js +40 -140
- package/package.json +3 -4
- package/dist/commons/events/Constants.d.ts +0 -3
- package/dist/commons/events/CountryConfigQueryInput.d.ts +0 -4132
- package/dist/commons/events/CreatedAtLocation.d.ts +0 -2
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +0 -53
- package/dist/commons/events/event.d.ts +0 -46
- package/dist/commons/events/field.d.ts +0 -94
- 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,53 +0,0 @@
|
|
1
|
-
import { z } from 'zod';
|
2
|
-
import { TranslationConfig } from './TranslationConfig';
|
3
|
-
export declare const WorkqueueColumnKeysArray: readonly ["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags", "title", "outbox"];
|
4
|
-
export declare const WorkqueueColumnKeys: z.ZodEnum<["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags", "title", "outbox"]>;
|
5
|
-
export type WorkqueueColumnKeys = z.infer<typeof WorkqueueColumnKeys>;
|
6
|
-
export declare const WorkqueueColumnValue: z.ZodObject<{
|
7
|
-
$event: z.ZodEnum<["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags", "title", "outbox"]>;
|
8
|
-
}, "strip", z.ZodTypeAny, {
|
9
|
-
$event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "updatedAt" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
|
10
|
-
}, {
|
11
|
-
$event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "updatedAt" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
|
12
|
-
}>;
|
13
|
-
export type WorkqueueColumnValue = z.infer<typeof WorkqueueColumnValue>;
|
14
|
-
/**
|
15
|
-
* Configuration for column header and value of cell of workqueue.
|
16
|
-
*/
|
17
|
-
export declare const WorkqueueColumn: z.ZodObject<{
|
18
|
-
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
19
|
-
id: string;
|
20
|
-
description: string;
|
21
|
-
defaultMessage: string;
|
22
|
-
}>;
|
23
|
-
value: z.ZodObject<{
|
24
|
-
$event: z.ZodEnum<["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags", "title", "outbox"]>;
|
25
|
-
}, "strip", z.ZodTypeAny, {
|
26
|
-
$event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "updatedAt" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
|
27
|
-
}, {
|
28
|
-
$event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "updatedAt" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
|
29
|
-
}>;
|
30
|
-
}, "strip", z.ZodTypeAny, {
|
31
|
-
value: {
|
32
|
-
$event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "updatedAt" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
|
33
|
-
};
|
34
|
-
label: TranslationConfig;
|
35
|
-
}, {
|
36
|
-
value: {
|
37
|
-
$event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "updatedAt" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
|
38
|
-
};
|
39
|
-
label: {
|
40
|
-
id: string;
|
41
|
-
description: string;
|
42
|
-
defaultMessage: string;
|
43
|
-
};
|
44
|
-
}>;
|
45
|
-
export type WorkqueueColumn = z.infer<typeof WorkqueueColumn>;
|
46
|
-
export type WorkqueueColumnInput = z.infer<typeof WorkqueueColumn>;
|
47
|
-
export declare function defineWorkqueuesColumns(workqueueColumns: WorkqueueColumnInput[]): {
|
48
|
-
value: {
|
49
|
-
$event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "updatedAt" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
|
50
|
-
};
|
51
|
-
label: TranslationConfig;
|
52
|
-
}[];
|
53
|
-
//# sourceMappingURL=WorkqueueColumnConfig.d.ts.map
|
@@ -1,46 +0,0 @@
|
|
1
|
-
import { ActionType } from './ActionType';
|
2
|
-
import { EventFieldId } from './AdvancedSearchConfig';
|
3
|
-
import { WorkqueueColumnKeys, WorkqueueColumnValue } from './WorkqueueColumnConfig';
|
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): {
|
12
|
-
range: () => {
|
13
|
-
fieldId: "status" | "updatedAt" | "trackingId" | "legalStatuses.REGISTERED.acceptedAt" | "legalStatuses.REGISTERED.createdAtLocation";
|
14
|
-
fieldType: "event";
|
15
|
-
} & {
|
16
|
-
config: {
|
17
|
-
type: "range";
|
18
|
-
};
|
19
|
-
};
|
20
|
-
exact: () => {
|
21
|
-
fieldId: "status" | "updatedAt" | "trackingId" | "legalStatuses.REGISTERED.acceptedAt" | "legalStatuses.REGISTERED.createdAtLocation";
|
22
|
-
fieldType: "event";
|
23
|
-
} & {
|
24
|
-
config: {
|
25
|
-
type: "exact";
|
26
|
-
};
|
27
|
-
};
|
28
|
-
fuzzy: () => {
|
29
|
-
fieldId: "status" | "updatedAt" | "trackingId" | "legalStatuses.REGISTERED.acceptedAt" | "legalStatuses.REGISTERED.createdAtLocation";
|
30
|
-
fieldType: "event";
|
31
|
-
} & {
|
32
|
-
config: {
|
33
|
-
type: "fuzzy";
|
34
|
-
};
|
35
|
-
};
|
36
|
-
};
|
37
|
-
declare const event: typeof eventFn & {
|
38
|
-
/**
|
39
|
-
* Checks if the event contains a specific action type.
|
40
|
-
* @param action - The action type to check for.
|
41
|
-
*/
|
42
|
-
hasAction: (action: ActionType) => import("../conditionals/conditionals").JSONSchema;
|
43
|
-
field(field: WorkqueueColumnKeys): WorkqueueColumnValue;
|
44
|
-
};
|
45
|
-
export { event };
|
46
|
-
//# sourceMappingURL=event.d.ts.map
|
@@ -1,94 +0,0 @@
|
|
1
|
-
import { FieldConditional } from './Conditional';
|
2
|
-
import { TranslationConfig } from './TranslationConfig';
|
3
|
-
import { SelectOption, ValidationConfig } from './FieldConfig';
|
4
|
-
/**
|
5
|
-
* Entry point for defining conditional logic or configuration for a form field.
|
6
|
-
* @param fieldId - The ID of the field to define rules or config for.
|
7
|
-
* @returns An object combining conditional methods and configuration builders.
|
8
|
-
*/
|
9
|
-
export declare function field(fieldId: string, options?: {
|
10
|
-
options?: SelectOption[];
|
11
|
-
excludeInSearchQuery?: boolean;
|
12
|
-
alternateFieldIds?: string[];
|
13
|
-
conditionals?: FieldConditional[];
|
14
|
-
validations?: ValidationConfig[];
|
15
|
-
searchCriteriaLabelPrefix?: TranslationConfig;
|
16
|
-
}): {
|
17
|
-
range: () => {
|
18
|
-
options?: SelectOption[];
|
19
|
-
excludeInSearchQuery?: boolean;
|
20
|
-
alternateFieldIds?: string[];
|
21
|
-
conditionals?: FieldConditional[];
|
22
|
-
validations?: ValidationConfig[];
|
23
|
-
searchCriteriaLabelPrefix?: TranslationConfig;
|
24
|
-
fieldId: string;
|
25
|
-
fieldType: "field";
|
26
|
-
} & {
|
27
|
-
config: {
|
28
|
-
type: "range";
|
29
|
-
};
|
30
|
-
};
|
31
|
-
exact: () => {
|
32
|
-
options?: SelectOption[];
|
33
|
-
excludeInSearchQuery?: boolean;
|
34
|
-
alternateFieldIds?: string[];
|
35
|
-
conditionals?: FieldConditional[];
|
36
|
-
validations?: ValidationConfig[];
|
37
|
-
searchCriteriaLabelPrefix?: TranslationConfig;
|
38
|
-
fieldId: string;
|
39
|
-
fieldType: "field";
|
40
|
-
} & {
|
41
|
-
config: {
|
42
|
-
type: "exact";
|
43
|
-
};
|
44
|
-
};
|
45
|
-
fuzzy: () => {
|
46
|
-
options?: SelectOption[];
|
47
|
-
excludeInSearchQuery?: boolean;
|
48
|
-
alternateFieldIds?: string[];
|
49
|
-
conditionals?: FieldConditional[];
|
50
|
-
validations?: ValidationConfig[];
|
51
|
-
searchCriteriaLabelPrefix?: TranslationConfig;
|
52
|
-
fieldId: string;
|
53
|
-
fieldType: "field";
|
54
|
-
} & {
|
55
|
-
config: {
|
56
|
-
type: "fuzzy";
|
57
|
-
};
|
58
|
-
};
|
59
|
-
$$field: string;
|
60
|
-
isAfter: () => {
|
61
|
-
days: (days: number) => {
|
62
|
-
inPast: () => import("../conditionals/conditionals").JSONSchema;
|
63
|
-
inFuture: () => import("../conditionals/conditionals").JSONSchema;
|
64
|
-
};
|
65
|
-
date: (date: string | {
|
66
|
-
$$field: string;
|
67
|
-
}) => import("../conditionals/conditionals").JSONSchema;
|
68
|
-
now: () => import("../conditionals/conditionals").JSONSchema;
|
69
|
-
};
|
70
|
-
isBefore: () => {
|
71
|
-
days: (days: number) => {
|
72
|
-
inPast: () => import("../conditionals/conditionals").JSONSchema;
|
73
|
-
inFuture: () => import("../conditionals/conditionals").JSONSchema;
|
74
|
-
};
|
75
|
-
date: (date: string | {
|
76
|
-
$$field: string;
|
77
|
-
}) => import("../conditionals/conditionals").JSONSchema;
|
78
|
-
now: () => import("../conditionals/conditionals").JSONSchema;
|
79
|
-
};
|
80
|
-
isEqualTo: (value: string | boolean | {
|
81
|
-
$$field: string;
|
82
|
-
}) => import("../conditionals/conditionals").JSONSchema;
|
83
|
-
isFalsy: () => import("../conditionals/conditionals").JSONSchema;
|
84
|
-
isUndefined: () => import("../conditionals/conditionals").JSONSchema;
|
85
|
-
inArray: (values: string[]) => import("../conditionals/conditionals").JSONSchema;
|
86
|
-
isValidEnglishName: () => import("../conditionals/conditionals").JSONSchema;
|
87
|
-
matches: (pattern: string) => import("../conditionals/conditionals").JSONSchema;
|
88
|
-
isBetween: (min: number, max: number) => import("../conditionals/conditionals").JSONSchema;
|
89
|
-
getId: () => {
|
90
|
-
fieldId: string;
|
91
|
-
};
|
92
|
-
object: (options: Record<string, any>) => import("../conditionals/conditionals").JSONSchema;
|
93
|
-
};
|
94
|
-
//# sourceMappingURL=field.d.ts.map
|
@@ -1,45 +0,0 @@
|
|
1
|
-
import { Scope } from '../scopes';
|
2
|
-
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"];
|
3
|
-
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")[];
|
4
|
-
export declare const ACTION_ALLOWED_SCOPES: {
|
5
|
-
READ: ["record.declare-birth", "record.read", "record.declaration-submit-incomplete", "record.declaration-submit-for-review", "record.register", "record.export-records"];
|
6
|
-
CREATE: ["record.declare-birth", "record.declaration-submit-incomplete", "record.declaration-submit-for-review"];
|
7
|
-
NOTIFY: ["record.declaration-submit-incomplete"];
|
8
|
-
DECLARE: ["record.declare-birth", "record.declaration-submit-for-approval", "record.register"];
|
9
|
-
DELETE: ["record.declare-birth"];
|
10
|
-
VALIDATE: ["record.declaration-submit-for-approval", "record.register"];
|
11
|
-
REGISTER: ["record.register"];
|
12
|
-
PRINT_CERTIFICATE: ["record.registration-print&issue-certified-copies"];
|
13
|
-
REQUEST_CORRECTION: ["record.registration-request-correction", "record.registration-correct"];
|
14
|
-
REVIEW_CORRECTION_REQUEST: ["record.registration-correct"];
|
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 const WRITE_ACTION_SCOPES: ("record.declare-birth" | "record.declaration-submit-for-approval" | "record.register" | "record.registration-print&issue-certified-copies")[];
|
44
|
-
export declare function hasAnyOfScopes(a: Scope[], b: Scope[]): boolean;
|
45
|
-
//# sourceMappingURL=scopes.d.ts.map
|