@opencrvs/toolkit 2.0.0-rc.18f0568 → 2.0.0-rc.18f6ed6
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/application-config/index.js +17 -9
- package/dist/cli.js +3 -1
- package/dist/commons/api/router.d.ts +412 -30
- package/dist/commons/events/ActionDocument.d.ts +6 -0
- package/dist/commons/events/ActionInput.d.ts +6 -0
- package/dist/commons/events/EventDocument.d.ts +3 -0
- package/dist/commons/events/EventIndex.d.ts +0 -3
- package/dist/commons/events/EventMetadata.d.ts +0 -7
- package/dist/commons/events/WorkqueueConfig.d.ts +146 -146
- package/dist/commons/events/state/index.d.ts +0 -4
- package/dist/commons/events/state/utils.d.ts +3 -2
- package/dist/commons/events/utils.d.ts +3 -0
- package/dist/conditionals/index.js +3 -1
- package/dist/events/index.js +30 -44
- package/dist/migrations/v2.0/index.js +3 -1
- package/dist/notification/index.js +30 -28
- package/dist/scopes/index.js +3 -1
- package/opencrvs-toolkit-2.0.0-rc.18f6ed6.tgz +0 -0
- package/package.json +1 -1
- package/opencrvs-toolkit-2.0.0-rc.18f0568.tgz +0 -0
|
@@ -75,7 +75,10 @@ var ActionConditional = z.discriminatedUnion("type", [
|
|
|
75
75
|
ShowConditional,
|
|
76
76
|
// Action can be shown to the user in the list but as disabled
|
|
77
77
|
EnableConditional
|
|
78
|
-
])
|
|
78
|
+
]).meta({
|
|
79
|
+
description: "Action conditional configuration",
|
|
80
|
+
id: "ActionConditional"
|
|
81
|
+
});
|
|
79
82
|
var DisplayOnReviewConditional = z.object({
|
|
80
83
|
type: z.literal(ConditionalType.DISPLAY_ON_REVIEW),
|
|
81
84
|
conditional: Conditional
|
|
@@ -831,7 +834,9 @@ var ScopeType = z11.enum([
|
|
|
831
834
|
var EncodedScope = z11.string().brand("EncodedScope");
|
|
832
835
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
833
836
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
834
|
-
accessLevel: JurisdictionFilter.enum.all
|
|
837
|
+
accessLevel: JurisdictionFilter.enum.all,
|
|
838
|
+
registeredIn: JurisdictionFilter.enum.all,
|
|
839
|
+
declaredIn: JurisdictionFilter.enum.all
|
|
835
840
|
};
|
|
836
841
|
|
|
837
842
|
// ../commons/src/authentication.ts
|
|
@@ -984,8 +989,9 @@ var RequestedCorrectionAction = ActionBase.extend(
|
|
|
984
989
|
var ApprovedCorrectionAction = ActionBase.extend(
|
|
985
990
|
z13.object({
|
|
986
991
|
type: z13.literal(ActionType.APPROVE_CORRECTION),
|
|
987
|
-
requestId: z13.string()
|
|
992
|
+
requestId: z13.string(),
|
|
988
993
|
// TODO move into 'content' property
|
|
994
|
+
content: z13.object({ immediateCorrection: z13.boolean().optional() }).optional()
|
|
989
995
|
}).shape
|
|
990
996
|
);
|
|
991
997
|
var RejectedCorrectionAction = ActionBase.extend(
|
|
@@ -1077,6 +1083,9 @@ var FlagConfig = z14.object({
|
|
|
1077
1083
|
"Indicates if this flag expects an action to be performed to be cleared."
|
|
1078
1084
|
),
|
|
1079
1085
|
label: TranslationConfig.describe("Human readable label of the flag.")
|
|
1086
|
+
}).meta({
|
|
1087
|
+
description: "Flag configuration",
|
|
1088
|
+
id: "FlagConfig"
|
|
1080
1089
|
});
|
|
1081
1090
|
var ActionFlagConfig = z14.object({
|
|
1082
1091
|
id: Flag,
|
|
@@ -1084,6 +1093,9 @@ var ActionFlagConfig = z14.object({
|
|
|
1084
1093
|
conditional: Conditional.optional().describe(
|
|
1085
1094
|
"When conditional is met, the operation is performed on the flag. If not provided, the operation is performed unconditionally."
|
|
1086
1095
|
)
|
|
1096
|
+
}).meta({
|
|
1097
|
+
description: "Action flag configuration",
|
|
1098
|
+
id: "ActionFlagConfig"
|
|
1087
1099
|
});
|
|
1088
1100
|
|
|
1089
1101
|
// ../commons/src/events/EventMetadata.ts
|
|
@@ -1105,8 +1117,7 @@ var ActionCreationMetadata = z15.object({
|
|
|
1105
1117
|
),
|
|
1106
1118
|
createdByUserType: z15.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
|
|
1107
1119
|
acceptedAt: z15.iso.datetime().describe("Timestamp when the action request was accepted."),
|
|
1108
|
-
createdByRole: z15.string().optional().describe("Role of the user at the time of action request creation.")
|
|
1109
|
-
createdBySignature: z15.string().nullish().describe("Signature of the user who created the action request.")
|
|
1120
|
+
createdByRole: z15.string().optional().describe("Role of the user at the time of action request creation.")
|
|
1110
1121
|
});
|
|
1111
1122
|
var RegistrationCreationMetadata = ActionCreationMetadata.extend({
|
|
1112
1123
|
registrationNumber: z15.string().describe(
|
|
@@ -1134,9 +1145,6 @@ var EventMetadata = z15.object({
|
|
|
1134
1145
|
createdAtLocation: UUID.nullish().describe(
|
|
1135
1146
|
"Location of the user who created the event."
|
|
1136
1147
|
),
|
|
1137
|
-
createdBySignature: DocumentPath.nullish().describe(
|
|
1138
|
-
"Signature of the user who created the event."
|
|
1139
|
-
),
|
|
1140
1148
|
updatedAtLocation: UUID.nullish().describe(
|
|
1141
1149
|
"Location of the user who last changed the status."
|
|
1142
1150
|
),
|
|
@@ -1400,7 +1408,7 @@ var FieldId = import_v43.default.string().superRefine((val, ctx) => {
|
|
|
1400
1408
|
}
|
|
1401
1409
|
}).describe("Unique identifier for the field");
|
|
1402
1410
|
var FieldReference = import_v43.default.object({
|
|
1403
|
-
$$field: FieldId,
|
|
1411
|
+
$$field: FieldId.describe("Id of the field to reference"),
|
|
1404
1412
|
$$subfield: import_v43.default.array(import_v43.default.string()).optional().default([]).describe(
|
|
1405
1413
|
'If the FieldValue is an object, subfield can be used to refer to e.g. `["foo", "bar"]` in `{ foo: { bar: 3 } }`'
|
|
1406
1414
|
)
|
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
|