@opencrvs/toolkit 2.1.0-rc.6ec0d1f → 2.1.0-rc.75e32d8

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.
@@ -101,6 +101,9 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
101
101
  annotation: {};
102
102
  keepAssignment?: boolean | undefined;
103
103
  type: "EDIT";
104
+ content: {
105
+ comment: string;
106
+ };
104
107
  eventId: string;
105
108
  };
106
109
  assign: (eventId: string, input?: Partial<Pick<AssignActionInput, "transactionId" | "assignedTo">>) => {
@@ -203,14 +203,14 @@ export declare function findLastAssignmentAction(actions: Action[]): {
203
203
  declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
204
204
  status: "Requested" | "Accepted" | "Rejected";
205
205
  type: "EDIT";
206
+ content: {
207
+ comment?: string | undefined;
208
+ };
206
209
  createdByRole?: string | undefined;
207
210
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
208
211
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
209
212
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
210
213
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
211
- content?: {
212
- comment?: string | undefined;
213
- } | undefined;
214
214
  } | {
215
215
  id: string & import("zod").$brand<"UUID">;
216
216
  transactionId: string;
@@ -1,6 +1,15 @@
1
- export declare const log: (message?: any, ...optionalParams: any[]) => void;
2
- export declare const warn: (message?: any, ...optionalParams: any[]) => void;
1
+ export declare const log: {
2
+ (...data: any[]): void;
3
+ (message?: any, ...optionalParams: any[]): void;
4
+ };
5
+ export declare const warn: {
6
+ (...data: any[]): void;
7
+ (message?: any, ...optionalParams: any[]): void;
8
+ };
3
9
  export declare const success: (...args: any[]) => void;
4
- export declare const info: (message?: any, ...optionalParams: any[]) => void;
10
+ export declare const info: {
11
+ (...data: any[]): void;
12
+ (message?: any, ...optionalParams: any[]): void;
13
+ };
5
14
  export declare const error: (...args: any[]) => void;
6
15
  //# sourceMappingURL=logger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/environment/logger.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,GAAG,mDAAc,CAAA;AAC9B,eAAO,MAAM,IAAI,mDAAe,CAAA;AAChC,eAAO,MAAM,OAAO,GAAI,GAAG,MAAM,GAAG,EAAE,SACI,CAAA;AAC1C,eAAO,MAAM,IAAI,mDAAe,CAAA;AAChC,eAAO,MAAM,KAAK,GAAI,GAAG,MAAM,GAAG,EAAE,SAA2C,CAAA"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/environment/logger.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,GAAG;;;CAAc,CAAA;AAC9B,eAAO,MAAM,IAAI;;;CAAe,CAAA;AAChC,eAAO,MAAM,OAAO,YAAa,GAAG,EAAE,SACI,CAAA;AAC1C,eAAO,MAAM,IAAI;;;CAAe,CAAA;AAChC,eAAO,MAAM,KAAK,YAAa,GAAG,EAAE,SAA2C,CAAA"}
@@ -25,23 +25,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
25
25
  }) : function(o, v) {
26
26
  o["default"] = v;
27
27
  });
28
- var __importStar = (this && this.__importStar) || (function () {
29
- var ownKeys = function(o) {
30
- ownKeys = Object.getOwnPropertyNames || function (o) {
31
- var ar = [];
32
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
33
- return ar;
34
- };
35
- return ownKeys(o);
36
- };
37
- return function (mod) {
38
- if (mod && mod.__esModule) return mod;
39
- var result = {};
40
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
41
- __setModuleDefault(result, mod);
42
- return result;
43
- };
44
- })();
28
+ var __importStar = (this && this.__importStar) || function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
45
35
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
46
36
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
47
37
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -25,23 +25,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
25
25
  }) : function(o, v) {
26
26
  o["default"] = v;
27
27
  });
