@opencrvs/toolkit 1.8.1-rc.b849abb → 1.8.1-rc.fdf27d6

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.
@@ -1418,10 +1418,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1418
1418
  type: "REJECT_CORRECTION";
1419
1419
  id: string & import("zod").BRAND<"UUID">;
1420
1420
  status: "Rejected" | "Requested" | "Accepted";
1421
- reason: {
1422
- message: string;
1423
- isDuplicate?: boolean | undefined;
1424
- };
1425
1421
  transactionId: string;
1426
1422
  createdByUserType: "system" | "user";
1427
1423
  createdAt: string;
@@ -2988,10 +2984,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2988
2984
  type: "REJECT_CORRECTION";
2989
2985
  id: string & import("zod").BRAND<"UUID">;
2990
2986
  status: "Rejected" | "Requested" | "Accepted";
2991
- reason: {
2992
- message: string;
2993
- isDuplicate?: boolean | undefined;
2994
- };
2995
2987
  transactionId: string;
2996
2988
  createdByUserType: "system" | "user";
2997
2989
  createdAt: string;
@@ -5350,10 +5342,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
5350
5342
  type: "REJECT_CORRECTION";
5351
5343
  id: string & import("zod").BRAND<"UUID">;
5352
5344
  status: "Rejected" | "Requested" | "Accepted";
5353
- reason: {
5354
- message: string;
5355
- isDuplicate?: boolean | undefined;
5356
- };
5357
5345
  transactionId: string;
5358
5346
  createdByUserType: "system" | "user";
5359
5347
  createdAt: string;
@@ -7017,10 +7005,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
7017
7005
  type: "REJECT_CORRECTION";
7018
7006
  id: string & import("zod").BRAND<"UUID">;
7019
7007
  status: "Rejected" | "Requested" | "Accepted";
7020
- reason: {
7021
- message: string;
7022
- isDuplicate?: boolean | undefined;
7023
- };
7024
7008
  transactionId: string;
7025
7009
  createdByUserType: "system" | "user";
7026
7010
  createdAt: string;
@@ -8926,10 +8910,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8926
8910
  type: "REJECT_CORRECTION";
8927
8911
  id: string;
8928
8912
  status: "Rejected" | "Requested" | "Accepted";
8929
- reason: {
8930
- message: string;
8931
- isDuplicate?: boolean | undefined;
8932
- };
8933
8913
  transactionId: string;
8934
8914
  createdByUserType: "system" | "user";
8935
8915
  createdAt: string;
@@ -10492,10 +10472,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
10492
10472
  type: "REJECT_CORRECTION";
10493
10473
  id: string & import("zod").BRAND<"UUID">;
10494
10474
  status: "Rejected" | "Requested" | "Accepted";
10495
- reason: {
10496
- message: string;
10497
- isDuplicate?: boolean | undefined;
10498
- };
10499
10475
  transactionId: string;
10500
10476
  createdByUserType: "system" | "user";
10501
10477
  createdAt: string;
