@opencrvs/toolkit 2.0.0-rc.5f678db → 2.0.0-rc.61553b5
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/create-countryconfig/package.json +12 -2
- package/dist/application-config/index.js +23 -12
- package/dist/cli.js +3 -1
- package/dist/commons/api/router.d.ts +14 -3
- package/dist/commons/events/ActionInput.d.ts +36 -36
- package/dist/commons/events/Draft.d.ts +2 -3
- package/dist/commons/events/state/flags.d.ts +7 -0
- package/dist/commons/events/state/index.d.ts +1 -1
- package/dist/conditionals/index.js +3 -1
- package/dist/events/index.js +97 -42
- package/dist/migrations/v2.0/index.js +3 -1
- package/dist/notification/index.js +85 -31
- package/dist/scopes/index.js +3 -1
- package/opencrvs-toolkit-2.0.0-rc.61553b5.tgz +0 -0
- package/package.json +5 -1
- package/opencrvs-toolkit-2.0.0-rc.5f678db.tgz +0 -0
|
@@ -5,7 +5,17 @@
|
|
|
5
5
|
"bin": {
|
|
6
6
|
"create-countryconfig": "./index.js"
|
|
7
7
|
},
|
|
8
|
-
"
|
|
9
|
-
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/opencrvs/opencrvs-core.git"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"index.js"
|
|
14
|
+
],
|
|
15
|
+
"keywords": [
|
|
16
|
+
"opencrvs",
|
|
17
|
+
"countryconfig",
|
|
18
|
+
"create"
|
|
19
|
+
],
|
|
10
20
|
"license": "MPL-2.0"
|
|
11
21
|
}
|
|
@@ -76,8 +76,8 @@ var ActionConditional = z.discriminatedUnion("type", [
|
|
|
76
76
|
// Action can be shown to the user in the list but as disabled
|
|
77
77
|
EnableConditional
|
|
78
78
|
]).meta({
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
id: "ActionConditional",
|
|
80
|
+
description: "Conditional gating whether an action is shown (SHOW) or enabled (ENABLE). When omitted from an action, the action is shown and enabled for everyone."
|
|
81
81
|
});
|
|
82
82
|
var DisplayOnReviewConditional = z.object({
|
|
83
83
|
type: z.literal(ConditionalType.DISPLAY_ON_REVIEW),
|
|
@@ -93,8 +93,8 @@ var FieldConditional = z.discriminatedUnion("type", [
|
|
|
93
93
|
// Field output can be shown / hidden on the review page
|
|
94
94
|
DisplayOnReviewConditional
|
|
95
95
|
]).meta({
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
id: "FieldConditional",
|
|
97
|
+
description: "Conditional gating whether a form field is shown (SHOW), enabled (ENABLE), or displayed on the review page (DISPLAY_ON_REVIEW). When omitted, the field is shown and enabled for everyone, and is displayed on review whenever it has a value."
|
|
98
98
|
});
|
|
99
99
|
|
|
100
100
|
// ../commons/src/events/TranslationConfig.ts
|
|
@@ -834,7 +834,9 @@ var ScopeType = z11.enum([
|
|
|
834
834
|
var EncodedScope = z11.string().brand("EncodedScope");
|
|
835
835
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
836
836
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
837
|
-
accessLevel: JurisdictionFilter.enum.all
|
|
837
|
+
accessLevel: JurisdictionFilter.enum.all,
|
|
838
|
+
registeredIn: JurisdictionFilter.enum.all,
|
|
839
|
+
declaredIn: JurisdictionFilter.enum.all
|
|
838
840
|
};
|
|
839
841
|
|
|
840
842
|
// ../commons/src/authentication.ts
|
|
@@ -1081,8 +1083,8 @@ var FlagConfig = z14.object({
|
|
|
1081
1083
|
),
|
|
1082
1084
|
label: TranslationConfig.describe("Human readable label of the flag.")
|
|
1083
1085
|
}).meta({
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
+
id: "FlagConfig",
|
|
1087
|
+
description: "Configuration for a custom flag that can be added to or removed from records by event actions."
|
|
1086
1088
|
});
|
|
1087
1089
|
var ActionFlagConfig = z14.object({
|
|
1088
1090
|
id: Flag,
|
|
@@ -1091,8 +1093,8 @@ var ActionFlagConfig = z14.object({
|
|
|
1091
1093
|
"When conditional is met, the operation is performed on the flag. If not provided, the operation is performed unconditionally."
|
|
1092
1094
|
)
|
|
1093
1095
|
}).meta({
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
+
id: "ActionFlagConfig",
|
|
1097
|
+
description: "Add or remove operation applied to a flag when the parent action is accepted. Optionally gated by a conditional."
|
|
1096
1098
|
});
|
|
1097
1099
|
|
|
1098
1100
|
// ../commons/src/events/EventMetadata.ts
|
|
@@ -1411,8 +1413,15 @@ var FieldReference = import_v43.default.object({
|
|
|
1411
1413
|
)
|
|
1412
1414
|
}).describe("Reference to a field by its ID");
|
|
1413
1415
|
var ValidationConfig = import_v43.default.object({
|
|
1414
|
-
validator: Conditional
|
|
1415
|
-
|
|
1416
|
+
validator: Conditional.describe(
|
|
1417
|
+
"Conditional expression that must hold for the field value to be considered valid."
|
|
1418
|
+
),
|
|
1419
|
+
message: TranslationConfig.describe(
|
|
1420
|
+
"Error message displayed when the validator does not hold."
|
|
1421
|
+
)
|
|
1422
|
+
}).meta({
|
|
1423
|
+
id: "ValidationConfig",
|
|
1424
|
+
description: "Validation rule applied to a form field. The validator is a conditional expression that must hold for the field value to be considered valid."
|
|
1416
1425
|
});
|
|
1417
1426
|
var requiredSchema = import_v43.default.union([
|
|
1418
1427
|
import_v43.default.boolean(),
|
|
@@ -2002,7 +2011,9 @@ var HttpField = BaseField.extend({
|
|
|
2002
2011
|
var AutocompleteField = BaseField.extend({
|
|
2003
2012
|
type: import_v43.default.literal(FieldType.AUTOCOMPLETE),
|
|
2004
2013
|
configuration: import_v43.default.object({
|
|
2005
|
-
url: import_v43.default.string().describe(
|
|
2014
|
+
url: import_v43.default.string().describe(
|
|
2015
|
+
"URL to fetch autocomplete suggestions from. This should be a country config server endpoint."
|
|
2016
|
+
).optional(),
|
|
2006
2017
|
method: import_v43.default.enum(["GET", "POST"]).default("GET").optional(),
|
|
2007
2018
|
defaultOptions: import_v43.default.array(
|
|
2008
2019
|
import_v43.default.object({
|
package/dist/cli.js
CHANGED
|
@@ -2393,7 +2393,9 @@ var decodeScope = (query) => {
|
|
|
2393
2393
|
};
|
|
2394
2394
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
2395
2395
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
2396
|
-
accessLevel: JurisdictionFilter.enum.all
|
|
2396
|
+
accessLevel: JurisdictionFilter.enum.all,
|
|
2397
|
+
registeredIn: JurisdictionFilter.enum.all,
|
|
2398
|
+
declaredIn: JurisdictionFilter.enum.all
|
|
2397
2399
|
};
|
|
2398
2400
|
|
|
2399
2401
|
// ../commons/src/scopes.deprecated.do-not-use.ts
|
|
@@ -429,6 +429,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
429
429
|
input: {
|
|
430
430
|
eventId: string;
|
|
431
431
|
customActionType?: string | undefined;
|
|
432
|
+
waitFor?: boolean | undefined;
|
|
432
433
|
};
|
|
433
434
|
output: {
|
|
434
435
|
id: string & import("zod").$brand<"UUID">;
|
|
@@ -1097,18 +1098,17 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1097
1098
|
}>;
|
|
1098
1099
|
create: import("@trpc/server").TRPCMutationProcedure<{
|
|
1099
1100
|
input: {
|
|
1100
|
-
eventId: string;
|
|
1101
1101
|
transactionId: string;
|
|
1102
|
+
eventId: string;
|
|
1102
1103
|
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ" | "CUSTOM" | "CREATE" | "DUPLICATE_DETECTED" | "MARK_AS_NOT_DUPLICATE" | "NOTIFY" | "ASSIGN" | "APPROVE_CORRECTION" | "REJECT_CORRECTION" | "UNASSIGN";
|
|
1103
1104
|
status: "Requested" | "Accepted" | "Rejected";
|
|
1105
|
+
createdAtLocation?: string | null | undefined;
|
|
1104
1106
|
declaration?: Record<string, unknown> | undefined;
|
|
1105
1107
|
annotation?: Record<string, unknown> | undefined;
|
|
1106
1108
|
originalActionId?: string | undefined;
|
|
1107
1109
|
keepAssignment?: boolean | undefined;
|
|
1108
1110
|
keepAssignmentIfAccepted?: boolean | undefined;
|
|
1109
1111
|
keepAssignmentIfRejected?: boolean | undefined;
|
|
1110
|
-
waitFor?: boolean | undefined;
|
|
1111
|
-
createdAtLocation?: string | null | undefined;
|
|
1112
1112
|
};
|
|
1113
1113
|
output: {
|
|
1114
1114
|
id: string & import("zod").$brand<"UUID">;
|
|
@@ -1439,6 +1439,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1439
1439
|
transactionId: import("zod").ZodString;
|
|
1440
1440
|
eventId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
|
|
1441
1441
|
keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1442
|
+
waitFor: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
1442
1443
|
actionId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
|
|
1443
1444
|
}, import("zod/v4/core").$strip>>;
|
|
1444
1445
|
output: import("../commons").EventDocument;
|
|
@@ -2381,6 +2382,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2381
2382
|
transactionId: import("zod").ZodString;
|
|
2382
2383
|
eventId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
|
|
2383
2384
|
keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2385
|
+
waitFor: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
2384
2386
|
actionId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
|
|
2385
2387
|
}, import("zod/v4/core").$strip>>;
|
|
2386
2388
|
output: import("../commons").EventDocument;
|
|
@@ -2672,6 +2674,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2672
2674
|
transactionId: import("zod").ZodString;
|
|
2673
2675
|
eventId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
|
|
2674
2676
|
keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2677
|
+
waitFor: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
2675
2678
|
actionId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
|
|
2676
2679
|
}, import("zod/v4/core").$strip>>;
|
|
2677
2680
|
output: import("../commons").EventDocument;
|
|
@@ -2963,6 +2966,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2963
2966
|
transactionId: import("zod").ZodString;
|
|
2964
2967
|
eventId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
|
|
2965
2968
|
keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2969
|
+
waitFor: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
2966
2970
|
actionId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
|
|
2967
2971
|
}, import("zod/v4/core").$strip>>;
|
|
2968
2972
|
output: import("../commons").EventDocument;
|
|
@@ -3254,6 +3258,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3254
3258
|
transactionId: import("zod").ZodString;
|
|
3255
3259
|
eventId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
|
|
3256
3260
|
keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
3261
|
+
waitFor: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
3257
3262
|
actionId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
|
|
3258
3263
|
}, import("zod/v4/core").$strip>>;
|
|
3259
3264
|
output: import("../commons").EventDocument;
|
|
@@ -3545,6 +3550,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3545
3550
|
transactionId: import("zod").ZodString;
|
|
3546
3551
|
eventId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
|
|
3547
3552
|
keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
3553
|
+
waitFor: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
3548
3554
|
actionId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
|
|
3549
3555
|
}, import("zod/v4/core").$strip>>;
|
|
3550
3556
|
output: import("../commons").EventDocument;
|
|
@@ -3836,6 +3842,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3836
3842
|
transactionId: import("zod").ZodString;
|
|
3837
3843
|
eventId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
|
|
3838
3844
|
keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
3845
|
+
waitFor: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
3839
3846
|
actionId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
|
|
3840
3847
|
}, import("zod/v4/core").$strip>>;
|
|
3841
3848
|
output: import("../commons").EventDocument;
|
|
@@ -4440,6 +4447,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4440
4447
|
transactionId: import("zod").ZodString;
|
|
4441
4448
|
eventId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
|
|
4442
4449
|
keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
4450
|
+
waitFor: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
4443
4451
|
actionId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
|
|
4444
4452
|
}, import("zod/v4/core").$strip>>;
|
|
4445
4453
|
output: import("../commons").EventDocument;
|
|
@@ -5412,6 +5420,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5412
5420
|
transactionId: import("zod").ZodString;
|
|
5413
5421
|
eventId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
|
|
5414
5422
|
keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
5423
|
+
waitFor: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
5415
5424
|
actionId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
|
|
5416
5425
|
}, import("zod/v4/core").$strip>>;
|
|
5417
5426
|
output: import("../commons").EventDocument;
|
|
@@ -5703,6 +5712,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5703
5712
|
transactionId: import("zod").ZodString;
|
|
5704
5713
|
eventId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
|
|
5705
5714
|
keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
5715
|
+
waitFor: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
5706
5716
|
actionId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
|
|
5707
5717
|
}, import("zod/v4/core").$strip>>;
|
|
5708
5718
|
output: import("../commons").EventDocument;
|
|
@@ -5994,6 +6004,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5994
6004
|
transactionId: import("zod").ZodString;
|
|
5995
6005
|
eventId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
|
|
5996
6006
|
keepAssignment: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
6007
|
+
waitFor: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
5997
6008
|
actionId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID", "out">;
|
|
5998
6009
|
}, import("zod/v4/core").$strip>>;
|
|
5999
6010
|
output: import("../commons").EventDocument;
|
|
@@ -8,7 +8,7 @@ export declare const BaseActionInput: z.ZodObject<{
|
|
|
8
8
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
9
9
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
10
10
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
-
waitFor: z.
|
|
11
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
12
12
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
13
13
|
}, z.core.$strip>;
|
|
14
14
|
export declare const RegisterActionInput: z.ZodObject<{
|
|
@@ -20,7 +20,7 @@ export declare const RegisterActionInput: z.ZodObject<{
|
|
|
20
20
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
21
21
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
22
22
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
23
|
-
waitFor: z.
|
|
23
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
24
24
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
25
25
|
type: z.ZodDefault<z.ZodLiteral<"REGISTER">>;
|
|
26
26
|
registrationNumber: z.ZodOptional<z.ZodString>;
|
|
@@ -35,7 +35,7 @@ export declare const NotifyActionInput: z.ZodObject<{
|
|
|
35
35
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
36
36
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
37
37
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
-
waitFor: z.
|
|
38
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
39
39
|
type: z.ZodDefault<z.ZodLiteral<"NOTIFY">>;
|
|
40
40
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
41
41
|
}, z.core.$strip>;
|
|
@@ -49,7 +49,7 @@ export declare const DeclareActionInput: z.ZodObject<{
|
|
|
49
49
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
50
50
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
51
51
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
52
|
-
waitFor: z.
|
|
52
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
53
53
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
54
54
|
type: z.ZodDefault<z.ZodLiteral<"DECLARE">>;
|
|
55
55
|
}, z.core.$strip>;
|
|
@@ -62,7 +62,7 @@ export declare const EditActionInput: z.ZodObject<{
|
|
|
62
62
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
63
63
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
64
64
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
65
|
-
waitFor: z.
|
|
65
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
66
66
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
67
67
|
type: z.ZodDefault<z.ZodLiteral<"EDIT">>;
|
|
68
68
|
content: z.ZodObject<{
|
|
@@ -79,7 +79,7 @@ export declare const PrintCertificateActionInput: z.ZodObject<{
|
|
|
79
79
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
80
80
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
81
81
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
82
|
-
waitFor: z.
|
|
82
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
83
83
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
84
84
|
type: z.ZodDefault<z.ZodLiteral<"PRINT_CERTIFICATE">>;
|
|
85
85
|
content: z.ZodOptional<z.ZodObject<{
|
|
@@ -96,7 +96,7 @@ export declare const RejectDeclarationActionInput: z.ZodObject<{
|
|
|
96
96
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
97
97
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
98
98
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
99
|
-
waitFor: z.
|
|
99
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
100
100
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
101
101
|
type: z.ZodDefault<z.ZodLiteral<"REJECT">>;
|
|
102
102
|
content: z.ZodObject<{
|
|
@@ -113,7 +113,7 @@ export declare const DuplicateDetectedActionInput: z.ZodObject<{
|
|
|
113
113
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
114
114
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
115
115
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
116
|
-
waitFor: z.
|
|
116
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
117
117
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
118
118
|
type: z.ZodDefault<z.ZodLiteral<"DUPLICATE_DETECTED">>;
|
|
119
119
|
content: z.ZodObject<{
|
|
@@ -132,7 +132,7 @@ export declare const MarkAsDuplicateActionInput: z.ZodObject<{
|
|
|
132
132
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
133
133
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
134
134
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
135
|
-
waitFor: z.
|
|
135
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
136
136
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
137
137
|
type: z.ZodDefault<z.ZodLiteral<"MARK_AS_DUPLICATE">>;
|
|
138
138
|
content: z.ZodOptional<z.ZodObject<{
|
|
@@ -149,7 +149,7 @@ export declare const MarkNotDuplicateActionInput: z.ZodObject<{
|
|
|
149
149
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
150
150
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
151
151
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
152
|
-
waitFor: z.
|
|
152
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
153
153
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
154
154
|
type: z.ZodDefault<z.ZodLiteral<"MARK_AS_NOT_DUPLICATE">>;
|
|
155
155
|
}, z.core.$strip>;
|
|
@@ -163,7 +163,7 @@ export declare const ArchiveActionInput: z.ZodObject<{
|
|
|
163
163
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
164
164
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
165
165
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
166
|
-
waitFor: z.
|
|
166
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
167
167
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
168
168
|
type: z.ZodDefault<z.ZodLiteral<"ARCHIVE">>;
|
|
169
169
|
content: z.ZodObject<{
|
|
@@ -180,7 +180,7 @@ export declare const AssignActionInput: z.ZodObject<{
|
|
|
180
180
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
181
181
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
182
182
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
183
|
-
waitFor: z.
|
|
183
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
184
184
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
185
185
|
type: z.ZodLiteral<"ASSIGN">;
|
|
186
186
|
assignedTo: z.ZodString;
|
|
@@ -195,7 +195,7 @@ export declare const UnassignActionInput: z.ZodObject<{
|
|
|
195
195
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
196
196
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
197
197
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
198
|
-
waitFor: z.
|
|
198
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
199
199
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
200
200
|
type: z.ZodDefault<z.ZodLiteral<"UNASSIGN">>;
|
|
201
201
|
assignedTo: z.ZodDefault<z.ZodLiteral<null>>;
|
|
@@ -210,7 +210,7 @@ export declare const RequestCorrectionActionInput: z.ZodObject<{
|
|
|
210
210
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
211
211
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
212
212
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
213
|
-
waitFor: z.
|
|
213
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
214
214
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
215
215
|
type: z.ZodDefault<z.ZodLiteral<"REQUEST_CORRECTION">>;
|
|
216
216
|
}, z.core.$strip>;
|
|
@@ -224,7 +224,7 @@ export declare const RejectCorrectionActionInput: z.ZodObject<{
|
|
|
224
224
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
225
225
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
226
226
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
227
|
-
waitFor: z.
|
|
227
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
228
228
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
229
229
|
requestId: z.ZodString;
|
|
230
230
|
type: z.ZodDefault<z.ZodLiteral<"REJECT_CORRECTION">>;
|
|
@@ -242,7 +242,7 @@ export declare const ApproveCorrectionActionInput: z.ZodObject<{
|
|
|
242
242
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
243
243
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
244
244
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
245
|
-
waitFor: z.
|
|
245
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
246
246
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
247
247
|
requestId: z.ZodString;
|
|
248
248
|
type: z.ZodDefault<z.ZodLiteral<"APPROVE_CORRECTION">>;
|
|
@@ -257,7 +257,7 @@ export declare const ReadActionInput: z.ZodObject<{
|
|
|
257
257
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
258
258
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
259
259
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
260
|
-
waitFor: z.
|
|
260
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
261
261
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
262
262
|
type: z.ZodDefault<z.ZodLiteral<"READ">>;
|
|
263
263
|
}, z.core.$strip>;
|
|
@@ -275,7 +275,7 @@ export declare const CustomActionInput: z.ZodObject<{
|
|
|
275
275
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
276
276
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
277
277
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
278
|
-
waitFor: z.
|
|
278
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
279
279
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
280
280
|
type: z.ZodDefault<z.ZodLiteral<"CUSTOM">>;
|
|
281
281
|
customActionType: z.ZodString;
|
|
@@ -298,7 +298,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
298
298
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
299
299
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
300
300
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
301
|
-
waitFor: z.
|
|
301
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
302
302
|
type: z.ZodDefault<z.ZodLiteral<"CREATE">>;
|
|
303
303
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
304
304
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -310,7 +310,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
310
310
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
311
311
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
312
312
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
313
|
-
waitFor: z.
|
|
313
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
314
314
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
315
315
|
type: z.ZodDefault<z.ZodLiteral<"REGISTER">>;
|
|
316
316
|
registrationNumber: z.ZodOptional<z.ZodString>;
|
|
@@ -323,7 +323,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
323
323
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
324
324
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
325
325
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
326
|
-
waitFor: z.
|
|
326
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
327
327
|
type: z.ZodDefault<z.ZodLiteral<"NOTIFY">>;
|
|
328
328
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
329
329
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -335,7 +335,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
335
335
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
336
336
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
337
337
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
338
|
-
waitFor: z.
|
|
338
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
339
339
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
340
340
|
type: z.ZodDefault<z.ZodLiteral<"DECLARE">>;
|
|
341
341
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -347,7 +347,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
347
347
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
348
348
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
349
349
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
350
|
-
waitFor: z.
|
|
350
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
351
351
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
352
352
|
type: z.ZodDefault<z.ZodLiteral<"REJECT">>;
|
|
353
353
|
content: z.ZodObject<{
|
|
@@ -362,7 +362,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
362
362
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
363
363
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
364
364
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
365
|
-
waitFor: z.
|
|
365
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
366
366
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
367
367
|
type: z.ZodDefault<z.ZodLiteral<"DUPLICATE_DETECTED">>;
|
|
368
368
|
content: z.ZodObject<{
|
|
@@ -380,7 +380,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
380
380
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
381
381
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
382
382
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
383
|
-
waitFor: z.
|
|
383
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
384
384
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
385
385
|
type: z.ZodDefault<z.ZodLiteral<"MARK_AS_DUPLICATE">>;
|
|
386
386
|
content: z.ZodOptional<z.ZodObject<{
|
|
@@ -395,7 +395,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
395
395
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
396
396
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
397
397
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
398
|
-
waitFor: z.
|
|
398
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
399
399
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
400
400
|
type: z.ZodDefault<z.ZodLiteral<"MARK_AS_NOT_DUPLICATE">>;
|
|
401
401
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -407,7 +407,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
407
407
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
408
408
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
409
409
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
410
|
-
waitFor: z.
|
|
410
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
411
411
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
412
412
|
type: z.ZodDefault<z.ZodLiteral<"ARCHIVE">>;
|
|
413
413
|
content: z.ZodObject<{
|
|
@@ -422,7 +422,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
422
422
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
423
423
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
424
424
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
425
|
-
waitFor: z.
|
|
425
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
426
426
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
427
427
|
type: z.ZodLiteral<"ASSIGN">;
|
|
428
428
|
assignedTo: z.ZodString;
|
|
@@ -435,7 +435,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
435
435
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
436
436
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
437
437
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
438
|
-
waitFor: z.
|
|
438
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
439
439
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
440
440
|
type: z.ZodDefault<z.ZodLiteral<"UNASSIGN">>;
|
|
441
441
|
assignedTo: z.ZodDefault<z.ZodLiteral<null>>;
|
|
@@ -448,7 +448,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
448
448
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
449
449
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
450
450
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
451
|
-
waitFor: z.
|
|
451
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
452
452
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
453
453
|
type: z.ZodDefault<z.ZodLiteral<"PRINT_CERTIFICATE">>;
|
|
454
454
|
content: z.ZodOptional<z.ZodObject<{
|
|
@@ -463,7 +463,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
463
463
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
464
464
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
465
465
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
466
|
-
waitFor: z.
|
|
466
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
467
467
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
468
468
|
type: z.ZodDefault<z.ZodLiteral<"REQUEST_CORRECTION">>;
|
|
469
469
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -475,7 +475,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
475
475
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
476
476
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
477
477
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
478
|
-
waitFor: z.
|
|
478
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
479
479
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
480
480
|
requestId: z.ZodString;
|
|
481
481
|
type: z.ZodDefault<z.ZodLiteral<"REJECT_CORRECTION">>;
|
|
@@ -491,7 +491,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
491
491
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
492
492
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
493
493
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
494
|
-
waitFor: z.
|
|
494
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
495
495
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
496
496
|
requestId: z.ZodString;
|
|
497
497
|
type: z.ZodDefault<z.ZodLiteral<"APPROVE_CORRECTION">>;
|
|
@@ -504,7 +504,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
504
504
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
505
505
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
506
506
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
507
|
-
waitFor: z.
|
|
507
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
508
508
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
509
509
|
type: z.ZodDefault<z.ZodLiteral<"READ">>;
|
|
510
510
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -516,7 +516,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
516
516
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
517
517
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
518
518
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
519
|
-
waitFor: z.
|
|
519
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
520
520
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
521
521
|
type: z.ZodDefault<z.ZodLiteral<"CUSTOM">>;
|
|
522
522
|
customActionType: z.ZodString;
|
|
@@ -529,7 +529,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
529
529
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
530
530
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
531
531
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
532
|
-
waitFor: z.
|
|
532
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
533
533
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
534
534
|
type: z.ZodDefault<z.ZodLiteral<"EDIT">>;
|
|
535
535
|
content: z.ZodObject<{
|
|
@@ -45,16 +45,15 @@ export declare const Draft: z.ZodObject<{
|
|
|
45
45
|
}, z.core.$strip>;
|
|
46
46
|
}, z.core.$strip>;
|
|
47
47
|
export declare const DraftInput: z.ZodObject<{
|
|
48
|
-
eventId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
49
48
|
transactionId: z.ZodString;
|
|
49
|
+
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
50
50
|
declaration: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
51
51
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
52
52
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
53
|
+
eventId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
53
54
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
54
55
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
55
56
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
56
|
-
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
57
|
-
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
58
57
|
type: z.ZodEnum<{
|
|
59
58
|
CUSTOM: "CUSTOM";
|
|
60
59
|
CREATE: "CREATE";
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
import { Action, RequestedCorrectionAction } from '../ActionDocument';
|
|
1
2
|
import { Flag, CustomFlag } from '../Flag';
|
|
2
3
|
import { EventConfig } from '../EventConfig';
|
|
3
4
|
import { EventDocument } from '../EventDocument';
|
|
5
|
+
/**
|
|
6
|
+
* Returns the latest accepted REQUEST_CORRECTION action that has not been
|
|
7
|
+
* resolved by a subsequent APPROVE_CORRECTION or REJECT_CORRECTION. Returns
|
|
8
|
+
* undefined if no correction request is currently pending.
|
|
9
|
+
*/
|
|
10
|
+
export declare function findPendingCorrectionRequest(actions: Action[]): RequestedCorrectionAction | undefined;
|
|
4
11
|
/**
|
|
5
12
|
* This function resolves custom flags for an event based on its actions.
|
|
6
13
|
* Flags are not stored to the event state or any database directly, instead they are always computed/evaluated from the event actions.
|
|
@@ -5,6 +5,7 @@ import { EventIndex } from '../EventIndex';
|
|
|
5
5
|
import { EventStatus } from '../EventMetadata';
|
|
6
6
|
import { Draft } from '../Draft';
|
|
7
7
|
import { EventConfig } from '../EventConfig';
|
|
8
|
+
export { findPendingCorrectionRequest } from './flags';
|
|
8
9
|
import { UUID } from '../../uuid';
|
|
9
10
|
import { DocumentPath } from '../../documents';
|
|
10
11
|
export declare function getStatusFromActions(actions: Array<Action>): "CREATED" | "NOTIFIED" | "DECLARED" | "REGISTERED" | "ARCHIVED";
|
|
@@ -114,5 +115,4 @@ export declare function getActionAnnotation({ event, actionType, draft }: {
|
|
|
114
115
|
actionType: ActionType;
|
|
115
116
|
draft?: Draft;
|
|
116
117
|
}): EventState;
|
|
117
|
-
export {};
|
|
118
118
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -365,7 +365,9 @@ var ScopeType2 = z6.enum([
|
|
|
365
365
|
var EncodedScope2 = z6.string().brand("EncodedScope");
|
|
366
366
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
367
367
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
368
|
-
accessLevel: JurisdictionFilter.enum.all
|
|
368
|
+
accessLevel: JurisdictionFilter.enum.all,
|
|
369
|
+
registeredIn: JurisdictionFilter.enum.all,
|
|
370
|
+
declaredIn: JurisdictionFilter.enum.all
|
|
369
371
|
};
|
|
370
372
|
|
|
371
373
|
// ../commons/src/users/userReferences.ts
|
package/dist/events/index.js
CHANGED
|
@@ -277,6 +277,7 @@ __export(events_exports, {
|
|
|
277
277
|
findActiveDraftForEvent: () => findActiveDraftForEvent,
|
|
278
278
|
findAllFields: () => findAllFields,
|
|
279
279
|
findLastAssignmentAction: () => findLastAssignmentAction,
|
|
280
|
+
findPendingCorrectionRequest: () => findPendingCorrectionRequest,
|
|
280
281
|
findRecordActionPages: () => findRecordActionPages,
|
|
281
282
|
flag: () => flag,
|
|
282
283
|
flattenFieldReference: () => flattenFieldReference,
|
|
@@ -704,7 +705,9 @@ var decodeScope = (query) => {
|
|
|
704
705
|
};
|
|
705
706
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
706
707
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
707
|
-
accessLevel: JurisdictionFilter.enum.all
|
|
708
|
+
accessLevel: JurisdictionFilter.enum.all,
|
|
709
|
+
registeredIn: JurisdictionFilter.enum.all,
|
|
710
|
+
declaredIn: JurisdictionFilter.enum.all
|
|
708
711
|
};
|
|
709
712
|
function getAcceptedScopesByType({
|
|
710
713
|
acceptedScopes,
|
|
@@ -1078,8 +1081,8 @@ var ActionConditional = z7.discriminatedUnion("type", [
|
|
|
1078
1081
|
// Action can be shown to the user in the list but as disabled
|
|
1079
1082
|
EnableConditional
|
|
1080
1083
|
]).meta({
|
|
1081
|
-
|
|
1082
|
-
|
|
1084
|
+
id: "ActionConditional",
|
|
1085
|
+
description: "Conditional gating whether an action is shown (SHOW) or enabled (ENABLE). When omitted from an action, the action is shown and enabled for everyone."
|
|
1083
1086
|
});
|
|
1084
1087
|
var DisplayOnReviewConditional = z7.object({
|
|
1085
1088
|
type: z7.literal(ConditionalType.DISPLAY_ON_REVIEW),
|
|
@@ -1095,8 +1098,8 @@ var FieldConditional = z7.discriminatedUnion("type", [
|
|
|
1095
1098
|
// Field output can be shown / hidden on the review page
|
|
1096
1099
|
DisplayOnReviewConditional
|
|
1097
1100
|
]).meta({
|
|
1098
|
-
|
|
1099
|
-
|
|
1101
|
+
id: "FieldConditional",
|
|
1102
|
+
description: "Conditional gating whether a form field is shown (SHOW), enabled (ENABLE), or displayed on the review page (DISPLAY_ON_REVIEW). When omitted, the field is shown and enabled for everyone, and is displayed on review whenever it has a value."
|
|
1100
1103
|
});
|
|
1101
1104
|
|
|
1102
1105
|
// ../commons/src/events/FieldType.ts
|
|
@@ -1740,8 +1743,8 @@ var FlagConfig = z15.object({
|
|
|
1740
1743
|
),
|
|
1741
1744
|
label: TranslationConfig.describe("Human readable label of the flag.")
|
|
1742
1745
|
}).meta({
|
|
1743
|
-
|
|
1744
|
-
|
|
1746
|
+
id: "FlagConfig",
|
|
1747
|
+
description: "Configuration for a custom flag that can be added to or removed from records by event actions."
|
|
1745
1748
|
});
|
|
1746
1749
|
var ActionFlagConfig = z15.object({
|
|
1747
1750
|
id: Flag,
|
|
@@ -1750,8 +1753,8 @@ var ActionFlagConfig = z15.object({
|
|
|
1750
1753
|
"When conditional is met, the operation is performed on the flag. If not provided, the operation is performed unconditionally."
|
|
1751
1754
|
)
|
|
1752
1755
|
}).meta({
|
|
1753
|
-
|
|
1754
|
-
|
|
1756
|
+
id: "ActionFlagConfig",
|
|
1757
|
+
description: "Add or remove operation applied to a flag when the parent action is accepted. Optionally gated by a conditional."
|
|
1755
1758
|
});
|
|
1756
1759
|
|
|
1757
1760
|
// ../commons/src/events/EventMetadata.ts
|
|
@@ -2181,8 +2184,15 @@ var FieldReference = import_v43.default.object({
|
|
|
2181
2184
|
)
|
|
2182
2185
|
}).describe("Reference to a field by its ID");
|
|
2183
2186
|
var ValidationConfig = import_v43.default.object({
|
|
2184
|
-
validator: Conditional
|
|
2185
|
-
|
|
2187
|
+
validator: Conditional.describe(
|
|
2188
|
+
"Conditional expression that must hold for the field value to be considered valid."
|
|
2189
|
+
),
|
|
2190
|
+
message: TranslationConfig.describe(
|
|
2191
|
+
"Error message displayed when the validator does not hold."
|
|
2192
|
+
)
|
|
2193
|
+
}).meta({
|
|
2194
|
+
id: "ValidationConfig",
|
|
2195
|
+
description: "Validation rule applied to a form field. The validator is a conditional expression that must hold for the field value to be considered valid."
|
|
2186
2196
|
});
|
|
2187
2197
|
var requiredSchema = import_v43.default.union([
|
|
2188
2198
|
import_v43.default.boolean(),
|
|
@@ -2772,7 +2782,9 @@ var HttpField = BaseField.extend({
|
|
|
2772
2782
|
var AutocompleteField = BaseField.extend({
|
|
2773
2783
|
type: import_v43.default.literal(FieldType.AUTOCOMPLETE),
|
|
2774
2784
|
configuration: import_v43.default.object({
|
|
2775
|
-
url: import_v43.default.string().describe(
|
|
2785
|
+
url: import_v43.default.string().describe(
|
|
2786
|
+
"URL to fetch autocomplete suggestions from. This should be a country config server endpoint."
|
|
2787
|
+
).optional(),
|
|
2776
2788
|
method: import_v43.default.enum(["GET", "POST"]).default("GET").optional(),
|
|
2777
2789
|
defaultOptions: import_v43.default.array(
|
|
2778
2790
|
import_v43.default.object({
|
|
@@ -3014,15 +3026,18 @@ var VerificationPageConfig = FormPageConfig.extend({
|
|
|
3014
3026
|
actions: VerificationActionConfig
|
|
3015
3027
|
});
|
|
3016
3028
|
var PageConfig = z21.discriminatedUnion("type", [FormPageConfig, VerificationPageConfig]).meta({
|
|
3017
|
-
|
|
3018
|
-
|
|
3029
|
+
id: "PageConfig",
|
|
3030
|
+
description: "Configuration for a single page in a form. Either a form page with fields and a continue button, or a verification page with verify/cancel options."
|
|
3019
3031
|
});
|
|
3020
3032
|
|
|
3021
3033
|
// ../commons/src/events/FormConfig.ts
|
|
3022
3034
|
var DeclarationFormConfig = z22.object({
|
|
3023
3035
|
label: TranslationConfig.describe("Human readable description of the form"),
|
|
3024
3036
|
pages: z22.array(FormPageConfig)
|
|
3025
|
-
}).
|
|
3037
|
+
}).meta({
|
|
3038
|
+
id: "DeclarationFormConfig",
|
|
3039
|
+
description: "Configuration of the declaration form."
|
|
3040
|
+
});
|
|
3026
3041
|
var ActionFormConfig = z22.object({
|
|
3027
3042
|
label: TranslationConfig.describe("Human readable description of the form"),
|
|
3028
3043
|
pages: z22.array(PageConfig)
|
|
@@ -3122,6 +3137,9 @@ var DeduplicationConfig = z23.object({
|
|
|
3122
3137
|
id: z23.string(),
|
|
3123
3138
|
label: TranslationConfig,
|
|
3124
3139
|
query: Clause
|
|
3140
|
+
}).meta({
|
|
3141
|
+
id: "DeduplicationConfig",
|
|
3142
|
+
description: "Configuration for duplicate detection on a declare or register action. The query is built from fuzzy / strict / date-range matchers combined with and/or/not."
|
|
3125
3143
|
});
|
|
3126
3144
|
|
|
3127
3145
|
// ../commons/src/events/ActionConfig.ts
|
|
@@ -3239,17 +3257,42 @@ var ActionConfig = z24.discriminatedUnion("type", [
|
|
|
3239
3257
|
* OpenAPI references are defined here so our generated OpenAPI spec knows to reuse the models
|
|
3240
3258
|
* and treat them as "models" instead of duplicating the data structure in each endpoint.
|
|
3241
3259
|
*/
|
|
3242
|
-
ReadActionConfig.meta({
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3260
|
+
ReadActionConfig.meta({
|
|
3261
|
+
id: "ReadActionConfig",
|
|
3262
|
+
description: "Configuration for the read action \u2014 defines the record-tab content displayed on the event overview page."
|
|
3263
|
+
}),
|
|
3264
|
+
DeclareConfig.meta({
|
|
3265
|
+
id: "DeclareActionConfig",
|
|
3266
|
+
description: "Configuration for the declare action. Includes review-page fields. Shared with the notify action (ActionType.NOTIFY)."
|
|
3267
|
+
}),
|
|
3268
|
+
RejectConfig.meta({
|
|
3269
|
+
id: "RejectActionConfig",
|
|
3270
|
+
description: "Configuration for rejecting a record before registration."
|
|
3271
|
+
}),
|
|
3272
|
+
RegisterConfig.meta({
|
|
3273
|
+
id: "RegisterActionConfig",
|
|
3274
|
+
description: "Configuration for registering a record."
|
|
3275
|
+
}),
|
|
3246
3276
|
PrintCertificateActionConfig.meta({
|
|
3247
|
-
id: "PrintCertificateActionConfig"
|
|
3277
|
+
id: "PrintCertificateActionConfig",
|
|
3278
|
+
description: "Configuration for printing a certificate of a registered record."
|
|
3279
|
+
}),
|
|
3280
|
+
RequestCorrectionConfig.meta({
|
|
3281
|
+
id: "RequestCorrectionActionConfig",
|
|
3282
|
+
description: "Configuration for requesting a correction on a registered record."
|
|
3248
3283
|
}),
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3284
|
+
EditActionConfig.meta({
|
|
3285
|
+
id: "EditActionConfig",
|
|
3286
|
+
description: "Configuration for editing a record before registration."
|
|
3287
|
+
}),
|
|
3288
|
+
ArchiveConfig.meta({
|
|
3289
|
+
id: "ArchiveActionConfig",
|
|
3290
|
+
description: "Configuration for archiving a record."
|
|
3291
|
+
}),
|
|
3292
|
+
CustomActionConfig.meta({
|
|
3293
|
+
id: "CustomActionConfig",
|
|
3294
|
+
description: "Configuration for a country-defined custom action. An event may include any number of these."
|
|
3295
|
+
})
|
|
3253
3296
|
]).describe(
|
|
3254
3297
|
"Configuration of an action available for an event. Data collected depends on the action type and is accessible through the annotation property in ActionDocument."
|
|
3255
3298
|
).meta({ id: "ActionConfig" });
|
|
@@ -3325,7 +3368,10 @@ var Field = BaseField2.extend({
|
|
|
3325
3368
|
}).describe("Custom field defined for the summary view.");
|
|
3326
3369
|
var SummaryConfig = z27.object({
|
|
3327
3370
|
fields: z27.array(z27.union([Field, ReferenceField])).describe("Fields displayed in the event summary view.")
|
|
3328
|
-
}).
|
|
3371
|
+
}).meta({
|
|
3372
|
+
id: "SummaryConfig",
|
|
3373
|
+
description: "Configuration of the event overview page. Defines which declaration fields appear in the record summary, optionally with custom labels, empty-value messages, and templated values."
|
|
3374
|
+
});
|
|
3329
3375
|
|
|
3330
3376
|
// ../commons/src/events/AdvancedSearchConfig.ts
|
|
3331
3377
|
var z28 = __toESM(require("zod/v4"));
|
|
@@ -3449,6 +3495,9 @@ var AdvancedSearchField = z28.discriminatedUnion("fieldType", [FieldConfigSchema
|
|
|
3449
3495
|
var AdvancedSearchConfig = z28.object({
|
|
3450
3496
|
title: TranslationConfig.describe("Advanced search tab title"),
|
|
3451
3497
|
fields: z28.array(AdvancedSearchField).describe("Advanced search fields within the tab.")
|
|
3498
|
+
}).meta({
|
|
3499
|
+
id: "AdvancedSearchConfig",
|
|
3500
|
+
description: "Configuration of one advanced search tab. Each tab has a title and a list of searchable fields \u2014 either declaration fields (via `field()`) or event metadata (via `event()`)."
|
|
3452
3501
|
});
|
|
3453
3502
|
|
|
3454
3503
|
// ../commons/src/events/utils.ts
|
|
@@ -5522,8 +5571,9 @@ var EventConfig = _EventConfigBase.superRefine((event2, ctx) => {
|
|
|
5522
5571
|
validateActionFlags(event2, ctx);
|
|
5523
5572
|
validateActionOrder(event2, ctx);
|
|
5524
5573
|
}).meta({
|
|
5525
|
-
id: "EventConfig"
|
|
5526
|
-
|
|
5574
|
+
id: "EventConfig",
|
|
5575
|
+
description: "Configuration defining an event type registered in OpenCRVS (for example birth or death)."
|
|
5576
|
+
});
|
|
5527
5577
|
|
|
5528
5578
|
// ../commons/src/events/EventConfigInput.ts
|
|
5529
5579
|
var defineDeclarationForm = (form) => DeclarationFormConfig.parse(form);
|
|
@@ -5746,6 +5796,9 @@ var WorkqueueColumnValue = z34.object({
|
|
|
5746
5796
|
var WorkqueueColumn = z34.object({
|
|
5747
5797
|
label: TranslationConfig,
|
|
5748
5798
|
value: WorkqueueColumnValue
|
|
5799
|
+
}).meta({
|
|
5800
|
+
id: "WorkqueueColumn",
|
|
5801
|
+
description: "Configuration for a single workqueue column. The value references an event metadata key (e.g. `dateOfEvent`, `status`, `trackingId`)."
|
|
5749
5802
|
});
|
|
5750
5803
|
function defineWorkqueuesColumns(workqueueColumns) {
|
|
5751
5804
|
return workqueueColumns.map(
|
|
@@ -5951,8 +6004,8 @@ var WorkqueueConfigWithoutQuery = WorkqueueConfig.omit({
|
|
|
5951
6004
|
var WorkqueueConfigInput = WorkqueueConfig.extend({
|
|
5952
6005
|
query: CountryConfigQueryInputType
|
|
5953
6006
|
}).meta({
|
|
5954
|
-
|
|
5955
|
-
|
|
6007
|
+
id: "WorkqueueConfig",
|
|
6008
|
+
description: "Configuration for a single workqueue. Defines the filter applied to the event index, the quick-action button, the columns shown on each row, and the message rendered when the queue is empty."
|
|
5956
6009
|
});
|
|
5957
6010
|
function defineWorkqueue(workqueueInput) {
|
|
5958
6011
|
const queryInput = workqueueInput.query;
|
|
@@ -6015,7 +6068,9 @@ var BaseActionInput = z38.object({
|
|
|
6015
6068
|
keepAssignment: z38.boolean().optional(),
|
|
6016
6069
|
keepAssignmentIfAccepted: z38.boolean().optional(),
|
|
6017
6070
|
keepAssignmentIfRejected: z38.boolean().optional(),
|
|
6018
|
-
waitFor: z38.boolean().
|
|
6071
|
+
waitFor: z38.boolean().default(true).describe(
|
|
6072
|
+
"Whether action waits for the indexing before returning. Defaults to true. Setting this to to false completes faster but might lead to stale data in the client if the client tries to read the event immediately after performing the action. Use with care."
|
|
6073
|
+
),
|
|
6019
6074
|
// For normal users, the createdAtLocation is resolved on the backend from the user's primaryOfficeId.
|
|
6020
6075
|
// @TODO: createdAtLocation should be limited to actions that system users can perform. For normal users, it should not be part of the base action.
|
|
6021
6076
|
createdAtLocation: UUID.nullish().describe(
|
|
@@ -6195,7 +6250,7 @@ var Draft = z39.object({
|
|
|
6195
6250
|
}).describe(
|
|
6196
6251
|
"A temporary storage for an action. Stored with details of the event, creator and creation time."
|
|
6197
6252
|
);
|
|
6198
|
-
var DraftInput = BaseActionInput.extend({
|
|
6253
|
+
var DraftInput = BaseActionInput.omit({ waitFor: true }).extend({
|
|
6199
6254
|
type: ActionTypes.exclude([ActionTypes.enum.DELETE]),
|
|
6200
6255
|
status: z39.enum([
|
|
6201
6256
|
ActionStatus.Requested,
|
|
@@ -6326,19 +6381,19 @@ var import_date_fns3 = require("date-fns");
|
|
|
6326
6381
|
function isEditInProgress(actions) {
|
|
6327
6382
|
return actions.at(-1)?.type === ActionType.EDIT;
|
|
6328
6383
|
}
|
|
6329
|
-
function
|
|
6330
|
-
return actions.
|
|
6331
|
-
if (type === ActionType.REQUEST_CORRECTION) {
|
|
6332
|
-
return
|
|
6384
|
+
function findPendingCorrectionRequest(actions) {
|
|
6385
|
+
return actions.filter((a) => a.status === ActionStatus.Accepted).reduce((pending, action) => {
|
|
6386
|
+
if (action.type === ActionType.REQUEST_CORRECTION) {
|
|
6387
|
+
return action;
|
|
6333
6388
|
}
|
|
6334
|
-
if (type === ActionType.APPROVE_CORRECTION) {
|
|
6335
|
-
return
|
|
6336
|
-
}
|
|
6337
|
-
if (type === ActionType.REJECT_CORRECTION) {
|
|
6338
|
-
return false;
|
|
6389
|
+
if (action.type === ActionType.APPROVE_CORRECTION || action.type === ActionType.REJECT_CORRECTION) {
|
|
6390
|
+
return void 0;
|
|
6339
6391
|
}
|
|
6340
|
-
return
|
|
6341
|
-
},
|
|
6392
|
+
return pending;
|
|
6393
|
+
}, void 0);
|
|
6394
|
+
}
|
|
6395
|
+
function isCorrectionRequested(actions) {
|
|
6396
|
+
return findPendingCorrectionRequest(actions) !== void 0;
|
|
6342
6397
|
}
|
|
6343
6398
|
function isDeclarationIncomplete(actions) {
|
|
6344
6399
|
return getStatusFromActions(actions) === EventStatus.enum.NOTIFIED;
|
|
@@ -2405,7 +2405,9 @@ var decodeScope = (query) => {
|
|
|
2405
2405
|
};
|
|
2406
2406
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
2407
2407
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
2408
|
-
accessLevel: JurisdictionFilter.enum.all
|
|
2408
|
+
accessLevel: JurisdictionFilter.enum.all,
|
|
2409
|
+
registeredIn: JurisdictionFilter.enum.all,
|
|
2410
|
+
declaredIn: JurisdictionFilter.enum.all
|
|
2409
2411
|
};
|
|
2410
2412
|
|
|
2411
2413
|
// ../commons/src/scopes.deprecated.do-not-use.ts
|
|
@@ -293,7 +293,9 @@ var ScopeType = z2.enum([
|
|
|
293
293
|
var EncodedScope = z2.string().brand("EncodedScope");
|
|
294
294
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
295
295
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
296
|
-
accessLevel: JurisdictionFilter.enum.all
|
|
296
|
+
accessLevel: JurisdictionFilter.enum.all,
|
|
297
|
+
registeredIn: JurisdictionFilter.enum.all,
|
|
298
|
+
declaredIn: JurisdictionFilter.enum.all
|
|
297
299
|
};
|
|
298
300
|
|
|
299
301
|
// ../commons/src/authentication.ts
|
|
@@ -653,8 +655,8 @@ var ActionConditional = z7.discriminatedUnion("type", [
|
|
|
653
655
|
// Action can be shown to the user in the list but as disabled
|
|
654
656
|
EnableConditional
|
|
655
657
|
]).meta({
|
|
656
|
-
|
|
657
|
-
|
|
658
|
+
id: "ActionConditional",
|
|
659
|
+
description: "Conditional gating whether an action is shown (SHOW) or enabled (ENABLE). When omitted from an action, the action is shown and enabled for everyone."
|
|
658
660
|
});
|
|
659
661
|
var DisplayOnReviewConditional = z7.object({
|
|
660
662
|
type: z7.literal(ConditionalType.DISPLAY_ON_REVIEW),
|
|
@@ -670,8 +672,8 @@ var FieldConditional = z7.discriminatedUnion("type", [
|
|
|
670
672
|
// Field output can be shown / hidden on the review page
|
|
671
673
|
DisplayOnReviewConditional
|
|
672
674
|
]).meta({
|
|
673
|
-
|
|
674
|
-
|
|
675
|
+
id: "FieldConditional",
|
|
676
|
+
description: "Conditional gating whether a form field is shown (SHOW), enabled (ENABLE), or displayed on the review page (DISPLAY_ON_REVIEW). When omitted, the field is shown and enabled for everyone, and is displayed on review whenever it has a value."
|
|
675
677
|
});
|
|
676
678
|
|
|
677
679
|
// ../commons/src/events/FieldType.ts
|
|
@@ -1307,8 +1309,8 @@ var FlagConfig = z15.object({
|
|
|
1307
1309
|
),
|
|
1308
1310
|
label: TranslationConfig.describe("Human readable label of the flag.")
|
|
1309
1311
|
}).meta({
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
+
id: "FlagConfig",
|
|
1313
|
+
description: "Configuration for a custom flag that can be added to or removed from records by event actions."
|
|
1312
1314
|
});
|
|
1313
1315
|
var ActionFlagConfig = z15.object({
|
|
1314
1316
|
id: Flag,
|
|
@@ -1317,8 +1319,8 @@ var ActionFlagConfig = z15.object({
|
|
|
1317
1319
|
"When conditional is met, the operation is performed on the flag. If not provided, the operation is performed unconditionally."
|
|
1318
1320
|
)
|
|
1319
1321
|
}).meta({
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
+
id: "ActionFlagConfig",
|
|
1323
|
+
description: "Add or remove operation applied to a flag when the parent action is accepted. Optionally gated by a conditional."
|
|
1322
1324
|
});
|
|
1323
1325
|
|
|
1324
1326
|
// ../commons/src/events/EventMetadata.ts
|
|
@@ -1666,8 +1668,15 @@ var FieldReference = import_v43.default.object({
|
|
|
1666
1668
|
)
|
|
1667
1669
|
}).describe("Reference to a field by its ID");
|
|
1668
1670
|
var ValidationConfig = import_v43.default.object({
|
|
1669
|
-
validator: Conditional
|
|
1670
|
-
|
|
1671
|
+
validator: Conditional.describe(
|
|
1672
|
+
"Conditional expression that must hold for the field value to be considered valid."
|
|
1673
|
+
),
|
|
1674
|
+
message: TranslationConfig.describe(
|
|
1675
|
+
"Error message displayed when the validator does not hold."
|
|
1676
|
+
)
|
|
1677
|
+
}).meta({
|
|
1678
|
+
id: "ValidationConfig",
|
|
1679
|
+
description: "Validation rule applied to a form field. The validator is a conditional expression that must hold for the field value to be considered valid."
|
|
1671
1680
|
});
|
|
1672
1681
|
var requiredSchema = import_v43.default.union([
|
|
1673
1682
|
import_v43.default.boolean(),
|
|
@@ -2257,7 +2266,9 @@ var HttpField = BaseField.extend({
|
|
|
2257
2266
|
var AutocompleteField = BaseField.extend({
|
|
2258
2267
|
type: import_v43.default.literal(FieldType.AUTOCOMPLETE),
|
|
2259
2268
|
configuration: import_v43.default.object({
|
|
2260
|
-
url: import_v43.default.string().describe(
|
|
2269
|
+
url: import_v43.default.string().describe(
|
|
2270
|
+
"URL to fetch autocomplete suggestions from. This should be a country config server endpoint."
|
|
2271
|
+
).optional(),
|
|
2261
2272
|
method: import_v43.default.enum(["GET", "POST"]).default("GET").optional(),
|
|
2262
2273
|
defaultOptions: import_v43.default.array(
|
|
2263
2274
|
import_v43.default.object({
|
|
@@ -2499,15 +2510,18 @@ var VerificationPageConfig = FormPageConfig.extend({
|
|
|
2499
2510
|
actions: VerificationActionConfig
|
|
2500
2511
|
});
|
|
2501
2512
|
var PageConfig = z21.discriminatedUnion("type", [FormPageConfig, VerificationPageConfig]).meta({
|
|
2502
|
-
|
|
2503
|
-
|
|
2513
|
+
id: "PageConfig",
|
|
2514
|
+
description: "Configuration for a single page in a form. Either a form page with fields and a continue button, or a verification page with verify/cancel options."
|
|
2504
2515
|
});
|
|
2505
2516
|
|
|
2506
2517
|
// ../commons/src/events/FormConfig.ts
|
|
2507
2518
|
var DeclarationFormConfig = z22.object({
|
|
2508
2519
|
label: TranslationConfig.describe("Human readable description of the form"),
|
|
2509
2520
|
pages: z22.array(FormPageConfig)
|
|
2510
|
-
}).
|
|
2521
|
+
}).meta({
|
|
2522
|
+
id: "DeclarationFormConfig",
|
|
2523
|
+
description: "Configuration of the declaration form."
|
|
2524
|
+
});
|
|
2511
2525
|
var ActionFormConfig = z22.object({
|
|
2512
2526
|
label: TranslationConfig.describe("Human readable description of the form"),
|
|
2513
2527
|
pages: z22.array(PageConfig)
|
|
@@ -2607,6 +2621,9 @@ var DeduplicationConfig = z23.object({
|
|
|
2607
2621
|
id: z23.string(),
|
|
2608
2622
|
label: TranslationConfig,
|
|
2609
2623
|
query: Clause
|
|
2624
|
+
}).meta({
|
|
2625
|
+
id: "DeduplicationConfig",
|
|
2626
|
+
description: "Configuration for duplicate detection on a declare or register action. The query is built from fuzzy / strict / date-range matchers combined with and/or/not."
|
|
2610
2627
|
});
|
|
2611
2628
|
|
|
2612
2629
|
// ../commons/src/events/ActionConfig.ts
|
|
@@ -2724,17 +2741,42 @@ var ActionConfig = z24.discriminatedUnion("type", [
|
|
|
2724
2741
|
* OpenAPI references are defined here so our generated OpenAPI spec knows to reuse the models
|
|
2725
2742
|
* and treat them as "models" instead of duplicating the data structure in each endpoint.
|
|
2726
2743
|
*/
|
|
2727
|
-
ReadActionConfig.meta({
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2744
|
+
ReadActionConfig.meta({
|
|
2745
|
+
id: "ReadActionConfig",
|
|
2746
|
+
description: "Configuration for the read action \u2014 defines the record-tab content displayed on the event overview page."
|
|
2747
|
+
}),
|
|
2748
|
+
DeclareConfig.meta({
|
|
2749
|
+
id: "DeclareActionConfig",
|
|
2750
|
+
description: "Configuration for the declare action. Includes review-page fields. Shared with the notify action (ActionType.NOTIFY)."
|
|
2751
|
+
}),
|
|
2752
|
+
RejectConfig.meta({
|
|
2753
|
+
id: "RejectActionConfig",
|
|
2754
|
+
description: "Configuration for rejecting a record before registration."
|
|
2755
|
+
}),
|
|
2756
|
+
RegisterConfig.meta({
|
|
2757
|
+
id: "RegisterActionConfig",
|
|
2758
|
+
description: "Configuration for registering a record."
|
|
2759
|
+
}),
|
|
2731
2760
|
PrintCertificateActionConfig.meta({
|
|
2732
|
-
id: "PrintCertificateActionConfig"
|
|
2761
|
+
id: "PrintCertificateActionConfig",
|
|
2762
|
+
description: "Configuration for printing a certificate of a registered record."
|
|
2733
2763
|
}),
|
|
2734
|
-
RequestCorrectionConfig.meta({
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2764
|
+
RequestCorrectionConfig.meta({
|
|
2765
|
+
id: "RequestCorrectionActionConfig",
|
|
2766
|
+
description: "Configuration for requesting a correction on a registered record."
|
|
2767
|
+
}),
|
|
2768
|
+
EditActionConfig.meta({
|
|
2769
|
+
id: "EditActionConfig",
|
|
2770
|
+
description: "Configuration for editing a record before registration."
|
|
2771
|
+
}),
|
|
2772
|
+
ArchiveConfig.meta({
|
|
2773
|
+
id: "ArchiveActionConfig",
|
|
2774
|
+
description: "Configuration for archiving a record."
|
|
2775
|
+
}),
|
|
2776
|
+
CustomActionConfig.meta({
|
|
2777
|
+
id: "CustomActionConfig",
|
|
2778
|
+
description: "Configuration for a country-defined custom action. An event may include any number of these."
|
|
2779
|
+
})
|
|
2738
2780
|
]).describe(
|
|
2739
2781
|
"Configuration of an action available for an event. Data collected depends on the action type and is accessible through the annotation property in ActionDocument."
|
|
2740
2782
|
).meta({ id: "ActionConfig" });
|
|
@@ -2810,7 +2852,10 @@ var Field = BaseField2.extend({
|
|
|
2810
2852
|
}).describe("Custom field defined for the summary view.");
|
|
2811
2853
|
var SummaryConfig = z27.object({
|
|
2812
2854
|
fields: z27.array(z27.union([Field, ReferenceField])).describe("Fields displayed in the event summary view.")
|
|
2813
|
-
}).
|
|
2855
|
+
}).meta({
|
|
2856
|
+
id: "SummaryConfig",
|
|
2857
|
+
description: "Configuration of the event overview page. Defines which declaration fields appear in the record summary, optionally with custom labels, empty-value messages, and templated values."
|
|
2858
|
+
});
|
|
2814
2859
|
|
|
2815
2860
|
// ../commons/src/events/AdvancedSearchConfig.ts
|
|
2816
2861
|
var z28 = __toESM(require("zod/v4"));
|
|
@@ -2934,6 +2979,9 @@ var AdvancedSearchField = z28.discriminatedUnion("fieldType", [FieldConfigSchema
|
|
|
2934
2979
|
var AdvancedSearchConfig = z28.object({
|
|
2935
2980
|
title: TranslationConfig.describe("Advanced search tab title"),
|
|
2936
2981
|
fields: z28.array(AdvancedSearchField).describe("Advanced search fields within the tab.")
|
|
2982
|
+
}).meta({
|
|
2983
|
+
id: "AdvancedSearchConfig",
|
|
2984
|
+
description: "Configuration of one advanced search tab. Each tab has a title and a list of searchable fields \u2014 either declaration fields (via `field()`) or event metadata (via `event()`)."
|
|
2937
2985
|
});
|
|
2938
2986
|
|
|
2939
2987
|
// ../commons/src/events/utils.ts
|
|
@@ -3826,8 +3874,9 @@ var EventConfig = _EventConfigBase.superRefine((event2, ctx) => {
|
|
|
3826
3874
|
validateActionFlags(event2, ctx);
|
|
3827
3875
|
validateActionOrder(event2, ctx);
|
|
3828
3876
|
}).meta({
|
|
3829
|
-
id: "EventConfig"
|
|
3830
|
-
|
|
3877
|
+
id: "EventConfig",
|
|
3878
|
+
description: "Configuration defining an event type registered in OpenCRVS (for example birth or death)."
|
|
3879
|
+
});
|
|
3831
3880
|
|
|
3832
3881
|
// ../commons/src/events/EventConfigInput.ts
|
|
3833
3882
|
var defineDeclarationForm = (form) => DeclarationFormConfig.parse(form);
|
|
@@ -4049,6 +4098,9 @@ var WorkqueueColumnValue = z34.object({
|
|
|
4049
4098
|
var WorkqueueColumn = z34.object({
|
|
4050
4099
|
label: TranslationConfig,
|
|
4051
4100
|
value: WorkqueueColumnValue
|
|
4101
|
+
}).meta({
|
|
4102
|
+
id: "WorkqueueColumn",
|
|
4103
|
+
description: "Configuration for a single workqueue column. The value references an event metadata key (e.g. `dateOfEvent`, `status`, `trackingId`)."
|
|
4052
4104
|
});
|
|
4053
4105
|
function defineWorkqueuesColumns(workqueueColumns) {
|
|
4054
4106
|
return workqueueColumns.map(
|
|
@@ -4254,8 +4306,8 @@ var WorkqueueConfigWithoutQuery = WorkqueueConfig.omit({
|
|
|
4254
4306
|
var WorkqueueConfigInput = WorkqueueConfig.extend({
|
|
4255
4307
|
query: CountryConfigQueryInputType
|
|
4256
4308
|
}).meta({
|
|
4257
|
-
|
|
4258
|
-
|
|
4309
|
+
id: "WorkqueueConfig",
|
|
4310
|
+
description: "Configuration for a single workqueue. Defines the filter applied to the event index, the quick-action button, the columns shown on each row, and the message rendered when the queue is empty."
|
|
4259
4311
|
});
|
|
4260
4312
|
var WorkqueueCountInput = z37.array(
|
|
4261
4313
|
z37.object({ slug: z37.string(), query: QueryType })
|
|
@@ -4297,7 +4349,9 @@ var BaseActionInput = z38.object({
|
|
|
4297
4349
|
keepAssignment: z38.boolean().optional(),
|
|
4298
4350
|
keepAssignmentIfAccepted: z38.boolean().optional(),
|
|
4299
4351
|
keepAssignmentIfRejected: z38.boolean().optional(),
|
|
4300
|
-
waitFor: z38.boolean().
|
|
4352
|
+
waitFor: z38.boolean().default(true).describe(
|
|
4353
|
+
"Whether action waits for the indexing before returning. Defaults to true. Setting this to to false completes faster but might lead to stale data in the client if the client tries to read the event immediately after performing the action. Use with care."
|
|
4354
|
+
),
|
|
4301
4355
|
// For normal users, the createdAtLocation is resolved on the backend from the user's primaryOfficeId.
|
|
4302
4356
|
// @TODO: createdAtLocation should be limited to actions that system users can perform. For normal users, it should not be part of the base action.
|
|
4303
4357
|
createdAtLocation: UUID.nullish().describe(
|
|
@@ -4477,7 +4531,7 @@ var Draft = z39.object({
|
|
|
4477
4531
|
}).describe(
|
|
4478
4532
|
"A temporary storage for an action. Stored with details of the event, creator and creation time."
|
|
4479
4533
|
);
|
|
4480
|
-
var DraftInput = BaseActionInput.extend({
|
|
4534
|
+
var DraftInput = BaseActionInput.omit({ waitFor: true }).extend({
|
|
4481
4535
|
type: ActionTypes.exclude([ActionTypes.enum.DELETE]),
|
|
4482
4536
|
status: z39.enum([
|
|
4483
4537
|
ActionStatus.Requested,
|
package/dist/scopes/index.js
CHANGED
|
@@ -365,7 +365,9 @@ var decodeScope = (query) => {
|
|
|
365
365
|
};
|
|
366
366
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
367
367
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
368
|
-
accessLevel: JurisdictionFilter.enum.all
|
|
368
|
+
accessLevel: JurisdictionFilter.enum.all,
|
|
369
|
+
registeredIn: JurisdictionFilter.enum.all,
|
|
370
|
+
declaredIn: JurisdictionFilter.enum.all
|
|
369
371
|
};
|
|
370
372
|
function getScopeOptionValue(scope, option) {
|
|
371
373
|
const options = "options" in scope ? scope.options : void 0;
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencrvs/toolkit",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.61553b5",
|
|
4
4
|
"description": "OpenCRVS toolkit for building country configurations",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"bin": {
|
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
"build": "./build.sh",
|
|
21
21
|
"build:all": "lerna run build --include-dependencies --scope @opencrvs/toolkit && ./build.sh"
|
|
22
22
|
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/opencrvs/opencrvs-core.git"
|
|
26
|
+
},
|
|
23
27
|
"dependencies": {
|
|
24
28
|
"@trpc/client": "11.4.3",
|
|
25
29
|
"@trpc/server": "^11.8.0",
|
|
Binary file
|