@opencrvs/toolkit 2.0.0-rc.358eace → 2.0.0-rc.3598fb7
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/build.sh +3 -3
- package/dist/application-config/index.js +17 -6
- package/dist/cli.js +328 -226
- package/dist/commons/api/router.d.ts +10 -0
- package/dist/commons/conditionals/conditionals.d.ts +3 -3
- package/dist/commons/events/ActionConfig.d.ts +7 -0
- 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 +10 -0
- 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.map +1 -1
- package/dist/environment/derived-variables.d.ts.map +1 -1
- package/dist/environment/derived-variables.js +1 -1
- package/dist/environment/editor-questions.d.ts.map +1 -1
- package/dist/environment/editor-questions.js +6 -4
- package/dist/environment/git.js +5 -5
- package/dist/environment/github.d.ts.map +1 -1
- package/dist/environment/github.js +15 -12
- package/dist/environment/index.d.ts.map +1 -1
- package/dist/environment/index.js +2 -1
- package/dist/environment/manage-users.d.ts.map +1 -1
- package/dist/environment/manage-users.js +11 -8
- package/dist/environment/questions-helper.d.ts.map +1 -1
- package/dist/environment/questions-helper.js +5 -5
- package/dist/environment/questions.d.ts.map +1 -1
- package/dist/environment/questions.js +13 -13
- package/dist/environment/setup-environment.js +75 -54
- package/dist/environment/ssh-keygen.d.ts.map +1 -1
- package/dist/environment/ssh-keygen.js +5 -2
- package/dist/environment/swarm-to-k8s.js +16 -15
- package/dist/environment/templates.d.ts.map +1 -1
- package/dist/environment/templates.js +16 -12
- package/dist/environment/update-workflows.d.ts.map +1 -1
- package/dist/environment/update-workflows.js +6 -5
- package/dist/environment/users.d.ts +1 -1
- package/dist/environment/users.d.ts.map +1 -1
- package/dist/environment/users.js +19 -9
- package/dist/environment/utils.d.ts.map +1 -1
- package/dist/environment/utils.js +1 -1
- package/dist/events/index.js +69 -18
- package/dist/migrations/v2.0/index.js +10 -5
- package/dist/notification/index.js +32 -17
- package/dist/scopes/index.d.ts +89 -1
- package/dist/scopes/index.js +10 -5
- package/dist/{environment/templates → templates}/charts-values/dependencies/values.yaml +7 -6
- package/dist/{environment/templates/charts-values/dependencies → templates/charts-values/opencrvs-services}/values.override.yaml +1 -1
- package/dist/{environment/templates → templates}/charts-values/opencrvs-services/values.yaml +8 -6
- package/dist/{environment/templates → templates}/charts-values/traefik/values.override.yaml +1 -1
- package/dist/{environment/templates → templates}/charts-values/traefik/values.yaml +6 -7
- package/dist/{environment/templates → templates}/inventory/production.example.yml +2 -2
- package/opencrvs-toolkit-2.0.0-rc.3598fb7.tgz +0 -0
- package/package.json +1 -1
- package/opencrvs-toolkit-2.0.0-rc.358eace.tgz +0 -0
- /package/dist/{environment/templates/charts-values/opencrvs-services → templates/charts-values/dependencies}/values.override.yaml +0 -0
- /package/dist/{environment/templates → templates}/inventory/inventory.template.yml +0 -0
- /package/dist/{environment/templates → templates}/inventory/qa.example.yml +0 -0
package/dist/events/index.js
CHANGED
|
@@ -312,6 +312,7 @@ __export(events_exports, {
|
|
|
312
312
|
getActionAnnotation: () => getActionAnnotation,
|
|
313
313
|
getActionAnnotationFields: () => getActionAnnotationFields,
|
|
314
314
|
getActionConfig: () => getActionConfig,
|
|
315
|
+
getActionFormFields: () => getActionFormFields,
|
|
315
316
|
getActionReview: () => getActionReview,
|
|
316
317
|
getActionReviewFields: () => getActionReviewFields,
|
|
317
318
|
getAdministrativeAreaHierarchy: () => getAdministrativeAreaHierarchy,
|
|
@@ -520,11 +521,13 @@ var scopeOptionsPlaceEvent = z2.object({
|
|
|
520
521
|
event: scopeByEvent,
|
|
521
522
|
placeOfEvent: JurisdictionFilter.optional()
|
|
522
523
|
}).describe("Options applicable to all record scopes.");
|
|
523
|
-
var
|
|
524
|
+
var scopeOptionsDeclaredOrNotified = scopeOptionsPlaceEvent.extend({
|
|
525
|
+
notifiedIn: JurisdictionFilter.optional(),
|
|
526
|
+
notifiedBy: UserFilter.optional(),
|
|
524
527
|
declaredIn: JurisdictionFilter.optional(),
|
|
525
528
|
declaredBy: UserFilter.optional()
|
|
526
529
|
}).describe("Options applicable to actions that may take place after DECLARE");
|
|
527
|
-
var AllRecordScopeOptions =
|
|
530
|
+
var AllRecordScopeOptions = scopeOptionsDeclaredOrNotified.extend({
|
|
528
531
|
registeredIn: JurisdictionFilter.optional(),
|
|
529
532
|
registeredBy: UserFilter.optional()
|
|
530
533
|
}).describe(
|
|
@@ -562,6 +565,8 @@ var ResolvedScopeOptionsPlaceEvent = z2.object({
|
|
|
562
565
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
563
566
|
);
|
|
564
567
|
var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
|
|
568
|
+
notifiedIn: UUID.nullish(),
|
|
569
|
+
notifiedBy: z2.string().optional(),
|
|
565
570
|
declaredIn: UUID.nullish(),
|
|
566
571
|
declaredBy: z2.string().optional()
|
|
567
572
|
}).describe(
|
|
@@ -607,7 +612,7 @@ var RecordScopeV2 = z2.discriminatedUnion("type", [
|
|
|
607
612
|
}),
|
|
608
613
|
z2.object({
|
|
609
614
|
type: ScopesWithDeclaredOptions,
|
|
610
|
-
options:
|
|
615
|
+
options: scopeOptionsDeclaredOrNotified.optional()
|
|
611
616
|
}),
|
|
612
617
|
z2.object({
|
|
613
618
|
type: ScopesWithFullOptions,
|
|
@@ -730,8 +735,9 @@ var decodeScope = (encodedScope) => {
|
|
|
730
735
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
731
736
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
732
737
|
accessLevel: JurisdictionFilter.enum.all,
|
|
733
|
-
|
|
734
|
-
declaredIn: JurisdictionFilter.enum.all
|
|
738
|
+
notifiedIn: JurisdictionFilter.enum.all,
|
|
739
|
+
declaredIn: JurisdictionFilter.enum.all,
|
|
740
|
+
registeredIn: JurisdictionFilter.enum.all
|
|
735
741
|
};
|
|
736
742
|
function getAcceptedScopesByType({
|
|
737
743
|
acceptedScopes,
|
|
@@ -1815,6 +1821,7 @@ var RegistrationCreationMetadata = ActionCreationMetadata.extend({
|
|
|
1815
1821
|
)
|
|
1816
1822
|
});
|
|
1817
1823
|
var LegalStatuses = z16.object({
|
|
1824
|
+
[EventStatus.enum.NOTIFIED]: ActionCreationMetadata.nullish(),
|
|
1818
1825
|
[EventStatus.enum.DECLARED]: ActionCreationMetadata.nullish(),
|
|
1819
1826
|
[EventStatus.enum.REGISTERED]: RegistrationCreationMetadata.nullish()
|
|
1820
1827
|
});
|
|
@@ -1956,6 +1963,8 @@ var eventMetadataLabelMap = {
|
|
|
1956
1963
|
var EventMetadataDateFieldIdInput = z16.enum([
|
|
1957
1964
|
"createdAt",
|
|
1958
1965
|
"updatedAt",
|
|
1966
|
+
"legalStatuses.NOTIFIED.createdAt",
|
|
1967
|
+
"legalStatuses.NOTIFIED.acceptedAt",
|
|
1959
1968
|
"legalStatuses.DECLARED.createdAt",
|
|
1960
1969
|
"legalStatuses.DECLARED.acceptedAt",
|
|
1961
1970
|
"legalStatuses.REGISTERED.createdAt",
|
|
@@ -1964,6 +1973,8 @@ var EventMetadataDateFieldIdInput = z16.enum([
|
|
|
1964
1973
|
var EventMetadataDateFieldId = z16.enum([
|
|
1965
1974
|
"event.createdAt",
|
|
1966
1975
|
"event.updatedAt",
|
|
1976
|
+
"event.legalStatuses.NOTIFIED.createdAt",
|
|
1977
|
+
"event.legalStatuses.NOTIFIED.acceptedAt",
|
|
1967
1978
|
"event.legalStatuses.DECLARED.createdAt",
|
|
1968
1979
|
"event.legalStatuses.DECLARED.acceptedAt",
|
|
1969
1980
|
"event.legalStatuses.REGISTERED.createdAt",
|
|
@@ -2023,7 +2034,8 @@ var Range = import_v4.z.object({
|
|
|
2023
2034
|
});
|
|
2024
2035
|
var ContainsFlags = import_v4.z.object({
|
|
2025
2036
|
anyOf: import_v4.z.array(Flag).optional(),
|
|
2026
|
-
noneOf: import_v4.z.array(Flag).optional()
|
|
2037
|
+
noneOf: import_v4.z.array(Flag).optional(),
|
|
2038
|
+
allOf: import_v4.z.array(Flag).optional()
|
|
2027
2039
|
}).meta({
|
|
2028
2040
|
id: "ContainsFlags"
|
|
2029
2041
|
});
|
|
@@ -3213,6 +3225,9 @@ var ActionConfigBase = z24.object({
|
|
|
3213
3225
|
var DeclarationActionBase = ActionConfigBase.extend({
|
|
3214
3226
|
deduplication: DeduplicationConfig.optional()
|
|
3215
3227
|
});
|
|
3228
|
+
var actionConfirmationForm = z24.array(FieldConfig).optional().describe(
|
|
3229
|
+
"Fields rendered on the action confirmation dialog. Submitted values are stored in the action annotation and shown in the audit history."
|
|
3230
|
+
);
|
|
3216
3231
|
var ReadActionConfig = ActionConfigBase.extend(
|
|
3217
3232
|
z24.object({
|
|
3218
3233
|
type: z24.literal(ActionType.READ),
|
|
@@ -3224,7 +3239,8 @@ var ReadActionConfig = ActionConfigBase.extend(
|
|
|
3224
3239
|
);
|
|
3225
3240
|
var NotifyConfig = ActionConfigBase.extend(
|
|
3226
3241
|
z24.object({
|
|
3227
|
-
type: z24.literal(ActionType.NOTIFY)
|
|
3242
|
+
type: z24.literal(ActionType.NOTIFY),
|
|
3243
|
+
form: actionConfirmationForm
|
|
3228
3244
|
}).shape
|
|
3229
3245
|
);
|
|
3230
3246
|
var DeclareConfig = DeclarationActionBase.extend(
|
|
@@ -3233,6 +3249,7 @@ var DeclareConfig = DeclarationActionBase.extend(
|
|
|
3233
3249
|
review: DeclarationReviewConfig.describe(
|
|
3234
3250
|
"Configuration of the review page fields."
|
|
3235
3251
|
),
|
|
3252
|
+
form: actionConfirmationForm,
|
|
3236
3253
|
dialogCopy: z24.object({
|
|
3237
3254
|
notify: TranslationConfig.describe(
|
|
3238
3255
|
"Confirmation text for the notify action"
|
|
@@ -3248,7 +3265,8 @@ var DeclareConfig = DeclarationActionBase.extend(
|
|
|
3248
3265
|
);
|
|
3249
3266
|
var ArchiveConfig = ActionConfigBase.extend(
|
|
3250
3267
|
z24.object({
|
|
3251
|
-
type: z24.literal(ActionType.ARCHIVE)
|
|
3268
|
+
type: z24.literal(ActionType.ARCHIVE),
|
|
3269
|
+
form: actionConfirmationForm
|
|
3252
3270
|
}).shape
|
|
3253
3271
|
);
|
|
3254
3272
|
var EditActionConfig = ActionConfigBase.extend(
|
|
@@ -3269,12 +3287,14 @@ var EditActionConfig = ActionConfigBase.extend(
|
|
|
3269
3287
|
);
|
|
3270
3288
|
var RejectConfig = ActionConfigBase.extend(
|
|
3271
3289
|
z24.object({
|
|
3272
|
-
type: z24.literal(ActionType.REJECT)
|
|
3290
|
+
type: z24.literal(ActionType.REJECT),
|
|
3291
|
+
form: actionConfirmationForm
|
|
3273
3292
|
}).shape
|
|
3274
3293
|
);
|
|
3275
3294
|
var RegisterConfig = DeclarationActionBase.extend(
|
|
3276
3295
|
z24.object({
|
|
3277
|
-
type: z24.literal(ActionType.REGISTER)
|
|
3296
|
+
type: z24.literal(ActionType.REGISTER),
|
|
3297
|
+
form: actionConfirmationForm
|
|
3278
3298
|
}).shape
|
|
3279
3299
|
);
|
|
3280
3300
|
var PrintCertificateActionConfig = ActionConfigBase.extend(
|
|
@@ -4505,7 +4525,19 @@ function getCustomActionFields(eventConfiguration, customActionType) {
|
|
|
4505
4525
|
customActionType,
|
|
4506
4526
|
actionType: ActionType.CUSTOM
|
|
4507
4527
|
});
|
|
4508
|
-
if (!actionConfig ||
|
|
4528
|
+
if (!actionConfig || actionConfig.type !== ActionType.CUSTOM) {
|
|
4529
|
+
return [];
|
|
4530
|
+
}
|
|
4531
|
+
return actionConfig.form;
|
|
4532
|
+
}
|
|
4533
|
+
function getActionFormFields(eventConfiguration, actionType, customActionType) {
|
|
4534
|
+
const actionConfig = eventConfiguration.actions.find((a) => {
|
|
4535
|
+
if (a.type === ActionType.CUSTOM && customActionType) {
|
|
4536
|
+
return a.customActionType === customActionType;
|
|
4537
|
+
}
|
|
4538
|
+
return a.type === actionType;
|
|
4539
|
+
});
|
|
4540
|
+
if (!actionConfig || !("form" in actionConfig) || actionConfig.form == null) {
|
|
4509
4541
|
return [];
|
|
4510
4542
|
}
|
|
4511
4543
|
return actionConfig.form;
|
|
@@ -4526,13 +4558,9 @@ var getActionAnnotationFields = (actionConfig) => {
|
|
|
4526
4558
|
if (actionConfig.type === ActionType.PRINT_CERTIFICATE) {
|
|
4527
4559
|
return actionConfig.printForm.pages.flatMap(({ fields }) => fields);
|
|
4528
4560
|
}
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
if ("review" in actionConfig && actionConfig.review != null) {
|
|
4533
|
-
return actionConfig.review.fields;
|
|
4534
|
-
}
|
|
4535
|
-
return [];
|
|
4561
|
+
const reviewFields = "review" in actionConfig && actionConfig.review != null ? actionConfig.review.fields : [];
|
|
4562
|
+
const formFields = "form" in actionConfig && actionConfig.form != null ? actionConfig.form : [];
|
|
4563
|
+
return [...reviewFields, ...formFields];
|
|
4536
4564
|
};
|
|
4537
4565
|
function getAllAnnotationFields(config) {
|
|
4538
4566
|
return (0, import_lodash.flattenDeep)(config.actions.map(getActionAnnotationFields));
|
|
@@ -6530,6 +6558,10 @@ function getActionUpdateMetadata(actions) {
|
|
|
6530
6558
|
}
|
|
6531
6559
|
function getLegalStatuses(actions) {
|
|
6532
6560
|
return {
|
|
6561
|
+
[EventStatus.enum.NOTIFIED]: getDeclarationActionCreationMetadata(
|
|
6562
|
+
ActionType.NOTIFY,
|
|
6563
|
+
actions
|
|
6564
|
+
),
|
|
6533
6565
|
[EventStatus.enum.DECLARED]: getDeclarationActionCreationMetadata(
|
|
6534
6566
|
ActionType.DECLARE,
|
|
6535
6567
|
actions
|
|
@@ -10345,6 +10377,25 @@ function canAccessEventWithScope(event2, scope, user2, customActionType) {
|
|
|
10345
10377
|
}
|
|
10346
10378
|
if (scopeUsesDeclaredOptions(scope)) {
|
|
10347
10379
|
const { options } = scope;
|
|
10380
|
+
if (options?.notifiedBy === UserFilter.enum.user) {
|
|
10381
|
+
if (event2.legalStatuses?.NOTIFIED?.createdBy !== user2.id) {
|
|
10382
|
+
return false;
|
|
10383
|
+
}
|
|
10384
|
+
}
|
|
10385
|
+
if (options?.notifiedIn === JurisdictionFilter.enum.location && !matchesJurisdictionFilter(
|
|
10386
|
+
event2.legalStatuses?.NOTIFIED?.createdAtLocation,
|
|
10387
|
+
JurisdictionFilter.enum.location,
|
|
10388
|
+
user2
|
|
10389
|
+
)) {
|
|
10390
|
+
return false;
|
|
10391
|
+
}
|
|
10392
|
+
if (options?.notifiedIn === JurisdictionFilter.enum.administrativeArea && !matchesJurisdictionFilter(
|
|
10393
|
+
event2.legalStatuses?.NOTIFIED?.createdAtLocation,
|
|
10394
|
+
JurisdictionFilter.enum.administrativeArea,
|
|
10395
|
+
user2
|
|
10396
|
+
)) {
|
|
10397
|
+
return false;
|
|
10398
|
+
}
|
|
10348
10399
|
if (options?.declaredBy === UserFilter.enum.user) {
|
|
10349
10400
|
if (event2.legalStatuses?.DECLARED?.createdBy !== user2.id) {
|
|
10350
10401
|
return false;
|
|
@@ -2204,11 +2204,13 @@ var scopeOptionsPlaceEvent = z3.object({
|
|
|
2204
2204
|
event: scopeByEvent,
|
|
2205
2205
|
placeOfEvent: JurisdictionFilter.optional()
|
|
2206
2206
|
}).describe("Options applicable to all record scopes.");
|
|
2207
|
-
var
|
|
2207
|
+
var scopeOptionsDeclaredOrNotified = scopeOptionsPlaceEvent.extend({
|
|
2208
|
+
notifiedIn: JurisdictionFilter.optional(),
|
|
2209
|
+
notifiedBy: UserFilter.optional(),
|
|
2208
2210
|
declaredIn: JurisdictionFilter.optional(),
|
|
2209
2211
|
declaredBy: UserFilter.optional()
|
|
2210
2212
|
}).describe("Options applicable to actions that may take place after DECLARE");
|
|
2211
|
-
var AllRecordScopeOptions =
|
|
2213
|
+
var AllRecordScopeOptions = scopeOptionsDeclaredOrNotified.extend({
|
|
2212
2214
|
registeredIn: JurisdictionFilter.optional(),
|
|
2213
2215
|
registeredBy: UserFilter.optional()
|
|
2214
2216
|
}).describe(
|
|
@@ -2246,6 +2248,8 @@ var ResolvedScopeOptionsPlaceEvent = z3.object({
|
|
|
2246
2248
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
2247
2249
|
);
|
|
2248
2250
|
var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
|
|
2251
|
+
notifiedIn: UUID.nullish(),
|
|
2252
|
+
notifiedBy: z3.string().optional(),
|
|
2249
2253
|
declaredIn: UUID.nullish(),
|
|
2250
2254
|
declaredBy: z3.string().optional()
|
|
2251
2255
|
}).describe(
|
|
@@ -2291,7 +2295,7 @@ var RecordScopeV2 = z3.discriminatedUnion("type", [
|
|
|
2291
2295
|
}),
|
|
2292
2296
|
z3.object({
|
|
2293
2297
|
type: ScopesWithDeclaredOptions,
|
|
2294
|
-
options:
|
|
2298
|
+
options: scopeOptionsDeclaredOrNotified.optional()
|
|
2295
2299
|
}),
|
|
2296
2300
|
z3.object({
|
|
2297
2301
|
type: ScopesWithFullOptions,
|
|
@@ -2412,8 +2416,9 @@ var decodeScope = (encodedScope) => {
|
|
|
2412
2416
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
2413
2417
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
2414
2418
|
accessLevel: JurisdictionFilter.enum.all,
|
|
2415
|
-
|
|
2416
|
-
declaredIn: JurisdictionFilter.enum.all
|
|
2419
|
+
notifiedIn: JurisdictionFilter.enum.all,
|
|
2420
|
+
declaredIn: JurisdictionFilter.enum.all,
|
|
2421
|
+
registeredIn: JurisdictionFilter.enum.all
|
|
2417
2422
|
};
|
|
2418
2423
|
|
|
2419
2424
|
// ../commons/src/scopes.deprecated.do-not-use.ts
|
|
@@ -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
|
|
@@ -1357,6 +1362,7 @@ var RegistrationCreationMetadata = ActionCreationMetadata.extend({
|
|
|
1357
1362
|
)
|
|
1358
1363
|
});
|
|
1359
1364
|
var LegalStatuses = z16.object({
|
|
1365
|
+
[EventStatus.enum.NOTIFIED]: ActionCreationMetadata.nullish(),
|
|
1360
1366
|
[EventStatus.enum.DECLARED]: ActionCreationMetadata.nullish(),
|
|
1361
1367
|
[EventStatus.enum.REGISTERED]: RegistrationCreationMetadata.nullish()
|
|
1362
1368
|
});
|
|
@@ -1416,6 +1422,8 @@ var EventMetadataKeys = z16.enum(EventMetadataKeysArray);
|
|
|
1416
1422
|
var EventMetadataDateFieldIdInput = z16.enum([
|
|
1417
1423
|
"createdAt",
|
|
1418
1424
|
"updatedAt",
|
|
1425
|
+
"legalStatuses.NOTIFIED.createdAt",
|
|
1426
|
+
"legalStatuses.NOTIFIED.acceptedAt",
|
|
1419
1427
|
"legalStatuses.DECLARED.createdAt",
|
|
1420
1428
|
"legalStatuses.DECLARED.acceptedAt",
|
|
1421
1429
|
"legalStatuses.REGISTERED.createdAt",
|
|
@@ -1424,6 +1432,8 @@ var EventMetadataDateFieldIdInput = z16.enum([
|
|
|
1424
1432
|
var EventMetadataDateFieldId = z16.enum([
|
|
1425
1433
|
"event.createdAt",
|
|
1426
1434
|
"event.updatedAt",
|
|
1435
|
+
"event.legalStatuses.NOTIFIED.createdAt",
|
|
1436
|
+
"event.legalStatuses.NOTIFIED.acceptedAt",
|
|
1427
1437
|
"event.legalStatuses.DECLARED.createdAt",
|
|
1428
1438
|
"event.legalStatuses.DECLARED.acceptedAt",
|
|
1429
1439
|
"event.legalStatuses.REGISTERED.createdAt",
|
|
@@ -1483,7 +1493,8 @@ var Range = import_v4.z.object({
|
|
|
1483
1493
|
});
|
|
1484
1494
|
var ContainsFlags = import_v4.z.object({
|
|
1485
1495
|
anyOf: import_v4.z.array(Flag).optional(),
|
|
1486
|
-
noneOf: import_v4.z.array(Flag).optional()
|
|
1496
|
+
noneOf: import_v4.z.array(Flag).optional(),
|
|
1497
|
+
allOf: import_v4.z.array(Flag).optional()
|
|
1487
1498
|
}).meta({
|
|
1488
1499
|
id: "ContainsFlags"
|
|
1489
1500
|
});
|
|
@@ -2670,6 +2681,9 @@ var ActionConfigBase = z24.object({
|
|
|
2670
2681
|
var DeclarationActionBase = ActionConfigBase.extend({
|
|
2671
2682
|
deduplication: DeduplicationConfig.optional()
|
|
2672
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
|
+
);
|
|
2673
2687
|
var ReadActionConfig = ActionConfigBase.extend(
|
|
2674
2688
|
z24.object({
|
|
2675
2689
|
type: z24.literal(ActionType.READ),
|
|
@@ -2681,7 +2695,8 @@ var ReadActionConfig = ActionConfigBase.extend(
|
|
|
2681
2695
|
);
|
|
2682
2696
|
var NotifyConfig = ActionConfigBase.extend(
|
|
2683
2697
|
z24.object({
|
|
2684
|
-
type: z24.literal(ActionType.NOTIFY)
|
|
2698
|
+
type: z24.literal(ActionType.NOTIFY),
|
|
2699
|
+
form: actionConfirmationForm
|
|
2685
2700
|
}).shape
|
|
2686
2701
|
);
|
|
2687
2702
|
var DeclareConfig = DeclarationActionBase.extend(
|
|
@@ -2690,6 +2705,7 @@ var DeclareConfig = DeclarationActionBase.extend(
|
|
|
2690
2705
|
review: DeclarationReviewConfig.describe(
|
|
2691
2706
|
"Configuration of the review page fields."
|
|
2692
2707
|
),
|
|
2708
|
+
form: actionConfirmationForm,
|
|
2693
2709
|
dialogCopy: z24.object({
|
|
2694
2710
|
notify: TranslationConfig.describe(
|
|
2695
2711
|
"Confirmation text for the notify action"
|
|
@@ -2705,7 +2721,8 @@ var DeclareConfig = DeclarationActionBase.extend(
|
|
|
2705
2721
|
);
|
|
2706
2722
|
var ArchiveConfig = ActionConfigBase.extend(
|
|
2707
2723
|
z24.object({
|
|
2708
|
-
type: z24.literal(ActionType.ARCHIVE)
|
|
2724
|
+
type: z24.literal(ActionType.ARCHIVE),
|
|
2725
|
+
form: actionConfirmationForm
|
|
2709
2726
|
}).shape
|
|
2710
2727
|
);
|
|
2711
2728
|
var EditActionConfig = ActionConfigBase.extend(
|
|
@@ -2726,12 +2743,14 @@ var EditActionConfig = ActionConfigBase.extend(
|
|
|
2726
2743
|
);
|
|
2727
2744
|
var RejectConfig = ActionConfigBase.extend(
|
|
2728
2745
|
z24.object({
|
|
2729
|
-
type: z24.literal(ActionType.REJECT)
|
|
2746
|
+
type: z24.literal(ActionType.REJECT),
|
|
2747
|
+
form: actionConfirmationForm
|
|
2730
2748
|
}).shape
|
|
2731
2749
|
);
|
|
2732
2750
|
var RegisterConfig = DeclarationActionBase.extend(
|
|
2733
2751
|
z24.object({
|
|
2734
|
-
type: z24.literal(ActionType.REGISTER)
|
|
2752
|
+
type: z24.literal(ActionType.REGISTER),
|
|
2753
|
+
form: actionConfirmationForm
|
|
2735
2754
|
}).shape
|
|
2736
2755
|
);
|
|
2737
2756
|
var PrintCertificateActionConfig = ActionConfigBase.extend(
|
|
@@ -3205,13 +3224,9 @@ var getActionAnnotationFields = (actionConfig) => {
|
|
|
3205
3224
|
if (actionConfig.type === ActionType.PRINT_CERTIFICATE) {
|
|
3206
3225
|
return actionConfig.printForm.pages.flatMap(({ fields }) => fields);
|
|
3207
3226
|
}
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
if ("review" in actionConfig && actionConfig.review != null) {
|
|
3212
|
-
return actionConfig.review.fields;
|
|
3213
|
-
}
|
|
3214
|
-
return [];
|
|
3227
|
+
const reviewFields = "review" in actionConfig && actionConfig.review != null ? actionConfig.review.fields : [];
|
|
3228
|
+
const formFields = "form" in actionConfig && actionConfig.form != null ? actionConfig.form : [];
|
|
3229
|
+
return [...reviewFields, ...formFields];
|
|
3215
3230
|
};
|
|
3216
3231
|
function getAllAnnotationFields(config) {
|
|
3217
3232
|
return (0, import_lodash.flattenDeep)(config.actions.map(getActionAnnotationFields));
|
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;
|