@opencrvs/toolkit 2.0.0-rc.b0c39c7 → 2.0.0-rc.b11441a

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,13 +665,11 @@ var scopeOptionsPlaceEvent = z11.object({
665
665
  event: scopeByEvent,
666
666
  placeOfEvent: JurisdictionFilter.optional()
667
667
  }).describe("Options applicable to all record scopes.");
668
- var scopeOptionsDeclaredOrNotified = scopeOptionsPlaceEvent.extend({
669
- notifiedIn: JurisdictionFilter.optional(),
670
- notifiedBy: UserFilter.optional(),
668
+ var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
671
669
  declaredIn: JurisdictionFilter.optional(),
672
670
  declaredBy: UserFilter.optional()
673
671
  }).describe("Options applicable to actions that may take place after DECLARE");
674
- var AllRecordScopeOptions = scopeOptionsDeclaredOrNotified.extend({
672
+ var AllRecordScopeOptions = scopeOptionsDeclared.extend({
675
673
  registeredIn: JurisdictionFilter.optional(),
676
674
  registeredBy: UserFilter.optional()
677
675
  }).describe(
@@ -709,8 +707,6 @@ var ResolvedScopeOptionsPlaceEvent = z11.object({
709
707
  "Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
710
708
  );
711
709
  var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
712
- notifiedIn: UUID.nullish(),
713
- notifiedBy: z11.string().optional(),
714
710
  declaredIn: UUID.nullish(),
715
711
  declaredBy: z11.string().optional()
716
712
  }).describe(
@@ -756,7 +752,7 @@ var RecordScopeV2 = z11.discriminatedUnion("type", [
756
752
  }),
757
753
  z11.object({
758
754
  type: ScopesWithDeclaredOptions,
759
- options: scopeOptionsDeclaredOrNotified.optional()
755
+ options: scopeOptionsDeclared.optional()
760
756
  }),
761
757
  z11.object({
762
758
  type: ScopesWithFullOptions,
@@ -845,9 +841,8 @@ var EncodedScope = z11.string().brand("EncodedScope");
845
841
  var DEFAULT_SCOPE_OPTIONS = {
846
842
  placeOfEvent: JurisdictionFilter.enum.all,
847
843
  accessLevel: JurisdictionFilter.enum.all,
848
- notifiedIn: JurisdictionFilter.enum.all,
849
- declaredIn: JurisdictionFilter.enum.all,
850
- registeredIn: JurisdictionFilter.enum.all
844
+ registeredIn: JurisdictionFilter.enum.all,
845
+ declaredIn: JurisdictionFilter.enum.all
851
846
  };
852
847
 
853
848
  // ../commons/src/authentication.ts
@@ -1136,7 +1131,6 @@ var RegistrationCreationMetadata = ActionCreationMetadata.extend({
1136
1131
  )
1137
1132
  });
1138
1133
  var LegalStatuses = z15.object({
1139
- [EventStatus.enum.NOTIFIED]: ActionCreationMetadata.nullish(),
1140
1134
  [EventStatus.enum.DECLARED]: ActionCreationMetadata.nullish(),
1141
1135
  [EventStatus.enum.REGISTERED]: RegistrationCreationMetadata.nullish()
1142
1136
  });
@@ -1196,8 +1190,6 @@ var EventMetadataKeys = z15.enum(EventMetadataKeysArray);
1196
1190
  var EventMetadataDateFieldIdInput = z15.enum([
1197
1191
  "createdAt",
1198
1192
  "updatedAt",
1199
- "legalStatuses.NOTIFIED.createdAt",
1200
- "legalStatuses.NOTIFIED.acceptedAt",
1201
1193
  "legalStatuses.DECLARED.createdAt",
1202
1194
  "legalStatuses.DECLARED.acceptedAt",
1203
1195
  "legalStatuses.REGISTERED.createdAt",
@@ -1206,8 +1198,6 @@ var EventMetadataDateFieldIdInput = z15.enum([
1206
1198
  var EventMetadataDateFieldId = z15.enum([
1207
1199
  "event.createdAt",
1208
1200
  "event.updatedAt",
1209
- "event.legalStatuses.NOTIFIED.createdAt",
1210
- "event.legalStatuses.NOTIFIED.acceptedAt",
1211
1201
  "event.legalStatuses.DECLARED.createdAt",
1212
1202
  "event.legalStatuses.DECLARED.acceptedAt",
1213
1203
  "event.legalStatuses.REGISTERED.createdAt",
package/dist/cli.js CHANGED
@@ -5327,13 +5327,11 @@ var scopeOptionsPlaceEvent = z3.object({
5327
5327
  event: scopeByEvent,
5328
5328
  placeOfEvent: JurisdictionFilter.optional()
5329
5329
  }).describe("Options applicable to all record scopes.");
5330
- var scopeOptionsDeclaredOrNotified = scopeOptionsPlaceEvent.extend({
5331
- notifiedIn: JurisdictionFilter.optional(),
5332
- notifiedBy: UserFilter.optional(),
5330
+ var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
5333
5331
  declaredIn: JurisdictionFilter.optional(),
5334
5332
  declaredBy: UserFilter.optional()
5335
5333
  }).describe("Options applicable to actions that may take place after DECLARE");
5336
- var AllRecordScopeOptions = scopeOptionsDeclaredOrNotified.extend({
5334
+ var AllRecordScopeOptions = scopeOptionsDeclared.extend({
5337
5335
  registeredIn: JurisdictionFilter.optional(),
5338
5336
  registeredBy: UserFilter.optional()
5339
5337
  }).describe(
@@ -5371,8 +5369,6 @@ var ResolvedScopeOptionsPlaceEvent = z3.object({
5371
5369
  "Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
5372
5370
  );
5373
5371
  var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
5374
- notifiedIn: UUID.nullish(),
5375
- notifiedBy: z3.string().optional(),
5376
5372
  declaredIn: UUID.nullish(),
5377
5373
  declaredBy: z3.string().optional()
5378
5374
  }).describe(
@@ -5418,7 +5414,7 @@ var RecordScopeV2 = z3.discriminatedUnion("type", [
5418
5414
  }),
5419
5415
  z3.object({
5420
5416
  type: ScopesWithDeclaredOptions,
5421
- options: scopeOptionsDeclaredOrNotified.optional()
5417
+ options: scopeOptionsDeclared.optional()
5422
5418
  }),
5423
5419
  z3.object({
5424
5420
  type: ScopesWithFullOptions,
@@ -5539,9 +5535,8 @@ var decodeScope = (encodedScope) => {
5539
5535
  var DEFAULT_SCOPE_OPTIONS = {
5540
5536
  placeOfEvent: JurisdictionFilter.enum.all,
5541
5537
  accessLevel: JurisdictionFilter.enum.all,
5542
- notifiedIn: JurisdictionFilter.enum.all,
5543
- declaredIn: JurisdictionFilter.enum.all,
5544
- registeredIn: JurisdictionFilter.enum.all
5538
+ registeredIn: JurisdictionFilter.enum.all,
5539
+ declaredIn: JurisdictionFilter.enum.all
5545
5540
  };
5546
5541
 
5547
5542
  // ../commons/src/scopes.deprecated.do-not-use.ts
@@ -6749,14 +6749,6 @@ 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;
6760
6752
  DECLARED?: {
6761
6753
  createdAt: string;
6762
6754
  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" | "notifiedIn" | "notifiedBy" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
97
+ $option: "role" | "event" | "placeOfEvent" | "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" | "notifiedIn" | "notifiedBy" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
102
+ $option: "role" | "event" | "placeOfEvent" | "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" | "notifiedIn" | "notifiedBy" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
106
+ $option: "role" | "event" | "placeOfEvent" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
107
107
  };
108
108
  };
109
109
  };
@@ -111,7 +111,6 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
111
111
  conditional: z.ZodAny;
112
112
  }, z.core.$strip>], "type">>>;
113
113
  type: z.ZodLiteral<"NOTIFY">;
114
- form: z.ZodOptional<z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>>;
115
114
  }, z.core.$strip>, z.ZodObject<{
116
115
  label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
117
116
  flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -147,7 +146,6 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
147
146
  title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
148
147
  fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
149
148
  }, z.core.$strip>;
150
- form: z.ZodOptional<z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>>;
151
149
  dialogCopy: z.ZodOptional<z.ZodObject<{
152
150
  notify: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
153
151
  declare: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
@@ -179,7 +177,6 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
179
177
  conditional: z.ZodAny;
180
178
  }, z.core.$strip>], "type">>>;
181
179
  type: z.ZodLiteral<"REJECT">;
182
- form: z.ZodOptional<z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>>;
183
180
  }, z.core.$strip>, z.ZodObject<{
184
181
  label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
185
182
  flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -211,7 +208,6 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
211
208
  query: z.ZodType<import("./DeduplicationConfig").ClauseOutput, import("./DeduplicationConfig").ClauseInput, z.core.$ZodTypeInternals<import("./DeduplicationConfig").ClauseOutput, import("./DeduplicationConfig").ClauseInput>>;
212
209
  }, z.core.$strip>>;
213
210
  type: z.ZodLiteral<"REGISTER">;
214
- form: z.ZodOptional<z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>>;
215
211
  }, z.core.$strip>, z.ZodObject<{
216
212
  label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
217
213
  flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -381,7 +377,6 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
381
377
  conditional: z.ZodAny;
382
378
  }, z.core.$strip>], "type">>>;
383
379
  type: z.ZodLiteral<"ARCHIVE">;
384
- form: z.ZodOptional<z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>>;
385
380
  }, z.core.$strip>, z.ZodObject<{
386
381
  label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
387
382
  flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -458,7 +453,6 @@ export declare const DeclarationActionConfig: z.ZodDiscriminatedUnion<[z.ZodObje
458
453
  title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
459
454
  fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
460
455
  }, z.core.$strip>;
461
- form: z.ZodOptional<z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>>;
462
456
  dialogCopy: z.ZodOptional<z.ZodObject<{
463
457
  notify: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
464
458
  declare: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
@@ -495,7 +489,6 @@ export declare const DeclarationActionConfig: z.ZodDiscriminatedUnion<[z.ZodObje
495
489
  query: z.ZodType<import("./DeduplicationConfig").ClauseOutput, import("./DeduplicationConfig").ClauseInput, z.core.$ZodTypeInternals<import("./DeduplicationConfig").ClauseOutput, import("./DeduplicationConfig").ClauseInput>>;
496
490
  }, z.core.$strip>>;
497
491
  type: z.ZodLiteral<"REGISTER">;
498
- form: z.ZodOptional<z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>>;
499
492
  }, z.core.$strip>], "type">;
500
493
  export type DeclarationActionConfig = z.infer<typeof DeclarationActionConfig>;
501
494
  export {};
@@ -139,8 +139,6 @@ export declare const FieldConfigSchema: z.ZodObject<{
139
139
  role: "role";
140
140
  event: "event";
141
141
  placeOfEvent: "placeOfEvent";
142
- notifiedIn: "notifiedIn";
143
- notifiedBy: "notifiedBy";
144
142
  declaredIn: "declaredIn";
145
143
  declaredBy: "declaredBy";
146
144
  registeredIn: "registeredIn";
@@ -318,8 +316,6 @@ export declare const EventFieldConfigSchema: z.ZodObject<{
318
316
  role: "role";
319
317
  event: "event";
320
318
  placeOfEvent: "placeOfEvent";
321
- notifiedIn: "notifiedIn";
322
- notifiedBy: "notifiedBy";
323
319
  declaredIn: "declaredIn";
324
320
  declaredBy: "declaredBy";
325
321
  registeredIn: "registeredIn";
@@ -473,8 +469,6 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
473
469
  role: "role";
474
470
  event: "event";
475
471
  placeOfEvent: "placeOfEvent";
476
- notifiedIn: "notifiedIn";
477
- notifiedBy: "notifiedBy";
478
472
  declaredIn: "declaredIn";
479
473
  declaredBy: "declaredBy";
480
474
  registeredIn: "registeredIn";
@@ -620,8 +614,6 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
620
614
  role: "role";
621
615
  event: "event";
622
616
  placeOfEvent: "placeOfEvent";
623
- notifiedIn: "notifiedIn";
624
- notifiedBy: "notifiedBy";
625
617
  declaredIn: "declaredIn";
626
618
  declaredBy: "declaredBy";
627
619
  registeredIn: "registeredIn";
@@ -778,8 +770,6 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
778
770
  role: "role";
779
771
  event: "event";
780
772
  placeOfEvent: "placeOfEvent";
781
- notifiedIn: "notifiedIn";
782
- notifiedBy: "notifiedBy";
783
773
  declaredIn: "declaredIn";
784
774
  declaredBy: "declaredBy";
785
775
  registeredIn: "registeredIn";
@@ -925,8 +915,6 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
925
915
  role: "role";
926
916
  event: "event";
927
917
  placeOfEvent: "placeOfEvent";
928
- notifiedIn: "notifiedIn";
929
- notifiedBy: "notifiedBy";
930
918
  declaredIn: "declaredIn";
931
919
  declaredBy: "declaredBy";
932
920
  registeredIn: "registeredIn";
@@ -10,8 +10,6 @@ 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";
15
13
  "legalStatuses.DECLARED.createdAt": "legalStatuses.DECLARED.createdAt";
16
14
  "legalStatuses.DECLARED.acceptedAt": "legalStatuses.DECLARED.acceptedAt";
17
15
  "legalStatuses.REGISTERED.createdAt": "legalStatuses.REGISTERED.createdAt";
@@ -10,17 +10,6 @@ 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>>>;
24
13
  DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
25
14
  createdAt: z.ZodISODateTime;
26
15
  createdBy: z.ZodString;
@@ -39,17 +39,6 @@ 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>>>;
53
42
  DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
54
43
  createdAt: z.ZodISODateTime;
55
44
  createdBy: z.ZodString;
@@ -90,17 +79,6 @@ export declare const EventMetadata: z.ZodObject<{
90
79
  ARCHIVED: "ARCHIVED";
91
80
  }>;
92
81
  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>>>;
104
82
  DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
105
83
  createdAt: z.ZodISODateTime;
106
84
  createdBy: z.ZodString;
@@ -183,8 +161,6 @@ export declare const eventMetadataLabelMap: Record<Exclude<`event.${EventMetadat
183
161
  export declare const EventMetadataDateFieldIdInput: z.ZodEnum<{
184
162
  updatedAt: "updatedAt";
185
163
  createdAt: "createdAt";
186
- "legalStatuses.NOTIFIED.createdAt": "legalStatuses.NOTIFIED.createdAt";
187
- "legalStatuses.NOTIFIED.acceptedAt": "legalStatuses.NOTIFIED.acceptedAt";
188
164
  "legalStatuses.DECLARED.createdAt": "legalStatuses.DECLARED.createdAt";
189
165
  "legalStatuses.DECLARED.acceptedAt": "legalStatuses.DECLARED.acceptedAt";
190
166
  "legalStatuses.REGISTERED.createdAt": "legalStatuses.REGISTERED.createdAt";
@@ -194,8 +170,6 @@ export type EventMetadataDateFieldIdInput = z.infer<typeof EventMetadataDateFiel
194
170
  export declare const EventMetadataDateFieldId: z.ZodEnum<{
195
171
  "event.updatedAt": "event.updatedAt";
196
172
  "event.createdAt": "event.createdAt";
197
- "event.legalStatuses.NOTIFIED.createdAt": "event.legalStatuses.NOTIFIED.createdAt";
198
- "event.legalStatuses.NOTIFIED.acceptedAt": "event.legalStatuses.NOTIFIED.acceptedAt";
199
173
  "event.legalStatuses.DECLARED.createdAt": "event.legalStatuses.DECLARED.createdAt";
200
174
  "event.legalStatuses.DECLARED.acceptedAt": "event.legalStatuses.DECLARED.acceptedAt";
201
175
  "event.legalStatuses.REGISTERED.createdAt": "event.legalStatuses.REGISTERED.createdAt";
@@ -1919,8 +1919,6 @@ declare const AdministrativeAreaField: z.ZodObject<{
1919
1919
  role: "role";
1920
1920
  event: "event";
1921
1921
  placeOfEvent: "placeOfEvent";
1922
- notifiedIn: "notifiedIn";
1923
- notifiedBy: "notifiedBy";
1924
1922
  declaredIn: "declaredIn";
1925
1923
  declaredBy: "declaredBy";
1926
1924
  registeredIn: "registeredIn";
@@ -2047,8 +2045,6 @@ declare const LocationInput: z.ZodObject<{
2047
2045
  role: "role";
2048
2046
  event: "event";
2049
2047
  placeOfEvent: "placeOfEvent";
2050
- notifiedIn: "notifiedIn";
2051
- notifiedBy: "notifiedBy";
2052
2048
  declaredIn: "declaredIn";
2053
2049
  declaredBy: "declaredBy";
2054
2050
  registeredIn: "registeredIn";
@@ -2246,8 +2242,6 @@ declare const Facility: z.ZodObject<{
2246
2242
  role: "role";
2247
2243
  event: "event";
2248
2244
  placeOfEvent: "placeOfEvent";
2249
- notifiedIn: "notifiedIn";
2250
- notifiedBy: "notifiedBy";
2251
2245
  declaredIn: "declaredIn";
2252
2246
  declaredBy: "declaredBy";
2253
2247
  registeredIn: "registeredIn";
@@ -2360,8 +2354,6 @@ declare const Office: z.ZodObject<{
2360
2354
  role: "role";
2361
2355
  event: "event";
2362
2356
  placeOfEvent: "placeOfEvent";
2363
- notifiedIn: "notifiedIn";
2364
- notifiedBy: "notifiedBy";
2365
2357
  declaredIn: "declaredIn";
2366
2358
  declaredBy: "declaredBy";
2367
2359
  registeredIn: "registeredIn";
@@ -2560,8 +2552,6 @@ declare const Address: z.ZodObject<{
2560
2552
  role: "role";
2561
2553
  event: "event";
2562
2554
  placeOfEvent: "placeOfEvent";
2563
- notifiedIn: "notifiedIn";
2564
- notifiedBy: "notifiedBy";
2565
2555
  declaredIn: "declaredIn";
2566
2556
  declaredBy: "declaredBy";
2567
2557
  registeredIn: "registeredIn";
@@ -40,7 +40,6 @@ 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;
44
43
  DECLARED: ToArrayFields<ActionCreationMetadata, 'createdAtLocation'> | undefined;
45
44
  REGISTERED: ToArrayFields<RegistrationCreationMetadata, 'createdAtLocation'> | undefined;
46
45
  };
@@ -65,14 +65,6 @@ 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;
76
68
  DECLARED?: {
77
69
  createdAt: string;
78
70
  createdBy: string;
@@ -30,15 +30,6 @@ 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;
42
33
  DECLARED: {
43
34
  createdAt: string;
44
35
  createdBy: string;
@@ -50,14 +50,6 @@ export declare function getActionConfig({ eventConfiguration, actionType, custom
50
50
  customActionType?: string;
51
51
  }): ActionConfig | undefined;
52
52
  export declare function getCustomActionFields(eventConfiguration: EventConfig, customActionType: string): FieldConfig[];
53
- /**
54
- * Returns the fields configured for an action's confirmation dialog.
55
- *
56
- * Unlike review fields and supporting copy, NOTIFY does NOT fall back to the
57
- * DECLARE config here: dialog fields always come from the action's own
58
- * configuration entry.
59
- */
60
- export declare function getActionFormFields(eventConfiguration: EventConfig, actionType: ActionType, customActionType?: string): FieldConfig[];
61
53
  export declare function getPrintCertificatePages(configuration: EventConfig): ({
62
54
  id: string;
63
55
  title: {
@@ -191,13 +191,11 @@ var scopeOptionsPlaceEvent = z6.object({
191
191
  event: scopeByEvent,
192
192
  placeOfEvent: JurisdictionFilter.optional()
193
193
  }).describe("Options applicable to all record scopes.");
194
- var scopeOptionsDeclaredOrNotified = scopeOptionsPlaceEvent.extend({
195
- notifiedIn: JurisdictionFilter.optional(),
196
- notifiedBy: UserFilter.optional(),
194
+ var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
197
195
  declaredIn: JurisdictionFilter.optional(),
198
196
  declaredBy: UserFilter.optional()
199
197
  }).describe("Options applicable to actions that may take place after DECLARE");
200
- var AllRecordScopeOptions = scopeOptionsDeclaredOrNotified.extend({
198
+ var AllRecordScopeOptions = scopeOptionsDeclared.extend({
201
199
  registeredIn: JurisdictionFilter.optional(),
202
200
  registeredBy: UserFilter.optional()
203
201
  }).describe(
@@ -235,8 +233,6 @@ var ResolvedScopeOptionsPlaceEvent = z6.object({
235
233
  "Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
236
234
  );
237
235
  var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
238
- notifiedIn: UUID.nullish(),
239
- notifiedBy: z6.string().optional(),
240
236
  declaredIn: UUID.nullish(),
241
237
  declaredBy: z6.string().optional()
242
238
  }).describe(
@@ -282,7 +278,7 @@ var RecordScopeV2 = z6.discriminatedUnion("type", [
282
278
  }),
283
279
  z6.object({
284
280
  type: ScopesWithDeclaredOptions,
285
- options: scopeOptionsDeclaredOrNotified.optional()
281
+ options: scopeOptionsDeclared.optional()
286
282
  }),
287
283
  z6.object({
288
284
  type: ScopesWithFullOptions,
@@ -371,9 +367,8 @@ var EncodedScope2 = z6.string().brand("EncodedScope");
371
367
  var DEFAULT_SCOPE_OPTIONS = {
372
368
  placeOfEvent: JurisdictionFilter.enum.all,
373
369
  accessLevel: JurisdictionFilter.enum.all,
374
- notifiedIn: JurisdictionFilter.enum.all,
375
- declaredIn: JurisdictionFilter.enum.all,
376
- registeredIn: JurisdictionFilter.enum.all
370
+ registeredIn: JurisdictionFilter.enum.all,
371
+ declaredIn: JurisdictionFilter.enum.all
377
372
  };
378
373
 
379
374
  // ../commons/src/users/userReferences.ts
@@ -312,7 +312,6 @@ __export(events_exports, {
312
312
  getActionAnnotation: () => getActionAnnotation,
313
313
  getActionAnnotationFields: () => getActionAnnotationFields,
314
314
  getActionConfig: () => getActionConfig,
315
- getActionFormFields: () => getActionFormFields,
316
315
  getActionReview: () => getActionReview,
317
316
  getActionReviewFields: () => getActionReviewFields,
318
317
  getAdministrativeAreaHierarchy: () => getAdministrativeAreaHierarchy,
@@ -521,13 +520,11 @@ var scopeOptionsPlaceEvent = z2.object({
521
520
  event: scopeByEvent,
522
521
  placeOfEvent: JurisdictionFilter.optional()
523
522
  }).describe("Options applicable to all record scopes.");
524
- var scopeOptionsDeclaredOrNotified = scopeOptionsPlaceEvent.extend({
525
- notifiedIn: JurisdictionFilter.optional(),
526
- notifiedBy: UserFilter.optional(),
523
+ var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
527
524
  declaredIn: JurisdictionFilter.optional(),
528
525
  declaredBy: UserFilter.optional()
529
526
  }).describe("Options applicable to actions that may take place after DECLARE");
530
- var AllRecordScopeOptions = scopeOptionsDeclaredOrNotified.extend({
527
+ var AllRecordScopeOptions = scopeOptionsDeclared.extend({
531
528
  registeredIn: JurisdictionFilter.optional(),
532
529
  registeredBy: UserFilter.optional()
533
530
  }).describe(
@@ -565,8 +562,6 @@ var ResolvedScopeOptionsPlaceEvent = z2.object({
565
562
  "Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
566
563
  );
567
564
  var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
568
- notifiedIn: UUID.nullish(),
569
- notifiedBy: z2.string().optional(),
570
565
  declaredIn: UUID.nullish(),
571
566
  declaredBy: z2.string().optional()
572
567
  }).describe(
@@ -612,7 +607,7 @@ var RecordScopeV2 = z2.discriminatedUnion("type", [
612
607
  }),
613
608
  z2.object({
614
609
  type: ScopesWithDeclaredOptions,
615
- options: scopeOptionsDeclaredOrNotified.optional()
610
+ options: scopeOptionsDeclared.optional()
616
611
  }),
617
612
  z2.object({
618
613
  type: ScopesWithFullOptions,
@@ -735,9 +730,8 @@ var decodeScope = (encodedScope) => {
735
730
  var DEFAULT_SCOPE_OPTIONS = {
736
731
  placeOfEvent: JurisdictionFilter.enum.all,
737
732
  accessLevel: JurisdictionFilter.enum.all,
738
- notifiedIn: JurisdictionFilter.enum.all,
739
- declaredIn: JurisdictionFilter.enum.all,
740
- registeredIn: JurisdictionFilter.enum.all
733
+ registeredIn: JurisdictionFilter.enum.all,
734
+ declaredIn: JurisdictionFilter.enum.all
741
735
  };
742
736
  function getAcceptedScopesByType({
743
737
  acceptedScopes,
@@ -1821,7 +1815,6 @@ var RegistrationCreationMetadata = ActionCreationMetadata.extend({
1821
1815
  )
1822
1816
  });
1823
1817
  var LegalStatuses = z16.object({
1824
- [EventStatus.enum.NOTIFIED]: ActionCreationMetadata.nullish(),
1825
1818
  [EventStatus.enum.DECLARED]: ActionCreationMetadata.nullish(),
1826
1819
  [EventStatus.enum.REGISTERED]: RegistrationCreationMetadata.nullish()
1827
1820
  });
@@ -1963,8 +1956,6 @@ var eventMetadataLabelMap = {
1963
1956
  var EventMetadataDateFieldIdInput = z16.enum([
1964
1957
  "createdAt",
1965
1958
  "updatedAt",
1966
- "legalStatuses.NOTIFIED.createdAt",
1967
- "legalStatuses.NOTIFIED.acceptedAt",
1968
1959
  "legalStatuses.DECLARED.createdAt",
1969
1960
  "legalStatuses.DECLARED.acceptedAt",
1970
1961
  "legalStatuses.REGISTERED.createdAt",
@@ -1973,8 +1964,6 @@ var EventMetadataDateFieldIdInput = z16.enum([
1973
1964
  var EventMetadataDateFieldId = z16.enum([
1974
1965
  "event.createdAt",
1975
1966
  "event.updatedAt",
1976
- "event.legalStatuses.NOTIFIED.createdAt",
1977
- "event.legalStatuses.NOTIFIED.acceptedAt",
1978
1967
  "event.legalStatuses.DECLARED.createdAt",
1979
1968
  "event.legalStatuses.DECLARED.acceptedAt",
1980
1969
  "event.legalStatuses.REGISTERED.createdAt",
@@ -3225,9 +3214,6 @@ var ActionConfigBase = z24.object({
3225
3214
  var DeclarationActionBase = ActionConfigBase.extend({
3226
3215
  deduplication: DeduplicationConfig.optional()
3227
3216
  });
3228
- var actionConfirmationForm = z24.array(FieldConfig).optional().describe(
3229
- "Fields rendered on the action confirmation dialog. Submitted values are stored in the action annotation and shown in the audit history."
3230
- );
3231
3217
  var ReadActionConfig = ActionConfigBase.extend(
3232
3218
  z24.object({
3233
3219
  type: z24.literal(ActionType.READ),
@@ -3239,8 +3225,7 @@ var ReadActionConfig = ActionConfigBase.extend(
3239
3225
  );
3240
3226
  var NotifyConfig = ActionConfigBase.extend(
3241
3227
  z24.object({
3242
- type: z24.literal(ActionType.NOTIFY),
3243
- form: actionConfirmationForm
3228
+ type: z24.literal(ActionType.NOTIFY)
3244
3229
  }).shape
3245
3230
  );
3246
3231
  var DeclareConfig = DeclarationActionBase.extend(
@@ -3249,7 +3234,6 @@ var DeclareConfig = DeclarationActionBase.extend(
3249
3234
  review: DeclarationReviewConfig.describe(
3250
3235
  "Configuration of the review page fields."
3251
3236
  ),
3252
- form: actionConfirmationForm,
3253
3237
  dialogCopy: z24.object({
3254
3238
  notify: TranslationConfig.describe(
3255
3239
  "Confirmation text for the notify action"
@@ -3265,8 +3249,7 @@ var DeclareConfig = DeclarationActionBase.extend(
3265
3249
  );
3266
3250
  var ArchiveConfig = ActionConfigBase.extend(
3267
3251
  z24.object({
3268
- type: z24.literal(ActionType.ARCHIVE),
3269
- form: actionConfirmationForm
3252
+ type: z24.literal(ActionType.ARCHIVE)
3270
3253
  }).shape
3271
3254
  );
3272
3255
  var EditActionConfig = ActionConfigBase.extend(
@@ -3287,14 +3270,12 @@ var EditActionConfig = ActionConfigBase.extend(
3287
3270
  );
3288
3271
  var RejectConfig = ActionConfigBase.extend(
3289
3272
  z24.object({
3290
- type: z24.literal(ActionType.REJECT),
3291
- form: actionConfirmationForm
3273
+ type: z24.literal(ActionType.REJECT)
3292
3274
  }).shape
3293
3275
  );
3294
3276
  var RegisterConfig = DeclarationActionBase.extend(
3295
3277
  z24.object({
3296
- type: z24.literal(ActionType.REGISTER),
3297
- form: actionConfirmationForm
3278
+ type: z24.literal(ActionType.REGISTER)
3298
3279
  }).shape
3299
3280
  );
3300
3281
  var PrintCertificateActionConfig = ActionConfigBase.extend(
@@ -4525,19 +4506,7 @@ function getCustomActionFields(eventConfiguration, customActionType) {
4525
4506
  customActionType,
4526
4507
  actionType: ActionType.CUSTOM
4527
4508
  });
4528
- if (!actionConfig || actionConfig.type !== ActionType.CUSTOM) {
4529
- return [];
4530
- }
4531
- return actionConfig.form;
4532
- }
4533
- function getActionFormFields(eventConfiguration, actionType, customActionType) {
4534
- const actionConfig = eventConfiguration.actions.find((a) => {
4535
- if (a.type === ActionType.CUSTOM && customActionType) {
4536
- return a.customActionType === customActionType;
4537
- }
4538
- return a.type === actionType;
4539
- });
4540
- if (!actionConfig || !("form" in actionConfig) || actionConfig.form == null) {
4509
+ if (!actionConfig || !("form" in actionConfig)) {
4541
4510
  return [];
4542
4511
  }
4543
4512
  return actionConfig.form;
@@ -4558,9 +4527,13 @@ var getActionAnnotationFields = (actionConfig) => {
4558
4527
  if (actionConfig.type === ActionType.PRINT_CERTIFICATE) {
4559
4528
  return actionConfig.printForm.pages.flatMap(({ fields }) => fields);
4560
4529
  }
4561
- const reviewFields = "review" in actionConfig && actionConfig.review != null ? actionConfig.review.fields : [];
4562
- const formFields = "form" in actionConfig && actionConfig.form != null ? actionConfig.form : [];
4563
- return [...reviewFields, ...formFields];
4530
+ if (actionConfig.type === ActionType.CUSTOM) {
4531
+ return actionConfig.form;
4532
+ }
4533
+ if ("review" in actionConfig && actionConfig.review != null) {
4534
+ return actionConfig.review.fields;
4535
+ }
4536
+ return [];
4564
4537
  };
4565
4538
  function getAllAnnotationFields(config) {
4566
4539
  return (0, import_lodash.flattenDeep)(config.actions.map(getActionAnnotationFields));
@@ -6558,10 +6531,6 @@ function getActionUpdateMetadata(actions) {
6558
6531
  }
6559
6532
  function getLegalStatuses(actions) {
6560
6533
  return {
6561
- [EventStatus.enum.NOTIFIED]: getDeclarationActionCreationMetadata(
6562
- ActionType.NOTIFY,
6563
- actions
6564
- ),
6565
6534
  [EventStatus.enum.DECLARED]: getDeclarationActionCreationMetadata(
6566
6535
  ActionType.DECLARE,
6567
6536
  actions
@@ -10377,25 +10346,6 @@ function canAccessEventWithScope(event2, scope, user2, customActionType) {
10377
10346
  }
10378
10347
  if (scopeUsesDeclaredOptions(scope)) {
10379
10348
  const { options } = scope;
10380
- if (options?.notifiedBy === UserFilter.enum.user) {
10381
- if (event2.legalStatuses?.NOTIFIED?.createdBy !== user2.id) {
10382
- return false;
10383
- }
10384
- }
10385
- if (options?.notifiedIn === JurisdictionFilter.enum.location && !matchesJurisdictionFilter(
10386
- event2.legalStatuses?.NOTIFIED?.createdAtLocation,
10387
- JurisdictionFilter.enum.location,
10388
- user2
10389
- )) {
10390
- return false;
10391
- }
10392
- if (options?.notifiedIn === JurisdictionFilter.enum.administrativeArea && !matchesJurisdictionFilter(
10393
- event2.legalStatuses?.NOTIFIED?.createdAtLocation,
10394
- JurisdictionFilter.enum.administrativeArea,
10395
- user2
10396
- )) {
10397
- return false;
10398
- }
10399
10349
  if (options?.declaredBy === UserFilter.enum.user) {
10400
10350
  if (event2.legalStatuses?.DECLARED?.createdBy !== user2.id) {
10401
10351
  return false;
@@ -2204,13 +2204,11 @@ var scopeOptionsPlaceEvent = z3.object({
2204
2204
  event: scopeByEvent,
2205
2205
  placeOfEvent: JurisdictionFilter.optional()
2206
2206
  }).describe("Options applicable to all record scopes.");
2207
- var scopeOptionsDeclaredOrNotified = scopeOptionsPlaceEvent.extend({
2208
- notifiedIn: JurisdictionFilter.optional(),
2209
- notifiedBy: UserFilter.optional(),
2207
+ var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
2210
2208
  declaredIn: JurisdictionFilter.optional(),
2211
2209
  declaredBy: UserFilter.optional()
2212
2210
  }).describe("Options applicable to actions that may take place after DECLARE");
2213
- var AllRecordScopeOptions = scopeOptionsDeclaredOrNotified.extend({
2211
+ var AllRecordScopeOptions = scopeOptionsDeclared.extend({
2214
2212
  registeredIn: JurisdictionFilter.optional(),
2215
2213
  registeredBy: UserFilter.optional()
2216
2214
  }).describe(
@@ -2248,8 +2246,6 @@ var ResolvedScopeOptionsPlaceEvent = z3.object({
2248
2246
  "Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
2249
2247
  );
2250
2248
  var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
2251
- notifiedIn: UUID.nullish(),
2252
- notifiedBy: z3.string().optional(),
2253
2249
  declaredIn: UUID.nullish(),
2254
2250
  declaredBy: z3.string().optional()
2255
2251
  }).describe(
@@ -2295,7 +2291,7 @@ var RecordScopeV2 = z3.discriminatedUnion("type", [
2295
2291
  }),
2296
2292
  z3.object({
2297
2293
  type: ScopesWithDeclaredOptions,
2298
- options: scopeOptionsDeclaredOrNotified.optional()
2294
+ options: scopeOptionsDeclared.optional()
2299
2295
  }),
2300
2296
  z3.object({
2301
2297
  type: ScopesWithFullOptions,
@@ -2416,9 +2412,8 @@ var decodeScope = (encodedScope) => {
2416
2412
  var DEFAULT_SCOPE_OPTIONS = {
2417
2413
  placeOfEvent: JurisdictionFilter.enum.all,
2418
2414
  accessLevel: JurisdictionFilter.enum.all,
2419
- notifiedIn: JurisdictionFilter.enum.all,
2420
- declaredIn: JurisdictionFilter.enum.all,
2421
- registeredIn: JurisdictionFilter.enum.all
2415
+ registeredIn: JurisdictionFilter.enum.all,
2416
+ declaredIn: JurisdictionFilter.enum.all
2422
2417
  };
2423
2418
 
2424
2419
  // ../commons/src/scopes.deprecated.do-not-use.ts
@@ -118,13 +118,11 @@ var scopeOptionsPlaceEvent = z2.object({
118
118
  event: scopeByEvent,
119
119
  placeOfEvent: JurisdictionFilter.optional()
120
120
  }).describe("Options applicable to all record scopes.");
121
- var scopeOptionsDeclaredOrNotified = scopeOptionsPlaceEvent.extend({
122
- notifiedIn: JurisdictionFilter.optional(),
123
- notifiedBy: UserFilter.optional(),
121
+ var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
124
122
  declaredIn: JurisdictionFilter.optional(),
125
123
  declaredBy: UserFilter.optional()
126
124
  }).describe("Options applicable to actions that may take place after DECLARE");
127
- var AllRecordScopeOptions = scopeOptionsDeclaredOrNotified.extend({
125
+ var AllRecordScopeOptions = scopeOptionsDeclared.extend({
128
126
  registeredIn: JurisdictionFilter.optional(),
129
127
  registeredBy: UserFilter.optional()
130
128
  }).describe(
@@ -162,8 +160,6 @@ var ResolvedScopeOptionsPlaceEvent = z2.object({
162
160
  "Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
163
161
  );
164
162
  var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
165
- notifiedIn: UUID.nullish(),
166
- notifiedBy: z2.string().optional(),
167
163
  declaredIn: UUID.nullish(),
168
164
  declaredBy: z2.string().optional()
169
165
  }).describe(
@@ -209,7 +205,7 @@ var RecordScopeV2 = z2.discriminatedUnion("type", [
209
205
  }),
210
206
  z2.object({
211
207
  type: ScopesWithDeclaredOptions,
212
- options: scopeOptionsDeclaredOrNotified.optional()
208
+ options: scopeOptionsDeclared.optional()
213
209
  }),
214
210
  z2.object({
215
211
  type: ScopesWithFullOptions,
@@ -298,9 +294,8 @@ var EncodedScope = z2.string().brand("EncodedScope");
298
294
  var DEFAULT_SCOPE_OPTIONS = {
299
295
  placeOfEvent: JurisdictionFilter.enum.all,
300
296
  accessLevel: JurisdictionFilter.enum.all,
301
- notifiedIn: JurisdictionFilter.enum.all,
302
- declaredIn: JurisdictionFilter.enum.all,
303
- registeredIn: JurisdictionFilter.enum.all
297
+ registeredIn: JurisdictionFilter.enum.all,
298
+ declaredIn: JurisdictionFilter.enum.all
304
299
  };
305
300
 
306
301
  // ../commons/src/authentication.ts
@@ -1362,7 +1357,6 @@ var RegistrationCreationMetadata = ActionCreationMetadata.extend({
1362
1357
  )
1363
1358
  });
1364
1359
  var LegalStatuses = z16.object({
1365
- [EventStatus.enum.NOTIFIED]: ActionCreationMetadata.nullish(),
1366
1360
  [EventStatus.enum.DECLARED]: ActionCreationMetadata.nullish(),
1367
1361
  [EventStatus.enum.REGISTERED]: RegistrationCreationMetadata.nullish()
1368
1362
  });
@@ -1422,8 +1416,6 @@ var EventMetadataKeys = z16.enum(EventMetadataKeysArray);
1422
1416
  var EventMetadataDateFieldIdInput = z16.enum([
1423
1417
  "createdAt",
1424
1418
  "updatedAt",
1425
- "legalStatuses.NOTIFIED.createdAt",
1426
- "legalStatuses.NOTIFIED.acceptedAt",
1427
1419
  "legalStatuses.DECLARED.createdAt",
1428
1420
  "legalStatuses.DECLARED.acceptedAt",
1429
1421
  "legalStatuses.REGISTERED.createdAt",
@@ -1432,8 +1424,6 @@ var EventMetadataDateFieldIdInput = z16.enum([
1432
1424
  var EventMetadataDateFieldId = z16.enum([
1433
1425
  "event.createdAt",
1434
1426
  "event.updatedAt",
1435
- "event.legalStatuses.NOTIFIED.createdAt",
1436
- "event.legalStatuses.NOTIFIED.acceptedAt",
1437
1427
  "event.legalStatuses.DECLARED.createdAt",
1438
1428
  "event.legalStatuses.DECLARED.acceptedAt",
1439
1429
  "event.legalStatuses.REGISTERED.createdAt",
@@ -2681,9 +2671,6 @@ var ActionConfigBase = z24.object({
2681
2671
  var DeclarationActionBase = ActionConfigBase.extend({
2682
2672
  deduplication: DeduplicationConfig.optional()
2683
2673
  });
2684
- var actionConfirmationForm = z24.array(FieldConfig).optional().describe(
2685
- "Fields rendered on the action confirmation dialog. Submitted values are stored in the action annotation and shown in the audit history."
2686
- );
2687
2674
  var ReadActionConfig = ActionConfigBase.extend(
2688
2675
  z24.object({
2689
2676
  type: z24.literal(ActionType.READ),
@@ -2695,8 +2682,7 @@ var ReadActionConfig = ActionConfigBase.extend(
2695
2682
  );
2696
2683
  var NotifyConfig = ActionConfigBase.extend(
2697
2684
  z24.object({
2698
- type: z24.literal(ActionType.NOTIFY),
2699
- form: actionConfirmationForm
2685
+ type: z24.literal(ActionType.NOTIFY)
2700
2686
  }).shape
2701
2687
  );
2702
2688
  var DeclareConfig = DeclarationActionBase.extend(
@@ -2705,7 +2691,6 @@ var DeclareConfig = DeclarationActionBase.extend(
2705
2691
  review: DeclarationReviewConfig.describe(
2706
2692
  "Configuration of the review page fields."
2707
2693
  ),
2708
- form: actionConfirmationForm,
2709
2694
  dialogCopy: z24.object({
2710
2695
  notify: TranslationConfig.describe(
2711
2696
  "Confirmation text for the notify action"
@@ -2721,8 +2706,7 @@ var DeclareConfig = DeclarationActionBase.extend(
2721
2706
  );
2722
2707
  var ArchiveConfig = ActionConfigBase.extend(
2723
2708
  z24.object({
2724
- type: z24.literal(ActionType.ARCHIVE),
2725
- form: actionConfirmationForm
2709
+ type: z24.literal(ActionType.ARCHIVE)
2726
2710
  }).shape
2727
2711
  );
2728
2712
  var EditActionConfig = ActionConfigBase.extend(
@@ -2743,14 +2727,12 @@ var EditActionConfig = ActionConfigBase.extend(
2743
2727
  );
2744
2728
  var RejectConfig = ActionConfigBase.extend(
2745
2729
  z24.object({
2746
- type: z24.literal(ActionType.REJECT),
2747
- form: actionConfirmationForm
2730
+ type: z24.literal(ActionType.REJECT)
2748
2731
  }).shape
2749
2732
  );
2750
2733
  var RegisterConfig = DeclarationActionBase.extend(
2751
2734
  z24.object({
2752
- type: z24.literal(ActionType.REGISTER),
2753
- form: actionConfirmationForm
2735
+ type: z24.literal(ActionType.REGISTER)
2754
2736
  }).shape
2755
2737
  );
2756
2738
  var PrintCertificateActionConfig = ActionConfigBase.extend(
@@ -3224,9 +3206,13 @@ var getActionAnnotationFields = (actionConfig) => {
3224
3206
  if (actionConfig.type === ActionType.PRINT_CERTIFICATE) {
3225
3207
  return actionConfig.printForm.pages.flatMap(({ fields }) => fields);
3226
3208
  }
3227
- const reviewFields = "review" in actionConfig && actionConfig.review != null ? actionConfig.review.fields : [];
3228
- const formFields = "form" in actionConfig && actionConfig.form != null ? actionConfig.form : [];
3229
- return [...reviewFields, ...formFields];
3209
+ if (actionConfig.type === ActionType.CUSTOM) {
3210
+ return actionConfig.form;
3211
+ }
3212
+ if ("review" in actionConfig && actionConfig.review != null) {
3213
+ return actionConfig.review.fields;
3214
+ }
3215
+ return [];
3230
3216
  };
3231
3217
  function getAllAnnotationFields(config) {
3232
3218
  return (0, import_lodash.flattenDeep)(config.actions.map(getActionAnnotationFields));
@@ -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 scopeOptionsDeclaredOrNotified @see scopeOptionsFull
17
+ * @see scopeOptionsPlaceEvent @see scopeOptionsDeclared @see scopeOptionsFull
18
18
  */
19
19
  export declare const RecordScopeTypeV2: z.ZodEnum<{
20
20
  "record.search": "record.search";
@@ -48,14 +48,6 @@ 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
- }>>;
59
51
  declaredIn: z.ZodOptional<z.ZodEnum<{
60
52
  administrativeArea: "administrativeArea";
61
53
  location: "location";
@@ -78,8 +70,6 @@ export declare const ScopeOptionKey: z.ZodEnum<{
78
70
  role: "role";
79
71
  event: "event";
80
72
  placeOfEvent: "placeOfEvent";
81
- notifiedIn: "notifiedIn";
82
- notifiedBy: "notifiedBy";
83
73
  declaredIn: "declaredIn";
84
74
  declaredBy: "declaredBy";
85
75
  registeredIn: "registeredIn";
@@ -136,14 +126,6 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
136
126
  location: "location";
137
127
  all: "all";
138
128
  }>>;
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
- }>>;
147
129
  declaredIn: z.ZodOptional<z.ZodEnum<{
148
130
  administrativeArea: "administrativeArea";
149
131
  location: "location";
@@ -168,14 +150,6 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
168
150
  location: "location";
169
151
  all: "all";
170
152
  }>>;
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
- }>>;
179
153
  declaredIn: z.ZodOptional<z.ZodEnum<{
180
154
  administrativeArea: "administrativeArea";
181
155
  location: "location";
@@ -202,14 +176,6 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
202
176
  location: "location";
203
177
  all: "all";
204
178
  }>>;
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
- }>>;
213
179
  declaredIn: z.ZodOptional<z.ZodEnum<{
214
180
  administrativeArea: "administrativeArea";
215
181
  location: "location";
@@ -237,14 +203,6 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
237
203
  location: "location";
238
204
  all: "all";
239
205
  }>>;
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
- }>>;
248
206
  declaredIn: z.ZodOptional<z.ZodEnum<{
249
207
  administrativeArea: "administrativeArea";
250
208
  location: "location";
@@ -347,8 +305,6 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
347
305
  options: z.ZodOptional<z.ZodObject<{
348
306
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
349
307
  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>;
352
308
  declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
353
309
  declaredBy: z.ZodOptional<z.ZodString>;
354
310
  }, z.core.$strip>>;
@@ -363,8 +319,6 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
363
319
  options: z.ZodOptional<z.ZodObject<{
364
320
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
365
321
  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>;
368
322
  declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
369
323
  declaredBy: z.ZodOptional<z.ZodString>;
370
324
  registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
@@ -375,8 +329,6 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
375
329
  options: z.ZodOptional<z.ZodObject<{
376
330
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
377
331
  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>;
380
332
  declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
381
333
  declaredBy: z.ZodOptional<z.ZodString>;
382
334
  registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
@@ -433,14 +385,6 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
433
385
  location: "location";
434
386
  all: "all";
435
387
  }>>;
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
- }>>;
444
388
  declaredIn: z.ZodOptional<z.ZodEnum<{
445
389
  administrativeArea: "administrativeArea";
446
390
  location: "location";
@@ -465,14 +409,6 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
465
409
  location: "location";
466
410
  all: "all";
467
411
  }>>;
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
- }>>;
476
412
  declaredIn: z.ZodOptional<z.ZodEnum<{
477
413
  administrativeArea: "administrativeArea";
478
414
  location: "location";
@@ -499,14 +435,6 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
499
435
  location: "location";
500
436
  all: "all";
501
437
  }>>;
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
- }>>;
510
438
  declaredIn: z.ZodOptional<z.ZodEnum<{
511
439
  administrativeArea: "administrativeArea";
512
440
  location: "location";
@@ -534,14 +462,6 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
534
462
  location: "location";
535
463
  all: "all";
536
464
  }>>;
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
- }>>;
545
465
  declaredIn: z.ZodOptional<z.ZodEnum<{
546
466
  administrativeArea: "administrativeArea";
547
467
  location: "location";
@@ -676,8 +596,6 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
676
596
  options?: {
677
597
  event?: string[] | undefined;
678
598
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
679
- notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
680
- notifiedBy?: "user" | undefined;
681
599
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
682
600
  declaredBy?: "user" | undefined;
683
601
  } | undefined;
@@ -686,8 +604,6 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
686
604
  options?: {
687
605
  event?: string[] | undefined;
688
606
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
689
- notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
690
- notifiedBy?: "user" | undefined;
691
607
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
692
608
  declaredBy?: "user" | undefined;
693
609
  registeredIn?: "administrativeArea" | "location" | "all" | undefined;
@@ -698,8 +614,6 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
698
614
  options?: {
699
615
  event?: string[] | undefined;
700
616
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
701
- notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
702
- notifiedBy?: "user" | undefined;
703
617
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
704
618
  declaredBy?: "user" | undefined;
705
619
  registeredIn?: "administrativeArea" | "location" | "all" | undefined;
@@ -711,8 +625,6 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
711
625
  options?: {
712
626
  event?: string[] | undefined;
713
627
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
714
- notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
715
- notifiedBy?: "user" | undefined;
716
628
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
717
629
  declaredBy?: "user" | undefined;
718
630
  registeredIn?: "administrativeArea" | "location" | "all" | undefined;
@@ -149,13 +149,11 @@ var scopeOptionsPlaceEvent = z3.object({
149
149
  event: scopeByEvent,
150
150
  placeOfEvent: JurisdictionFilter.optional()
151
151
  }).describe("Options applicable to all record scopes.");
152
- var scopeOptionsDeclaredOrNotified = scopeOptionsPlaceEvent.extend({
153
- notifiedIn: JurisdictionFilter.optional(),
154
- notifiedBy: UserFilter.optional(),
152
+ var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
155
153
  declaredIn: JurisdictionFilter.optional(),
156
154
  declaredBy: UserFilter.optional()
157
155
  }).describe("Options applicable to actions that may take place after DECLARE");
158
- var AllRecordScopeOptions = scopeOptionsDeclaredOrNotified.extend({
156
+ var AllRecordScopeOptions = scopeOptionsDeclared.extend({
159
157
  registeredIn: JurisdictionFilter.optional(),
160
158
  registeredBy: UserFilter.optional()
161
159
  }).describe(
@@ -193,8 +191,6 @@ var ResolvedScopeOptionsPlaceEvent = z3.object({
193
191
  "Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
194
192
  );
195
193
  var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
196
- notifiedIn: UUID.nullish(),
197
- notifiedBy: z3.string().optional(),
198
194
  declaredIn: UUID.nullish(),
199
195
  declaredBy: z3.string().optional()
200
196
  }).describe(
@@ -240,7 +236,7 @@ var RecordScopeV2 = z3.discriminatedUnion("type", [
240
236
  }),
241
237
  z3.object({
242
238
  type: ScopesWithDeclaredOptions,
243
- options: scopeOptionsDeclaredOrNotified.optional()
239
+ options: scopeOptionsDeclared.optional()
244
240
  }),
245
241
  z3.object({
246
242
  type: ScopesWithFullOptions,
@@ -376,9 +372,8 @@ var decodeScope = (encodedScope) => {
376
372
  var DEFAULT_SCOPE_OPTIONS = {
377
373
  placeOfEvent: JurisdictionFilter.enum.all,
378
374
  accessLevel: JurisdictionFilter.enum.all,
379
- notifiedIn: JurisdictionFilter.enum.all,
380
- declaredIn: JurisdictionFilter.enum.all,
381
- registeredIn: JurisdictionFilter.enum.all
375
+ registeredIn: JurisdictionFilter.enum.all,
376
+ declaredIn: JurisdictionFilter.enum.all
382
377
  };
383
378
  function getScopeOptionValue(scope, option) {
384
379
  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.b0c39c7",
3
+ "version": "2.0.0-rc.b11441a",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "bin": {