28
- var __importStar = (this && this.__importStar) || (function () {
29
- var ownKeys = function(o) {
30
- ownKeys = Object.getOwnPropertyNames || function (o) {
31
- var ar = [];
32
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
33
- return ar;
34
- };
35
- return ownKeys(o);
36
- };
37
- return function (mod) {
38
- if (mod && mod.__esModule) return mod;
39
- var result = {};
40
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
41
- __setModuleDefault(result, mod);
42
- return result;
43
- };
44
- })();
28
+ var __importStar = (this && this.__importStar) || function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
45
35
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
46
36
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
47
37
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -25,23 +25,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
25
25
  }) : function(o, v) {
26
26
  o["default"] = v;
27
27
  });
28
- var __importStar = (this && this.__importStar) || (function () {
29
- var ownKeys = function(o) {
30
- ownKeys = Object.getOwnPropertyNames || function (o) {
31
- var ar = [];
32
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
33
- return ar;
34
- };
35
- return ownKeys(o);
36
- };
37
- return function (mod) {
38
- if (mod && mod.__esModule) return mod;
39
- var result = {};
40
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
41
- __setModuleDefault(result, mod);
42
- return result;
43
- };
44
- })();
28
+ var __importStar = (this && this.__importStar) || function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
45
35
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
46
36
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
47
37
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -25,23 +25,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
25
25
  }) : function(o, v) {
26
26
  o["default"] = v;
27
27
  });
28
- var __importStar = (this && this.__importStar) || (function () {
29
- var ownKeys = function(o) {
30
- ownKeys = Object.getOwnPropertyNames || function (o) {
31
- var ar = [];
32
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
33
- return ar;
34
- };
35
- return ownKeys(o);
36
- };
37
- return function (mod) {
38
- if (mod && mod.__esModule) return mod;
39
- var result = {};
40
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
41
- __setModuleDefault(result, mod);
42
- return result;
43
- };
44
- })();
28
+ var __importStar = (this && this.__importStar) || function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
45
35
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
46
36
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
47
37
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -25,23 +25,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
25
25
  }) : function(o, v) {
26
26
  o["default"] = v;
27
27
  });
28
- var __importStar = (this && this.__importStar) || (function () {
29
- var ownKeys = function(o) {
30
- ownKeys = Object.getOwnPropertyNames || function (o) {
31
- var ar = [];
32
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
33
- return ar;
34
- };
35
- return ownKeys(o);
36
- };
37
- return function (mod) {
38
- if (mod && mod.__esModule) return mod;
39
- var result = {};
40
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
41
- __setModuleDefault(result, mod);
42
- return result;
43
- };
44
- })();
28
+ var __importStar = (this && this.__importStar) || function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
45
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
46
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
47
37
  };
@@ -1676,10 +1676,9 @@ var NotifiedAction = ActionBase.extend(
1676
1676
  var EditAction = ActionBase.extend(
1677
1677
  z14.object({
1678
1678
  type: z14.literal(ActionType.EDIT),
1679
- /** @deprecated New Edit-actions should no longer contain content. This is kept for old 2.0 edits. */
1680
1679
  content: z14.object({
1681
1680
  comment: z14.string().describe("Comment for the edit action.").optional()
1682
- }).optional()
1681
+ })
1683
1682
  }).shape
1684
1683
  );
