@opencrvs/toolkit 2.0.0-rc.1ba30b5 → 2.0.0-rc.1bc267d

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.
@@ -665,11 +665,13 @@ var scopeOptionsPlaceEvent = z11.object({
665
665
  event: scopeByEvent,
666
666
  placeOfEvent: JurisdictionFilter.optional()
667
667
  }).describe("Options applicable to all record scopes.");
668
- var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
668
+ var scopeOptionsDeclaredOrNotified = 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");
672
- var AllRecordScopeOptions = scopeOptionsDeclared.extend({
674
+ var AllRecordScopeOptions = scopeOptionsDeclaredOrNotified.extend({
673
675
  registeredIn: JurisdictionFilter.optional(),
674
676
  registeredBy: UserFilter.optional()
675
677
  }).describe(
@@ -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(
@@ -752,7 +756,7 @@ var RecordScopeV2 = z11.discriminatedUnion("type", [
752
756
  }),
753
757
  z11.object({
754
758
  type: ScopesWithDeclaredOptions,
755
- options: scopeOptionsDeclared.optional()
759
+ options: scopeOptionsDeclaredOrNotified.optional()
756
760
  }),
757
761
  z11.object({
758
762
  type: ScopesWithFullOptions,
@@ -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
- registeredIn: JurisdictionFilter.enum.all,
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
@@ -5327,11 +5327,13 @@ var scopeOptionsPlaceEvent = z3.object({
5327
5327
  event: scopeByEvent,
5328
5328
  placeOfEvent: JurisdictionFilter.optional()
5329
5329
  }).describe("Options applicable to all record scopes.");
5330
- var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
5330
+ var scopeOptionsDeclaredOrNotified = scopeOptionsPlaceEvent.extend({
5331
+ notifiedIn: JurisdictionFilter.optional(),
5332
+ notifiedBy: UserFilter.optional(),
5331
5333
  declaredIn: JurisdictionFilter.optional(),
5332
5334
  declaredBy: UserFilter.optional()
5333
5335
  }).describe("Options applicable to actions that may take place after DECLARE");
5334
- var AllRecordScopeOptions = scopeOptionsDeclared.extend({
5336
+ var AllRecordScopeOptions = scopeOptionsDeclaredOrNotified.extend({
5335
5337
  registeredIn: JurisdictionFilter.optional(),
5336
5338
  registeredBy: UserFilter.optional()
5337
5339
  }).describe(
@@ -5369,6 +5371,8 @@ var ResolvedScopeOptionsPlaceEvent = z3.object({
5369
5371
  "Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
5370
5372
  );
5371
5373
  var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
5374
+ notifiedIn: UUID.nullish(),
5375
+ notifiedBy: z3.string().optional(),
5372
5376
  declaredIn: UUID.nullish(),
5373
5377
  declaredBy: z3.string().optional()
5374
5378
  }).describe(
@@ -5414,7 +5418,7 @@ var RecordScopeV2 = z3.discriminatedUnion("type", [
5414
5418
  }),
5415
5419
  z3.object({
5416
5420
  type: ScopesWithDeclaredOptions,
5417
- options: scopeOptionsDeclared.optional()
5421
+ options: scopeOptionsDeclaredOrNotified.optional()
5418
5422
  }),
5419
5423
  z3.object({
5420
5424
  type: ScopesWithFullOptions,
@@ -5535,8 +5539,9 @@ var decodeScope = (encodedScope) => {
5535
5539
  var DEFAULT_SCOPE_OPTIONS = {
5536
5540
  placeOfEvent: JurisdictionFilter.enum.all,
5537
5541
  accessLevel: JurisdictionFilter.enum.all,
5538
- registeredIn: JurisdictionFilter.enum.all,
5539
- declaredIn: JurisdictionFilter.enum.all
5542
+ notifiedIn: JurisdictionFilter.enum.all,
5543
+ declaredIn: JurisdictionFilter.enum.all,
5544
+ registeredIn: JurisdictionFilter.enum.all
5540
5545
  };
5541
5546
 
5542
5547
  // ../commons/src/scopes.deprecated.do-not-use.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
  };
@@ -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;
@@ -191,11 +191,13 @@ var scopeOptionsPlaceEvent = z6.object({
191
191
  event: scopeByEvent,
192
192
  placeOfEvent: JurisdictionFilter.optional()
193
193
  }).describe("Options applicable to all record scopes.");
194
- var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
194
+ var scopeOptionsDeclaredOrNotified = 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");
198
- var AllRecordScopeOptions = scopeOptionsDeclared.extend({
200
+ var AllRecordScopeOptions = scopeOptionsDeclaredOrNotified.extend({
199
201
  registeredIn: JurisdictionFilter.optional(),
200
202
  registeredBy: UserFilter.optional()
201
203
  }).describe(
@@ -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(
@@ -278,7 +282,7 @@ var RecordScopeV2 = z6.discriminatedUnion("type", [
278
282
  }),
279
283
  z6.object({
280
284
  type: ScopesWithDeclaredOptions,
281
- options: scopeOptionsDeclared.optional()
285
+ options: scopeOptionsDeclaredOrNotified.optional()
282
286
  }),
283
287
  z6.object({
284
288
  type: ScopesWithFullOptions,
@@ -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
- registeredIn: JurisdictionFilter.enum.all,
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
@@ -520,11 +520,13 @@ var scopeOptionsPlaceEvent = z2.object({
520
520
  event: scopeByEvent,
521
521
  placeOfEvent: JurisdictionFilter.optional()
522
522
  }).describe("Options applicable to all record scopes.");
523
- var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
523
+ var scopeOptionsDeclaredOrNotified = 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");
527
- var AllRecordScopeOptions = scopeOptionsDeclared.extend({
529
+ var AllRecordScopeOptions = scopeOptionsDeclaredOrNotified.extend({
528
530
  registeredIn: JurisdictionFilter.optional(),
529
531
  registeredBy: UserFilter.optional()
530
532
  }).describe(
@@ -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(
@@ -607,7 +611,7 @@ var RecordScopeV2 = z2.discriminatedUnion("type", [
607
611
  }),
608
612
  z2.object({
609
613
  type: ScopesWithDeclaredOptions,
610
- options: scopeOptionsDeclared.optional()
614
+ options: scopeOptionsDeclaredOrNotified.optional()
611
615
  }),
612
616
  z2.object({
613
617
  type: ScopesWithFullOptions,
@@ -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
- registeredIn: JurisdictionFilter.enum.all,
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",
@@ -6531,6 +6541,10 @@ function getActionUpdateMetadata(actions) {
6531
6541
  }
6532
6542
  function getLegalStatuses(actions) {
6533
6543
  return {
6544
+ [EventStatus.enum.NOTIFIED]: getDeclarationActionCreationMetadata(
6545
+ ActionType.NOTIFY,
6546
+ actions
6547
+ ),
6534
6548
  [EventStatus.enum.DECLARED]: getDeclarationActionCreationMetadata(
6535
6549
  ActionType.DECLARE,
6536
6550
  actions
@@ -10346,6 +10360,25 @@ function canAccessEventWithScope(event2, scope, user2, customActionType) {
10346
10360
  }
10347
10361
  if (scopeUsesDeclaredOptions(scope)) {
10348
10362
  const { options } = scope;
10363
+ if (options?.notifiedBy === UserFilter.enum.user) {
10364
+ if (event2.legalStatuses?.NOTIFIED?.createdBy !== user2.id) {
10365
+ return false;
10366
+ }
10367
+ }
10368
+ if (options?.notifiedIn === JurisdictionFilter.enum.location && !matchesJurisdictionFilter(
10369
+ event2.legalStatuses?.NOTIFIED?.createdAtLocation,
10370
+ JurisdictionFilter.enum.location,
10371
+ user2
10372
+ )) {
10373
+ return false;
10374
+ }
10375
+ if (options?.notifiedIn === JurisdictionFilter.enum.administrativeArea && !matchesJurisdictionFilter(
10376
+ event2.legalStatuses?.NOTIFIED?.createdAtLocation,
10377
+ JurisdictionFilter.enum.administrativeArea,
10378
+ user2
10379
+ )) {
10380
+ return false;
10381
+ }
10349
10382
  if (options?.declaredBy === UserFilter.enum.user) {
10350
10383
  if (event2.legalStatuses?.DECLARED?.createdBy !== user2.id) {
10351
10384
  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 scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
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 = scopeOptionsDeclared.extend({
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: scopeOptionsDeclared.optional()
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
- registeredIn: JurisdictionFilter.enum.all,
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 scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
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 = scopeOptionsDeclared.extend({
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: scopeOptionsDeclared.optional()
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
- registeredIn: JurisdictionFilter.enum.all,
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",
@@ -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 scopeOptionsDeclared @see scopeOptionsFull
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;
@@ -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 scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
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 = scopeOptionsDeclared.extend({
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: scopeOptionsDeclared.optional()
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
- registeredIn: JurisdictionFilter.enum.all,
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "2.0.0-rc.1ba30b5",
3
+ "version": "2.0.0-rc.1bc267d",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "bin": {