@opencrvs/toolkit 2.0.0-rc.57f6f6a → 2.0.0-rc.57fff6f
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/dist/application-config/index.js +12 -2
- package/dist/cli.js +8 -3
- package/dist/commons/api/router.d.ts +8 -0
- package/dist/commons/conditionals/conditionals.d.ts +3 -3
- package/dist/commons/events/ActionConfig.d.ts +28 -2
- package/dist/commons/events/AdvancedSearchConfig.d.ts +12 -0
- package/dist/commons/events/EventConfig.d.ts +2 -0
- package/dist/commons/events/EventIndex.d.ts +11 -0
- package/dist/commons/events/EventMetadata.d.ts +26 -0
- package/dist/commons/events/FieldConfig.d.ts +10 -0
- package/dist/commons/events/locations.d.ts +1 -0
- package/dist/commons/events/state/index.d.ts +8 -0
- package/dist/commons/events/state/utils.d.ts +9 -0
- package/dist/conditionals/index.js +7 -2
- package/dist/events/index.js +74 -7
- 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 +8 -3
- package/dist/notification/index.js +48 -4
- package/dist/scopes/index.d.ts +88 -0
- package/dist/scopes/index.js +7 -2
- package/opencrvs-toolkit-2.0.0-rc.57fff6f.tgz +0 -0
- package/package.json +1 -1
- package/opencrvs-toolkit-2.0.0-rc.57f6f6a.tgz +0 -0
|
@@ -666,6 +666,8 @@ var scopeOptionsPlaceEvent = z11.object({
|
|
|
666
666
|
placeOfEvent: JurisdictionFilter.optional()
|
|
667
667
|
}).describe("Options applicable to all record scopes.");
|
|
668
668
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
669
|
+
notifiedIn: JurisdictionFilter.optional(),
|
|
670
|
+
notifiedBy: UserFilter.optional(),
|
|
669
671
|
declaredIn: JurisdictionFilter.optional(),
|
|
670
672
|
declaredBy: UserFilter.optional()
|
|
671
673
|
}).describe("Options applicable to actions that may take place after DECLARE");
|
|
@@ -707,6 +709,8 @@ var ResolvedScopeOptionsPlaceEvent = z11.object({
|
|
|
707
709
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
708
710
|
);
|
|
709
711
|
var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
|
|
712
|
+
notifiedIn: UUID.nullish(),
|
|
713
|
+
notifiedBy: z11.string().optional(),
|
|
710
714
|
declaredIn: UUID.nullish(),
|
|
711
715
|
declaredBy: z11.string().optional()
|
|
712
716
|
}).describe(
|
|
@@ -841,8 +845,9 @@ var EncodedScope = z11.string().brand("EncodedScope");
|
|
|
841
845
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
842
846
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
843
847
|
accessLevel: JurisdictionFilter.enum.all,
|
|
844
|
-
|
|
845
|
-
declaredIn: JurisdictionFilter.enum.all
|
|
848
|
+
notifiedIn: JurisdictionFilter.enum.all,
|
|
849
|
+
declaredIn: JurisdictionFilter.enum.all,
|
|
850
|
+
registeredIn: JurisdictionFilter.enum.all
|
|
846
851
|
};
|
|
847
852
|
|
|
848
853
|
// ../commons/src/authentication.ts
|
|
@@ -1131,6 +1136,7 @@ var RegistrationCreationMetadata = ActionCreationMetadata.extend({
|
|
|
1131
1136
|
)
|
|
1132
1137
|
});
|
|
1133
1138
|
var LegalStatuses = z15.object({
|
|
1139
|
+
[EventStatus.enum.NOTIFIED]: ActionCreationMetadata.nullish(),
|
|
1134
1140
|
[EventStatus.enum.DECLARED]: ActionCreationMetadata.nullish(),
|
|
1135
1141
|
[EventStatus.enum.REGISTERED]: RegistrationCreationMetadata.nullish()
|
|
1136
1142
|
});
|
|
@@ -1190,6 +1196,8 @@ var EventMetadataKeys = z15.enum(EventMetadataKeysArray);
|
|
|
1190
1196
|
var EventMetadataDateFieldIdInput = z15.enum([
|
|
1191
1197
|
"createdAt",
|
|
1192
1198
|
"updatedAt",
|
|
1199
|
+
"legalStatuses.NOTIFIED.createdAt",
|
|
1200
|
+
"legalStatuses.NOTIFIED.acceptedAt",
|
|
1193
1201
|
"legalStatuses.DECLARED.createdAt",
|
|
1194
1202
|
"legalStatuses.DECLARED.acceptedAt",
|
|
1195
1203
|
"legalStatuses.REGISTERED.createdAt",
|
|
@@ -1198,6 +1206,8 @@ var EventMetadataDateFieldIdInput = z15.enum([
|
|
|
1198
1206
|
var EventMetadataDateFieldId = z15.enum([
|
|
1199
1207
|
"event.createdAt",
|
|
1200
1208
|
"event.updatedAt",
|
|
1209
|
+
"event.legalStatuses.NOTIFIED.createdAt",
|
|
1210
|
+
"event.legalStatuses.NOTIFIED.acceptedAt",
|
|
1201
1211
|
"event.legalStatuses.DECLARED.createdAt",
|
|
1202
1212
|
"event.legalStatuses.DECLARED.acceptedAt",
|
|
1203
1213
|
"event.legalStatuses.REGISTERED.createdAt",
|
package/dist/cli.js
CHANGED
|
@@ -2193,6 +2193,8 @@ var scopeOptionsPlaceEvent = z3.object({
|
|
|
2193
2193
|
placeOfEvent: JurisdictionFilter.optional()
|
|
2194
2194
|
}).describe("Options applicable to all record scopes.");
|
|
2195
2195
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
2196
|
+
notifiedIn: JurisdictionFilter.optional(),
|
|
2197
|
+
notifiedBy: UserFilter.optional(),
|
|
2196
2198
|
declaredIn: JurisdictionFilter.optional(),
|
|
2197
2199
|
declaredBy: UserFilter.optional()
|
|
2198
2200
|
}).describe("Options applicable to actions that may take place after DECLARE");
|
|
@@ -2234,6 +2236,8 @@ var ResolvedScopeOptionsPlaceEvent = z3.object({
|
|
|
2234
2236
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
2235
2237
|
);
|
|
2236
2238
|
var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
|
|
2239
|
+
notifiedIn: UUID.nullish(),
|
|
2240
|
+
notifiedBy: z3.string().optional(),
|
|
2237
2241
|
declaredIn: UUID.nullish(),
|
|
2238
2242
|
declaredBy: z3.string().optional()
|
|
2239
2243
|
}).describe(
|
|
@@ -2400,8 +2404,9 @@ var decodeScope = (encodedScope) => {
|
|
|
2400
2404
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
2401
2405
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
2402
2406
|
accessLevel: JurisdictionFilter.enum.all,
|
|
2403
|
-
|
|
2404
|
-
declaredIn: JurisdictionFilter.enum.all
|
|
2407
|
+
notifiedIn: JurisdictionFilter.enum.all,
|
|
2408
|
+
declaredIn: JurisdictionFilter.enum.all,
|
|
2409
|
+
registeredIn: JurisdictionFilter.enum.all
|
|
2405
2410
|
};
|
|
2406
2411
|
|
|
2407
2412
|
// ../commons/src/scopes.deprecated.do-not-use.ts
|
|
@@ -4300,7 +4305,7 @@ Saved ${handlerRelPath}.`);
|
|
|
4300
4305
|
// src/migrations/v2.0/checkout-upstream-files.ts
|
|
4301
4306
|
var import_child_process = require("child_process");
|
|
4302
4307
|
var UPSTREAM_URL = "https://github.com/opencrvs/opencrvs-countryconfig.git";
|
|
4303
|
-
var UPSTREAM_BRANCH = "release
|
|
4308
|
+
var UPSTREAM_BRANCH = "release/2.0.0";
|
|
4304
4309
|
var TEMP_REMOTE = "opencrvs-upgrade-v19-v20-codemod";
|
|
4305
4310
|
var FILES_TO_CHECKOUT = [
|
|
4306
4311
|
"src/analytics/analytics.ts",
|
|
@@ -6749,6 +6749,14 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
6749
6749
|
type: string;
|
|
6750
6750
|
status: "CREATED" | "NOTIFIED" | "DECLARED" | "REGISTERED" | "ARCHIVED";
|
|
6751
6751
|
legalStatuses: {
|
|
6752
|
+
NOTIFIED?: {
|
|
6753
|
+
createdAt: string;
|
|
6754
|
+
createdBy: string;
|
|
6755
|
+
acceptedAt: string;
|
|
6756
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
6757
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
|
6758
|
+
createdByRole?: string | undefined;
|
|
6759
|
+
} | null | undefined;
|
|
6752
6760
|
DECLARED?: {
|
|
6753
6761
|
createdAt: string;
|
|
6754
6762
|
createdBy: string;
|
|
@@ -94,16 +94,16 @@ export declare const user: typeof userSerializer & {
|
|
|
94
94
|
scope: (scope: import("../scopes").ScopeType) => {
|
|
95
95
|
attribute: (option: import("../scopes").ScopeOptionKey) => {
|
|
96
96
|
$scope: "record.search" | "record.create" | "record.read" | "record.declare" | "record.notify" | "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register" | "record.print-certified-copies" | "record.request-correction" | "record.correct" | "record.unassign-others" | "record.custom-action" | "bypassratelimit" | "record.reindex" | "user.data-seeding" | "integration.create" | "record.import" | "config.update-all" | "attachment.upload" | "profile.electronic-signature" | "user.read-only-my-audit" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "record.confirm-registration" | "record.reject-registration" | "organisation.read-locations" | "user.read" | "user.create" | "user.edit" | "user.search" | "workqueue" | "dashboard.view";
|
|
97
|
-
$option: "role" | "event" | "placeOfEvent" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
|
|
97
|
+
$option: "role" | "event" | "placeOfEvent" | "notifiedIn" | "notifiedBy" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
|
|
98
98
|
};
|
|
99
99
|
};
|
|
100
100
|
jurisdiction: (jurisdiction: import("../scopes").JurisdictionFilter | {
|
|
101
101
|
$scope: "record.search" | "record.create" | "record.read" | "record.declare" | "record.notify" | "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register" | "record.print-certified-copies" | "record.request-correction" | "record.correct" | "record.unassign-others" | "record.custom-action" | "bypassratelimit" | "record.reindex" | "user.data-seeding" | "integration.create" | "record.import" | "config.update-all" | "attachment.upload" | "profile.electronic-signature" | "user.read-only-my-audit" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "record.confirm-registration" | "record.reject-registration" | "organisation.read-locations" | "user.read" | "user.create" | "user.edit" | "user.search" | "workqueue" | "dashboard.view";
|
|
102
|
-
$option: "role" | "event" | "placeOfEvent" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
|
|
102
|
+
$option: "role" | "event" | "placeOfEvent" | "notifiedIn" | "notifiedBy" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
|
|
103
103
|
}) => {
|
|
104
104
|
$jurisdiction: "administrativeArea" | "location" | "all" | {
|
|
105
105
|
$scope: "record.search" | "record.create" | "record.read" | "record.declare" | "record.notify" | "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register" | "record.print-certified-copies" | "record.request-correction" | "record.correct" | "record.unassign-others" | "record.custom-action" | "bypassratelimit" | "record.reindex" | "user.data-seeding" | "integration.create" | "record.import" | "config.update-all" | "attachment.upload" | "profile.electronic-signature" | "user.read-only-my-audit" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "record.confirm-registration" | "record.reject-registration" | "organisation.read-locations" | "user.read" | "user.create" | "user.edit" | "user.search" | "workqueue" | "dashboard.view";
|
|
106
|
-
$option: "role" | "event" | "placeOfEvent" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
|
|
106
|
+
$option: "role" | "event" | "placeOfEvent" | "notifiedIn" | "notifiedBy" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
|
|
107
107
|
};
|
|
108
108
|
};
|
|
109
109
|
};
|
|
@@ -85,6 +85,32 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
85
85
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
86
86
|
}, z.core.$strip>;
|
|
87
87
|
conditionals: z.ZodOptional<z.ZodNever>;
|
|
88
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
89
|
+
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
90
|
+
flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
91
|
+
id: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
92
|
+
readonly INCOMPLETE: "incomplete";
|
|
93
|
+
readonly REJECTED: "rejected";
|
|
94
|
+
readonly CORRECTION_REQUESTED: "correction-requested";
|
|
95
|
+
readonly POTENTIAL_DUPLICATE: "potential-duplicate";
|
|
96
|
+
readonly EDIT_IN_PROGRESS: "edit-in-progress";
|
|
97
|
+
}>]>, z.ZodString]>;
|
|
98
|
+
operation: z.ZodEnum<{
|
|
99
|
+
add: "add";
|
|
100
|
+
remove: "remove";
|
|
101
|
+
}>;
|
|
102
|
+
conditional: z.ZodOptional<z.ZodAny>;
|
|
103
|
+
}, z.core.$strip>>>>;
|
|
104
|
+
supportingCopy: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>>;
|
|
105
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
106
|
+
conditionals: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
107
|
+
type: z.ZodLiteral<"SHOW">;
|
|
108
|
+
conditional: z.ZodAny;
|
|
109
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
110
|
+
type: z.ZodLiteral<"ENABLE">;
|
|
111
|
+
conditional: z.ZodAny;
|
|
112
|
+
}, z.core.$strip>], "type">>>;
|
|
113
|
+
type: z.ZodLiteral<"NOTIFY">;
|
|
88
114
|
}, z.core.$strip>, z.ZodObject<{
|
|
89
115
|
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
90
116
|
flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -388,8 +414,8 @@ export declare const actionConfigTypes: Set<ActionConfigTypes>;
|
|
|
388
414
|
*
|
|
389
415
|
* These are not the same as the broader workflow `action.type` values.
|
|
390
416
|
* `ActionConfigTypes` includes only the action kinds that can be defined
|
|
391
|
-
* in the country configuration (e.g. DECLARE, VALIDATE, CUSTOM), and
|
|
392
|
-
* excludes workflow-only types such as CREATE
|
|
417
|
+
* in the country configuration (e.g. NOTIFY, DECLARE, VALIDATE, CUSTOM), and
|
|
418
|
+
* excludes workflow-only types such as CREATE.
|
|
393
419
|
*/
|
|
394
420
|
export type ActionConfigTypes = ActionConfig['type'];
|
|
395
421
|
export declare const DeclarationActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -139,6 +139,8 @@ export declare const FieldConfigSchema: z.ZodObject<{
|
|
|
139
139
|
role: "role";
|
|
140
140
|
event: "event";
|
|
141
141
|
placeOfEvent: "placeOfEvent";
|
|
142
|
+
notifiedIn: "notifiedIn";
|
|
143
|
+
notifiedBy: "notifiedBy";
|
|
142
144
|
declaredIn: "declaredIn";
|
|
143
145
|
declaredBy: "declaredBy";
|
|
144
146
|
registeredIn: "registeredIn";
|
|
@@ -316,6 +318,8 @@ export declare const EventFieldConfigSchema: z.ZodObject<{
|
|
|
316
318
|
role: "role";
|
|
317
319
|
event: "event";
|
|
318
320
|
placeOfEvent: "placeOfEvent";
|
|
321
|
+
notifiedIn: "notifiedIn";
|
|
322
|
+
notifiedBy: "notifiedBy";
|
|
319
323
|
declaredIn: "declaredIn";
|
|
320
324
|
declaredBy: "declaredBy";
|
|
321
325
|
registeredIn: "registeredIn";
|
|
@@ -469,6 +473,8 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
469
473
|
role: "role";
|
|
470
474
|
event: "event";
|
|
471
475
|
placeOfEvent: "placeOfEvent";
|
|
476
|
+
notifiedIn: "notifiedIn";
|
|
477
|
+
notifiedBy: "notifiedBy";
|
|
472
478
|
declaredIn: "declaredIn";
|
|
473
479
|
declaredBy: "declaredBy";
|
|
474
480
|
registeredIn: "registeredIn";
|
|
@@ -614,6 +620,8 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
614
620
|
role: "role";
|
|
615
621
|
event: "event";
|
|
616
622
|
placeOfEvent: "placeOfEvent";
|
|
623
|
+
notifiedIn: "notifiedIn";
|
|
624
|
+
notifiedBy: "notifiedBy";
|
|
617
625
|
declaredIn: "declaredIn";
|
|
618
626
|
declaredBy: "declaredBy";
|
|
619
627
|
registeredIn: "registeredIn";
|
|
@@ -770,6 +778,8 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
|
770
778
|
role: "role";
|
|
771
779
|
event: "event";
|
|
772
780
|
placeOfEvent: "placeOfEvent";
|
|
781
|
+
notifiedIn: "notifiedIn";
|
|
782
|
+
notifiedBy: "notifiedBy";
|
|
773
783
|
declaredIn: "declaredIn";
|
|
774
784
|
declaredBy: "declaredBy";
|
|
775
785
|
registeredIn: "registeredIn";
|
|
@@ -915,6 +925,8 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
|
915
925
|
role: "role";
|
|
916
926
|
event: "event";
|
|
917
927
|
placeOfEvent: "placeOfEvent";
|
|
928
|
+
notifiedIn: "notifiedIn";
|
|
929
|
+
notifiedBy: "notifiedBy";
|
|
918
930
|
declaredIn: "declaredIn";
|
|
919
931
|
declaredBy: "declaredBy";
|
|
920
932
|
registeredIn: "registeredIn";
|
|
@@ -10,6 +10,8 @@ export declare const EventFieldReference: z.ZodObject<{
|
|
|
10
10
|
$$event: z.ZodEnum<{
|
|
11
11
|
updatedAt: "updatedAt";
|
|
12
12
|
createdAt: "createdAt";
|
|
13
|
+
"legalStatuses.NOTIFIED.createdAt": "legalStatuses.NOTIFIED.createdAt";
|
|
14
|
+
"legalStatuses.NOTIFIED.acceptedAt": "legalStatuses.NOTIFIED.acceptedAt";
|
|
13
15
|
"legalStatuses.DECLARED.createdAt": "legalStatuses.DECLARED.createdAt";
|
|
14
16
|
"legalStatuses.DECLARED.acceptedAt": "legalStatuses.DECLARED.acceptedAt";
|
|
15
17
|
"legalStatuses.REGISTERED.createdAt": "legalStatuses.REGISTERED.createdAt";
|
|
@@ -10,6 +10,17 @@ export declare const EventIndex: z.ZodObject<{
|
|
|
10
10
|
ARCHIVED: "ARCHIVED";
|
|
11
11
|
}>;
|
|
12
12
|
legalStatuses: z.ZodObject<{
|
|
13
|
+
NOTIFIED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
14
|
+
createdAt: z.ZodISODateTime;
|
|
15
|
+
createdBy: z.ZodString;
|
|
16
|
+
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
17
|
+
createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
18
|
+
user: "user";
|
|
19
|
+
system: "system";
|
|
20
|
+
}>>>;
|
|
21
|
+
acceptedAt: z.ZodISODateTime;
|
|
22
|
+
createdByRole: z.ZodOptional<z.ZodString>;
|
|
23
|
+
}, z.core.$strip>>>;
|
|
13
24
|
DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
14
25
|
createdAt: z.ZodISODateTime;
|
|
15
26
|
createdBy: z.ZodString;
|
|
@@ -39,6 +39,17 @@ export declare const RegistrationCreationMetadata: z.ZodObject<{
|
|
|
39
39
|
}, z.core.$strip>;
|
|
40
40
|
export type RegistrationCreationMetadata = z.infer<typeof RegistrationCreationMetadata>;
|
|
41
41
|
export declare const LegalStatuses: z.ZodObject<{
|
|
42
|
+
NOTIFIED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
43
|
+
createdAt: z.ZodISODateTime;
|
|
44
|
+
createdBy: z.ZodString;
|
|
45
|
+
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
46
|
+
createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
47
|
+
user: "user";
|
|
48
|
+
system: "system";
|
|
49
|
+
}>>>;
|
|
50
|
+
acceptedAt: z.ZodISODateTime;
|
|
51
|
+
createdByRole: z.ZodOptional<z.ZodString>;
|
|
52
|
+
}, z.core.$strip>>>;
|
|
42
53
|
DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
43
54
|
createdAt: z.ZodISODateTime;
|
|
44
55
|
createdBy: z.ZodString;
|
|
@@ -79,6 +90,17 @@ export declare const EventMetadata: z.ZodObject<{
|
|
|
79
90
|
ARCHIVED: "ARCHIVED";
|
|
80
91
|
}>;
|
|
81
92
|
legalStatuses: z.ZodObject<{
|
|
93
|
+
NOTIFIED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
94
|
+
createdAt: z.ZodISODateTime;
|
|
95
|
+
createdBy: z.ZodString;
|
|
96
|
+
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
97
|
+
createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
98
|
+
user: "user";
|
|
99
|
+
system: "system";
|
|
100
|
+
}>>>;
|
|
101
|
+
acceptedAt: z.ZodISODateTime;
|
|
102
|
+
createdByRole: z.ZodOptional<z.ZodString>;
|
|
103
|
+
}, z.core.$strip>>>;
|
|
82
104
|
DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
83
105
|
createdAt: z.ZodISODateTime;
|
|
84
106
|
createdBy: z.ZodString;
|
|
@@ -161,6 +183,8 @@ export declare const eventMetadataLabelMap: Record<Exclude<`event.${EventMetadat
|
|
|
161
183
|
export declare const EventMetadataDateFieldIdInput: z.ZodEnum<{
|
|
162
184
|
updatedAt: "updatedAt";
|
|
163
185
|
createdAt: "createdAt";
|
|
186
|
+
"legalStatuses.NOTIFIED.createdAt": "legalStatuses.NOTIFIED.createdAt";
|
|
187
|
+
"legalStatuses.NOTIFIED.acceptedAt": "legalStatuses.NOTIFIED.acceptedAt";
|
|
164
188
|
"legalStatuses.DECLARED.createdAt": "legalStatuses.DECLARED.createdAt";
|
|
165
189
|
"legalStatuses.DECLARED.acceptedAt": "legalStatuses.DECLARED.acceptedAt";
|
|
166
190
|
"legalStatuses.REGISTERED.createdAt": "legalStatuses.REGISTERED.createdAt";
|
|
@@ -170,6 +194,8 @@ export type EventMetadataDateFieldIdInput = z.infer<typeof EventMetadataDateFiel
|
|
|
170
194
|
export declare const EventMetadataDateFieldId: z.ZodEnum<{
|
|
171
195
|
"event.updatedAt": "event.updatedAt";
|
|
172
196
|
"event.createdAt": "event.createdAt";
|
|
197
|
+
"event.legalStatuses.NOTIFIED.createdAt": "event.legalStatuses.NOTIFIED.createdAt";
|
|
198
|
+
"event.legalStatuses.NOTIFIED.acceptedAt": "event.legalStatuses.NOTIFIED.acceptedAt";
|
|
173
199
|
"event.legalStatuses.DECLARED.createdAt": "event.legalStatuses.DECLARED.createdAt";
|
|
174
200
|
"event.legalStatuses.DECLARED.acceptedAt": "event.legalStatuses.DECLARED.acceptedAt";
|
|
175
201
|
"event.legalStatuses.REGISTERED.createdAt": "event.legalStatuses.REGISTERED.createdAt";
|
|
@@ -1919,6 +1919,8 @@ declare const AdministrativeAreaField: z.ZodObject<{
|
|
|
1919
1919
|
role: "role";
|
|
1920
1920
|
event: "event";
|
|
1921
1921
|
placeOfEvent: "placeOfEvent";
|
|
1922
|
+
notifiedIn: "notifiedIn";
|
|
1923
|
+
notifiedBy: "notifiedBy";
|
|
1922
1924
|
declaredIn: "declaredIn";
|
|
1923
1925
|
declaredBy: "declaredBy";
|
|
1924
1926
|
registeredIn: "registeredIn";
|
|
@@ -2045,6 +2047,8 @@ declare const LocationInput: z.ZodObject<{
|
|
|
2045
2047
|
role: "role";
|
|
2046
2048
|
event: "event";
|
|
2047
2049
|
placeOfEvent: "placeOfEvent";
|
|
2050
|
+
notifiedIn: "notifiedIn";
|
|
2051
|
+
notifiedBy: "notifiedBy";
|
|
2048
2052
|
declaredIn: "declaredIn";
|
|
2049
2053
|
declaredBy: "declaredBy";
|
|
2050
2054
|
registeredIn: "registeredIn";
|
|
@@ -2242,6 +2246,8 @@ declare const Facility: z.ZodObject<{
|
|
|
2242
2246
|
role: "role";
|
|
2243
2247
|
event: "event";
|
|
2244
2248
|
placeOfEvent: "placeOfEvent";
|
|
2249
|
+
notifiedIn: "notifiedIn";
|
|
2250
|
+
notifiedBy: "notifiedBy";
|
|
2245
2251
|
declaredIn: "declaredIn";
|
|
2246
2252
|
declaredBy: "declaredBy";
|
|
2247
2253
|
registeredIn: "registeredIn";
|
|
@@ -2354,6 +2360,8 @@ declare const Office: z.ZodObject<{
|
|
|
2354
2360
|
role: "role";
|
|
2355
2361
|
event: "event";
|
|
2356
2362
|
placeOfEvent: "placeOfEvent";
|
|
2363
|
+
notifiedIn: "notifiedIn";
|
|
2364
|
+
notifiedBy: "notifiedBy";
|
|
2357
2365
|
declaredIn: "declaredIn";
|
|
2358
2366
|
declaredBy: "declaredBy";
|
|
2359
2367
|
registeredIn: "registeredIn";
|
|
@@ -2552,6 +2560,8 @@ declare const Address: z.ZodObject<{
|
|
|
2552
2560
|
role: "role";
|
|
2553
2561
|
event: "event";
|
|
2554
2562
|
placeOfEvent: "placeOfEvent";
|
|
2563
|
+
notifiedIn: "notifiedIn";
|
|
2564
|
+
notifiedBy: "notifiedBy";
|
|
2555
2565
|
declaredIn: "declaredIn";
|
|
2556
2566
|
declaredBy: "declaredBy";
|
|
2557
2567
|
registeredIn: "registeredIn";
|
|
@@ -40,6 +40,7 @@ type ToArrayFields<T, K extends PropertyKey> = T extends unknown ? T extends obj
|
|
|
40
40
|
*/
|
|
41
41
|
export type EventIndexWithAdministrativeHierarchy = Omit<ToArrayFields<EventIndex, 'createdAtLocation' | 'updatedAtLocation' | 'placeOfEvent'>, 'legalStatuses'> & {
|
|
42
42
|
legalStatuses: {
|
|
43
|
+
NOTIFIED: ToArrayFields<ActionCreationMetadata, 'createdAtLocation'> | undefined;
|
|
43
44
|
DECLARED: ToArrayFields<ActionCreationMetadata, 'createdAtLocation'> | undefined;
|
|
44
45
|
REGISTERED: ToArrayFields<RegistrationCreationMetadata, 'createdAtLocation'> | undefined;
|
|
45
46
|
};
|
|
@@ -65,6 +65,14 @@ export declare function applyDraftToEventIndex(eventIndex: EventIndex, draft: Dr
|
|
|
65
65
|
type: string;
|
|
66
66
|
status: "CREATED" | "NOTIFIED" | "DECLARED" | "REGISTERED" | "ARCHIVED";
|
|
67
67
|
legalStatuses: {
|
|
68
|
+
NOTIFIED?: {
|
|
69
|
+
createdAt: string;
|
|
70
|
+
createdBy: string;
|
|
71
|
+
acceptedAt: string;
|
|
72
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
73
|
+
createdByUserType?: "user" | "system" | null | undefined;
|
|
74
|
+
createdByRole?: string | undefined;
|
|
75
|
+
} | null | undefined;
|
|
68
76
|
DECLARED?: {
|
|
69
77
|
createdAt: string;
|
|
70
78
|
createdBy: string;
|
|
@@ -30,6 +30,15 @@ export declare function getActionUpdateMetadata(actions: Action[]): Pick<{
|
|
|
30
30
|
* @see EventIndex for the description of the returned object.
|
|
31
31
|
*/
|
|
32
32
|
export declare function getLegalStatuses(actions: Action[]): {
|
|
33
|
+
NOTIFIED: {
|
|
34
|
+
createdAt: string;
|
|
35
|
+
createdBy: string;
|
|
36
|
+
createdByUserType: "user" | "system";
|
|
37
|
+
createdAtLocation: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
38
|
+
acceptedAt: string;
|
|
39
|
+
createdByRole: string | undefined;
|
|
40
|
+
registrationNumber: string | null | undefined;
|
|
41
|
+
} | null;
|
|
33
42
|
DECLARED: {
|
|
34
43
|
createdAt: string;
|
|
35
44
|
createdBy: string;
|
|
@@ -192,6 +192,8 @@ var scopeOptionsPlaceEvent = z6.object({
|
|
|
192
192
|
placeOfEvent: JurisdictionFilter.optional()
|
|
193
193
|
}).describe("Options applicable to all record scopes.");
|
|
194
194
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
195
|
+
notifiedIn: JurisdictionFilter.optional(),
|
|
196
|
+
notifiedBy: UserFilter.optional(),
|
|
195
197
|
declaredIn: JurisdictionFilter.optional(),
|
|
196
198
|
declaredBy: UserFilter.optional()
|
|
197
199
|
}).describe("Options applicable to actions that may take place after DECLARE");
|
|
@@ -233,6 +235,8 @@ var ResolvedScopeOptionsPlaceEvent = z6.object({
|
|
|
233
235
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
234
236
|
);
|
|
235
237
|
var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
|
|
238
|
+
notifiedIn: UUID.nullish(),
|
|
239
|
+
notifiedBy: z6.string().optional(),
|
|
236
240
|
declaredIn: UUID.nullish(),
|
|
237
241
|
declaredBy: z6.string().optional()
|
|
238
242
|
}).describe(
|
|
@@ -367,8 +371,9 @@ var EncodedScope2 = z6.string().brand("EncodedScope");
|
|
|
367
371
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
368
372
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
369
373
|
accessLevel: JurisdictionFilter.enum.all,
|
|
370
|
-
|
|
371
|
-
declaredIn: JurisdictionFilter.enum.all
|
|
374
|
+
notifiedIn: JurisdictionFilter.enum.all,
|
|
375
|
+
declaredIn: JurisdictionFilter.enum.all,
|
|
376
|
+
registeredIn: JurisdictionFilter.enum.all
|
|
372
377
|
};
|
|
373
378
|
|
|
374
379
|
// ../commons/src/users/userReferences.ts
|
package/dist/events/index.js
CHANGED
|
@@ -521,6 +521,8 @@ var scopeOptionsPlaceEvent = z2.object({
|
|
|
521
521
|
placeOfEvent: JurisdictionFilter.optional()
|
|
522
522
|
}).describe("Options applicable to all record scopes.");
|
|
523
523
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
524
|
+
notifiedIn: JurisdictionFilter.optional(),
|
|
525
|
+
notifiedBy: UserFilter.optional(),
|
|
524
526
|
declaredIn: JurisdictionFilter.optional(),
|
|
525
527
|
declaredBy: UserFilter.optional()
|
|
526
528
|
}).describe("Options applicable to actions that may take place after DECLARE");
|
|
@@ -562,6 +564,8 @@ var ResolvedScopeOptionsPlaceEvent = z2.object({
|
|
|
562
564
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
563
565
|
);
|
|
564
566
|
var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
|
|
567
|
+
notifiedIn: UUID.nullish(),
|
|
568
|
+
notifiedBy: z2.string().optional(),
|
|
565
569
|
declaredIn: UUID.nullish(),
|
|
566
570
|
declaredBy: z2.string().optional()
|
|
567
571
|
}).describe(
|
|
@@ -730,8 +734,9 @@ var decodeScope = (encodedScope) => {
|
|
|
730
734
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
731
735
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
732
736
|
accessLevel: JurisdictionFilter.enum.all,
|
|
733
|
-
|
|
734
|
-
declaredIn: JurisdictionFilter.enum.all
|
|
737
|
+
notifiedIn: JurisdictionFilter.enum.all,
|
|
738
|
+
declaredIn: JurisdictionFilter.enum.all,
|
|
739
|
+
registeredIn: JurisdictionFilter.enum.all
|
|
735
740
|
};
|
|
736
741
|
function getAcceptedScopesByType({
|
|
737
742
|
acceptedScopes,
|
|
@@ -1815,6 +1820,7 @@ var RegistrationCreationMetadata = ActionCreationMetadata.extend({
|
|
|
1815
1820
|
)
|
|
1816
1821
|
});
|
|
1817
1822
|
var LegalStatuses = z16.object({
|
|
1823
|
+
[EventStatus.enum.NOTIFIED]: ActionCreationMetadata.nullish(),
|
|
1818
1824
|
[EventStatus.enum.DECLARED]: ActionCreationMetadata.nullish(),
|
|
1819
1825
|
[EventStatus.enum.REGISTERED]: RegistrationCreationMetadata.nullish()
|
|
1820
1826
|
});
|
|
@@ -1956,6 +1962,8 @@ var eventMetadataLabelMap = {
|
|
|
1956
1962
|
var EventMetadataDateFieldIdInput = z16.enum([
|
|
1957
1963
|
"createdAt",
|
|
1958
1964
|
"updatedAt",
|
|
1965
|
+
"legalStatuses.NOTIFIED.createdAt",
|
|
1966
|
+
"legalStatuses.NOTIFIED.acceptedAt",
|
|
1959
1967
|
"legalStatuses.DECLARED.createdAt",
|
|
1960
1968
|
"legalStatuses.DECLARED.acceptedAt",
|
|
1961
1969
|
"legalStatuses.REGISTERED.createdAt",
|
|
@@ -1964,6 +1972,8 @@ var EventMetadataDateFieldIdInput = z16.enum([
|
|
|
1964
1972
|
var EventMetadataDateFieldId = z16.enum([
|
|
1965
1973
|
"event.createdAt",
|
|
1966
1974
|
"event.updatedAt",
|
|
1975
|
+
"event.legalStatuses.NOTIFIED.createdAt",
|
|
1976
|
+
"event.legalStatuses.NOTIFIED.acceptedAt",
|
|
1967
1977
|
"event.legalStatuses.DECLARED.createdAt",
|
|
1968
1978
|
"event.legalStatuses.DECLARED.acceptedAt",
|
|
1969
1979
|
"event.legalStatuses.REGISTERED.createdAt",
|
|
@@ -3222,6 +3232,11 @@ var ReadActionConfig = ActionConfigBase.extend(
|
|
|
3222
3232
|
conditionals: z24.never().optional().describe("Read-action can not be disabled or hidden with conditionals.")
|
|
3223
3233
|
}).shape
|
|
3224
3234
|
);
|
|
3235
|
+
var NotifyConfig = ActionConfigBase.extend(
|
|
3236
|
+
z24.object({
|
|
3237
|
+
type: z24.literal(ActionType.NOTIFY)
|
|
3238
|
+
}).shape
|
|
3239
|
+
);
|
|
3225
3240
|
var DeclareConfig = DeclarationActionBase.extend(
|
|
3226
3241
|
z24.object({
|
|
3227
3242
|
type: z24.literal(ActionType.DECLARE),
|
|
@@ -3306,9 +3321,13 @@ var ActionConfig = z24.discriminatedUnion("type", [
|
|
|
3306
3321
|
id: "ReadActionConfig",
|
|
3307
3322
|
description: "Configuration for the read action \u2014 defines the record-tab content displayed on the event overview page."
|
|
3308
3323
|
}),
|
|
3324
|
+
NotifyConfig.meta({
|
|
3325
|
+
id: "NotifyActionConfig",
|
|
3326
|
+
description: "Configuration for the notify action. When present, NOTIFY uses this config independently from DECLARE. When absent, NOTIFY falls back to the DeclareActionConfig."
|
|
3327
|
+
}),
|
|
3309
3328
|
DeclareConfig.meta({
|
|
3310
3329
|
id: "DeclareActionConfig",
|
|
3311
|
-
description: "Configuration for the declare action. Includes review-page fields.
|
|
3330
|
+
description: "Configuration for the declare action. Includes review-page fields. NOTIFY falls back to this config when no dedicated NotifyActionConfig is provided."
|
|
3312
3331
|
}),
|
|
3313
3332
|
RejectConfig.meta({
|
|
3314
3333
|
id: "RejectActionConfig",
|
|
@@ -4477,13 +4496,13 @@ function getActionConfig({
|
|
|
4477
4496
|
actionType,
|
|
4478
4497
|
customActionType
|
|
4479
4498
|
}) {
|
|
4499
|
+
if (actionType === ActionType.NOTIFY) {
|
|
4500
|
+
return eventConfiguration.actions.find((a) => a.type === ActionType.NOTIFY) ?? eventConfiguration.actions.find((a) => a.type === ActionType.DECLARE);
|
|
4501
|
+
}
|
|
4480
4502
|
return eventConfiguration.actions.find((a) => {
|
|
4481
4503
|
if (a.type === ActionType.CUSTOM && customActionType) {
|
|
4482
4504
|
return a.customActionType === customActionType;
|
|
4483
4505
|
}
|
|
4484
|
-
if (actionType === ActionType.NOTIFY) {
|
|
4485
|
-
return a.type === ActionType.DECLARE;
|
|
4486
|
-
}
|
|
4487
4506
|
if (actionType === ActionType.APPROVE_CORRECTION || actionType === ActionType.REJECT_CORRECTION) {
|
|
4488
4507
|
return a.type === ActionType.REQUEST_CORRECTION;
|
|
4489
4508
|
}
|
|
@@ -4520,7 +4539,7 @@ var getActionAnnotationFields = (actionConfig) => {
|
|
|
4520
4539
|
if (actionConfig.type === ActionType.CUSTOM) {
|
|
4521
4540
|
return actionConfig.form;
|
|
4522
4541
|
}
|
|
4523
|
-
if ("review" in actionConfig) {
|
|
4542
|
+
if ("review" in actionConfig && actionConfig.review != null) {
|
|
4524
4543
|
return actionConfig.review.fields;
|
|
4525
4544
|
}
|
|
4526
4545
|
return [];
|
|
@@ -6521,6 +6540,10 @@ function getActionUpdateMetadata(actions) {
|
|
|
6521
6540
|
}
|
|
6522
6541
|
function getLegalStatuses(actions) {
|
|
6523
6542
|
return {
|
|
6543
|
+
[EventStatus.enum.NOTIFIED]: getDeclarationActionCreationMetadata(
|
|
6544
|
+
ActionType.NOTIFY,
|
|
6545
|
+
actions
|
|
6546
|
+
),
|
|
6524
6547
|
[EventStatus.enum.DECLARED]: getDeclarationActionCreationMetadata(
|
|
6525
6548
|
ActionType.DECLARE,
|
|
6526
6549
|
actions
|
|
@@ -8284,6 +8307,20 @@ var tennisClubMembershipEvent = defineConfig({
|
|
|
8284
8307
|
},
|
|
8285
8308
|
review: TENNIS_CLUB_DECLARATION_REVIEW
|
|
8286
8309
|
},
|
|
8310
|
+
{
|
|
8311
|
+
type: ActionType.NOTIFY,
|
|
8312
|
+
label: {
|
|
8313
|
+
defaultMessage: "Notify health worker",
|
|
8314
|
+
description: "This is shown as the action name anywhere the user can trigger the action from",
|
|
8315
|
+
id: "event.tennis-club-membership.action.notify.label"
|
|
8316
|
+
},
|
|
8317
|
+
flags: [
|
|
8318
|
+
{
|
|
8319
|
+
id: "health-worker-notified",
|
|
8320
|
+
operation: "add"
|
|
8321
|
+
}
|
|
8322
|
+
]
|
|
8323
|
+
},
|
|
8287
8324
|
{
|
|
8288
8325
|
type: ActionType.REJECT,
|
|
8289
8326
|
label: {
|
|
@@ -8526,6 +8563,17 @@ var tennisClubMembershipEvent = defineConfig({
|
|
|
8526
8563
|
}
|
|
8527
8564
|
}
|
|
8528
8565
|
],
|
|
8566
|
+
flags: [
|
|
8567
|
+
{
|
|
8568
|
+
id: "health-worker-notified",
|
|
8569
|
+
requiresAction: false,
|
|
8570
|
+
label: {
|
|
8571
|
+
id: "event.tennis-club-membership.flag.health-worker-notified.label",
|
|
8572
|
+
defaultMessage: "Health worker notified",
|
|
8573
|
+
description: "Label for the health-worker-notified flag"
|
|
8574
|
+
}
|
|
8575
|
+
}
|
|
8576
|
+
],
|
|
8529
8577
|
advancedSearch: [
|
|
8530
8578
|
{
|
|
8531
8579
|
title: {
|
|
@@ -10311,6 +10359,25 @@ function canAccessEventWithScope(event2, scope, user2, customActionType) {
|
|
|
10311
10359
|
}
|
|
10312
10360
|
if (scopeUsesDeclaredOptions(scope)) {
|
|
10313
10361
|
const { options } = scope;
|
|
10362
|
+
if (options?.notifiedBy === UserFilter.enum.user) {
|
|
10363
|
+
if (event2.legalStatuses?.NOTIFIED?.createdBy !== user2.id) {
|
|
10364
|
+
return false;
|
|
10365
|
+
}
|
|
10366
|
+
}
|
|
10367
|
+
if (options?.notifiedIn === JurisdictionFilter.enum.location && !matchesJurisdictionFilter(
|
|
10368
|
+
event2.legalStatuses?.NOTIFIED?.createdAtLocation,
|
|
10369
|
+
JurisdictionFilter.enum.location,
|
|
10370
|
+
user2
|
|
10371
|
+
)) {
|
|
10372
|
+
return false;
|
|
10373
|
+
}
|
|
10374
|
+
if (options?.notifiedIn === JurisdictionFilter.enum.administrativeArea && !matchesJurisdictionFilter(
|
|
10375
|
+
event2.legalStatuses?.NOTIFIED?.createdAtLocation,
|
|
10376
|
+
JurisdictionFilter.enum.administrativeArea,
|
|
10377
|
+
user2
|
|
10378
|
+
)) {
|
|
10379
|
+
return false;
|
|
10380
|
+
}
|
|
10314
10381
|
if (options?.declaredBy === UserFilter.enum.user) {
|
|
10315
10382
|
if (event2.legalStatuses?.DECLARED?.createdBy !== user2.id) {
|
|
10316
10383
|
return false;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const UPSTREAM_URL = "https://github.com/opencrvs/opencrvs-countryconfig.git";
|
|
2
|
-
export declare const UPSTREAM_BRANCH = "release
|
|
2
|
+
export declare const UPSTREAM_BRANCH = "release/2.0.0";
|
|
3
3
|
/**
|
|
4
4
|
* Runs a git command in the country config working directory.
|
|
5
5
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout-upstream-files.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/checkout-upstream-files.ts"],"names":[],"mappings":"AA8CA,eAAO,MAAM,YAAY,2DACiC,CAAA;AAE1D,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"checkout-upstream-files.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/checkout-upstream-files.ts"],"names":[],"mappings":"AA8CA,eAAO,MAAM,YAAY,2DACiC,CAAA;AAE1D,eAAO,MAAM,eAAe,kBAAkB,CAAA;AAc9C;;;;;;GAMG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,MAAM,EAAE,EACd,EAAE,MAAc,EAAE,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAC5C,MAAM,CAMR;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAO9C;AAED,wBAAgB,eAAe,IAAI,IAAI,CAMtC;AAID,iBAAe,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAuDnC;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
|
@@ -59,7 +59,7 @@ exports.main = main;
|
|
|
59
59
|
*/
|
|
60
60
|
const child_process_1 = require("child_process");
|
|
61
61
|
exports.UPSTREAM_URL = 'https://github.com/opencrvs/opencrvs-countryconfig.git';
|
|
62
|
-
exports.UPSTREAM_BRANCH = 'release
|
|
62
|
+
exports.UPSTREAM_BRANCH = 'release/2.0.0';
|
|
63
63
|
// Remote name used only for the duration of this codemod. Prefixed to avoid
|
|
64
64
|
// clashing with remotes the user may have (origin, upstream, etc.).
|
|
65
65
|
const TEMP_REMOTE = 'opencrvs-upgrade-v19-v20-codemod';
|
|
@@ -2205,6 +2205,8 @@ var scopeOptionsPlaceEvent = z3.object({
|
|
|
2205
2205
|
placeOfEvent: JurisdictionFilter.optional()
|
|
2206
2206
|
}).describe("Options applicable to all record scopes.");
|
|
2207
2207
|
var scopeOptionsDeclared = 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");
|
|
@@ -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(
|
|
@@ -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
|
|
@@ -4312,7 +4317,7 @@ Saved ${handlerRelPath}.`);
|
|
|
4312
4317
|
// src/migrations/v2.0/checkout-upstream-files.ts
|
|
4313
4318
|
var import_child_process = require("child_process");
|
|
4314
4319
|
var UPSTREAM_URL = "https://github.com/opencrvs/opencrvs-countryconfig.git";
|
|
4315
|
-
var UPSTREAM_BRANCH = "release
|
|
4320
|
+
var UPSTREAM_BRANCH = "release/2.0.0";
|
|
4316
4321
|
var TEMP_REMOTE = "opencrvs-upgrade-v19-v20-codemod";
|
|
4317
4322
|
var FILES_TO_CHECKOUT = [
|
|
4318
4323
|
"src/analytics/analytics.ts",
|
|
@@ -119,6 +119,8 @@ var scopeOptionsPlaceEvent = z2.object({
|
|
|
119
119
|
placeOfEvent: JurisdictionFilter.optional()
|
|
120
120
|
}).describe("Options applicable to all record scopes.");
|
|
121
121
|
var scopeOptionsDeclared = 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");
|
|
@@ -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(
|
|
@@ -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",
|
|
@@ -2679,6 +2689,11 @@ var ReadActionConfig = ActionConfigBase.extend(
|
|
|
2679
2689
|
conditionals: z24.never().optional().describe("Read-action can not be disabled or hidden with conditionals.")
|
|
2680
2690
|
}).shape
|
|
2681
2691
|
);
|
|
2692
|
+
var NotifyConfig = ActionConfigBase.extend(
|
|
2693
|
+
z24.object({
|
|
2694
|
+
type: z24.literal(ActionType.NOTIFY)
|
|
2695
|
+
}).shape
|
|
2696
|
+
);
|
|
2682
2697
|
var DeclareConfig = DeclarationActionBase.extend(
|
|
2683
2698
|
z24.object({
|
|
2684
2699
|
type: z24.literal(ActionType.DECLARE),
|
|
@@ -2763,9 +2778,13 @@ var ActionConfig = z24.discriminatedUnion("type", [
|
|
|
2763
2778
|
id: "ReadActionConfig",
|
|
2764
2779
|
description: "Configuration for the read action \u2014 defines the record-tab content displayed on the event overview page."
|
|
2765
2780
|
}),
|
|
2781
|
+
NotifyConfig.meta({
|
|
2782
|
+
id: "NotifyActionConfig",
|
|
2783
|
+
description: "Configuration for the notify action. When present, NOTIFY uses this config independently from DECLARE. When absent, NOTIFY falls back to the DeclareActionConfig."
|
|
2784
|
+
}),
|
|
2766
2785
|
DeclareConfig.meta({
|
|
2767
2786
|
id: "DeclareActionConfig",
|
|
2768
|
-
description: "Configuration for the declare action. Includes review-page fields.
|
|
2787
|
+
description: "Configuration for the declare action. Includes review-page fields. NOTIFY falls back to this config when no dedicated NotifyActionConfig is provided."
|
|
2769
2788
|
}),
|
|
2770
2789
|
RejectConfig.meta({
|
|
2771
2790
|
id: "RejectActionConfig",
|
|
@@ -3199,7 +3218,7 @@ var getActionAnnotationFields = (actionConfig) => {
|
|
|
3199
3218
|
if (actionConfig.type === ActionType.CUSTOM) {
|
|
3200
3219
|
return actionConfig.form;
|
|
3201
3220
|
}
|
|
3202
|
-
if ("review" in actionConfig) {
|
|
3221
|
+
if ("review" in actionConfig && actionConfig.review != null) {
|
|
3203
3222
|
return actionConfig.review.fields;
|
|
3204
3223
|
}
|
|
3205
3224
|
return [];
|
|
@@ -6056,6 +6075,20 @@ var tennisClubMembershipEvent = defineConfig({
|
|
|
6056
6075
|
},
|
|
6057
6076
|
review: TENNIS_CLUB_DECLARATION_REVIEW
|
|
6058
6077
|
},
|
|
6078
|
+
{
|
|
6079
|
+
type: ActionType.NOTIFY,
|
|
6080
|
+
label: {
|
|
6081
|
+
defaultMessage: "Notify health worker",
|
|
6082
|
+
description: "This is shown as the action name anywhere the user can trigger the action from",
|
|
6083
|
+
id: "event.tennis-club-membership.action.notify.label"
|
|
6084
|
+
},
|
|
6085
|
+
flags: [
|
|
6086
|
+
{
|
|
6087
|
+
id: "health-worker-notified",
|
|
6088
|
+
operation: "add"
|
|
6089
|
+
}
|
|
6090
|
+
]
|
|
6091
|
+
},
|
|
6059
6092
|
{
|
|
6060
6093
|
type: ActionType.REJECT,
|
|
6061
6094
|
label: {
|
|
@@ -6298,6 +6331,17 @@ var tennisClubMembershipEvent = defineConfig({
|
|
|
6298
6331
|
}
|
|
6299
6332
|
}
|
|
6300
6333
|
],
|
|
6334
|
+
flags: [
|
|
6335
|
+
{
|
|
6336
|
+
id: "health-worker-notified",
|
|
6337
|
+
requiresAction: false,
|
|
6338
|
+
label: {
|
|
6339
|
+
id: "event.tennis-club-membership.flag.health-worker-notified.label",
|
|
6340
|
+
defaultMessage: "Health worker notified",
|
|
6341
|
+
description: "Label for the health-worker-notified flag"
|
|
6342
|
+
}
|
|
6343
|
+
}
|
|
6344
|
+
],
|
|
6301
6345
|
advancedSearch: [
|
|
6302
6346
|
{
|
|
6303
6347
|
title: {
|
package/dist/scopes/index.d.ts
CHANGED
|
@@ -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
|
@@ -150,6 +150,8 @@ var scopeOptionsPlaceEvent = z3.object({
|
|
|
150
150
|
placeOfEvent: JurisdictionFilter.optional()
|
|
151
151
|
}).describe("Options applicable to all record scopes.");
|
|
152
152
|
var scopeOptionsDeclared = 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");
|
|
@@ -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(
|
|
@@ -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;
|
|
Binary file
|
package/package.json
CHANGED
|
Binary file
|