@opencrvs/toolkit 1.8.0-rc.f8aa0c5 → 1.8.0-rc.f8b1f33
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 +978 -5785
- package/dist/commons/conditionals/conditionals.d.ts +6 -14
- package/dist/commons/conditionals/validate.d.ts +6 -10
- package/dist/commons/events/ActionConfig.d.ts +1726 -120271
- package/dist/commons/events/ActionDocument.d.ts +564 -2585
- package/dist/commons/events/ActionInput.d.ts +425 -1705
- package/dist/commons/events/ActionType.d.ts +0 -4
- package/dist/commons/events/AdvancedSearchConfig.d.ts +22 -1233
- package/dist/commons/events/CompositeFieldValue.d.ts +0 -31
- package/dist/commons/events/Draft.d.ts +49 -168
- package/dist/commons/events/EventConfig.d.ts +1362 -57941
- package/dist/commons/events/EventDocument.d.ts +400 -1639
- package/dist/commons/events/EventIndex.d.ts +27 -2012
- package/dist/commons/events/EventMetadata.d.ts +45 -343
- package/dist/commons/events/FieldConfig.d.ts +1059 -5655
- package/dist/commons/events/FieldType.d.ts +3 -6
- package/dist/commons/events/FieldTypeMapping.d.ts +54 -103
- package/dist/commons/events/FieldValue.d.ts +8 -49
- package/dist/commons/events/FormConfig.d.ts +524 -50366
- package/dist/commons/events/PageConfig.d.ts +208 -12498
- package/dist/commons/events/SummaryConfig.d.ts +42 -93
- package/dist/commons/events/User.d.ts +2 -31
- package/dist/commons/events/WorkqueueConfig.d.ts +20 -7300
- package/dist/commons/events/defineConfig.d.ts +75 -9326
- package/dist/commons/events/index.d.ts +0 -8
- package/dist/commons/events/test.utils.d.ts +79 -171
- package/dist/commons/events/transactions.d.ts +1 -1
- package/dist/commons/events/utils.d.ts +72 -13814
- package/dist/conditionals/index.js +52 -95
- package/dist/events/index.js +1522 -4190
- 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 -3730
- 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 -54
- package/dist/commons/events/field.d.ts +0 -82
- package/dist/commons/events/scopes.d.ts +0 -44
- 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,54 +0,0 @@
|
|
1
|
-
import { EventFieldId } from './AdvancedSearchConfig';
|
2
|
-
import { SelectOption } from './FieldConfig';
|
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, 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: WorkqueueColumnKeys): WorkqueueColumnValue;
|
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
|
-
import { 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
|
-
conditionals?: FieldConditional[];
|
11
|
-
validations?: ValidationConfig[];
|
12
|
-
searchCriteriaLabelPrefix?: TranslationConfig;
|
13
|
-
}): {
|
14
|
-
range: () => {
|
15
|
-
conditionals?: FieldConditional[];
|
16
|
-
validations?: ValidationConfig[];
|
17
|
-
searchCriteriaLabelPrefix?: TranslationConfig;
|
18
|
-
fieldId: string;
|
19
|
-
fieldType: "field";
|
20
|
-
} & {
|
21
|
-
config: {
|
22
|
-
type: "range";
|
23
|
-
};
|
24
|
-
};
|
25
|
-
exact: () => {
|
26
|
-
conditionals?: FieldConditional[];
|
27
|
-
validations?: ValidationConfig[];
|
28
|
-
searchCriteriaLabelPrefix?: TranslationConfig;
|
29
|
-
fieldId: string;
|
30
|
-
fieldType: "field";
|
31
|
-
} & {
|
32
|
-
config: {
|
33
|
-
type: "exact";
|
34
|
-
};
|
35
|
-
};
|
36
|
-
fuzzy: () => {
|
37
|
-
conditionals?: FieldConditional[];
|
38
|
-
validations?: ValidationConfig[];
|
39
|
-
searchCriteriaLabelPrefix?: TranslationConfig;
|
40
|
-
fieldId: string;
|
41
|
-
fieldType: "field";
|
42
|
-
} & {
|
43
|
-
config: {
|
44
|
-
type: "fuzzy";
|
45
|
-
};
|
46
|
-
};
|
47
|
-
$$field: string;
|
48
|
-
isAfter: () => {
|
49
|
-
days: (days: number) => {
|
50
|
-
inPast: () => import("../conditionals/conditionals").JSONSchema;
|
51
|
-
inFuture: () => import("../conditionals/conditionals").JSONSchema;
|
52
|
-
};
|
53
|
-
date: (date: string | {
|
54
|
-
$$field: string;
|
55
|
-
}) => import("../conditionals/conditionals").JSONSchema;
|
56
|
-
now: () => import("../conditionals/conditionals").JSONSchema;
|
57
|
-
};
|
58
|
-
isBefore: () => {
|
59
|
-
days: (days: number) => {
|
60
|
-
inPast: () => import("../conditionals/conditionals").JSONSchema;
|
61
|
-
inFuture: () => import("../conditionals/conditionals").JSONSchema;
|
62
|
-
};
|
63
|
-
date: (date: string | {
|
64
|
-
$$field: string;
|
65
|
-
}) => import("../conditionals/conditionals").JSONSchema;
|
66
|
-
now: () => import("../conditionals/conditionals").JSONSchema;
|
67
|
-
};
|
68
|
-
isEqualTo: (value: string | boolean | {
|
69
|
-
$$field: string;
|
70
|
-
}) => import("../conditionals/conditionals").JSONSchema;
|
71
|
-
isFalsy: () => import("../conditionals/conditionals").JSONSchema;
|
72
|
-
isUndefined: () => import("../conditionals/conditionals").JSONSchema;
|
73
|
-
inArray: (values: string[]) => import("../conditionals/conditionals").JSONSchema;
|
74
|
-
isValidEnglishName: () => import("../conditionals/conditionals").JSONSchema;
|
75
|
-
matches: (pattern: string) => import("../conditionals/conditionals").JSONSchema;
|
76
|
-
isBetween: (min: number, max: number) => import("../conditionals/conditionals").JSONSchema;
|
77
|
-
getId: () => {
|
78
|
-
fieldId: string;
|
79
|
-
};
|
80
|
-
object: (options: Record<string, any>) => import("../conditionals/conditionals").JSONSchema;
|
81
|
-
};
|
82
|
-
//# sourceMappingURL=field.d.ts.map
|
@@ -1,44 +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"];
|
14
|
-
REJECT_CORRECTION: ["record.registration-correct"];
|
15
|
-
APPROVE_CORRECTION: ["record.registration-correct"];
|
16
|
-
MARKED_AS_DUPLICATE: ["record.declaration-archive"];
|
17
|
-
ARCHIVE: ["record.declaration-archive"];
|
18
|
-
REJECT: ["record.declaration-submit-for-updates"];
|
19
|
-
ASSIGN: null;
|
20
|
-
UNASSIGN: null;
|
21
|
-
DETECT_DUPLICATE: [];
|
22
|
-
};
|
23
|
-
export declare const ACTION_ALLOWED_CONFIGURABLE_SCOPES: {
|
24
|
-
READ: never[];
|
25
|
-
CREATE: "record.notify"[];
|
26
|
-
NOTIFY: "record.notify"[];
|
27
|
-
DECLARE: never[];
|
28
|
-
DELETE: never[];
|
29
|
-
VALIDATE: never[];
|
30
|
-
REGISTER: never[];
|
31
|
-
PRINT_CERTIFICATE: never[];
|
32
|
-
REQUEST_CORRECTION: never[];
|
33
|
-
REJECT_CORRECTION: never[];
|
34
|
-
APPROVE_CORRECTION: never[];
|
35
|
-
MARKED_AS_DUPLICATE: never[];
|
36
|
-
ARCHIVE: never[];
|
37
|
-
REJECT: never[];
|
38
|
-
ASSIGN: never[];
|
39
|
-
UNASSIGN: never[];
|
40
|
-
DETECT_DUPLICATE: never[];
|
41
|
-
};
|
42
|
-
export declare const WRITE_ACTION_SCOPES: ("record.declare-birth" | "record.declaration-submit-for-approval" | "record.register" | "record.registration-print&issue-certified-copies")[];
|
43
|
-
export declare function hasAnyOfScopes(a: Scope[], b: Scope[]): boolean;
|
44
|
-
//# sourceMappingURL=scopes.d.ts.map
|