1685
1684
  var PrintContent = z14.object({
@@ -6416,7 +6415,10 @@ var DeclareActionInput = BaseActionInput.extend(
6416
6415
  );
6417
6416
  var EditActionInput = BaseActionInput.extend(
6418
6417
  z38.object({
6419
- type: z38.literal(ActionType.EDIT).default(ActionType.EDIT)
6418
+ type: z38.literal(ActionType.EDIT).default(ActionType.EDIT),
6419
+ content: z38.object({
6420
+ comment: z38.string().describe("Comment for the edit action.").optional()
6421
+ })
6420
6422
  }).shape
6421
6423
  );
6422
6424
  var PrintCertificateActionInput = BaseActionInput.extend(
@@ -9961,6 +9963,7 @@ function eventPayloadGenerator(rng, configuration = tennisClubMembershipEvent) {
9961
9963
  },
9962
9964
  edit: (eventId, input = {}) => ({
9963
9965
  type: ActionType.EDIT,
9966
+ content: { comment: "Test comment" },
9964
9967
  transactionId: input.transactionId ?? getUUID(),
9965
9968
  declaration: input.declaration ?? generateActionDeclarationInput(configuration, ActionType.EDIT, rng),
9966
9969
  annotation: input.annotation ?? generateActionAnnotationInput(configuration, ActionType.EDIT, rng),
@@ -25,23 +25,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
25
25
  }) : function(o, v) {
26
26
  o["default"] = v;
27
27
  });
28
- var __importStar = (this && this.__importStar) || (function () {
29
- var ownKeys = function(o) {
30
- ownKeys = Object.getOwnPropertyNames || function (o) {
31
- var ar = [];
32
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
33
- return ar;
34
- };
35
- return ownKeys(o);
36
- };
37
- return function (mod) {
38
- if (mod && mod.__esModule) return mod;
39
- var result = {};
40
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
41
- __setModuleDefault(result, mod);
42
- return result;
43
- };
44
- })();
28
+ var __importStar = (this && this.__importStar) || function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
45
35
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
46
36
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
47
37
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -25,23 +25,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
25
25
  }) : function(o, v) {
26
26
  o["default"] = v;
27
27
  });
28
- var __importStar = (this && this.__importStar) || (function () {
29
- var ownKeys = function(o) {
30
- ownKeys = Object.getOwnPropertyNames || function (o) {
31
- var ar = [];
32
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
33
- return ar;
34
- };
35
- return ownKeys(o);
36
- };
37
- return function (mod) {
38
- if (mod && mod.__esModule) return mod;
39
- var result = {};
40
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
41
- __setModuleDefault(result, mod);
42
- return result;
43
- };
44
- })();
28
+ var __importStar = (this && this.__importStar) || function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
45
35
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
46
36
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
47
37
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -1216,10 +1216,9 @@ var NotifiedAction = ActionBase.extend(
1216
1216
  var EditAction = ActionBase.extend(
1217
1217
  z14.object({
1218
1218
  type: z14.literal(ActionType.EDIT),
1219
- /** @deprecated New Edit-actions should no longer contain content. This is kept for old 2.0 edits. */
1220
1219
  content: z14.object({
1221
1220
  comment: z14.string().describe("Comment for the edit action.").optional()
1222
- }).optional()
1221
+ })
1223
1222
  }).shape
1224
1223
  );
1225
1224
  var PrintContent = z14.object({
@@ -4653,7 +4652,10 @@ var DeclareActionInput = BaseActionInput.extend(
4653
4652
  );
4654
4653
  var EditActionInput = BaseActionInput.extend(
4655
4654
  z38.object({
4656
- type: z38.literal(ActionType.EDIT).default(ActionType.EDIT)
4655
+ type: z38.literal(ActionType.EDIT).default(ActionType.EDIT),
4656
+ content: z38.object({
4657
+ comment: z38.string().describe("Comment for the edit action.").optional()
4658
+ })
4657
4659
  }).shape
4658
4660
  );
4659
4661
  var PrintCertificateActionInput = BaseActionInput.extend(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "2.1.0-rc.6ec0d1f",
3
+ "version": "2.1.0-rc.75e32d8",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "bin": {
@@ -33,7 +33,7 @@
33
33
  "ajv-formats": "^3.0.1",
34
34
  "date-fns": "^2.28.0",
35
35
  "dotenv": "^16.4.5",
36
- "glob": "11.1.0",
36
+ "glob": "11.0.3",
37
37
  "handlebars": "^4.7.8",
38
38
  "js-yaml": "4.1.0",
39
39
  "jwt-decode": "^3.0.0",
@@ -59,7 +59,7 @@
59
59
  "@types/ssh2": "^1.15.5",
60
60
  "@types/uuid": "^9.0.3",
61
61
  "esbuild": "^0.24.0",
62
- "typescript": "6.0.3"
62
+ "typescript": "^5.6.3"
63
63
  },
64
64
  "moduleNameMapper": {
65
65
  "@opencrvs/commons/events": "@opencrvs/commons/build/dist/common/events/index.js",
@@ -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":"6.0.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/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"}