@@ -7945,24 +7945,10 @@ export declare const ActionDocument: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
7945
7945
  }, {
7946
7946
  type: z.ZodLiteral<"REJECT_CORRECTION">;
7947
7947
  requestId: z.ZodString;
7948
- reason: z.ZodObject<{
7949
- message: z.ZodString;
7950
- isDuplicate: z.ZodOptional<z.ZodBoolean>;
7951
- }, "strip", z.ZodTypeAny, {
7952
- message: string;
7953
- isDuplicate?: boolean | undefined;
7954
- }, {
7955
- message: string;
7956
- isDuplicate?: boolean | undefined;
7957
- }>;
7958
7948
  }>, "strip", z.ZodTypeAny, {
7959
7949
  type: "REJECT_CORRECTION";
7960
7950
  id: string & z.BRAND<"UUID">;
7961
7951
  status: "Rejected" | "Requested" | "Accepted";
7962
- reason: {
7963
- message: string;
7964
- isDuplicate?: boolean | undefined;
7965
- };
7966
7952
  transactionId: string;
7967
7953
  createdByUserType: "system" | "user";
7968
7954
  createdAt: string;
@@ -8066,10 +8052,6 @@ export declare const ActionDocument: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
8066
8052
  type: "REJECT_CORRECTION";
8067
8053
  id: string;
8068
8054
  status: "Rejected" | "Requested" | "Accepted";
8069
- reason: {
8070
- message: string;
8071
- isDuplicate?: boolean | undefined;
8072
- };
8073
8055
  transactionId: string;
8074
8056
  createdByUserType: "system" | "user";
8075
8057
  createdAt: string;
@@ -15628,24 +15610,10 @@ export declare const Action: z.ZodUnion<[z.ZodDiscriminatedUnion<"type", [z.ZodO
15628
15610
  }, {
15629
15611
  type: z.ZodLiteral<"REJECT_CORRECTION">;
15630
15612
  requestId: z.ZodString;
15631
- reason: z.ZodObject<{
15632
- message: z.ZodString;
15633
- isDuplicate: z.ZodOptional<z.ZodBoolean>;
15634
- }, "strip", z.ZodTypeAny, {
15635
- message: string;
15636
- isDuplicate?: boolean | undefined;
15637
- }, {
15638
- message: string;
15639
- isDuplicate?: boolean | undefined;
15640
- }>;
15641
15613
  }>, "strip", z.ZodTypeAny, {
15642
15614
  type: "REJECT_CORRECTION";
15643
15615
  id: string & z.BRAND<"UUID">;
15644
15616
  status: "Rejected" | "Requested" | "Accepted";
15645
- reason: {
15646
- message: string;
15647
- isDuplicate?: boolean | undefined;
15648
- };
15649
15617
  transactionId: string;
15650
15618
  createdByUserType: "system" | "user";
15651
15619
  createdAt: string;
@@ -15749,10 +15717,6 @@ export declare const Action: z.ZodUnion<[z.ZodDiscriminatedUnion<"type", [z.ZodO
15749
15717
  type: "REJECT_CORRECTION";
15750
15718
  id: string;
15751
15719
  status: "Rejected" | "Requested" | "Accepted";
15752
- reason: {
15753
- message: string;
15754
- isDuplicate?: boolean | undefined;
15755
- };
15756
15720
  transactionId: string;
15757
15721
  createdByUserType: "system" | "user";
15758
15722
  createdAt: string;
@@ -5971,22 +5971,8 @@ export declare const RejectCorrectionActionInput: z.ZodObject<z.objectUtil.exten
5971
5971
  }, {
5972
5972
  requestId: z.ZodString;
5973
5973
  type: z.ZodDefault<z.ZodLiteral<"REJECT_CORRECTION">>;
5974
- reason: z.ZodObject<{
5975
- message: z.ZodString;
5976
- isDuplicate: z.ZodOptional<z.ZodBoolean>;
5977
- }, "strip", z.ZodTypeAny, {
5978
- message: string;
5979
- isDuplicate?: boolean | undefined;
5980
- }, {
5981
- message: string;
5982
- isDuplicate?: boolean | undefined;
5983
- }>;
5984
5974
  }>, "strip", z.ZodTypeAny, {
5985
5975
  type: "REJECT_CORRECTION";
5986
- reason: {
5987
- message: string;
5988
- isDuplicate?: boolean | undefined;
5989
- };
5990
5976
  transactionId: string;
5991
5977
  declaration: Record<string, string | number | boolean | {
5992
5978
  type: string;
@@ -6083,10 +6069,6 @@ export declare const RejectCorrectionActionInput: z.ZodObject<z.objectUtil.exten
6083
6069
  originalActionId?: (string & z.BRAND<"UUID">) | undefined;
6084
6070
  keepAssignment?: boolean | undefined;
6085
6071
  }, {
6086
- reason: {
6087
- message: string;
6088
- isDuplicate?: boolean | undefined;
6089
- };
6090
6072
  transactionId: string;
6091
6073
  requestId: string;
6092
6074
  eventId: string;
@@ -13103,22 +13085,8 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
13103
13085
  }, {
13104
13086
  requestId: z.ZodString;
13105
13087
  type: z.ZodDefault<z.ZodLiteral<"REJECT_CORRECTION">>;
13106
- reason: z.ZodObject<{
13107
- message: z.ZodString;
13108
- isDuplicate: z.ZodOptional<z.ZodBoolean>;
13109
- }, "strip", z.ZodTypeAny, {
13110
- message: string;
13111
- isDuplicate?: boolean | undefined;
13112
- }, {
13113
- message: string;
13114
- isDuplicate?: boolean | undefined;
13115
- }>;
13116
13088
  }>, "strip", z.ZodTypeAny, {
13117
13089
  type: "REJECT_CORRECTION";
13118
- reason: {
13119
- message: string;
13120
- isDuplicate?: boolean | undefined;
13121
- };
13122
13090
  transactionId: string;
13123
13091
  declaration: Record<string, string | number | boolean | {
13124
13092
  type: string;
@@ -13215,10 +13183,6 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
13215
13183
  originalActionId?: (string & z.BRAND<"UUID">) | undefined;
13216
13184
  keepAssignment?: boolean | undefined;
13217
13185
  }, {
13218
- reason: {
13219
- message: string;
13220
- isDuplicate?: boolean | undefined;
13221
- };
13222
13186
  transactionId: string;
13223
13187
  requestId: string;
13224
13188
  eventId: string;
@@ -5690,24 +5690,10 @@ export declare const EventDocument: z.ZodObject<{
5690
5690
  }, {
5691
5691
  type: z.ZodLiteral<"REJECT_CORRECTION">;
5692
5692
  requestId: z.ZodString;
5693
- reason: z.ZodObject<{
5694
- message: z.ZodString;
5695
- isDuplicate: z.ZodOptional<z.ZodBoolean>;
5696
- }, "strip", z.ZodTypeAny, {
5697
- message: string;
5698
- isDuplicate?: boolean | undefined;
5699
- }, {
5700
- message: string;
5701
- isDuplicate?: boolean | undefined;
5702
- }>;
5703
5693
  }>, "strip", z.ZodTypeAny, {
5704
5694
  type: "REJECT_CORRECTION";
5705
5695
  id: string & z.BRAND<"UUID">;
5706
5696
  status: "Rejected" | "Requested" | "Accepted";
5707
- reason: {
5708
- message: string;
5709
- isDuplicate?: boolean | undefined;
5710
- };
5711
5697
  transactionId: string;
5712
5698
  createdByUserType: "system" | "user";
5713
5699
  createdAt: string;
@@ -5811,10 +5797,6 @@ export declare const EventDocument: z.ZodObject<{
5811
5797
  type: "REJECT_CORRECTION";
5812
5798
  id: string;
5813
5799
  status: "Rejected" | "Requested" | "Accepted";
5814
- reason: {
5815
- message: string;
5816
- isDuplicate?: boolean | undefined;
5817
- };
5818
5800
  transactionId: string;
5819
5801
  createdByUserType: "system" | "user";
5820
5802
  createdAt: string;
@@ -9031,10 +9013,6 @@ export declare const EventDocument: z.ZodObject<{
9031
9013
  type: "REJECT_CORRECTION";
9032
9014
  id: string & z.BRAND<"UUID">;
9033
9015
  status: "Rejected" | "Requested" | "Accepted";
9034
- reason: {
9035
- message: string;
9036
- isDuplicate?: boolean | undefined;
9037
- };
9038
9016
  transactionId: string;
9039
9017
  createdByUserType: "system" | "user";
9040
9018
  createdAt: string;
@@ -10596,10 +10574,6 @@ export declare const EventDocument: z.ZodObject<{
10596
10574
  type: "REJECT_CORRECTION";
10597
10575
  id: string;
10598
10576
  status: "Rejected" | "Requested" | "Accepted";
10599
- reason: {
10600
- message: string;
10601
- isDuplicate?: boolean | undefined;
10602
- };
10603
10577
  transactionId: string;
10604
10578
  createdByUserType: "system" | "user";
10605
10579
  createdAt: string;
@@ -414,7 +414,7 @@ export declare function eventPayloadGenerator(rng: () => number): {
414
414
  requestId: string;
415
415
  keepAssignment: boolean | undefined;
416
416
  };
417
- reject: (eventId: string, requestId: string, input: Partial<Pick<RejectCorrectionActionInput, "transactionId" | "annotation" | "keepAssignment" | "reason">>) => {
417
+ reject: (eventId: string, requestId: string, input?: Partial<Pick<RejectCorrectionActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
418
418
  type: "REJECT_CORRECTION";
419
419
  transactionId: string;
420
420
  declaration: {};
@@ -422,10 +422,6 @@ export declare function eventPayloadGenerator(rng: () => number): {
422
422
  eventId: string;
423
423
  requestId: string;
424
424
  keepAssignment: boolean | undefined;
425
- reason: {
426
- message: string;
427
- isDuplicate?: boolean | undefined;
428
- };
429
425
  };
430
426
  };
431
427
  };
@@ -1980,8 +1980,7 @@ var ApprovedCorrectionAction = ActionBase.merge(
1980
1980
  var RejectedCorrectionAction = ActionBase.merge(
1981
1981
  import_zod19.z.object({
1982
1982
  type: import_zod19.z.literal(ActionType.REJECT_CORRECTION),
1983
- requestId: import_zod19.z.string(),
1984
- reason: RejectionReason
1983
+ requestId: import_zod19.z.string()
1985
1984
  })
1986
1985
  );
1987
1986
  var ReadAction = ActionBase.merge(
@@ -3917,8 +3916,7 @@ var RequestCorrectionActionInput = BaseActionInput.merge(
3917
3916
  var RejectCorrectionActionInput = BaseActionInput.merge(
3918
3917
  import_zod29.z.object({
3919
3918
  requestId: import_zod29.z.string(),
3920
- type: import_zod29.z.literal(ActionType.REJECT_CORRECTION).default(ActionType.REJECT_CORRECTION),
3921
- reason: RejectionReason
3919
+ type: import_zod29.z.literal(ActionType.REJECT_CORRECTION).default(ActionType.REJECT_CORRECTION)
3922
3920
  })
3923
3921
  );
3924
3922
  var ApproveCorrectionActionInput = BaseActionInput.merge(
@@ -6757,7 +6755,7 @@ function eventPayloadGenerator(rng) {
6757
6755
  requestId,
6758
6756
  keepAssignment: input.keepAssignment
6759
6757
  }),
6760
- reject: (eventId, requestId, input) => ({
6758
+ reject: (eventId, requestId, input = {}) => ({
6761
6759
  type: ActionType.REJECT_CORRECTION,
6762
6760
  transactionId: input.transactionId ?? getUUID(),
6763
6761
  declaration: {},
@@ -6768,8 +6766,7 @@ function eventPayloadGenerator(rng) {
6768
6766
  ),
6769
6767
  eventId,
6770
6768
  requestId,
6771
- keepAssignment: input.keepAssignment,
6772
- reason: input.reason ?? { message: "" }
6769
+ keepAssignment: input.keepAssignment
6773
6770
  })
6774
6771
  }
6775
6772
  }
@@ -6828,8 +6825,7 @@ function generateActionDocument({
6828
6825
  return {
6829
6826
  ...actionBase,
6830
6827
  requestId: getUUID(),
6831
- type: action,
6832
- reason: { message: "Correction rejection" }
6828
+ type: action
6833
6829
  };
6834
6830
  case ActionType.REGISTER:
6835
6831
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "1.8.1-rc.b849abb",
3
+ "version": "1.8.1-rc.fdf27d6",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "exports": {