@opencrvs/toolkit 2.0.0-rc.c2f305f → 2.0.0-rc.c30a093
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/build.sh +2 -2
- package/dist/application-config/index.js +15 -5
- package/dist/cli.js +166 -5101
- package/dist/commons/api/router.d.ts +8 -0
- package/dist/commons/conditionals/conditionals.d.ts +3 -3
- package/dist/commons/events/ActionConfig.d.ts +176 -0
- package/dist/commons/events/AdvancedSearchConfig.d.ts +12 -0
- package/dist/commons/events/EventConfig.d.ts +2 -0
- package/dist/commons/events/EventIndex.d.ts +11 -0
- package/dist/commons/events/EventMetadata.d.ts +26 -0
- package/dist/commons/events/FieldConfig.d.ts +10 -0
- package/dist/commons/events/locations.d.ts +1 -0
- package/dist/commons/events/state/index.d.ts +8 -0
- package/dist/commons/events/state/utils.d.ts +9 -0
- package/dist/conditionals/index.js +10 -5
- package/dist/environment/templates.d.ts.map +1 -1
- package/dist/environment/templates.js +1 -0
- package/dist/events/index.js +130 -12
- package/dist/migrations/v2.0/index.js +88 -5139
- package/dist/migrations/v2.1/add-explicit-correction-flags.d.ts +3 -0
- package/dist/migrations/v2.1/add-explicit-correction-flags.d.ts.map +1 -0
- package/dist/migrations/v2.1/add-explicit-correction-flags.js +234 -0
- package/dist/migrations/v2.1/index.d.ts +6 -0
- package/dist/migrations/v2.1/index.d.ts.map +1 -0
- package/dist/migrations/v2.1/index.js +218 -0
- package/dist/notification/index.js +106 -8
- package/dist/scopes/index.d.ts +89 -1
- package/dist/scopes/index.js +10 -5
- package/dist/templates/charts-values/opencrvs-services/values.yaml +1 -0
- package/opencrvs-toolkit-2.0.0-rc.c30a093.tgz +0 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-2.0.0-rc.c2f305f.tgz +0 -0
package/build.sh
CHANGED
|
@@ -51,8 +51,8 @@ mkdir -p ./dist/commons/application-config
|
|
|
51
51
|
cp -r ../commons/build/dist/common/application-config.d.ts ./dist/commons/application-config/index.d.ts
|
|
52
52
|
|
|
53
53
|
# Build migration CLI
|
|
54
|
-
npx esbuild src/migrations/v2.
|
|
55
|
-
chmod +x ./dist/migrations/v2.
|
|
54
|
+
npx esbuild src/migrations/v2.1/index.ts --bundle --format=cjs --outdir=./dist/migrations/v2.1 --allow-overwrite --packages=external --banner:js="#!/usr/bin/env node"
|
|
55
|
+
chmod +x ./dist/migrations/v2.1/index.js
|
|
56
56
|
|
|
57
57
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
58
58
|
sed -i '' 's|@opencrvs/events/build/types|../commons/api|g' dist/api/index.d.ts
|
|
@@ -665,11 +665,13 @@ var scopeOptionsPlaceEvent = z11.object({
|
|
|
665
665
|
event: scopeByEvent,
|
|
666
666
|
placeOfEvent: JurisdictionFilter.optional()
|
|
667
667
|
}).describe("Options applicable to all record scopes.");
|
|
668
|
-
var
|
|
668
|
+
var scopeOptionsDeclaredOrNotified = scopeOptionsPlaceEvent.extend({
|
|
669
|
+
notifiedIn: JurisdictionFilter.optional(),
|
|
670
|
+
notifiedBy: UserFilter.optional(),
|
|
669
671
|
declaredIn: JurisdictionFilter.optional(),
|
|
670
672
|
declaredBy: UserFilter.optional()
|
|
671
673
|
}).describe("Options applicable to actions that may take place after DECLARE");
|
|
672
|
-
var AllRecordScopeOptions =
|
|
674
|
+
var AllRecordScopeOptions = scopeOptionsDeclaredOrNotified.extend({
|
|
673
675
|
registeredIn: JurisdictionFilter.optional(),
|
|
674
676
|
registeredBy: UserFilter.optional()
|
|
675
677
|
}).describe(
|
|
@@ -707,6 +709,8 @@ var ResolvedScopeOptionsPlaceEvent = z11.object({
|
|
|
707
709
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
708
710
|
);
|
|
709
711
|
var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
|
|
712
|
+
notifiedIn: UUID.nullish(),
|
|
713
|
+
notifiedBy: z11.string().optional(),
|
|
710
714
|
declaredIn: UUID.nullish(),
|
|
711
715
|
declaredBy: z11.string().optional()
|
|
712
716
|
}).describe(
|
|
@@ -752,7 +756,7 @@ var RecordScopeV2 = z11.discriminatedUnion("type", [
|
|
|
752
756
|
}),
|
|
753
757
|
z11.object({
|
|
754
758
|
type: ScopesWithDeclaredOptions,
|
|
755
|
-
options:
|
|
759
|
+
options: scopeOptionsDeclaredOrNotified.optional()
|
|
756
760
|
}),
|
|
757
761
|
z11.object({
|
|
758
762
|
type: ScopesWithFullOptions,
|
|
@@ -841,8 +845,9 @@ var EncodedScope = z11.string().brand("EncodedScope");
|
|
|
841
845
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
842
846
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
843
847
|
accessLevel: JurisdictionFilter.enum.all,
|
|
844
|
-
|
|
845
|
-
declaredIn: JurisdictionFilter.enum.all
|
|
848
|
+
notifiedIn: JurisdictionFilter.enum.all,
|
|
849
|
+
declaredIn: JurisdictionFilter.enum.all,
|
|
850
|
+
registeredIn: JurisdictionFilter.enum.all
|
|
846
851
|
};
|
|
847
852
|
|
|
848
853
|
// ../commons/src/authentication.ts
|
|
@@ -1131,6 +1136,7 @@ var RegistrationCreationMetadata = ActionCreationMetadata.extend({
|
|
|
1131
1136
|
)
|
|
1132
1137
|
});
|
|
1133
1138
|
var LegalStatuses = z15.object({
|
|
1139
|
+
[EventStatus.enum.NOTIFIED]: ActionCreationMetadata.nullish(),
|
|
1134
1140
|
[EventStatus.enum.DECLARED]: ActionCreationMetadata.nullish(),
|
|
1135
1141
|
[EventStatus.enum.REGISTERED]: RegistrationCreationMetadata.nullish()
|
|
1136
1142
|
});
|
|
@@ -1190,6 +1196,8 @@ var EventMetadataKeys = z15.enum(EventMetadataKeysArray);
|
|
|
1190
1196
|
var EventMetadataDateFieldIdInput = z15.enum([
|
|
1191
1197
|
"createdAt",
|
|
1192
1198
|
"updatedAt",
|
|
1199
|
+
"legalStatuses.NOTIFIED.createdAt",
|
|
1200
|
+
"legalStatuses.NOTIFIED.acceptedAt",
|
|
1193
1201
|
"legalStatuses.DECLARED.createdAt",
|
|
1194
1202
|
"legalStatuses.DECLARED.acceptedAt",
|
|
1195
1203
|
"legalStatuses.REGISTERED.createdAt",
|
|
@@ -1198,6 +1206,8 @@ var EventMetadataDateFieldIdInput = z15.enum([
|
|
|
1198
1206
|
var EventMetadataDateFieldId = z15.enum([
|
|
1199
1207
|
"event.createdAt",
|
|
1200
1208
|
"event.updatedAt",
|
|
1209
|
+
"event.legalStatuses.NOTIFIED.createdAt",
|
|
1210
|
+
"event.legalStatuses.NOTIFIED.acceptedAt",
|
|
1201
1211
|
"event.legalStatuses.DECLARED.createdAt",
|
|
1202
1212
|
"event.legalStatuses.DECLARED.acceptedAt",
|
|
1203
1213
|
"event.legalStatuses.REGISTERED.createdAt",
|