@opencrvs/toolkit 2.1.0-rc.4bddaf2 → 2.1.0-rc.4ebadf9
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 -1
- package/dist/cli.js +165 -5154
- package/dist/commons/api/router.d.ts +3667 -2887
- package/dist/commons/application-config/index.d.ts +6 -6
- package/dist/commons/conditionals/conditionals.d.ts +32 -323
- package/dist/commons/events/ActionConfig.d.ts +279 -70
- package/dist/commons/events/ActionDocument.d.ts +155 -111
- package/dist/commons/events/ActionInput.d.ts +26 -6
- package/dist/commons/events/ActionType.d.ts +63 -58
- package/dist/commons/events/AdvancedSearchConfig.d.ts +513 -501
- package/dist/commons/events/AuditLog.d.ts +151 -40
- package/dist/commons/events/CompositeFieldValue.d.ts +4 -4
- package/dist/commons/events/Conditional.d.ts +3 -3
- package/dist/commons/events/CountryConfigQueryInput.d.ts +590 -590
- package/dist/commons/events/Draft.d.ts +37 -35
- package/dist/commons/events/DynamicFieldValue.d.ts +9 -9
- package/dist/commons/events/EventConfig.d.ts +5 -5
- package/dist/commons/events/EventDocument.d.ts +66 -44
- package/dist/commons/events/EventIndex.d.ts +62 -62
- package/dist/commons/events/EventMetadata.d.ts +40 -40
- package/dist/commons/events/FieldConfig.d.ts +341 -331
- package/dist/commons/events/FieldType.d.ts +51 -51
- package/dist/commons/events/FieldTypeMapping.d.ts +100 -100
- package/dist/commons/events/FieldValue.d.ts +12 -12
- package/dist/commons/events/Flag.d.ts +15 -15
- package/dist/commons/events/TemplateConfig.d.ts +1 -1
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +40 -40
- package/dist/commons/events/WorkqueueConfig.d.ts +827 -824
- package/dist/commons/events/deduplication.d.ts +1 -1
- package/dist/commons/events/event.d.ts +2 -2
- package/dist/commons/events/field.d.ts +69 -198
- package/dist/commons/events/index.d.ts +1 -0
- package/dist/commons/events/locationPayloads.d.ts +95 -0
- package/dist/commons/events/locations.d.ts +103 -6
- package/dist/commons/events/mocks.test.utils.d.ts +18 -4
- package/dist/commons/events/scopes.d.ts +5 -4
- package/dist/commons/events/state/index.d.ts +17 -17
- package/dist/commons/events/state/utils.d.ts +7 -7
- package/dist/commons/events/test.utils.d.ts +44 -39
- package/dist/commons/events/utils.d.ts +127 -105
- package/dist/commons/notification/UserNotifications.d.ts +10 -10
- package/dist/conditionals/index.js +3 -0
- package/dist/environment/derived-variables.d.ts +119 -131
- package/dist/environment/derived-variables.d.ts.map +1 -1
- package/dist/environment/derived-variables.js +0 -14
- package/dist/environment/logger.d.ts +3 -12
- package/dist/environment/logger.d.ts.map +1 -1
- package/dist/environment/manage-users.js +17 -7
- package/dist/environment/questions.d.ts +75 -74
- package/dist/environment/questions.d.ts.map +1 -1
- package/dist/environment/setup-environment.js +8 -28
- package/dist/environment/swarm-to-k8s.js +17 -7
- package/dist/environment/update-workflows.js +17 -7
- package/dist/environment/users.js +17 -7
- package/dist/environment/utils.d.ts +1 -1
- package/dist/environment/utils.js +17 -7
- package/dist/events/deduplication.d.ts +1 -1
- package/dist/events/index.js +380 -88
- package/dist/migrations/v2.0/convert-config-files-to-ts.js +17 -7
- package/dist/migrations/v2.0/index.js +88 -5144
- package/dist/migrations/v2.0/migrate-application-config-url.js +4 -3
- package/dist/migrations/v2.0/remove-hearth-migrations.js +17 -7
- 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 +328 -104
- package/dist/scopes/index.d.ts +148 -140
- package/dist/scopes/index.js +3 -0
- package/dist/templates/charts-values/dependencies/values.yaml +0 -3
- package/dist/templates/charts-values/opencrvs-services/values.yaml +0 -4
- package/opencrvs-toolkit-2.1.0-rc.4ebadf9.tgz +0 -0
- package/package.json +5 -5
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-2.1.0-rc.4bddaf2.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
|
|
@@ -520,6 +520,7 @@ var ActionType = {
|
|
|
520
520
|
MARK_AS_DUPLICATE: "MARK_AS_DUPLICATE",
|
|
521
521
|
MARK_AS_NOT_DUPLICATE: "MARK_AS_NOT_DUPLICATE",
|
|
522
522
|
ARCHIVE: "ARCHIVE",
|
|
523
|
+
UNARCHIVE: "UNARCHIVE",
|
|
523
524
|
// Record actions
|
|
524
525
|
PRINT_CERTIFICATE: "PRINT_CERTIFICATE",
|
|
525
526
|
REQUEST_CORRECTION: "REQUEST_CORRECTION",
|
|
@@ -539,6 +540,7 @@ var ConfirmableActions = [
|
|
|
539
540
|
ActionType.REGISTER,
|
|
540
541
|
ActionType.REJECT,
|
|
541
542
|
ActionType.ARCHIVE,
|
|
543
|
+
ActionType.UNARCHIVE,
|
|
542
544
|
ActionType.PRINT_CERTIFICATE,
|
|
543
545
|
ActionType.REQUEST_CORRECTION,
|
|
544
546
|
ActionType.APPROVE_CORRECTION,
|
|
@@ -557,6 +559,7 @@ var ActionTypes = z10.enum([
|
|
|
557
559
|
"MARK_AS_DUPLICATE",
|
|
558
560
|
"MARK_AS_NOT_DUPLICATE",
|
|
559
561
|
"ARCHIVE",
|
|
562
|
+
"UNARCHIVE",
|
|
560
563
|
"PRINT_CERTIFICATE",
|
|
561
564
|
"REQUEST_CORRECTION",
|
|
562
565
|
"REJECT_CORRECTION",
|
|
@@ -597,6 +600,7 @@ var WorkqueueActionType = ActionTypes.extract([
|
|
|
597
600
|
ActionType.REJECT,
|
|
598
601
|
ActionType.MARK_AS_DUPLICATE,
|
|
599
602
|
ActionType.ARCHIVE,
|
|
603
|
+
ActionType.UNARCHIVE,
|
|
600
604
|
ActionType.PRINT_CERTIFICATE,
|
|
601
605
|
ActionType.REQUEST_CORRECTION
|
|
602
606
|
]);
|
|
@@ -626,6 +630,7 @@ var RecordScopeTypeV2 = z11.enum([
|
|
|
626
630
|
"record.edit",
|
|
627
631
|
"record.reject",
|
|
628
632
|
"record.archive",
|
|
633
|
+
"record.unarchive",
|
|
629
634
|
"record.review-duplicates",
|
|
630
635
|
"record.register",
|
|
631
636
|
"record.print-certified-copies",
|
|
@@ -642,6 +647,7 @@ var PlainScopeType = z11.enum([
|
|
|
642
647
|
"integration.create",
|
|
643
648
|
"record.import",
|
|
644
649
|
"config.update-all",
|
|
650
|
+
"location.edit",
|
|
645
651
|
"attachment.upload",
|
|
646
652
|
"profile.electronic-signature",
|
|
647
653
|
"user.read-only-my-audit",
|
|
@@ -731,6 +737,7 @@ var ScopesWithDeclaredOptions = RecordScopeTypeV2.extract([
|
|
|
731
737
|
"record.edit",
|
|
732
738
|
"record.reject",
|
|
733
739
|
"record.archive",
|
|
740
|
+
"record.unarchive",
|
|
734
741
|
"record.review-duplicates",
|
|
735
742
|
"record.register"
|
|
736
743
|
]);
|
|
@@ -965,6 +972,11 @@ var ArchiveAction = ActionBase.extend(
|
|
|
965
972
|
content: ReasonContent
|
|
966
973
|
}).shape
|
|
967
974
|
);
|
|
975
|
+
var UnarchiveAction = ActionBase.extend(
|
|
976
|
+
z13.object({
|
|
977
|
+
type: z13.literal(ActionType.UNARCHIVE)
|
|
978
|
+
}).shape
|
|
979
|
+
);
|
|
968
980
|
var CreatedAction = ActionBase.extend(
|
|
969
981
|
z13.object({
|
|
970
982
|
type: z13.literal(ActionType.CREATE)
|
|
@@ -978,9 +990,10 @@ var NotifiedAction = ActionBase.extend(
|
|
|
978
990
|
var EditAction = ActionBase.extend(
|
|
979
991
|
z13.object({
|
|
980
992
|
type: z13.literal(ActionType.EDIT),
|
|
993
|
+
/** @deprecated New Edit-actions should no longer contain content. This is kept for old 2.0 edits. */
|
|
981
994
|
content: z13.object({
|
|
982
995
|
comment: z13.string().describe("Comment for the edit action.").optional()
|
|
983
|
-
})
|
|
996
|
+
}).optional()
|
|
984
997
|
}).shape
|
|
985
998
|
);
|
|
986
999
|
var PrintContent = z13.object({
|
|
@@ -1031,6 +1044,7 @@ var ActionDocument = z13.discriminatedUnion("type", [
|
|
|
1031
1044
|
MarkNotDuplicateAction.meta({ id: "MarkNotDuplicateAction" }),
|
|
1032
1045
|
MarkAsDuplicateAction.meta({ id: "MarkAsDuplicateAction" }),
|
|
1033
1046
|
ArchiveAction.meta({ id: "ArchiveAction" }),
|
|
1047
|
+
UnarchiveAction.meta({ id: "UnarchiveAction" }),
|
|
1034
1048
|
NotifiedAction.meta({ id: "NotifiedAction" }),
|
|
1035
1049
|
RegisterAction.meta({ id: "RegisterAction" }),
|
|
1036
1050
|
DeclareAction.meta({ id: "DeclareAction" }),
|