@opencrvs/toolkit 2.0.0-rc.6b5f496 → 2.0.0-rc.6bedc29

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.
@@ -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",
@@ -2695,52 +2685,6 @@ var NotifyConfig = ActionConfigBase.extend(
2695
2685
  type: z24.literal(ActionType.NOTIFY)
2696
2686
  }).shape
2697
2687
  );
2698
- var DuplicateDetectedConfig = ActionConfigBase.extend(
2699
- z24.object({
2700
- type: z24.literal(ActionType.DUPLICATE_DETECTED),
2701
- label: z24.never().optional().describe(
2702
- "DUPLICATE_DETECTED is system-generated and never shown as a button, so it has no label."
2703
- ),
2704
- supportingCopy: z24.never().optional(),
2705
- icon: z24.never().optional().describe(
2706
- "DUPLICATE_DETECTED is system-generated and never shown as a button, so it has no icon."
2707
- ),
2708
- conditionals: z24.never().optional().describe(
2709
- "DUPLICATE_DETECTED is system-generated and never shown as a button, so it cannot be disabled or hidden with conditionals."
2710
- )
2711
- }).shape
2712
- );
2713
- var MarkAsDuplicateConfig = ActionConfigBase.extend(
2714
- z24.object({
2715
- type: z24.literal(ActionType.MARK_AS_DUPLICATE)
2716
- }).shape
2717
- );
2718
- var MarkAsNotDuplicateConfig = ActionConfigBase.extend(
2719
- z24.object({
2720
- type: z24.literal(ActionType.MARK_AS_NOT_DUPLICATE)
2721
- }).shape
2722
- );
2723
- var AssignConfig = ActionConfigBase.extend(
2724
- z24.object({
2725
- type: z24.literal(ActionType.ASSIGN),
2726
- flags: z24.never().optional().describe(
2727
- "ASSIGN is a meta action excluded from flag resolution, so flags configured here would never apply."
2728
- )
2729
- }).shape
2730
- );
2731
- var UnassignConfig = ActionConfigBase.extend(
2732
- z24.object({
2733
- type: z24.literal(ActionType.UNASSIGN),
2734
- flags: z24.never().optional().describe(
2735
- "UNASSIGN is a meta action excluded from flag resolution, so flags configured here would never apply."
2736
- )
2737
- }).shape
2738
- );
2739
- var DeleteConfig = ActionConfigBase.extend(
2740
- z24.object({
2741
- type: z24.literal(ActionType.DELETE)
2742
- }).shape
2743
- );
2744
2688
  var DeclareConfig = DeclarationActionBase.extend(
2745
2689
  z24.object({
2746
2690
  type: z24.literal(ActionType.DECLARE),
@@ -2803,17 +2747,7 @@ var RequestCorrectionConfig = ActionConfigBase.extend(
2803
2747
  correctionForm: ActionFormConfig
2804
2748
  }).shape
2805
2749
  );
2806
- var ApproveCorrectionConfig = ActionConfigBase.extend(
2807
- z24.object({
2808
- type: z24.literal(ActionType.APPROVE_CORRECTION)
2809
- }).shape
2810
- );
2811
- var RejectCorrectionConfig = ActionConfigBase.extend(
2812
- z24.object({
2813
- type: z24.literal(ActionType.REJECT_CORRECTION)
2814
- }).shape
2815
- );
2816
- var CustomActionConfig = ActionConfigBase.extend(
2750
+ var CustomActionConfig = ActionConfigBase.merge(
2817
2751
  z24.object({
2818
2752
  type: z24.literal(ActionType.CUSTOM),
2819
2753
  customActionType: z24.string().describe("Type identifier of the custom action."),
@@ -2824,7 +2758,7 @@ var CustomActionConfig = ActionConfigBase.extend(
2824
2758
  auditHistoryLabel: TranslationConfig.describe(
2825
2759
  'The label to show in audit history for this action. For example "Approved".'
2826
2760
  )
2827
- }).shape
2761
+ })
2828
2762
  );
2829
2763
  var ActionConfig = z24.discriminatedUnion("type", [
2830
2764
  /*
@@ -2835,18 +2769,6 @@ var ActionConfig = z24.discriminatedUnion("type", [
2835
2769
  id: "ReadActionConfig",
2836
2770
  description: "Configuration for the read action \u2014 defines the record-tab content displayed on the event overview page."
2837
2771
  }),
2838
- AssignConfig.meta({
2839
- id: "AssignActionConfig",
2840
- description: "Configuration for assigning a record to the current user."
2841
- }),
2842
- UnassignConfig.meta({
2843
- id: "UnassignActionConfig",
2844
- description: "Configuration for unassigning a record from its current assignee."
2845
- }),
2846
- DeleteConfig.meta({
2847
- id: "DeleteActionConfig",
2848
- description: "Configuration for deleting a draft record."
2849
- }),
2850
2772
  NotifyConfig.meta({
2851
2773
  id: "NotifyActionConfig",
2852
2774
  description: "Configuration for the notify action. When present, NOTIFY uses this config independently from DECLARE. When absent, NOTIFY falls back to the DeclareActionConfig."
@@ -2855,18 +2777,6 @@ var ActionConfig = z24.discriminatedUnion("type", [
2855
2777
  id: "DeclareActionConfig",
2856
2778
  description: "Configuration for the declare action. Includes review-page fields. NOTIFY falls back to this config when no dedicated NotifyActionConfig is provided."
2857
2779
  }),
2858
- DuplicateDetectedConfig.meta({
2859
- id: "DuplicateDetectedActionConfig",
2860
- description: "Configuration for the system-generated duplicate-detection action. Never shown as a button, so it only supports flags \u2014 not label, icon, or conditionals."
2861
- }),
2862
- MarkAsDuplicateConfig.meta({
2863
- id: "MarkAsDuplicateActionConfig",
2864
- description: "Configuration for marking a record as a duplicate."
2865
- }),
2866
- MarkAsNotDuplicateConfig.meta({
2867
- id: "MarkAsNotDuplicateActionConfig",
2868
- description: "Configuration for marking a record as not a duplicate, after it was previously flagged as one."
2869
- }),
2870
2780
  RejectConfig.meta({
2871
2781
  id: "RejectActionConfig",
2872
2782
  description: "Configuration for rejecting a record before registration."
@@ -2883,14 +2793,6 @@ var ActionConfig = z24.discriminatedUnion("type", [
2883
2793
  id: "RequestCorrectionActionConfig",
2884
2794
  description: "Configuration for requesting a correction on a registered record."
2885
2795
  }),
2886
- ApproveCorrectionConfig.meta({
2887
- id: "ApproveCorrectionActionConfig",
2888
- description: "Configuration for approving a requested correction."
2889
- }),
2890
- RejectCorrectionConfig.meta({
2891
- id: "RejectCorrectionActionConfig",
2892
- description: "Configuration for rejecting a requested correction."
2893
- }),
2894
2796
  EditActionConfig.meta({
2895
2797
  id: "EditActionConfig",
2896
2798
  description: "Configuration for editing a record before registration."
@@ -4018,7 +3920,7 @@ function validateActionFlags(event2, ctx) {
4018
3920
  const isInherentFlag = (value) => Object.values(InherentFlags).includes(value);
4019
3921
  const configuredFlagIds = event2.flags.map((flag) => flag.id);
4020
3922
  const actionFlagIds = event2.actions.flatMap(
4021
- (action) => (action.flags ?? []).map((flag) => flag.id)
3923
+ (action) => action.flags.map((flag) => flag.id)
4022
3924
  );
4023
3925
  for (const actionFlagId of actionFlagIds) {
4024
3926
  const isConfigured = configuredFlagIds.includes(actionFlagId);
@@ -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.6b5f496",
3
+ "version": "2.0.0-rc.6bedc29",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "bin": {
@@ -1 +1 @@
1
- {"root":["./src/cli.ts","./src/api/index.ts","./src/application-config/index.ts","./src/conditionals/index.ts","./src/environment/custom-types.ts","./src/environment/derived-variables.ts","./src/environment/editor-questions.ts","./src/environment/git.ts","./src/environment/github.ts","./src/environment/index.ts","./src/environment/logger.ts","./src/environment/manage-users.ts","./src/environment/questions-helper.ts","./src/environment/questions.ts","./src/environment/setup-environment.ts","./src/environment/ssh-keygen.ts","./src/environment/swarm-to-k8s.ts","./src/environment/templates.ts","./src/environment/update-workflows.ts","./src/environment/users.ts","./src/environment/utils.ts","./src/events/deduplication.ts","./src/events/index.ts","./src/migrations/v2.0/add-birth-certificate-issuance-flag.ts","./src/migrations/v2.0/add-resend-invite-notification.ts","./src/migrations/v2.0/checkout-upstream-files.ts","./src/migrations/v2.0/convert-config-files-to-ts.ts","./src/migrations/v2.0/convert-paragraph-to-heading.ts","./src/migrations/v2.0/create-events-index.ts","./src/migrations/v2.0/delete-infrastructure-directory.ts","./src/migrations/v2.0/fix-accept-requested-registration-function-type.ts","./src/migrations/v2.0/index.ts","./src/migrations/v2.0/make-built-in-validate-actions-custom.ts","./src/migrations/v2.0/merge-infrastructure-directory.ts","./src/migrations/v2.0/migrate-application-config-url.ts","./src/migrations/v2.0/migrate-scopes.ts","./src/migrations/v2.0/migrate-validated-workqueue-status-to-flag.ts","./src/migrations/v2.0/migrate-workqueue-configs.ts","./src/migrations/v2.0/remove-delete-actions.ts","./src/migrations/v2.0/remove-demo-scope.ts","./src/migrations/v2.0/remove-deprecated-imports.ts","./src/migrations/v2.0/remove-fhir-url-helpers.ts","./src/migrations/v2.0/remove-hearth-migrations.ts","./src/migrations/v2.0/remove-old-statistics-service.ts","./src/migrations/v2.0/remove-pending-certification-flag.ts","./src/migrations/v2.0/remove-review-from-register-action.ts","./src/migrations/v2.0/remove-unused-environment-variables.ts","./src/migrations/v2.0/rename-api-paths.ts","./src/migrations/v2.0/rename-location-parent-id.ts","./src/migrations/v2.0/simplify-analytics-precalculations.ts","./src/migrations/v2.0/update-package-json.ts","./src/migrations/v2.1/add-explicit-correction-flags.ts","./src/migrations/v2.1/index.ts","./src/notification/index.ts","./src/scopes/index.ts"],"version":"5.6.3"}
1
+ {"root":["./src/cli.ts","./src/api/index.ts","./src/application-config/index.ts","./src/conditionals/index.ts","./src/environment/custom-types.ts","./src/environment/derived-variables.ts","./src/environment/editor-questions.ts","./src/environment/git.ts","./src/environment/github.ts","./src/environment/index.ts","./src/environment/logger.ts","./src/environment/manage-users.ts","./src/environment/questions-helper.ts","./src/environment/questions.ts","./src/environment/setup-environment.ts","./src/environment/ssh-keygen.ts","./src/environment/swarm-to-k8s.ts","./src/environment/templates.ts","./src/environment/update-workflows.ts","./src/environment/users.ts","./src/environment/utils.ts","./src/events/deduplication.ts","./src/events/index.ts","./src/migrations/v2.0/add-birth-certificate-issuance-flag.ts","./src/migrations/v2.0/add-resend-invite-notification.ts","./src/migrations/v2.0/checkout-upstream-files.ts","./src/migrations/v2.0/convert-config-files-to-ts.ts","./src/migrations/v2.0/convert-paragraph-to-heading.ts","./src/migrations/v2.0/create-events-index.ts","./src/migrations/v2.0/delete-infrastructure-directory.ts","./src/migrations/v2.0/fix-accept-requested-registration-function-type.ts","./src/migrations/v2.0/index.ts","./src/migrations/v2.0/make-built-in-validate-actions-custom.ts","./src/migrations/v2.0/merge-infrastructure-directory.ts","./src/migrations/v2.0/migrate-application-config-url.ts","./src/migrations/v2.0/migrate-scopes.ts","./src/migrations/v2.0/migrate-validated-workqueue-status-to-flag.ts","./src/migrations/v2.0/migrate-workqueue-configs.ts","./src/migrations/v2.0/remove-delete-actions.ts","./src/migrations/v2.0/remove-demo-scope.ts","./src/migrations/v2.0/remove-deprecated-imports.ts","./src/migrations/v2.0/remove-fhir-url-helpers.ts","./src/migrations/v2.0/remove-hearth-migrations.ts","./src/migrations/v2.0/remove-old-statistics-service.ts","./src/migrations/v2.0/remove-pending-certification-flag.ts","./src/migrations/v2.0/remove-review-from-register-action.ts","./src/migrations/v2.0/remove-unused-environment-variables.ts","./src/migrations/v2.0/rename-api-paths.ts","./src/migrations/v2.0/rename-location-parent-id.ts","./src/migrations/v2.0/simplify-analytics-precalculations.ts","./src/migrations/v2.0/update-package-json.ts","./src/notification/index.ts","./src/scopes/index.ts"],"version":"5.6.3"}
@@ -1,3 +0,0 @@
1
- declare function main(): Promise<void>;
2
- export { main };
3
- //# sourceMappingURL=add-explicit-correction-flags.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"add-explicit-correction-flags.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.1/add-explicit-correction-flags.ts"],"names":[],"mappings":"AAyPA,iBAAe,IAAI,kBA+ClB;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}