@opencrvs/toolkit 2.1.0-rc.edf2492 → 2.1.0-rc.f29a266
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 +1 -0
- package/create-countryconfig/index.js +114 -66
- package/create-countryconfig/node_modules/.bin/degit +21 -0
- package/create-countryconfig/package.json +4 -1
- package/dist/application-config/index.js +256 -198
- package/dist/cli.js +195 -73
- package/dist/commons/api/router.d.ts +3924 -3326
- package/dist/commons/application-config/index.d.ts +6 -6
- package/dist/commons/conditionals/conditionals.d.ts +259 -2102
- package/dist/commons/conditionals/validate.d.ts +16 -5
- package/dist/commons/events/ActionConfig.d.ts +105 -105
- package/dist/commons/events/ActionDocument.d.ts +121 -127
- package/dist/commons/events/ActionInput.d.ts +4 -10
- package/dist/commons/events/ActionStatus.d.ts +14 -0
- package/dist/commons/events/ActionType.d.ts +62 -62
- package/dist/commons/events/AdvancedSearchConfig.d.ts +525 -507
- package/dist/commons/events/AuditLog.d.ts +189 -42
- 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 -37
- package/dist/commons/events/DynamicFieldValue.d.ts +9 -9
- package/dist/commons/events/EventConfig.d.ts +8 -5
- package/dist/commons/events/EventDocument.d.ts +50 -50
- package/dist/commons/events/EventIndex.d.ts +49 -72
- package/dist/commons/events/EventMetadata.d.ts +40 -40
- package/dist/commons/events/FieldConfig.d.ts +419 -389
- package/dist/commons/events/FieldType.d.ts +51 -51
- package/dist/commons/events/FieldTypeMapping.d.ts +90 -90
- package/dist/commons/events/FieldValue.d.ts +14 -14
- package/dist/commons/events/Flag.d.ts +57 -15
- package/dist/commons/events/PlainDate.d.ts +8 -0
- package/dist/commons/events/SummaryConfig.d.ts +249 -0
- 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 +817 -814
- package/dist/commons/events/deduplication.d.ts +1 -1
- package/dist/commons/events/event.d.ts +14 -2
- package/dist/commons/events/field.d.ts +78 -895
- 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 +241 -12
- package/dist/commons/events/mocks.test.utils.d.ts +48 -4
- package/dist/commons/events/scopes.d.ts +4 -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 +47 -46
- package/dist/commons/events/utils.d.ts +114 -114
- package/dist/commons/notification/UserNotifications.d.ts +38 -10
- package/dist/conditionals/index.js +308 -55
- package/dist/environment/derived-variables.d.ts +119 -119
- package/dist/environment/derived-variables.d.ts.map +1 -1
- package/dist/environment/index.d.ts +1 -0
- package/dist/environment/index.d.ts.map +1 -1
- package/dist/environment/index.js +10 -0
- package/dist/environment/logger.d.ts +12 -3
- package/dist/environment/logger.d.ts.map +1 -1
- package/dist/environment/paths.d.ts +7 -0
- package/dist/environment/paths.d.ts.map +1 -0
- package/dist/environment/paths.js +72 -0
- package/dist/environment/questions.d.ts +75 -74
- package/dist/environment/questions.d.ts.map +1 -1
- package/dist/environment/questions.js +20 -14
- package/dist/environment/setup-environment.js +11 -16
- package/dist/environment/templates.d.ts.map +1 -1
- package/dist/environment/templates.js +2 -1
- package/dist/environment/update-workflows.d.ts.map +1 -1
- package/dist/environment/update-workflows.js +17 -5
- package/dist/environment/upgrade.d.ts +2 -0
- package/dist/environment/upgrade.d.ts.map +1 -0
- package/dist/environment/upgrade.js +82 -0
- package/dist/environment/users.js +11 -13
- package/dist/environment/utils.d.ts +1 -1
- package/dist/events/deduplication.d.ts +1 -1
- package/dist/events/index.js +3678 -3296
- package/dist/migrations/v2.0/checkout-upstream-files.d.ts +2 -2
- package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
- package/dist/migrations/v2.0/checkout-upstream-files.js +2 -2
- package/dist/migrations/v2.0/migrate-application-config-url.js +4 -3
- package/dist/notification/index.js +1438 -1080
- package/dist/scopes/index.d.ts +396 -169
- package/dist/scopes/index.js +309 -55
- package/dist/templates/charts-values/opencrvs-services/values.yaml +4 -3
- package/dist/templates/charts-values/opentelemetry/values.yaml +95 -0
- package/dist/templates/charts-values/traefik/values.yaml +23 -9
- package/dist/templates/inventory/inventory.template.yml +1 -3
- package/opencrvs-toolkit-2.1.0-rc.f29a266.tgz +0 -0
- package/package.json +7 -7
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/templates/inventory/production.example.yml +0 -77
- package/dist/templates/inventory/qa.example.yml +0 -48
- package/opencrvs-toolkit-2.1.0-rc.edf2492.tgz +0 -0
|
@@ -500,7 +500,7 @@ var import_v4 = require("zod/v4");
|
|
|
500
500
|
var z15 = __toESM(require("zod/v4"));
|
|
501
501
|
|
|
502
502
|
// ../commons/src/events/ActionDocument.ts
|
|
503
|
-
var
|
|
503
|
+
var z14 = __toESM(require("zod/v4"));
|
|
504
504
|
|
|
505
505
|
// ../commons/src/events/ActionType.ts
|
|
506
506
|
var z10 = __toESM(require("zod/v4"));
|
|
@@ -612,16 +612,88 @@ var META_ACTIONS = [
|
|
|
612
612
|
|
|
613
613
|
// ../commons/src/authentication.ts
|
|
614
614
|
var import_jwt_decode = __toESM(require("jwt-decode"));
|
|
615
|
-
var
|
|
615
|
+
var z13 = __toESM(require("zod/v4"));
|
|
616
616
|
|
|
617
617
|
// ../commons/src/scopes.ts
|
|
618
|
-
var
|
|
618
|
+
var z12 = __toESM(require("zod/v4"));
|
|
619
619
|
var qs = __toESM(require("qs"));
|
|
620
|
-
|
|
620
|
+
|
|
621
|
+
// ../commons/src/events/ActionStatus.ts
|
|
622
|
+
var ActionStatus = {
|
|
623
|
+
Requested: "Requested",
|
|
624
|
+
Accepted: "Accepted",
|
|
625
|
+
Rejected: "Rejected"
|
|
626
|
+
};
|
|
627
|
+
|
|
628
|
+
// ../commons/src/events/Flag.ts
|
|
629
|
+
var z11 = __toESM(require("zod/v4"));
|
|
630
|
+
var InherentFlags = {
|
|
631
|
+
INCOMPLETE: "incomplete",
|
|
632
|
+
REJECTED: "rejected",
|
|
633
|
+
CORRECTION_REQUESTED: "correction-requested",
|
|
634
|
+
POTENTIAL_DUPLICATE: "potential-duplicate",
|
|
635
|
+
/**
|
|
636
|
+
* This flag is set by the Edit-action and removed after the declaration or registration.
|
|
637
|
+
* A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
|
|
638
|
+
*
|
|
639
|
+
* We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
|
|
640
|
+
*/
|
|
641
|
+
EDIT_IN_PROGRESS: "edit-in-progress"
|
|
642
|
+
};
|
|
643
|
+
var actionFlagPattern;
|
|
644
|
+
function getActionFlagPattern() {
|
|
645
|
+
actionFlagPattern ??= new RegExp(
|
|
646
|
+
`^(${Object.values(ActionType).join("|").toLowerCase()}):(${Object.values(
|
|
647
|
+
ActionStatus
|
|
648
|
+
).join("|").toLowerCase()})$`
|
|
649
|
+
);
|
|
650
|
+
return actionFlagPattern;
|
|
651
|
+
}
|
|
652
|
+
var ActionFlag = z11.string().refine((value) => getActionFlagPattern().test(value), {
|
|
653
|
+
message: "Flag must be in the format ActionType:ActionStatus (lowerCase)"
|
|
654
|
+
});
|
|
655
|
+
var CustomFlag = z11.string().refine((val) => !Object.values(InherentFlags).includes(val), {
|
|
656
|
+
message: `Custom flag cannot be one of the inherent flags: ${Object.values(
|
|
657
|
+
InherentFlags
|
|
658
|
+
).join(", ")}`
|
|
659
|
+
}).refine((val) => !ActionFlag.safeParse(val).success, {
|
|
660
|
+
message: "Custom flag cannot match the ActionFlag pattern (ActionType:ActionStatus)."
|
|
661
|
+
}).describe("Custom flag identifier defined by the country config.");
|
|
662
|
+
var Flag = ActionFlag.or(z11.enum(InherentFlags)).or(CustomFlag);
|
|
663
|
+
var ContainsFlags = z11.object({
|
|
664
|
+
anyOf: z11.array(Flag).optional(),
|
|
665
|
+
noneOf: z11.array(Flag).optional(),
|
|
666
|
+
allOf: z11.array(Flag).optional()
|
|
667
|
+
}).meta({
|
|
668
|
+
id: "ContainsFlags"
|
|
669
|
+
});
|
|
670
|
+
var FlagConfig = z11.object({
|
|
671
|
+
id: CustomFlag,
|
|
672
|
+
requiresAction: z11.boolean().describe(
|
|
673
|
+
"Indicates if this flag expects an action to be performed to be cleared."
|
|
674
|
+
),
|
|
675
|
+
label: TranslationConfig.describe("Human readable label of the flag.")
|
|
676
|
+
}).meta({
|
|
677
|
+
id: "FlagConfig",
|
|
678
|
+
description: "Configuration for a custom flag that can be added to or removed from records by event actions."
|
|
679
|
+
});
|
|
680
|
+
var ActionFlagConfig = z11.object({
|
|
681
|
+
id: Flag,
|
|
682
|
+
operation: z11.enum(["add", "remove"]).describe("Operation to perform on the flag."),
|
|
683
|
+
conditional: Conditional.optional().describe(
|
|
684
|
+
"When conditional is met, the operation is performed on the flag. If not provided, the operation is performed unconditionally."
|
|
685
|
+
)
|
|
686
|
+
}).meta({
|
|
687
|
+
id: "ActionFlagConfig",
|
|
688
|
+
description: "Add or remove operation applied to a flag when the parent action is accepted. Optionally gated by a conditional."
|
|
689
|
+
});
|
|
690
|
+
|
|
691
|
+
// ../commons/src/scopes.ts
|
|
692
|
+
var JurisdictionFilter = z12.enum(["administrativeArea", "location", "all"]).describe(
|
|
621
693
|
"Filters based on user jurisdiction relative to their office location in hierarchy."
|
|
622
694
|
);
|
|
623
|
-
var UserFilter =
|
|
624
|
-
var RecordScopeTypeV2 =
|
|
695
|
+
var UserFilter = z12.enum(["user"]).describe("Filters based on the user. Limits to self.");
|
|
696
|
+
var RecordScopeTypeV2 = z12.enum([
|
|
625
697
|
"record.search",
|
|
626
698
|
"record.create",
|
|
627
699
|
"record.read",
|
|
@@ -639,14 +711,20 @@ var RecordScopeTypeV2 = z11.enum([
|
|
|
639
711
|
"record.unassign-others",
|
|
640
712
|
"record.custom-action"
|
|
641
713
|
]);
|
|
642
|
-
var PlainScopeType =
|
|
714
|
+
var PlainScopeType = z12.enum([
|
|
643
715
|
// Misc. system scopes
|
|
644
716
|
"bypassratelimit",
|
|
645
717
|
"record.reindex",
|
|
646
718
|
"user.data-seeding",
|
|
647
719
|
"integration.create",
|
|
720
|
+
// Reading an integration's audit log. Deliberately separate from
|
|
721
|
+
// 'integration.create' so read-only oversight can be granted on its own, and
|
|
722
|
+
// deliberately option-less: system clients have no office and no
|
|
723
|
+
// administrative area, so jurisdiction options would have nothing to bind to.
|
|
724
|
+
"integration.audit.read",
|
|
648
725
|
"record.import",
|
|
649
726
|
"config.update-all",
|
|
727
|
+
"location.edit",
|
|
650
728
|
"attachment.upload",
|
|
651
729
|
"profile.electronic-signature",
|
|
652
730
|
"user.read-only-my-audit",
|
|
@@ -658,15 +736,15 @@ var PlainScopeType = z11.enum([
|
|
|
658
736
|
"record.confirm-registration",
|
|
659
737
|
"record.reject-registration"
|
|
660
738
|
]);
|
|
661
|
-
var scopeByEvent =
|
|
739
|
+
var scopeByEvent = z12.preprocess(
|
|
662
740
|
(val) => val === void 0 ? void 0 : [val].flat(),
|
|
663
|
-
|
|
741
|
+
z12.array(z12.string()).optional()
|
|
664
742
|
).describe("Event type, e.g. birth, death");
|
|
665
|
-
var userRole =
|
|
743
|
+
var userRole = z12.preprocess(
|
|
666
744
|
(val) => val === void 0 ? void 0 : [val].flat(),
|
|
667
|
-
|
|
745
|
+
z12.array(z12.string()).optional()
|
|
668
746
|
).describe("User role, e.g. admin, field agent");
|
|
669
|
-
var scopeOptionsPlaceEvent =
|
|
747
|
+
var scopeOptionsPlaceEvent = z12.object({
|
|
670
748
|
event: scopeByEvent,
|
|
671
749
|
placeOfEvent: JurisdictionFilter.optional()
|
|
672
750
|
}).describe("Options applicable to all record scopes.");
|
|
@@ -678,36 +756,37 @@ var scopeOptionsDeclaredOrNotified = scopeOptionsPlaceEvent.extend({
|
|
|
678
756
|
}).describe("Options applicable to actions that may take place after DECLARE");
|
|
679
757
|
var AllRecordScopeOptions = scopeOptionsDeclaredOrNotified.extend({
|
|
680
758
|
registeredIn: JurisdictionFilter.optional(),
|
|
681
|
-
registeredBy: UserFilter.optional()
|
|
759
|
+
registeredBy: UserFilter.optional(),
|
|
760
|
+
flags: ContainsFlags.optional()
|
|
682
761
|
}).describe(
|
|
683
762
|
"Options applicable to actions that may take place after REGISTER, with full filtering capabilities."
|
|
684
763
|
);
|
|
685
764
|
var CustomActionScopeOptions = AllRecordScopeOptions.extend({
|
|
686
|
-
customActionTypes:
|
|
765
|
+
customActionTypes: z12.preprocess(
|
|
687
766
|
(val) => val === void 0 ? void 0 : [val].flat(),
|
|
688
|
-
|
|
767
|
+
z12.array(z12.string()).optional()
|
|
689
768
|
).describe("Allowed custom action types")
|
|
690
769
|
});
|
|
691
|
-
var AccessLevelOptions =
|
|
770
|
+
var AccessLevelOptions = z12.object({
|
|
692
771
|
accessLevel: JurisdictionFilter.optional()
|
|
693
772
|
});
|
|
694
773
|
var AllUserScopeOptions = AccessLevelOptions.extend({
|
|
695
774
|
role: userRole.optional()
|
|
696
775
|
});
|
|
697
|
-
var WorkqueueOrDashboardOptions =
|
|
698
|
-
ids:
|
|
776
|
+
var WorkqueueOrDashboardOptions = z12.object({
|
|
777
|
+
ids: z12.preprocess(
|
|
699
778
|
(val) => val === void 0 ? void 0 : [val].flat(),
|
|
700
|
-
|
|
779
|
+
z12.array(z12.string())
|
|
701
780
|
).describe("Must contain a list of workqueue or dashboard ids.")
|
|
702
781
|
});
|
|
703
|
-
var AllScopeOptions =
|
|
782
|
+
var AllScopeOptions = z12.object({
|
|
704
783
|
...AllRecordScopeOptions.shape,
|
|
705
784
|
...AccessLevelOptions.shape,
|
|
706
785
|
...AllUserScopeOptions.shape,
|
|
707
786
|
...WorkqueueOrDashboardOptions.shape
|
|
708
787
|
});
|
|
709
788
|
var ScopeOptionKey = AllScopeOptions.keyof();
|
|
710
|
-
var ResolvedScopeOptionsPlaceEvent =
|
|
789
|
+
var ResolvedScopeOptionsPlaceEvent = z12.object({
|
|
711
790
|
event: scopeByEvent,
|
|
712
791
|
placeOfEvent: UUID.nullish()
|
|
713
792
|
}).describe(
|
|
@@ -715,15 +794,16 @@ var ResolvedScopeOptionsPlaceEvent = z11.object({
|
|
|
715
794
|
);
|
|
716
795
|
var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
|
|
717
796
|
notifiedIn: UUID.nullish(),
|
|
718
|
-
notifiedBy:
|
|
797
|
+
notifiedBy: z12.string().optional(),
|
|
719
798
|
declaredIn: UUID.nullish(),
|
|
720
|
-
declaredBy:
|
|
799
|
+
declaredBy: z12.string().optional()
|
|
721
800
|
}).describe(
|
|
722
801
|
"Resolved options applicable to actions that may take place after DECLARE, with location ID and user ID instead of filters."
|
|
723
802
|
);
|
|
724
803
|
var ResolvedScopeOptionsFull = ResolvedScopeOptionsDeclared.extend({
|
|
725
804
|
registeredIn: UUID.nullish(),
|
|
726
|
-
registeredBy:
|
|
805
|
+
registeredBy: z12.string().optional(),
|
|
806
|
+
flags: ContainsFlags.optional()
|
|
727
807
|
}).describe(
|
|
728
808
|
"Resolved options applicable to actions that may take place after REGISTER, with full filtering capabilities and location/user IDs instead of filters."
|
|
729
809
|
);
|
|
@@ -748,38 +828,38 @@ var ScopesWithFullOptions = RecordScopeTypeV2.extract([
|
|
|
748
828
|
"record.unassign-others"
|
|
749
829
|
]);
|
|
750
830
|
var ScopeOptionsPrintCertifiedCopies = AllRecordScopeOptions.extend({
|
|
751
|
-
templates:
|
|
831
|
+
templates: z12.preprocess(
|
|
752
832
|
(val) => val === void 0 ? void 0 : [val].flat(),
|
|
753
|
-
|
|
833
|
+
z12.array(z12.string()).optional()
|
|
754
834
|
).describe(
|
|
755
835
|
"Template IDs for certified copies. Controls which certificate templates are returned to the client via the config service. Certificate printing is a client-side operation \u2014 this option is not validated when the printCertificate action is submitted."
|
|
756
836
|
)
|
|
757
837
|
});
|
|
758
|
-
var RecordScopeV2 =
|
|
759
|
-
|
|
838
|
+
var RecordScopeV2 = z12.discriminatedUnion("type", [
|
|
839
|
+
z12.object({
|
|
760
840
|
type: ScopesWithPlaceEventOptions,
|
|
761
841
|
options: scopeOptionsPlaceEvent.optional()
|
|
762
842
|
}),
|
|
763
|
-
|
|
843
|
+
z12.object({
|
|
764
844
|
type: ScopesWithDeclaredOptions,
|
|
765
845
|
options: scopeOptionsDeclaredOrNotified.optional()
|
|
766
846
|
}),
|
|
767
|
-
|
|
847
|
+
z12.object({
|
|
768
848
|
type: ScopesWithFullOptions,
|
|
769
849
|
options: AllRecordScopeOptions.optional()
|
|
770
850
|
}),
|
|
771
|
-
|
|
772
|
-
type:
|
|
851
|
+
z12.object({
|
|
852
|
+
type: z12.literal("record.custom-action"),
|
|
773
853
|
options: CustomActionScopeOptions.optional()
|
|
774
854
|
}),
|
|
775
|
-
|
|
776
|
-
type:
|
|
855
|
+
z12.object({
|
|
856
|
+
type: z12.literal("record.print-certified-copies"),
|
|
777
857
|
options: ScopeOptionsPrintCertifiedCopies.optional()
|
|
778
858
|
})
|
|
779
859
|
]).describe(
|
|
780
860
|
"Scopes used to check user's permission to perform actions on a record."
|
|
781
861
|
);
|
|
782
|
-
var SystemScopeType =
|
|
862
|
+
var SystemScopeType = z12.enum([
|
|
783
863
|
"organisation.read-locations",
|
|
784
864
|
"user.read",
|
|
785
865
|
"user.create",
|
|
@@ -793,61 +873,61 @@ var UserScopeType = SystemScopeType.extract([
|
|
|
793
873
|
"user.search"
|
|
794
874
|
]);
|
|
795
875
|
var ScopesWithRoleOption = UserScopeType.extract(["user.edit", "user.create"]);
|
|
796
|
-
var UserScopeV2 =
|
|
797
|
-
|
|
876
|
+
var UserScopeV2 = z12.discriminatedUnion("type", [
|
|
877
|
+
z12.object({
|
|
798
878
|
type: ScopesWithRoleOption,
|
|
799
879
|
options: AllUserScopeOptions.optional()
|
|
800
880
|
}),
|
|
801
|
-
|
|
881
|
+
z12.object({
|
|
802
882
|
type: UserScopeType.extract(["user.read", "user.search"]),
|
|
803
883
|
options: AccessLevelOptions.optional()
|
|
804
884
|
})
|
|
805
885
|
]);
|
|
806
|
-
var ResolvedRecordScopeV2 =
|
|
807
|
-
|
|
886
|
+
var ResolvedRecordScopeV2 = z12.discriminatedUnion("type", [
|
|
887
|
+
z12.object({
|
|
808
888
|
type: ScopesWithPlaceEventOptions,
|
|
809
889
|
options: ResolvedScopeOptionsPlaceEvent.optional()
|
|
810
890
|
}),
|
|
811
|
-
|
|
891
|
+
z12.object({
|
|
812
892
|
type: ScopesWithDeclaredOptions,
|
|
813
893
|
options: ResolvedScopeOptionsDeclared.optional()
|
|
814
894
|
}),
|
|
815
|
-
|
|
895
|
+
z12.object({
|
|
816
896
|
type: ScopesWithFullOptions,
|
|
817
897
|
options: ResolvedScopeOptionsFull.optional()
|
|
818
898
|
}),
|
|
819
|
-
|
|
820
|
-
type:
|
|
899
|
+
z12.object({
|
|
900
|
+
type: z12.literal("record.print-certified-copies"),
|
|
821
901
|
options: ResolvedScopeOptionsFull.extend({
|
|
822
|
-
templates:
|
|
902
|
+
templates: z12.array(z12.string()).optional()
|
|
823
903
|
}).optional()
|
|
824
904
|
})
|
|
825
905
|
]).describe("Resolved scope with location/user IDs instead of filters.");
|
|
826
|
-
var Scope =
|
|
827
|
-
|
|
906
|
+
var Scope = z12.discriminatedUnion("type", [
|
|
907
|
+
z12.object({ type: PlainScopeType }),
|
|
828
908
|
...RecordScopeV2.options,
|
|
829
909
|
...UserScopeV2.options,
|
|
830
|
-
|
|
831
|
-
type:
|
|
910
|
+
z12.object({
|
|
911
|
+
type: z12.literal("organisation.read-locations"),
|
|
832
912
|
options: AccessLevelOptions.optional()
|
|
833
913
|
}),
|
|
834
|
-
|
|
835
|
-
type:
|
|
914
|
+
z12.object({
|
|
915
|
+
type: z12.literal("workqueue"),
|
|
836
916
|
options: WorkqueueOrDashboardOptions
|
|
837
917
|
}),
|
|
838
|
-
|
|
839
|
-
type:
|
|
918
|
+
z12.object({
|
|
919
|
+
type: z12.literal("dashboard.view"),
|
|
840
920
|
options: WorkqueueOrDashboardOptions
|
|
841
921
|
})
|
|
842
922
|
]);
|
|
843
|
-
var ScopeType =
|
|
923
|
+
var ScopeType = z12.enum([
|
|
844
924
|
...SystemScopeType.options,
|
|
845
925
|
...RecordScopeTypeV2.options,
|
|
846
926
|
...PlainScopeType.options,
|
|
847
927
|
"workqueue",
|
|
848
928
|
"dashboard.view"
|
|
849
929
|
]);
|
|
850
|
-
var EncodedScope =
|
|
930
|
+
var EncodedScope = z12.string().brand("EncodedScope");
|
|
851
931
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
852
932
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
853
933
|
accessLevel: JurisdictionFilter.enum.all,
|
|
@@ -857,30 +937,25 @@ var DEFAULT_SCOPE_OPTIONS = {
|
|
|
857
937
|
};
|
|
858
938
|
|
|
859
939
|
// ../commons/src/authentication.ts
|
|
860
|
-
var TokenUserType =
|
|
861
|
-
var TokenWithBearer =
|
|
940
|
+
var TokenUserType = z13.enum(["user", "system"]);
|
|
941
|
+
var TokenWithBearer = z13.string().regex(/^Bearer\s/);
|
|
862
942
|
|
|
863
943
|
// ../commons/src/events/ActionDocument.ts
|
|
864
|
-
var ActionUpdate =
|
|
944
|
+
var ActionUpdate = z14.record(z14.string(), FieldUpdateValue).describe(
|
|
865
945
|
"Record of field-level changes made by an action. Supports partial updates and nullable values."
|
|
866
946
|
);
|
|
867
|
-
var EventState =
|
|
947
|
+
var EventState = z14.record(z14.string(), FieldValue).describe(
|
|
868
948
|
"Aggregate representation of event data after all actions have been applied, with all updates consolidated and null values removed."
|
|
869
949
|
);
|
|
870
|
-
var
|
|
871
|
-
Requested: "Requested",
|
|
872
|
-
Accepted: "Accepted",
|
|
873
|
-
Rejected: "Rejected"
|
|
874
|
-
};
|
|
875
|
-
var ActionBase = z13.object({
|
|
950
|
+
var ActionBase = z14.object({
|
|
876
951
|
id: UUID.describe("Unique identifier of the action."),
|
|
877
|
-
transactionId:
|
|
952
|
+
transactionId: z14.string().describe("Unique identifier of the transaction."),
|
|
878
953
|
createdByUserType: TokenUserType.describe(
|
|
879
954
|
"Indicates whether the action was created by a human-user or by a system-user."
|
|
880
955
|
),
|
|
881
|
-
createdAt:
|
|
882
|
-
createdBy:
|
|
883
|
-
createdByRole:
|
|
956
|
+
createdAt: z14.string().datetime().describe("Timestamp indicating when the action was created."),
|
|
957
|
+
createdBy: z14.string().describe("Identifier of the user who created the action."),
|
|
958
|
+
createdByRole: z14.string().optional().describe("Role of the user who created the action."),
|
|
884
959
|
createdBySignature: DocumentPath.nullish().describe(
|
|
885
960
|
"Reference to the signature of the user who created the action."
|
|
886
961
|
),
|
|
@@ -892,7 +967,7 @@ var ActionBase = z13.object({
|
|
|
892
967
|
"Declaration data defined by the ActionConfig. Supports partial updates."
|
|
893
968
|
),
|
|
894
969
|
annotation: ActionUpdate.optional().nullable().describe("Action-specific metadata used to annotate the event."),
|
|
895
|
-
status:
|
|
970
|
+
status: z14.enum([
|
|
896
971
|
ActionStatus.Requested,
|
|
897
972
|
ActionStatus.Accepted,
|
|
898
973
|
ActionStatus.Rejected
|
|
@@ -904,138 +979,143 @@ var ActionBase = z13.object({
|
|
|
904
979
|
)
|
|
905
980
|
});
|
|
906
981
|
var AssignedAction = ActionBase.extend(
|
|
907
|
-
|
|
908
|
-
type:
|
|
909
|
-
assignedTo:
|
|
982
|
+
z14.object({
|
|
983
|
+
type: z14.literal(ActionType.ASSIGN),
|
|
984
|
+
assignedTo: z14.string().describe("Identifier of the user to whom the action is assigned.")
|
|
910
985
|
// TODO move into 'content' property
|
|
911
986
|
}).shape
|
|
912
987
|
);
|
|
913
988
|
var UnassignedAction = ActionBase.extend(
|
|
914
|
-
|
|
915
|
-
type:
|
|
989
|
+
z14.object({
|
|
990
|
+
type: z14.literal(ActionType.UNASSIGN)
|
|
916
991
|
}).shape
|
|
917
992
|
);
|
|
918
993
|
var RegisterAction = ActionBase.extend(
|
|
919
|
-
|
|
920
|
-
type:
|
|
921
|
-
registrationNumber:
|
|
994
|
+
z14.object({
|
|
995
|
+
type: z14.literal(ActionType.REGISTER),
|
|
996
|
+
registrationNumber: z14.string().optional().describe(
|
|
922
997
|
"Registration number of the event. Always present for accepted registrations."
|
|
923
998
|
)
|
|
924
999
|
// TODO move into 'content' property
|
|
925
1000
|
}).shape
|
|
926
1001
|
);
|
|
927
1002
|
var DeclareAction = ActionBase.extend(
|
|
928
|
-
|
|
929
|
-
type:
|
|
1003
|
+
z14.object({
|
|
1004
|
+
type: z14.literal(ActionType.DECLARE)
|
|
930
1005
|
}).shape
|
|
931
1006
|
);
|
|
932
|
-
var ReasonContent =
|
|
933
|
-
reason:
|
|
1007
|
+
var ReasonContent = z14.object({
|
|
1008
|
+
reason: z14.string().min(1, { error: "Message cannot be empty" }).describe(
|
|
934
1009
|
"Message describing the reason for rejecting or archiving the event."
|
|
935
1010
|
)
|
|
936
1011
|
});
|
|
937
1012
|
var RejectAction = ActionBase.extend(
|
|
938
|
-
|
|
939
|
-
type:
|
|
1013
|
+
z14.object({
|
|
1014
|
+
type: z14.literal(ActionType.REJECT),
|
|
940
1015
|
content: ReasonContent
|
|
941
1016
|
}).shape
|
|
942
1017
|
);
|
|
943
|
-
var PotentialDuplicate =
|
|
1018
|
+
var PotentialDuplicate = z14.object({
|
|
944
1019
|
id: UUID,
|
|
945
|
-
trackingId:
|
|
1020
|
+
trackingId: z14.string()
|
|
946
1021
|
});
|
|
947
1022
|
var DuplicateDetectedAction = ActionBase.extend(
|
|
948
|
-
|
|
949
|
-
type:
|
|
950
|
-
content:
|
|
951
|
-
duplicates:
|
|
1023
|
+
z14.object({
|
|
1024
|
+
type: z14.literal(ActionType.DUPLICATE_DETECTED),
|
|
1025
|
+
content: z14.object({
|
|
1026
|
+
duplicates: z14.array(PotentialDuplicate)
|
|
952
1027
|
})
|
|
953
1028
|
}).shape
|
|
954
1029
|
);
|
|
955
1030
|
var MarkNotDuplicateAction = ActionBase.extend(
|
|
956
|
-
|
|
957
|
-
type:
|
|
1031
|
+
z14.object({
|
|
1032
|
+
type: z14.literal(ActionType.MARK_AS_NOT_DUPLICATE)
|
|
958
1033
|
}).shape
|
|
959
1034
|
);
|
|
960
1035
|
var MarkAsDuplicateAction = ActionBase.extend(
|
|
961
|
-
|
|
962
|
-
type:
|
|
963
|
-
content:
|
|
1036
|
+
z14.object({
|
|
1037
|
+
type: z14.literal(ActionType.MARK_AS_DUPLICATE),
|
|
1038
|
+
content: z14.object({
|
|
964
1039
|
duplicateOf: UUID
|
|
965
1040
|
}).optional()
|
|
966
1041
|
}).shape
|
|
967
1042
|
);
|
|
968
1043
|
var ArchiveAction = ActionBase.extend(
|
|
969
|
-
|
|
970
|
-
type:
|
|
971
|
-
|
|
1044
|
+
z14.object({
|
|
1045
|
+
type: z14.literal(ActionType.ARCHIVE),
|
|
1046
|
+
/**
|
|
1047
|
+
* Archiving does not collect a reason on its own. Only the
|
|
1048
|
+
* "mark as duplicate" flow archives with a reason attached.
|
|
1049
|
+
*/
|
|
1050
|
+
content: ReasonContent.optional()
|
|
972
1051
|
}).shape
|
|
973
1052
|
);
|
|
974
1053
|
var UnarchiveAction = ActionBase.extend(
|
|
975
|
-
|
|
976
|
-
type:
|
|
1054
|
+
z14.object({
|
|
1055
|
+
type: z14.literal(ActionType.UNARCHIVE)
|
|
977
1056
|
}).shape
|
|
978
1057
|
);
|
|
979
1058
|
var CreatedAction = ActionBase.extend(
|
|
980
|
-
|
|
981
|
-
type:
|
|
1059
|
+
z14.object({
|
|
1060
|
+
type: z14.literal(ActionType.CREATE)
|
|
982
1061
|
}).shape
|
|
983
1062
|
);
|
|
984
1063
|
var NotifiedAction = ActionBase.extend(
|
|
985
|
-
|
|
986
|
-
type:
|
|
1064
|
+
z14.object({
|
|
1065
|
+
type: z14.literal(ActionType.NOTIFY)
|
|
987
1066
|
}).shape
|
|
988
1067
|
);
|
|
989
1068
|
var EditAction = ActionBase.extend(
|
|
990
|
-
|
|
991
|
-
type:
|
|
992
|
-
content
|
|
993
|
-
|
|
994
|
-
|
|
1069
|
+
z14.object({
|
|
1070
|
+
type: z14.literal(ActionType.EDIT),
|
|
1071
|
+
/** @deprecated New Edit-actions should no longer contain content. This is kept for old 2.0 edits. */
|
|
1072
|
+
content: z14.object({
|
|
1073
|
+
comment: z14.string().describe("Comment for the edit action.").optional()
|
|
1074
|
+
}).optional()
|
|
995
1075
|
}).shape
|
|
996
1076
|
);
|
|
997
|
-
var PrintContent =
|
|
998
|
-
templateId:
|
|
1077
|
+
var PrintContent = z14.object({
|
|
1078
|
+
templateId: z14.string().optional()
|
|
999
1079
|
});
|
|
1000
1080
|
var PrintCertificateAction = ActionBase.extend(
|
|
1001
|
-
|
|
1002
|
-
type:
|
|
1081
|
+
z14.object({
|
|
1082
|
+
type: z14.literal(ActionType.PRINT_CERTIFICATE),
|
|
1003
1083
|
content: PrintContent.optional().nullable()
|
|
1004
1084
|
}).shape
|
|
1005
1085
|
);
|
|
1006
1086
|
var RequestedCorrectionAction = ActionBase.extend(
|
|
1007
|
-
|
|
1008
|
-
type:
|
|
1087
|
+
z14.object({
|
|
1088
|
+
type: z14.literal(ActionType.REQUEST_CORRECTION)
|
|
1009
1089
|
}).shape
|
|
1010
1090
|
);
|
|
1011
1091
|
var ApprovedCorrectionAction = ActionBase.extend(
|
|
1012
|
-
|
|
1013
|
-
type:
|
|
1014
|
-
requestId:
|
|
1092
|
+
z14.object({
|
|
1093
|
+
type: z14.literal(ActionType.APPROVE_CORRECTION),
|
|
1094
|
+
requestId: z14.string(),
|
|
1015
1095
|
// TODO move into 'content' property
|
|
1016
|
-
content:
|
|
1096
|
+
content: z14.object({ immediateCorrection: z14.boolean().optional() }).optional()
|
|
1017
1097
|
}).shape
|
|
1018
1098
|
);
|
|
1019
1099
|
var RejectedCorrectionAction = ActionBase.extend(
|
|
1020
|
-
|
|
1021
|
-
type:
|
|
1022
|
-
requestId:
|
|
1100
|
+
z14.object({
|
|
1101
|
+
type: z14.literal(ActionType.REJECT_CORRECTION),
|
|
1102
|
+
requestId: z14.string(),
|
|
1023
1103
|
// TODO move into 'content' property
|
|
1024
1104
|
content: ReasonContent
|
|
1025
1105
|
}).shape
|
|
1026
1106
|
);
|
|
1027
1107
|
var ReadAction = ActionBase.extend(
|
|
1028
|
-
|
|
1029
|
-
type:
|
|
1108
|
+
z14.object({
|
|
1109
|
+
type: z14.literal(ActionType.READ)
|
|
1030
1110
|
}).shape
|
|
1031
1111
|
);
|
|
1032
1112
|
var CustomAction = ActionBase.merge(
|
|
1033
|
-
|
|
1034
|
-
type:
|
|
1035
|
-
customActionType:
|
|
1113
|
+
z14.object({
|
|
1114
|
+
type: z14.literal(ActionType.CUSTOM),
|
|
1115
|
+
customActionType: z14.string()
|
|
1036
1116
|
})
|
|
1037
1117
|
);
|
|
1038
|
-
var ActionDocument =
|
|
1118
|
+
var ActionDocument = z14.discriminatedUnion("type", [
|
|
1039
1119
|
CreatedAction.meta({ id: "CreatedAction" }),
|
|
1040
1120
|
RejectAction.meta({ id: "RejectAction" }),
|
|
1041
1121
|
DuplicateDetectedAction.meta({ id: "DuplicateDetectedAction" }),
|
|
@@ -1062,64 +1142,12 @@ var AsyncRejectActionDocument = ActionBase.omit({
|
|
|
1062
1142
|
declaration: true,
|
|
1063
1143
|
annotation: true
|
|
1064
1144
|
}).extend(
|
|
1065
|
-
|
|
1066
|
-
type:
|
|
1067
|
-
status:
|
|
1145
|
+
z14.object({
|
|
1146
|
+
type: z14.enum(ConfirmableActions),
|
|
1147
|
+
status: z14.literal(ActionStatus.Rejected)
|
|
1068
1148
|
}).shape
|
|
1069
1149
|
);
|
|
1070
|
-
var Action =
|
|
1071
|
-
|
|
1072
|
-
// ../commons/src/events/Flag.ts
|
|
1073
|
-
var z14 = __toESM(require("zod/v4"));
|
|
1074
|
-
var InherentFlags = {
|
|
1075
|
-
INCOMPLETE: "incomplete",
|
|
1076
|
-
REJECTED: "rejected",
|
|
1077
|
-
CORRECTION_REQUESTED: "correction-requested",
|
|
1078
|
-
POTENTIAL_DUPLICATE: "potential-duplicate",
|
|
1079
|
-
/**
|
|
1080
|
-
* This flag is set by the Edit-action and removed after the declaration or registration.
|
|
1081
|
-
* A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
|
|
1082
|
-
*
|
|
1083
|
-
* We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
|
|
1084
|
-
*/
|
|
1085
|
-
EDIT_IN_PROGRESS: "edit-in-progress"
|
|
1086
|
-
};
|
|
1087
|
-
var ActionFlag = z14.string().regex(
|
|
1088
|
-
new RegExp(
|
|
1089
|
-
`^(${Object.values(ActionType).join("|").toLowerCase()}):(${Object.values(
|
|
1090
|
-
ActionStatus
|
|
1091
|
-
).join("|").toLowerCase()})$`
|
|
1092
|
-
),
|
|
1093
|
-
"Flag must be in the format ActionType:ActionStatus (lowerCase)"
|
|
1094
|
-
);
|
|
1095
|
-
var CustomFlag = z14.string().refine((val) => !Object.values(InherentFlags).includes(val), {
|
|
1096
|
-
message: `Custom flag cannot be one of the inherent flags: ${Object.values(
|
|
1097
|
-
InherentFlags
|
|
1098
|
-
).join(", ")}`
|
|
1099
|
-
}).refine((val) => !ActionFlag.safeParse(val).success, {
|
|
1100
|
-
message: "Custom flag cannot match the ActionFlag pattern (ActionType:ActionStatus)."
|
|
1101
|
-
}).describe("Custom flag identifier defined by the country config.");
|
|
1102
|
-
var Flag = ActionFlag.or(z14.enum(InherentFlags)).or(CustomFlag);
|
|
1103
|
-
var FlagConfig = z14.object({
|
|
1104
|
-
id: CustomFlag,
|
|
1105
|
-
requiresAction: z14.boolean().describe(
|
|
1106
|
-
"Indicates if this flag expects an action to be performed to be cleared."
|
|
1107
|
-
),
|
|
1108
|
-
label: TranslationConfig.describe("Human readable label of the flag.")
|
|
1109
|
-
}).meta({
|
|
1110
|
-
id: "FlagConfig",
|
|
1111
|
-
description: "Configuration for a custom flag that can be added to or removed from records by event actions."
|
|
1112
|
-
});
|
|
1113
|
-
var ActionFlagConfig = z14.object({
|
|
1114
|
-
id: Flag,
|
|
1115
|
-
operation: z14.enum(["add", "remove"]).describe("Operation to perform on the flag."),
|
|
1116
|
-
conditional: Conditional.optional().describe(
|
|
1117
|
-
"When conditional is met, the operation is performed on the flag. If not provided, the operation is performed unconditionally."
|
|
1118
|
-
)
|
|
1119
|
-
}).meta({
|
|
1120
|
-
id: "ActionFlagConfig",
|
|
1121
|
-
description: "Add or remove operation applied to a flag when the parent action is accepted. Optionally gated by a conditional."
|
|
1122
|
-
});
|
|
1150
|
+
var Action = z14.union([ActionDocument, AsyncRejectActionDocument]);
|
|
1123
1151
|
|
|
1124
1152
|
// ../commons/src/events/EventMetadata.ts
|
|
1125
1153
|
var EventStatus = z15.enum([
|
|
@@ -1280,13 +1308,6 @@ var Range = import_v4.z.object({
|
|
|
1280
1308
|
}).meta({
|
|
1281
1309
|
id: "Range"
|
|
1282
1310
|
});
|
|
1283
|
-
var ContainsFlags = import_v4.z.object({
|
|
1284
|
-
anyOf: import_v4.z.array(Flag).optional(),
|
|
1285
|
-
noneOf: import_v4.z.array(Flag).optional(),
|
|
1286
|
-
allOf: import_v4.z.array(Flag).optional()
|
|
1287
|
-
}).meta({
|
|
1288
|
-
id: "ContainsFlags"
|
|
1289
|
-
});
|
|
1290
1311
|
var Within = import_v4.z.object({ type: import_v4.z.literal("within"), location: import_v4.z.string() }).meta({
|
|
1291
1312
|
id: "Within"
|
|
1292
1313
|
});
|
|
@@ -1481,8 +1502,8 @@ var BaseField = import_v43.default.object({
|
|
|
1481
1502
|
conditionals: import_v43.default.array(FieldConditional).default([]).optional().describe(
|
|
1482
1503
|
"Conditions determining when the field is shown or enabled. By default, the field is always shown and enabled."
|
|
1483
1504
|
),
|
|
1484
|
-
secured: import_v43.default.boolean().default(false).optional().describe(
|
|
1485
|
-
"Indicates whether the field is secured. Secured fields are not indexed for search and are only visible when explicitly assigned."
|
|
1505
|
+
secured: import_v43.default.union([import_v43.default.boolean(), Conditional]).default(false).optional().describe(
|
|
1506
|
+
"Indicates whether the field is secured, either always (boolean) or conditionally, evaluated against the event (a JSONSchema conditional, e.g. flag('sealed')). Secured fields are not indexed for search and are only visible when explicitly assigned."
|
|
1486
1507
|
),
|
|
1487
1508
|
placeholder: TranslationConfig.optional(),
|
|
1488
1509
|
validation: import_v43.default.array(ValidationConfig).default([]).optional().describe("Additional validation rules applied to the field."),
|
|
@@ -1880,7 +1901,16 @@ var AdministrativeAreaField = BaseField.extend({
|
|
|
1880
1901
|
configuration: import_v43.default.object({
|
|
1881
1902
|
partOf: FieldReference.optional().describe("Parent location"),
|
|
1882
1903
|
type: AdministrativeAreas,
|
|
1883
|
-
allowedLocations: AllowedLocations
|
|
1904
|
+
allowedLocations: AllowedLocations,
|
|
1905
|
+
listHistoricalNames: import_v43.default.boolean().optional().describe(
|
|
1906
|
+
"List every historical name a location has had as a separate, selectable option."
|
|
1907
|
+
),
|
|
1908
|
+
activeOnly: import_v43.default.boolean().optional().describe(
|
|
1909
|
+
"Offer only locations that are active at the resolved anchor date (today, or the date of event when anchorToDateOfEvent is set); inactive or not-yet-effective versions are excluded."
|
|
1910
|
+
),
|
|
1911
|
+
anchorToDateOfEvent: import_v43.default.boolean().optional().describe(
|
|
1912
|
+
"Resolve selectable/displayed versions against the event's date of event (falling back to the record's creation date when empty) instead of today. Does not by itself exclude inactive versions; combine with activeOnly for that."
|
|
1913
|
+
)
|
|
1884
1914
|
}).describe("Administrative area options")
|
|
1885
1915
|
}).meta({
|
|
1886
1916
|
description: "Administrative area input field",
|
|
@@ -1891,7 +1921,16 @@ var LocationInput = BaseField.extend({
|
|
|
1891
1921
|
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField, ComputedDefaultValue]).optional(),
|
|
1892
1922
|
configuration: import_v43.default.object({
|
|
1893
1923
|
locationTypes: import_v43.default.array(import_v43.default.string()).optional().describe("Types of the locations that are available for selection."),
|
|
1894
|
-
allowedLocations: AllowedLocations
|
|
1924
|
+
allowedLocations: AllowedLocations,
|
|
1925
|
+
listHistoricalNames: import_v43.default.boolean().optional().describe(
|
|
1926
|
+
"List every historical name a location has had as a separate, selectable option."
|
|
1927
|
+
),
|
|
1928
|
+
activeOnly: import_v43.default.boolean().optional().describe(
|
|
1929
|
+
"Offer only locations that are active at the resolved anchor date (today, or the date of event when anchorToDateOfEvent is set); inactive or not-yet-effective versions are excluded."
|
|
1930
|
+
),
|
|
1931
|
+
anchorToDateOfEvent: import_v43.default.boolean().optional().describe(
|
|
1932
|
+
"Resolve selectable/displayed versions against the event's date of event (falling back to the record's creation date when empty) instead of today. Does not by itself exclude inactive versions; combine with activeOnly for that."
|
|
1933
|
+
)
|
|
1895
1934
|
}).optional()
|
|
1896
1935
|
}).meta({
|
|
1897
1936
|
description: "A field for selecting a location",
|
|
@@ -1917,12 +1956,22 @@ var FileUploadWithOptions = BaseField.extend({
|
|
|
1917
1956
|
var Facility = BaseField.extend({
|
|
1918
1957
|
type: import_v43.default.literal(FieldType.FACILITY),
|
|
1919
1958
|
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1920
|
-
configuration: import_v43.default.object({
|
|
1959
|
+
configuration: import_v43.default.object({
|
|
1960
|
+
allowedLocations: AllowedLocations,
|
|
1961
|
+
listHistoricalNames: import_v43.default.boolean().optional(),
|
|
1962
|
+
activeOnly: import_v43.default.boolean().optional(),
|
|
1963
|
+
anchorToDateOfEvent: import_v43.default.boolean().optional()
|
|
1964
|
+
}).optional()
|
|
1921
1965
|
}).describe("Input field for a facility");
|
|
1922
1966
|
var Office = BaseField.extend({
|
|
1923
1967
|
type: import_v43.default.literal(FieldType.OFFICE),
|
|
1924
1968
|
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1925
|
-
configuration: import_v43.default.object({
|
|
1969
|
+
configuration: import_v43.default.object({
|
|
1970
|
+
allowedLocations: AllowedLocations,
|
|
1971
|
+
listHistoricalNames: import_v43.default.boolean().optional(),
|
|
1972
|
+
activeOnly: import_v43.default.boolean().optional(),
|
|
1973
|
+
anchorToDateOfEvent: import_v43.default.boolean().optional()
|
|
1974
|
+
}).optional()
|
|
1926
1975
|
}).describe("Input field for an office");
|
|
1927
1976
|
var DefaultAddressFieldValue = DomesticAddressFieldValue.extend({
|
|
1928
1977
|
administrativeArea: import_v43.default.union([UUID, SerializedUserField]).optional()
|
|
@@ -1955,7 +2004,16 @@ var Address = BaseField.extend({
|
|
|
1955
2004
|
parent: FieldReference.optional()
|
|
1956
2005
|
})
|
|
1957
2006
|
).optional(),
|
|
1958
|
-
allowedLocations: AllowedLocations
|
|
2007
|
+
allowedLocations: AllowedLocations,
|
|
2008
|
+
listHistoricalNames: import_v43.default.boolean().optional().describe(
|
|
2009
|
+
"List every historical name a location has had as a separate, selectable option. Propagated to the embedded admin-area selectors."
|
|
2010
|
+
),
|
|
2011
|
+
activeOnly: import_v43.default.boolean().optional().describe(
|
|
2012
|
+
"Offer only admin areas that are active at the resolved anchor date (today, or the date of event when anchorToDateOfEvent is set); inactive or not-yet-effective versions are excluded. Propagated to the embedded admin-area selectors."
|
|
2013
|
+
),
|
|
2014
|
+
anchorToDateOfEvent: import_v43.default.boolean().optional().describe(
|
|
2015
|
+
"Resolve selectable/displayed versions against the event's date of event (falling back to the record's creation date when empty) instead of today. Does not by itself exclude inactive versions; combine with activeOnly for that. Propagated to the embedded admin-area selectors."
|
|
2016
|
+
)
|
|
1959
2017
|
}).optional(),
|
|
1960
2018
|
defaultValue: DefaultAddressFieldValue.or(ComputedDefaultValue).optional()
|
|
1961
2019
|
}).meta({
|