@opencrvs/toolkit 2.0.0-rc.93cb766 → 2.0.0-rc.93f7fcd
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/README.md +15 -0
- package/build.sh +5 -4
- package/dist/application-config/index.js +23 -6
- package/dist/cli.js +3186 -4921
- package/dist/commons/api/router.d.ts +21 -2
- package/dist/commons/conditionals/conditionals.d.ts +3 -3
- package/dist/commons/events/ActionConfig.d.ts +211 -2
- package/dist/commons/events/AdvancedSearchConfig.d.ts +12 -0
- package/dist/commons/events/CountryConfigQueryInput.d.ts +42 -0
- package/dist/commons/events/EventConfig.d.ts +2 -0
- package/dist/commons/events/EventIndex.d.ts +25 -0
- package/dist/commons/events/EventMetadata.d.ts +26 -0
- package/dist/commons/events/FieldConfig.d.ts +11 -0
- package/dist/commons/events/FieldType.d.ts +1 -0
- package/dist/commons/events/FieldTypeMapping.d.ts +1 -1
- package/dist/commons/events/WorkqueueConfig.d.ts +39 -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/commons/events/utils.d.ts +8 -0
- package/dist/conditionals/index.js +10 -5
- package/dist/environment/custom-types.d.ts +33 -0
- package/dist/environment/custom-types.d.ts.map +1 -0
- package/dist/environment/custom-types.js +12 -0
- package/dist/environment/derived-variables.d.ts +134 -0
- package/dist/environment/derived-variables.d.ts.map +1 -0
- package/dist/environment/derived-variables.js +169 -0
- package/dist/environment/editor-questions.d.ts +4 -0
- package/dist/environment/editor-questions.d.ts.map +1 -0
- package/dist/environment/editor-questions.js +67 -0
- package/dist/environment/git.d.ts +5 -0
- package/dist/environment/git.d.ts.map +1 -0
- package/dist/environment/git.js +38 -0
- package/dist/environment/github.d.ts +26 -0
- package/dist/environment/github.d.ts.map +1 -0
- package/dist/environment/github.js +247 -0
- package/dist/environment/index.d.ts +5 -0
- package/dist/environment/index.d.ts.map +1 -0
- package/dist/environment/index.js +71 -0
- package/dist/environment/logger.d.ts +15 -0
- package/dist/environment/logger.d.ts.map +1 -0
- package/dist/environment/logger.js +25 -0
- package/dist/environment/manage-users.d.ts +11 -0
- package/dist/environment/manage-users.d.ts.map +1 -0
- package/dist/environment/manage-users.js +497 -0
- package/dist/environment/questions-helper.d.ts +15 -0
- package/dist/environment/questions-helper.d.ts.map +1 -0
- package/dist/environment/questions-helper.js +70 -0
- package/dist/environment/questions.d.ts +199 -0
- package/dist/environment/questions.d.ts.map +1 -0
- package/dist/environment/questions.js +412 -0
- package/dist/environment/setup-environment.d.ts +2 -0
- package/dist/environment/setup-environment.d.ts.map +1 -0
- package/dist/environment/setup-environment.js +794 -0
- package/dist/environment/ssh-keygen.d.ts +5 -0
- package/dist/environment/ssh-keygen.d.ts.map +1 -0
- package/dist/environment/ssh-keygen.js +21 -0
- package/dist/environment/swarm-to-k8s.d.ts +2 -0
- package/dist/environment/swarm-to-k8s.d.ts.map +1 -0
- package/dist/environment/swarm-to-k8s.js +173 -0
- package/dist/environment/templates.d.ts +27 -0
- package/dist/environment/templates.d.ts.map +1 -0
- package/dist/environment/templates.js +163 -0
- package/dist/environment/update-workflows.d.ts +2 -0
- package/dist/environment/update-workflows.d.ts.map +1 -0
- package/dist/environment/update-workflows.js +169 -0
- package/dist/environment/users.d.ts +2 -0
- package/dist/environment/users.d.ts.map +1 -0
- package/dist/environment/users.js +112 -0
- package/dist/environment/utils.d.ts +18 -0
- package/dist/environment/utils.d.ts.map +1 -0
- package/dist/environment/utils.js +100 -0
- package/dist/events/index.js +302 -76
- package/dist/migrations/v2.0/checkout-upstream-files.d.ts +1 -1
- package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
- package/dist/migrations/v2.0/checkout-upstream-files.js +1 -1
- 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 +209 -20
- package/dist/scopes/index.d.ts +89 -1
- package/dist/scopes/index.js +10 -5
- package/dist/templates/charts-values/dependencies/values.override.yaml +4 -0
- package/dist/templates/charts-values/dependencies/values.yaml +83 -0
- package/dist/templates/charts-values/opencrvs-services/values.override.yaml +4 -0
- package/dist/templates/charts-values/opencrvs-services/values.yaml +81 -0
- package/dist/templates/charts-values/traefik/values.override.yaml +4 -0
- package/dist/templates/charts-values/traefik/values.yaml +115 -0
- package/dist/templates/inventory/inventory.template.yml +100 -0
- package/dist/templates/inventory/production.example.yml +77 -0
- package/dist/templates/inventory/qa.example.yml +48 -0
- package/opencrvs-toolkit-2.0.0-rc.93f7fcd.tgz +0 -0
- package/package.json +15 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-2.0.0-rc.93cb766.tgz +0 -0
|
@@ -118,11 +118,13 @@ var scopeOptionsPlaceEvent = z2.object({
|
|
|
118
118
|
event: scopeByEvent,
|
|
119
119
|
placeOfEvent: JurisdictionFilter.optional()
|
|
120
120
|
}).describe("Options applicable to all record scopes.");
|
|
121
|
-
var
|
|
121
|
+
var scopeOptionsDeclaredOrNotified = scopeOptionsPlaceEvent.extend({
|
|
122
|
+
notifiedIn: JurisdictionFilter.optional(),
|
|
123
|
+
notifiedBy: UserFilter.optional(),
|
|
122
124
|
declaredIn: JurisdictionFilter.optional(),
|
|
123
125
|
declaredBy: UserFilter.optional()
|
|
124
126
|
}).describe("Options applicable to actions that may take place after DECLARE");
|
|
125
|
-
var AllRecordScopeOptions =
|
|
127
|
+
var AllRecordScopeOptions = scopeOptionsDeclaredOrNotified.extend({
|
|
126
128
|
registeredIn: JurisdictionFilter.optional(),
|
|
127
129
|
registeredBy: UserFilter.optional()
|
|
128
130
|
}).describe(
|
|
@@ -160,6 +162,8 @@ var ResolvedScopeOptionsPlaceEvent = z2.object({
|
|
|
160
162
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
161
163
|
);
|
|
162
164
|
var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
|
|
165
|
+
notifiedIn: UUID.nullish(),
|
|
166
|
+
notifiedBy: z2.string().optional(),
|
|
163
167
|
declaredIn: UUID.nullish(),
|
|
164
168
|
declaredBy: z2.string().optional()
|
|
165
169
|
}).describe(
|
|
@@ -205,7 +209,7 @@ var RecordScopeV2 = z2.discriminatedUnion("type", [
|
|
|
205
209
|
}),
|
|
206
210
|
z2.object({
|
|
207
211
|
type: ScopesWithDeclaredOptions,
|
|
208
|
-
options:
|
|
212
|
+
options: scopeOptionsDeclaredOrNotified.optional()
|
|
209
213
|
}),
|
|
210
214
|
z2.object({
|
|
211
215
|
type: ScopesWithFullOptions,
|
|
@@ -294,8 +298,9 @@ var EncodedScope = z2.string().brand("EncodedScope");
|
|
|
294
298
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
295
299
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
296
300
|
accessLevel: JurisdictionFilter.enum.all,
|
|
297
|
-
|
|
298
|
-
declaredIn: JurisdictionFilter.enum.all
|
|
301
|
+
notifiedIn: JurisdictionFilter.enum.all,
|
|
302
|
+
declaredIn: JurisdictionFilter.enum.all,
|
|
303
|
+
registeredIn: JurisdictionFilter.enum.all
|
|
299
304
|
};
|
|
300
305
|
|
|
301
306
|
// ../commons/src/authentication.ts
|
|
@@ -770,6 +775,11 @@ var FieldTypesToHideInReview = [
|
|
|
770
775
|
FieldType.ALPHA_PRINT_BUTTON,
|
|
771
776
|
FieldType.ALPHA_HIDDEN
|
|
772
777
|
];
|
|
778
|
+
var HiddenFieldTypes = [
|
|
779
|
+
FieldType.HTTP,
|
|
780
|
+
FieldType.QUERY_PARAM_READER,
|
|
781
|
+
FieldType.ALPHA_HIDDEN
|
|
782
|
+
];
|
|
773
783
|
|
|
774
784
|
// ../commons/src/events/FieldValue.ts
|
|
775
785
|
var z12 = __toESM(require("zod/v4"));
|
|
@@ -1352,6 +1362,7 @@ var RegistrationCreationMetadata = ActionCreationMetadata.extend({
|
|
|
1352
1362
|
)
|
|
1353
1363
|
});
|
|
1354
1364
|
var LegalStatuses = z16.object({
|
|
1365
|
+
[EventStatus.enum.NOTIFIED]: ActionCreationMetadata.nullish(),
|
|
1355
1366
|
[EventStatus.enum.DECLARED]: ActionCreationMetadata.nullish(),
|
|
1356
1367
|
[EventStatus.enum.REGISTERED]: RegistrationCreationMetadata.nullish()
|
|
1357
1368
|
});
|
|
@@ -1411,6 +1422,8 @@ var EventMetadataKeys = z16.enum(EventMetadataKeysArray);
|
|
|
1411
1422
|
var EventMetadataDateFieldIdInput = z16.enum([
|
|
1412
1423
|
"createdAt",
|
|
1413
1424
|
"updatedAt",
|
|
1425
|
+
"legalStatuses.NOTIFIED.createdAt",
|
|
1426
|
+
"legalStatuses.NOTIFIED.acceptedAt",
|
|
1414
1427
|
"legalStatuses.DECLARED.createdAt",
|
|
1415
1428
|
"legalStatuses.DECLARED.acceptedAt",
|
|
1416
1429
|
"legalStatuses.REGISTERED.createdAt",
|
|
@@ -1419,6 +1432,8 @@ var EventMetadataDateFieldIdInput = z16.enum([
|
|
|
1419
1432
|
var EventMetadataDateFieldId = z16.enum([
|
|
1420
1433
|
"event.createdAt",
|
|
1421
1434
|
"event.updatedAt",
|
|
1435
|
+
"event.legalStatuses.NOTIFIED.createdAt",
|
|
1436
|
+
"event.legalStatuses.NOTIFIED.acceptedAt",
|
|
1422
1437
|
"event.legalStatuses.DECLARED.createdAt",
|
|
1423
1438
|
"event.legalStatuses.DECLARED.acceptedAt",
|
|
1424
1439
|
"event.legalStatuses.REGISTERED.createdAt",
|
|
@@ -1478,7 +1493,8 @@ var Range = import_v4.z.object({
|
|
|
1478
1493
|
});
|
|
1479
1494
|
var ContainsFlags = import_v4.z.object({
|
|
1480
1495
|
anyOf: import_v4.z.array(Flag).optional(),
|
|
1481
|
-
noneOf: import_v4.z.array(Flag).optional()
|
|
1496
|
+
noneOf: import_v4.z.array(Flag).optional(),
|
|
1497
|
+
allOf: import_v4.z.array(Flag).optional()
|
|
1482
1498
|
}).meta({
|
|
1483
1499
|
id: "ContainsFlags"
|
|
1484
1500
|
});
|
|
@@ -1750,6 +1766,7 @@ var NumberField = BaseField.extend({
|
|
|
1750
1766
|
configuration: import_v43.default.object({
|
|
1751
1767
|
min: import_v43.default.number().optional().describe("Minimum value"),
|
|
1752
1768
|
max: import_v43.default.number().optional().describe("Maximum value"),
|
|
1769
|
+
integer: import_v43.default.boolean().optional().describe("When true, only whole numbers are allowed"),
|
|
1753
1770
|
prefix: TranslationConfig.optional(),
|
|
1754
1771
|
postfix: TranslationConfig.optional()
|
|
1755
1772
|
}).optional()
|
|
@@ -2664,6 +2681,9 @@ var ActionConfigBase = z24.object({
|
|
|
2664
2681
|
var DeclarationActionBase = ActionConfigBase.extend({
|
|
2665
2682
|
deduplication: DeduplicationConfig.optional()
|
|
2666
2683
|
});
|
|
2684
|
+
var actionConfirmationForm = z24.array(FieldConfig).optional().describe(
|
|
2685
|
+
"Fields rendered on the action confirmation dialog. Submitted values are stored in the action annotation and shown in the audit history."
|
|
2686
|
+
);
|
|
2667
2687
|
var ReadActionConfig = ActionConfigBase.extend(
|
|
2668
2688
|
z24.object({
|
|
2669
2689
|
type: z24.literal(ActionType.READ),
|
|
@@ -2673,12 +2693,65 @@ var ReadActionConfig = ActionConfigBase.extend(
|
|
|
2673
2693
|
conditionals: z24.never().optional().describe("Read-action can not be disabled or hidden with conditionals.")
|
|
2674
2694
|
}).shape
|
|
2675
2695
|
);
|
|
2696
|
+
var NotifyConfig = ActionConfigBase.extend(
|
|
2697
|
+
z24.object({
|
|
2698
|
+
type: z24.literal(ActionType.NOTIFY),
|
|
2699
|
+
form: actionConfirmationForm
|
|
2700
|
+
}).shape
|
|
2701
|
+
);
|
|
2702
|
+
var DuplicateDetectedConfig = ActionConfigBase.extend(
|
|
2703
|
+
z24.object({
|
|
2704
|
+
type: z24.literal(ActionType.DUPLICATE_DETECTED),
|
|
2705
|
+
label: z24.never().optional().describe(
|
|
2706
|
+
"DUPLICATE_DETECTED is system-generated and never shown as a button, so it has no label."
|
|
2707
|
+
),
|
|
2708
|
+
supportingCopy: z24.never().optional(),
|
|
2709
|
+
icon: z24.never().optional().describe(
|
|
2710
|
+
"DUPLICATE_DETECTED is system-generated and never shown as a button, so it has no icon."
|
|
2711
|
+
),
|
|
2712
|
+
conditionals: z24.never().optional().describe(
|
|
2713
|
+
"DUPLICATE_DETECTED is system-generated and never shown as a button, so it cannot be disabled or hidden with conditionals."
|
|
2714
|
+
)
|
|
2715
|
+
}).shape
|
|
2716
|
+
);
|
|
2717
|
+
var MarkAsDuplicateConfig = ActionConfigBase.extend(
|
|
2718
|
+
z24.object({
|
|
2719
|
+
type: z24.literal(ActionType.MARK_AS_DUPLICATE)
|
|
2720
|
+
}).shape
|
|
2721
|
+
);
|
|
2722
|
+
var MarkAsNotDuplicateConfig = ActionConfigBase.extend(
|
|
2723
|
+
z24.object({
|
|
2724
|
+
type: z24.literal(ActionType.MARK_AS_NOT_DUPLICATE)
|
|
2725
|
+
}).shape
|
|
2726
|
+
);
|
|
2727
|
+
var AssignConfig = ActionConfigBase.extend(
|
|
2728
|
+
z24.object({
|
|
2729
|
+
type: z24.literal(ActionType.ASSIGN),
|
|
2730
|
+
flags: z24.never().optional().describe(
|
|
2731
|
+
"ASSIGN is a meta action excluded from flag resolution, so flags configured here would never apply."
|
|
2732
|
+
)
|
|
2733
|
+
}).shape
|
|
2734
|
+
);
|
|
2735
|
+
var UnassignConfig = ActionConfigBase.extend(
|
|
2736
|
+
z24.object({
|
|
2737
|
+
type: z24.literal(ActionType.UNASSIGN),
|
|
2738
|
+
flags: z24.never().optional().describe(
|
|
2739
|
+
"UNASSIGN is a meta action excluded from flag resolution, so flags configured here would never apply."
|
|
2740
|
+
)
|
|
2741
|
+
}).shape
|
|
2742
|
+
);
|
|
2743
|
+
var DeleteConfig = ActionConfigBase.extend(
|
|
2744
|
+
z24.object({
|
|
2745
|
+
type: z24.literal(ActionType.DELETE)
|
|
2746
|
+
}).shape
|
|
2747
|
+
);
|
|
2676
2748
|
var DeclareConfig = DeclarationActionBase.extend(
|
|
2677
2749
|
z24.object({
|
|
2678
2750
|
type: z24.literal(ActionType.DECLARE),
|
|
2679
2751
|
review: DeclarationReviewConfig.describe(
|
|
2680
2752
|
"Configuration of the review page fields."
|
|
2681
2753
|
),
|
|
2754
|
+
form: actionConfirmationForm,
|
|
2682
2755
|
dialogCopy: z24.object({
|
|
2683
2756
|
notify: TranslationConfig.describe(
|
|
2684
2757
|
"Confirmation text for the notify action"
|
|
@@ -2694,7 +2767,8 @@ var DeclareConfig = DeclarationActionBase.extend(
|
|
|
2694
2767
|
);
|
|
2695
2768
|
var ArchiveConfig = ActionConfigBase.extend(
|
|
2696
2769
|
z24.object({
|
|
2697
|
-
type: z24.literal(ActionType.ARCHIVE)
|
|
2770
|
+
type: z24.literal(ActionType.ARCHIVE),
|
|
2771
|
+
form: actionConfirmationForm
|
|
2698
2772
|
}).shape
|
|
2699
2773
|
);
|
|
2700
2774
|
var EditActionConfig = ActionConfigBase.extend(
|
|
@@ -2715,12 +2789,14 @@ var EditActionConfig = ActionConfigBase.extend(
|
|
|
2715
2789
|
);
|
|
2716
2790
|
var RejectConfig = ActionConfigBase.extend(
|
|
2717
2791
|
z24.object({
|
|
2718
|
-
type: z24.literal(ActionType.REJECT)
|
|
2792
|
+
type: z24.literal(ActionType.REJECT),
|
|
2793
|
+
form: actionConfirmationForm
|
|
2719
2794
|
}).shape
|
|
2720
2795
|
);
|
|
2721
2796
|
var RegisterConfig = DeclarationActionBase.extend(
|
|
2722
2797
|
z24.object({
|
|
2723
|
-
type: z24.literal(ActionType.REGISTER)
|
|
2798
|
+
type: z24.literal(ActionType.REGISTER),
|
|
2799
|
+
form: actionConfirmationForm
|
|
2724
2800
|
}).shape
|
|
2725
2801
|
);
|
|
2726
2802
|
var PrintCertificateActionConfig = ActionConfigBase.extend(
|
|
@@ -2735,7 +2811,17 @@ var RequestCorrectionConfig = ActionConfigBase.extend(
|
|
|
2735
2811
|
correctionForm: ActionFormConfig
|
|
2736
2812
|
}).shape
|
|
2737
2813
|
);
|
|
2738
|
-
var
|
|
2814
|
+
var ApproveCorrectionConfig = ActionConfigBase.extend(
|
|
2815
|
+
z24.object({
|
|
2816
|
+
type: z24.literal(ActionType.APPROVE_CORRECTION)
|
|
2817
|
+
}).shape
|
|
2818
|
+
);
|
|
2819
|
+
var RejectCorrectionConfig = ActionConfigBase.extend(
|
|
2820
|
+
z24.object({
|
|
2821
|
+
type: z24.literal(ActionType.REJECT_CORRECTION)
|
|
2822
|
+
}).shape
|
|
2823
|
+
);
|
|
2824
|
+
var CustomActionConfig = ActionConfigBase.extend(
|
|
2739
2825
|
z24.object({
|
|
2740
2826
|
type: z24.literal(ActionType.CUSTOM),
|
|
2741
2827
|
customActionType: z24.string().describe("Type identifier of the custom action."),
|
|
@@ -2746,7 +2832,7 @@ var CustomActionConfig = ActionConfigBase.merge(
|
|
|
2746
2832
|
auditHistoryLabel: TranslationConfig.describe(
|
|
2747
2833
|
'The label to show in audit history for this action. For example "Approved".'
|
|
2748
2834
|
)
|
|
2749
|
-
})
|
|
2835
|
+
}).shape
|
|
2750
2836
|
);
|
|
2751
2837
|
var ActionConfig = z24.discriminatedUnion("type", [
|
|
2752
2838
|
/*
|
|
@@ -2757,9 +2843,37 @@ var ActionConfig = z24.discriminatedUnion("type", [
|
|
|
2757
2843
|
id: "ReadActionConfig",
|
|
2758
2844
|
description: "Configuration for the read action \u2014 defines the record-tab content displayed on the event overview page."
|
|
2759
2845
|
}),
|
|
2846
|
+
AssignConfig.meta({
|
|
2847
|
+
id: "AssignActionConfig",
|
|
2848
|
+
description: "Configuration for assigning a record to the current user."
|
|
2849
|
+
}),
|
|
2850
|
+
UnassignConfig.meta({
|
|
2851
|
+
id: "UnassignActionConfig",
|
|
2852
|
+
description: "Configuration for unassigning a record from its current assignee."
|
|
2853
|
+
}),
|
|
2854
|
+
DeleteConfig.meta({
|
|
2855
|
+
id: "DeleteActionConfig",
|
|
2856
|
+
description: "Configuration for deleting a draft record."
|
|
2857
|
+
}),
|
|
2858
|
+
NotifyConfig.meta({
|
|
2859
|
+
id: "NotifyActionConfig",
|
|
2860
|
+
description: "Configuration for the notify action. When present, NOTIFY uses this config independently from DECLARE. When absent, NOTIFY falls back to the DeclareActionConfig."
|
|
2861
|
+
}),
|
|
2760
2862
|
DeclareConfig.meta({
|
|
2761
2863
|
id: "DeclareActionConfig",
|
|
2762
|
-
description: "Configuration for the declare action. Includes review-page fields.
|
|
2864
|
+
description: "Configuration for the declare action. Includes review-page fields. NOTIFY falls back to this config when no dedicated NotifyActionConfig is provided."
|
|
2865
|
+
}),
|
|
2866
|
+
DuplicateDetectedConfig.meta({
|
|
2867
|
+
id: "DuplicateDetectedActionConfig",
|
|
2868
|
+
description: "Configuration for the system-generated duplicate-detection action. Never shown as a button, so it only supports flags \u2014 not label, icon, or conditionals."
|
|
2869
|
+
}),
|
|
2870
|
+
MarkAsDuplicateConfig.meta({
|
|
2871
|
+
id: "MarkAsDuplicateActionConfig",
|
|
2872
|
+
description: "Configuration for marking a record as a duplicate."
|
|
2873
|
+
}),
|
|
2874
|
+
MarkAsNotDuplicateConfig.meta({
|
|
2875
|
+
id: "MarkAsNotDuplicateActionConfig",
|
|
2876
|
+
description: "Configuration for marking a record as not a duplicate, after it was previously flagged as one."
|
|
2763
2877
|
}),
|
|
2764
2878
|
RejectConfig.meta({
|
|
2765
2879
|
id: "RejectActionConfig",
|
|
@@ -2777,6 +2891,14 @@ var ActionConfig = z24.discriminatedUnion("type", [
|
|
|
2777
2891
|
id: "RequestCorrectionActionConfig",
|
|
2778
2892
|
description: "Configuration for requesting a correction on a registered record."
|
|
2779
2893
|
}),
|
|
2894
|
+
ApproveCorrectionConfig.meta({
|
|
2895
|
+
id: "ApproveCorrectionActionConfig",
|
|
2896
|
+
description: "Configuration for approving a requested correction."
|
|
2897
|
+
}),
|
|
2898
|
+
RejectCorrectionConfig.meta({
|
|
2899
|
+
id: "RejectCorrectionActionConfig",
|
|
2900
|
+
description: "Configuration for rejecting a requested correction."
|
|
2901
|
+
}),
|
|
2780
2902
|
EditActionConfig.meta({
|
|
2781
2903
|
id: "EditActionConfig",
|
|
2782
2904
|
description: "Configuration for editing a record before registration."
|
|
@@ -3190,13 +3312,9 @@ var getActionAnnotationFields = (actionConfig) => {
|
|
|
3190
3312
|
if (actionConfig.type === ActionType.PRINT_CERTIFICATE) {
|
|
3191
3313
|
return actionConfig.printForm.pages.flatMap(({ fields }) => fields);
|
|
3192
3314
|
}
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
if ("review" in actionConfig) {
|
|
3197
|
-
return actionConfig.review.fields;
|
|
3198
|
-
}
|
|
3199
|
-
return [];
|
|
3315
|
+
const reviewFields = "review" in actionConfig && actionConfig.review != null ? actionConfig.review.fields : [];
|
|
3316
|
+
const formFields = "form" in actionConfig && actionConfig.form != null ? actionConfig.form : [];
|
|
3317
|
+
return [...reviewFields, ...formFields];
|
|
3200
3318
|
};
|
|
3201
3319
|
function getAllAnnotationFields(config) {
|
|
3202
3320
|
return (0, import_lodash.flattenDeep)(config.actions.map(getActionAnnotationFields));
|
|
@@ -3904,7 +4022,7 @@ function validateActionFlags(event2, ctx) {
|
|
|
3904
4022
|
const isInherentFlag = (value) => Object.values(InherentFlags).includes(value);
|
|
3905
4023
|
const configuredFlagIds = event2.flags.map((flag) => flag.id);
|
|
3906
4024
|
const actionFlagIds = event2.actions.flatMap(
|
|
3907
|
-
(action) => action.flags.map((flag) => flag.id)
|
|
4025
|
+
(action) => (action.flags ?? []).map((flag) => flag.id)
|
|
3908
4026
|
);
|
|
3909
4027
|
for (const actionFlagId of actionFlagIds) {
|
|
3910
4028
|
const isConfigured = configuredFlagIds.includes(actionFlagId);
|
|
@@ -4697,12 +4815,53 @@ var updateActions = ActionTypes.extract([
|
|
|
4697
4815
|
ActionType.ARCHIVE,
|
|
4698
4816
|
ActionType.PRINT_CERTIFICATE,
|
|
4699
4817
|
ActionType.REQUEST_CORRECTION,
|
|
4818
|
+
ActionType.APPROVE_CORRECTION,
|
|
4819
|
+
ActionType.REJECT_CORRECTION,
|
|
4700
4820
|
ActionType.CUSTOM
|
|
4701
4821
|
]);
|
|
4702
4822
|
|
|
4703
4823
|
// ../commons/src/events/state/flags.ts
|
|
4704
4824
|
var import_lodash3 = require("lodash");
|
|
4705
4825
|
var import_date_fns3 = require("date-fns");
|
|
4826
|
+
var INHERENT_FLAG_RULES = [
|
|
4827
|
+
{
|
|
4828
|
+
flag: InherentFlags.CORRECTION_REQUESTED,
|
|
4829
|
+
setOn: [ActionType.REQUEST_CORRECTION],
|
|
4830
|
+
resetOn: [ActionType.APPROVE_CORRECTION, ActionType.REJECT_CORRECTION]
|
|
4831
|
+
},
|
|
4832
|
+
{
|
|
4833
|
+
// INCOMPLETE mirrors the NOTIFIED status: set by NOTIFY, cleared by any
|
|
4834
|
+
// other status-changing action (see getStatusFromActions).
|
|
4835
|
+
flag: InherentFlags.INCOMPLETE,
|
|
4836
|
+
setOn: [ActionType.NOTIFY],
|
|
4837
|
+
resetOn: [
|
|
4838
|
+
ActionType.CREATE,
|
|
4839
|
+
ActionType.DECLARE,
|
|
4840
|
+
ActionType.REGISTER,
|
|
4841
|
+
ActionType.ARCHIVE
|
|
4842
|
+
]
|
|
4843
|
+
},
|
|
4844
|
+
{
|
|
4845
|
+
flag: InherentFlags.REJECTED,
|
|
4846
|
+
setOn: [ActionType.REJECT],
|
|
4847
|
+
resetOn: [
|
|
4848
|
+
ActionType.NOTIFY,
|
|
4849
|
+
ActionType.DECLARE,
|
|
4850
|
+
ActionType.EDIT,
|
|
4851
|
+
ActionType.REGISTER
|
|
4852
|
+
]
|
|
4853
|
+
},
|
|
4854
|
+
{
|
|
4855
|
+
flag: InherentFlags.POTENTIAL_DUPLICATE,
|
|
4856
|
+
setOn: [ActionType.DUPLICATE_DETECTED],
|
|
4857
|
+
resetOn: [ActionType.MARK_AS_DUPLICATE, ActionType.MARK_AS_NOT_DUPLICATE]
|
|
4858
|
+
},
|
|
4859
|
+
{
|
|
4860
|
+
flag: InherentFlags.EDIT_IN_PROGRESS,
|
|
4861
|
+
setOn: [ActionType.EDIT],
|
|
4862
|
+
resetOnAnyOtherAction: true
|
|
4863
|
+
}
|
|
4864
|
+
];
|
|
4706
4865
|
|
|
4707
4866
|
// ../commons/src/events/defineConfig.ts
|
|
4708
4867
|
var IGNORED_EVENT_TYPES = [
|
|
@@ -5448,6 +5607,11 @@ var TENNIS_CLUB_DECLARATION_REVIEW = {
|
|
|
5448
5607
|
id: "signature.upload.modal.title",
|
|
5449
5608
|
defaultMessage: "Draw signature",
|
|
5450
5609
|
description: "Title for the modal to draw signature"
|
|
5610
|
+
},
|
|
5611
|
+
// Zod applies the schema default at parse time, but this fixture bypasses
|
|
5612
|
+
// parsing — GeneratedInputField accesses configuration.maxFileSize directly.
|
|
5613
|
+
configuration: {
|
|
5614
|
+
maxFileSize: 5 * 1024 * 1024
|
|
5451
5615
|
}
|
|
5452
5616
|
}
|
|
5453
5617
|
]
|
|
@@ -6004,6 +6168,20 @@ var tennisClubMembershipEvent = defineConfig({
|
|
|
6004
6168
|
},
|
|
6005
6169
|
review: TENNIS_CLUB_DECLARATION_REVIEW
|
|
6006
6170
|
},
|
|
6171
|
+
{
|
|
6172
|
+
type: ActionType.NOTIFY,
|
|
6173
|
+
label: {
|
|
6174
|
+
defaultMessage: "Notify health worker",
|
|
6175
|
+
description: "This is shown as the action name anywhere the user can trigger the action from",
|
|
6176
|
+
id: "event.tennis-club-membership.action.notify.label"
|
|
6177
|
+
},
|
|
6178
|
+
flags: [
|
|
6179
|
+
{
|
|
6180
|
+
id: "health-worker-notified",
|
|
6181
|
+
operation: "add"
|
|
6182
|
+
}
|
|
6183
|
+
]
|
|
6184
|
+
},
|
|
6007
6185
|
{
|
|
6008
6186
|
type: ActionType.REJECT,
|
|
6009
6187
|
label: {
|
|
@@ -6246,6 +6424,17 @@ var tennisClubMembershipEvent = defineConfig({
|
|
|
6246
6424
|
}
|
|
6247
6425
|
}
|
|
6248
6426
|
],
|
|
6427
|
+
flags: [
|
|
6428
|
+
{
|
|
6429
|
+
id: "health-worker-notified",
|
|
6430
|
+
requiresAction: false,
|
|
6431
|
+
label: {
|
|
6432
|
+
id: "event.tennis-club-membership.flag.health-worker-notified.label",
|
|
6433
|
+
defaultMessage: "Health worker notified",
|
|
6434
|
+
description: "Label for the health-worker-notified flag"
|
|
6435
|
+
}
|
|
6436
|
+
}
|
|
6437
|
+
],
|
|
6249
6438
|
advancedSearch: [
|
|
6250
6439
|
{
|
|
6251
6440
|
title: {
|
package/dist/scopes/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export type UserFilter = z.infer<typeof UserFilter>;
|
|
|
14
14
|
* The different types of scopes that can be used to control access to records. Each type has different options that can be used to further filter the records that the scope applies to.
|
|
15
15
|
* When adding new scope types, they should be added to the appropriate section based on the options they require.
|
|
16
16
|
*
|
|
17
|
-
* @see scopeOptionsPlaceEvent @see
|
|
17
|
+
* @see scopeOptionsPlaceEvent @see scopeOptionsDeclaredOrNotified @see scopeOptionsFull
|
|
18
18
|
*/
|
|
19
19
|
export declare const RecordScopeTypeV2: z.ZodEnum<{
|
|
20
20
|
"record.search": "record.search";
|
|
@@ -48,6 +48,14 @@ declare const AllScopeOptions: z.ZodObject<{
|
|
|
48
48
|
location: "location";
|
|
49
49
|
all: "all";
|
|
50
50
|
}>>;
|
|
51
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
52
|
+
administrativeArea: "administrativeArea";
|
|
53
|
+
location: "location";
|
|
54
|
+
all: "all";
|
|
55
|
+
}>>;
|
|
56
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
57
|
+
user: "user";
|
|
58
|
+
}>>;
|
|
51
59
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
52
60
|
administrativeArea: "administrativeArea";
|
|
53
61
|
location: "location";
|
|
@@ -70,6 +78,8 @@ export declare const ScopeOptionKey: z.ZodEnum<{
|
|
|
70
78
|
role: "role";
|
|
71
79
|
event: "event";
|
|
72
80
|
placeOfEvent: "placeOfEvent";
|
|
81
|
+
notifiedIn: "notifiedIn";
|
|
82
|
+
notifiedBy: "notifiedBy";
|
|
73
83
|
declaredIn: "declaredIn";
|
|
74
84
|
declaredBy: "declaredBy";
|
|
75
85
|
registeredIn: "registeredIn";
|
|
@@ -126,6 +136,14 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
126
136
|
location: "location";
|
|
127
137
|
all: "all";
|
|
128
138
|
}>>;
|
|
139
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
140
|
+
administrativeArea: "administrativeArea";
|
|
141
|
+
location: "location";
|
|
142
|
+
all: "all";
|
|
143
|
+
}>>;
|
|
144
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
145
|
+
user: "user";
|
|
146
|
+
}>>;
|
|
129
147
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
130
148
|
administrativeArea: "administrativeArea";
|
|
131
149
|
location: "location";
|
|
@@ -150,6 +168,14 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
150
168
|
location: "location";
|
|
151
169
|
all: "all";
|
|
152
170
|
}>>;
|
|
171
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
172
|
+
administrativeArea: "administrativeArea";
|
|
173
|
+
location: "location";
|
|
174
|
+
all: "all";
|
|
175
|
+
}>>;
|
|
176
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
177
|
+
user: "user";
|
|
178
|
+
}>>;
|
|
153
179
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
154
180
|
administrativeArea: "administrativeArea";
|
|
155
181
|
location: "location";
|
|
@@ -176,6 +202,14 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
176
202
|
location: "location";
|
|
177
203
|
all: "all";
|
|
178
204
|
}>>;
|
|
205
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
206
|
+
administrativeArea: "administrativeArea";
|
|
207
|
+
location: "location";
|
|
208
|
+
all: "all";
|
|
209
|
+
}>>;
|
|
210
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
211
|
+
user: "user";
|
|
212
|
+
}>>;
|
|
179
213
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
180
214
|
administrativeArea: "administrativeArea";
|
|
181
215
|
location: "location";
|
|
@@ -203,6 +237,14 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
203
237
|
location: "location";
|
|
204
238
|
all: "all";
|
|
205
239
|
}>>;
|
|
240
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
241
|
+
administrativeArea: "administrativeArea";
|
|
242
|
+
location: "location";
|
|
243
|
+
all: "all";
|
|
244
|
+
}>>;
|
|
245
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
246
|
+
user: "user";
|
|
247
|
+
}>>;
|
|
206
248
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
207
249
|
administrativeArea: "administrativeArea";
|
|
208
250
|
location: "location";
|
|
@@ -305,6 +347,8 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
305
347
|
options: z.ZodOptional<z.ZodObject<{
|
|
306
348
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
307
349
|
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
350
|
+
notifiedIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
351
|
+
notifiedBy: z.ZodOptional<z.ZodString>;
|
|
308
352
|
declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
309
353
|
declaredBy: z.ZodOptional<z.ZodString>;
|
|
310
354
|
}, z.core.$strip>>;
|
|
@@ -319,6 +363,8 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
319
363
|
options: z.ZodOptional<z.ZodObject<{
|
|
320
364
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
321
365
|
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
366
|
+
notifiedIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
367
|
+
notifiedBy: z.ZodOptional<z.ZodString>;
|
|
322
368
|
declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
323
369
|
declaredBy: z.ZodOptional<z.ZodString>;
|
|
324
370
|
registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
@@ -329,6 +375,8 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
329
375
|
options: z.ZodOptional<z.ZodObject<{
|
|
330
376
|
event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
331
377
|
placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
378
|
+
notifiedIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
379
|
+
notifiedBy: z.ZodOptional<z.ZodString>;
|
|
332
380
|
declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
333
381
|
declaredBy: z.ZodOptional<z.ZodString>;
|
|
334
382
|
registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
@@ -385,6 +433,14 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
385
433
|
location: "location";
|
|
386
434
|
all: "all";
|
|
387
435
|
}>>;
|
|
436
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
437
|
+
administrativeArea: "administrativeArea";
|
|
438
|
+
location: "location";
|
|
439
|
+
all: "all";
|
|
440
|
+
}>>;
|
|
441
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
442
|
+
user: "user";
|
|
443
|
+
}>>;
|
|
388
444
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
389
445
|
administrativeArea: "administrativeArea";
|
|
390
446
|
location: "location";
|
|
@@ -409,6 +465,14 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
409
465
|
location: "location";
|
|
410
466
|
all: "all";
|
|
411
467
|
}>>;
|
|
468
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
469
|
+
administrativeArea: "administrativeArea";
|
|
470
|
+
location: "location";
|
|
471
|
+
all: "all";
|
|
472
|
+
}>>;
|
|
473
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
474
|
+
user: "user";
|
|
475
|
+
}>>;
|
|
412
476
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
413
477
|
administrativeArea: "administrativeArea";
|
|
414
478
|
location: "location";
|
|
@@ -435,6 +499,14 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
435
499
|
location: "location";
|
|
436
500
|
all: "all";
|
|
437
501
|
}>>;
|
|
502
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
503
|
+
administrativeArea: "administrativeArea";
|
|
504
|
+
location: "location";
|
|
505
|
+
all: "all";
|
|
506
|
+
}>>;
|
|
507
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
508
|
+
user: "user";
|
|
509
|
+
}>>;
|
|
438
510
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
439
511
|
administrativeArea: "administrativeArea";
|
|
440
512
|
location: "location";
|
|
@@ -462,6 +534,14 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
462
534
|
location: "location";
|
|
463
535
|
all: "all";
|
|
464
536
|
}>>;
|
|
537
|
+
notifiedIn: z.ZodOptional<z.ZodEnum<{
|
|
538
|
+
administrativeArea: "administrativeArea";
|
|
539
|
+
location: "location";
|
|
540
|
+
all: "all";
|
|
541
|
+
}>>;
|
|
542
|
+
notifiedBy: z.ZodOptional<z.ZodEnum<{
|
|
543
|
+
user: "user";
|
|
544
|
+
}>>;
|
|
465
545
|
declaredIn: z.ZodOptional<z.ZodEnum<{
|
|
466
546
|
administrativeArea: "administrativeArea";
|
|
467
547
|
location: "location";
|
|
@@ -596,6 +676,8 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
596
676
|
options?: {
|
|
597
677
|
event?: string[] | undefined;
|
|
598
678
|
placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
|
|
679
|
+
notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
680
|
+
notifiedBy?: "user" | undefined;
|
|
599
681
|
declaredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
600
682
|
declaredBy?: "user" | undefined;
|
|
601
683
|
} | undefined;
|
|
@@ -604,6 +686,8 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
604
686
|
options?: {
|
|
605
687
|
event?: string[] | undefined;
|
|
606
688
|
placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
|
|
689
|
+
notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
690
|
+
notifiedBy?: "user" | undefined;
|
|
607
691
|
declaredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
608
692
|
declaredBy?: "user" | undefined;
|
|
609
693
|
registeredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
@@ -614,6 +698,8 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
614
698
|
options?: {
|
|
615
699
|
event?: string[] | undefined;
|
|
616
700
|
placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
|
|
701
|
+
notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
702
|
+
notifiedBy?: "user" | undefined;
|
|
617
703
|
declaredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
618
704
|
declaredBy?: "user" | undefined;
|
|
619
705
|
registeredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
@@ -625,6 +711,8 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
625
711
|
options?: {
|
|
626
712
|
event?: string[] | undefined;
|
|
627
713
|
placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
|
|
714
|
+
notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
715
|
+
notifiedBy?: "user" | undefined;
|
|
628
716
|
declaredIn?: "administrativeArea" | "location" | "all" | undefined;
|
|
629
717
|
declaredBy?: "user" | undefined;
|
|
630
718
|
registeredIn?: "administrativeArea" | "location" | "all" | undefined;
|
package/dist/scopes/index.js
CHANGED
|
@@ -149,11 +149,13 @@ var scopeOptionsPlaceEvent = z3.object({
|
|
|
149
149
|
event: scopeByEvent,
|
|
150
150
|
placeOfEvent: JurisdictionFilter.optional()
|
|
151
151
|
}).describe("Options applicable to all record scopes.");
|
|
152
|
-
var
|
|
152
|
+
var scopeOptionsDeclaredOrNotified = scopeOptionsPlaceEvent.extend({
|
|
153
|
+
notifiedIn: JurisdictionFilter.optional(),
|
|
154
|
+
notifiedBy: UserFilter.optional(),
|
|
153
155
|
declaredIn: JurisdictionFilter.optional(),
|
|
154
156
|
declaredBy: UserFilter.optional()
|
|
155
157
|
}).describe("Options applicable to actions that may take place after DECLARE");
|
|
156
|
-
var AllRecordScopeOptions =
|
|
158
|
+
var AllRecordScopeOptions = scopeOptionsDeclaredOrNotified.extend({
|
|
157
159
|
registeredIn: JurisdictionFilter.optional(),
|
|
158
160
|
registeredBy: UserFilter.optional()
|
|
159
161
|
}).describe(
|
|
@@ -191,6 +193,8 @@ var ResolvedScopeOptionsPlaceEvent = z3.object({
|
|
|
191
193
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
192
194
|
);
|
|
193
195
|
var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
|
|
196
|
+
notifiedIn: UUID.nullish(),
|
|
197
|
+
notifiedBy: z3.string().optional(),
|
|
194
198
|
declaredIn: UUID.nullish(),
|
|
195
199
|
declaredBy: z3.string().optional()
|
|
196
200
|
}).describe(
|
|
@@ -236,7 +240,7 @@ var RecordScopeV2 = z3.discriminatedUnion("type", [
|
|
|
236
240
|
}),
|
|
237
241
|
z3.object({
|
|
238
242
|
type: ScopesWithDeclaredOptions,
|
|
239
|
-
options:
|
|
243
|
+
options: scopeOptionsDeclaredOrNotified.optional()
|
|
240
244
|
}),
|
|
241
245
|
z3.object({
|
|
242
246
|
type: ScopesWithFullOptions,
|
|
@@ -372,8 +376,9 @@ var decodeScope = (encodedScope) => {
|
|
|
372
376
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
373
377
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
374
378
|
accessLevel: JurisdictionFilter.enum.all,
|
|
375
|
-
|
|
376
|
-
declaredIn: JurisdictionFilter.enum.all
|
|
379
|
+
notifiedIn: JurisdictionFilter.enum.all,
|
|
380
|
+
declaredIn: JurisdictionFilter.enum.all,
|
|
381
|
+
registeredIn: JurisdictionFilter.enum.all
|
|
377
382
|
};
|
|
378
383
|
function getScopeOptionValue(scope, option) {
|
|
379
384
|
const options = "options" in scope ? scope.options : void 0;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
##################################################################################
|
|
2
|
+
# Use this file to customize helm chart behavior
|
|
3
|
+
# Please make sure your custom changes doesn't conflict with values.yaml
|
|
4
|
+
##################################################################################
|