@opencrvs/toolkit 2.1.0-rc.b5d11bf → 2.1.0-rc.b632d41

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.
Files changed (62) hide show
  1. package/dist/application-config/index.js +1 -2
  2. package/dist/commons/api/router.d.ts +1640 -1604
  3. package/dist/commons/application-config/index.d.ts +6 -6
  4. package/dist/commons/conditionals/conditionals.d.ts +323 -32
  5. package/dist/commons/events/ActionConfig.d.ts +105 -105
  6. package/dist/commons/events/ActionDocument.d.ts +119 -119
  7. package/dist/commons/events/ActionInput.d.ts +6 -0
  8. package/dist/commons/events/ActionType.d.ts +62 -62
  9. package/dist/commons/events/AdvancedSearchConfig.d.ts +507 -507
  10. package/dist/commons/events/AuditLog.d.ts +43 -43
  11. package/dist/commons/events/CompositeFieldValue.d.ts +4 -4
  12. package/dist/commons/events/Conditional.d.ts +3 -3
  13. package/dist/commons/events/CountryConfigQueryInput.d.ts +590 -590
  14. package/dist/commons/events/Draft.d.ts +37 -37
  15. package/dist/commons/events/DynamicFieldValue.d.ts +9 -9
  16. package/dist/commons/events/EventConfig.d.ts +5 -5
  17. package/dist/commons/events/EventDocument.d.ts +48 -48
  18. package/dist/commons/events/EventIndex.d.ts +62 -62
  19. package/dist/commons/events/EventMetadata.d.ts +40 -40
  20. package/dist/commons/events/FieldConfig.d.ts +337 -337
  21. package/dist/commons/events/FieldType.d.ts +51 -51
  22. package/dist/commons/events/FieldTypeMapping.d.ts +100 -100
  23. package/dist/commons/events/FieldValue.d.ts +12 -12
  24. package/dist/commons/events/Flag.d.ts +15 -15
  25. package/dist/commons/events/TemplateConfig.d.ts +1 -1
  26. package/dist/commons/events/WorkqueueColumnConfig.d.ts +40 -40
  27. package/dist/commons/events/WorkqueueConfig.d.ts +820 -820
  28. package/dist/commons/events/deduplication.d.ts +1 -1
  29. package/dist/commons/events/event.d.ts +2 -2
  30. package/dist/commons/events/field.d.ts +198 -69
  31. package/dist/commons/events/locations.d.ts +4 -4
  32. package/dist/commons/events/mocks.test.utils.d.ts +2 -2
  33. package/dist/commons/events/scopes.d.ts +4 -4
  34. package/dist/commons/events/state/index.d.ts +17 -17
  35. package/dist/commons/events/state/utils.d.ts +7 -7
  36. package/dist/commons/events/test.utils.d.ts +38 -35
  37. package/dist/commons/events/utils.d.ts +114 -114
  38. package/dist/commons/notification/UserNotifications.d.ts +10 -10
  39. package/dist/environment/derived-variables.d.ts +119 -119
  40. package/dist/environment/derived-variables.d.ts.map +1 -1
  41. package/dist/environment/logger.d.ts +12 -3
  42. package/dist/environment/logger.d.ts.map +1 -1
  43. package/dist/environment/manage-users.js +7 -17
  44. package/dist/environment/questions.d.ts +74 -75
  45. package/dist/environment/questions.d.ts.map +1 -1
  46. package/dist/environment/setup-environment.js +14 -8
  47. package/dist/environment/swarm-to-k8s.js +7 -17
  48. package/dist/environment/update-workflows.js +7 -17
  49. package/dist/environment/users.js +7 -17
  50. package/dist/environment/utils.d.ts +1 -1
  51. package/dist/environment/utils.js +7 -17
  52. package/dist/events/deduplication.d.ts +1 -1
  53. package/dist/events/index.js +6 -3
  54. package/dist/migrations/v2.0/convert-config-files-to-ts.js +7 -17
  55. package/dist/migrations/v2.0/migrate-application-config-url.js +3 -4
  56. package/dist/migrations/v2.0/remove-hearth-migrations.js +7 -17
  57. package/dist/notification/index.js +5 -3
  58. package/dist/scopes/index.d.ts +146 -146
  59. package/opencrvs-toolkit-2.1.0-rc.b632d41.tgz +0 -0
  60. package/package.json +4 -3
  61. package/tsconfig.tsbuildinfo +1 -1
  62. package/opencrvs-toolkit-2.1.0-rc.b5d11bf.tgz +0 -0
@@ -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) {
@@ -1,7 +1,7 @@
1
1
  import { Secret, Variable } from './github';
2
2
  import { Answers } from './custom-types';
3
3
  export declare function generateLongPassword(): string;
4
- export declare function findExistingValue<T extends string>(name: string, type: T, scope: 'ENVIRONMENT' | 'REPOSITORY', existingValues: Array<Secret | Variable>): (T extends 'SECRET' ? Secret : T extends 'VARIABLE' ? Variable : never) | undefined;
4
+ export declare function findExistingValue<T extends string>(name: string, type: T, scope: 'ENVIRONMENT' | 'REPOSITORY', existingValues: Array<Secret | Variable>): (T extends "SECRET" ? Secret : T extends "VARIABLE" ? Variable : never) | undefined;
5
5
  /**
6
6
  * Merges and stores secrets in `.env.{environment}` file.
7
7
  * Updates existing variables, preserves unchanged ones, adds new ones.
@@ -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
  };
@@ -59,8 +59,8 @@ export declare function field(fieldId: string): {
59
59
  fieldId: string;
60
60
  type: "dateRange";
61
61
  options: {
62
- pivot?: number | undefined;
63
62
  days: number;
63
+ pivot?: number | undefined;
64
64
  boost?: number | undefined;
65
65
  matchAgainst?: string | undefined;
66
66
  };
@@ -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) {
@@ -92,10 +92,9 @@ const FUNCTION_LIKE_KINDS = [
92
92
  * Falls back to `<anonymous>` when nothing useful can be derived.
93
93
  */
94
94
  function describeFunction(node) {
95
- var _a;
96
- var _b, _c;
95
+ var _a, _b, _c;
97
96
  if (ts_morph_1.Node.isFunctionDeclaration(node) || ts_morph_1.Node.isMethodDeclaration(node)) {
98
- return (_b = node.getName()) !== null && _b !== void 0 ? _b : '<anonymous>';
97
+ return (_a = node.getName()) !== null && _a !== void 0 ? _a : '<anonymous>';
99
98
  }
100
99
  // FunctionExpression / ArrowFunction: try to pick up the assignment target.
101
100
  const parent = node.getParent();
@@ -107,7 +106,7 @@ function describeFunction(node) {
107
106
  }
108
107
  if (ts_morph_1.Node.isFunctionExpression(node) &&
109
108
  node.getNameNode() !== undefined) {
110
- return (_c = (_a = node.getNameNode()) === null || _a === void 0 ? void 0 : _a.getText()) !== null && _c !== void 0 ? _c : '<anonymous>';
109
+ return (_c = (_b = node.getNameNode()) === null || _b === void 0 ? void 0 : _b.getText()) !== null && _c !== void 0 ? _c : '<anonymous>';
111
110
  }
112
111
  return '<anonymous>';
113
112
  }
@@ -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(