@opencrvs/toolkit 1.8.1-rc.be16155 → 1.8.1-rc.e32d7b8

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.
@@ -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
  };
@@ -6758,6 +6758,10 @@ export declare function findActiveDrafts(event: EventDocument, drafts: Draft[]):
6758
6758
  start: string;
6759
6759
  end: string;
6760
6760
  } | null | undefined> | null | undefined;
6761
+ actionDetails?: {
6762
+ templateId?: string | undefined;
6763
+ isImmediateCorrection?: boolean | undefined;
6764
+ } | null | undefined;
6761
6765
  originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
6762
6766
  };
6763
6767
  }[];
@@ -39,6 +39,7 @@ __export(events_exports, {
39
39
  ActionConfig: () => ActionConfig,
40
40
  ActionConfigBase: () => ActionConfigBase,
41
41
  ActionCreationMetadata: () => ActionCreationMetadata,
42
+ ActionDetails: () => ActionDetails,
42
43
  ActionDocument: () => ActionDocument,
43
44
  ActionFormConfig: () => ActionFormConfig,
44
45
  ActionInput: () => ActionInput,
@@ -1882,6 +1883,10 @@ var ActionStatus = {
1882
1883
  Accepted: "Accepted",
1883
1884
  Rejected: "Rejected"
1884
1885
  };
1886
+ var ActionDetails = import_zod19.z.object({
1887
+ templateId: import_zod19.z.string().optional(),
1888
+ isImmediateCorrection: import_zod19.z.boolean().optional()
1889
+ });
1885
1890
  var ActionBase = import_zod19.z.object({
1886
1891
  id: UUID,
1887
1892
  transactionId: import_zod19.z.string(),
@@ -1893,6 +1898,7 @@ var ActionBase = import_zod19.z.object({
1893
1898
  createdAtLocation: CreatedAtLocation,
1894
1899
  declaration: ActionUpdate,
1895
1900
  annotation: ActionUpdate.optional().nullable(),
1901
+ actionDetails: ActionDetails.optional().nullable(),
1896
1902
  status: import_zod19.z.enum([
1897
1903
  ActionStatus.Requested,
1898
1904
  ActionStatus.Accepted,
@@ -1980,8 +1986,7 @@ var ApprovedCorrectionAction = ActionBase.merge(
1980
1986
  var RejectedCorrectionAction = ActionBase.merge(
1981
1987
  import_zod19.z.object({
1982
1988
  type: import_zod19.z.literal(ActionType.REJECT_CORRECTION),
1983
- requestId: import_zod19.z.string(),
1984
- reason: RejectionReason
1989
+ requestId: import_zod19.z.string()
1985
1990
  })
1986
1991
  );
1987
1992
  var ReadAction = ActionBase.merge(
@@ -3835,6 +3840,7 @@ var BaseActionInput = import_zod29.z.object({
3835
3840
  transactionId: import_zod29.z.string(),
3836
3841
  declaration: ActionUpdate.default({}),
3837
3842
  annotation: ActionUpdate.optional(),
3843
+ actionDetails: ActionDetails.optional(),
3838
3844
  originalActionId: UUID.optional(),
3839
3845
  // should not be part of base action.
3840
3846
  keepAssignment: import_zod29.z.boolean().optional()
@@ -3917,8 +3923,7 @@ var RequestCorrectionActionInput = BaseActionInput.merge(
3917
3923
  var RejectCorrectionActionInput = BaseActionInput.merge(
3918
3924
  import_zod29.z.object({
3919
3925
  requestId: import_zod29.z.string(),
3920
- type: import_zod29.z.literal(ActionType.REJECT_CORRECTION).default(ActionType.REJECT_CORRECTION),
3921
- reason: RejectionReason
3926
+ type: import_zod29.z.literal(ActionType.REJECT_CORRECTION).default(ActionType.REJECT_CORRECTION)
3922
3927
  })
3923
3928
  );
3924
3929
  var ApproveCorrectionActionInput = BaseActionInput.merge(
@@ -6757,7 +6762,7 @@ function eventPayloadGenerator(rng) {
6757
6762
  requestId,
6758
6763
  keepAssignment: input.keepAssignment
6759
6764
  }),
6760
- reject: (eventId, requestId, input) => ({
6765
+ reject: (eventId, requestId, input = {}) => ({
6761
6766
  type: ActionType.REJECT_CORRECTION,
6762
6767
  transactionId: input.transactionId ?? getUUID(),
6763
6768
  declaration: {},
@@ -6768,8 +6773,7 @@ function eventPayloadGenerator(rng) {
6768
6773
  ),
6769
6774
  eventId,
6770
6775
  requestId,
6771
- keepAssignment: input.keepAssignment,
6772
- reason: input.reason ?? { message: "" }
6776
+ keepAssignment: input.keepAssignment
6773
6777
  })
6774
6778
  }
6775
6779
  }
@@ -6828,8 +6832,7 @@ function generateActionDocument({
6828
6832
  return {
6829
6833
  ...actionBase,
6830
6834
  requestId: getUUID(),
6831
- type: action,
6832
- reason: { message: "Correction rejection" }
6835
+ type: action
6833
6836
  };
6834
6837
  case ActionType.REGISTER:
6835
6838
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "1.8.1-rc.be16155",
3
+ "version": "1.8.1-rc.e32d7b8",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "exports": {