@opencrvs/toolkit 2.0.0-rc.c2c75ca → 2.0.0-rc.c2f305f

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 (125) hide show
  1. package/README.md +15 -0
  2. package/build.sh +3 -2
  3. package/create-countryconfig/index.js +103 -0
  4. package/create-countryconfig/package.json +21 -0
  5. package/dist/application-config/index.js +314 -131
  6. package/dist/cli.js +3782 -212
  7. package/dist/commons/api/router.d.ts +3413 -269
  8. package/dist/commons/application-config/index.d.ts +17 -4
  9. package/dist/commons/conditionals/conditionals.d.ts +360 -10
  10. package/dist/commons/conditionals/validate.d.ts +52 -2
  11. package/dist/commons/events/ActionConfig.d.ts +28 -2
  12. package/dist/commons/events/ActionDocument.d.ts +6 -0
  13. package/dist/commons/events/ActionInput.d.ts +114 -0
  14. package/dist/commons/events/AdvancedSearchConfig.d.ts +342 -0
  15. package/dist/commons/events/CountryConfigQueryInput.d.ts +42 -0
  16. package/dist/commons/events/Draft.d.ts +4 -2
  17. package/dist/commons/events/EventDocument.d.ts +3 -0
  18. package/dist/commons/events/EventIndex.d.ts +14 -3
  19. package/dist/commons/events/EventMetadata.d.ts +0 -7
  20. package/dist/commons/events/FieldConfig.d.ts +388 -50
  21. package/dist/commons/events/FieldType.d.ts +1 -0
  22. package/dist/commons/events/FieldTypeMapping.d.ts +1 -1
  23. package/dist/commons/events/FieldValue.d.ts +6 -0
  24. package/dist/commons/events/WorkqueueConfig.d.ts +189 -150
  25. package/dist/commons/events/field.d.ts +53 -1
  26. package/dist/commons/events/index.d.ts +2 -0
  27. package/dist/commons/events/locations.d.ts +38 -1
  28. package/dist/commons/events/mocks.test.utils.d.ts +19 -0
  29. package/dist/commons/events/scopes.d.ts +24 -1
  30. package/dist/commons/events/state/flags.d.ts +16 -0
  31. package/dist/commons/events/state/index.d.ts +0 -4
  32. package/dist/commons/events/state/utils.d.ts +12 -289
  33. package/dist/commons/events/utils.d.ts +13 -2
  34. package/dist/conditionals/index.js +92 -9
  35. package/dist/environment/custom-types.d.ts +33 -0
  36. package/dist/environment/custom-types.d.ts.map +1 -0
  37. package/dist/environment/custom-types.js +12 -0
  38. package/dist/environment/derived-variables.d.ts +134 -0
  39. package/dist/environment/derived-variables.d.ts.map +1 -0
  40. package/dist/environment/derived-variables.js +169 -0
  41. package/dist/environment/editor-questions.d.ts +4 -0
  42. package/dist/environment/editor-questions.d.ts.map +1 -0
  43. package/dist/environment/editor-questions.js +67 -0
  44. package/dist/environment/git.d.ts +5 -0
  45. package/dist/environment/git.d.ts.map +1 -0
  46. package/dist/environment/git.js +38 -0
  47. package/dist/environment/github.d.ts +26 -0
  48. package/dist/environment/github.d.ts.map +1 -0
  49. package/dist/environment/github.js +247 -0
  50. package/dist/environment/index.d.ts +5 -0
  51. package/dist/environment/index.d.ts.map +1 -0
  52. package/dist/environment/index.js +71 -0
  53. package/dist/environment/logger.d.ts +15 -0
  54. package/dist/environment/logger.d.ts.map +1 -0
  55. package/dist/environment/logger.js +25 -0
  56. package/dist/environment/manage-users.d.ts +11 -0
  57. package/dist/environment/manage-users.d.ts.map +1 -0
  58. package/dist/environment/manage-users.js +497 -0
  59. package/dist/environment/questions-helper.d.ts +15 -0
  60. package/dist/environment/questions-helper.d.ts.map +1 -0
  61. package/dist/environment/questions-helper.js +70 -0
  62. package/dist/environment/questions.d.ts +199 -0
  63. package/dist/environment/questions.d.ts.map +1 -0
  64. package/dist/environment/questions.js +412 -0
  65. package/dist/environment/setup-environment.d.ts +2 -0
  66. package/dist/environment/setup-environment.d.ts.map +1 -0
  67. package/dist/environment/setup-environment.js +794 -0
  68. package/dist/environment/ssh-keygen.d.ts +5 -0
  69. package/dist/environment/ssh-keygen.d.ts.map +1 -0
  70. package/dist/environment/ssh-keygen.js +21 -0
  71. package/dist/environment/swarm-to-k8s.d.ts +2 -0
  72. package/dist/environment/swarm-to-k8s.d.ts.map +1 -0
  73. package/dist/environment/swarm-to-k8s.js +173 -0
  74. package/dist/environment/templates.d.ts +27 -0
  75. package/dist/environment/templates.d.ts.map +1 -0
  76. package/dist/environment/templates.js +162 -0
  77. package/dist/environment/update-workflows.d.ts +2 -0
  78. package/dist/environment/update-workflows.d.ts.map +1 -0
  79. package/dist/environment/update-workflows.js +169 -0
  80. package/dist/environment/users.d.ts +2 -0
  81. package/dist/environment/users.d.ts.map +1 -0
  82. package/dist/environment/users.js +112 -0
  83. package/dist/environment/utils.d.ts +18 -0
  84. package/dist/environment/utils.d.ts.map +1 -0
  85. package/dist/environment/utils.js +100 -0
  86. package/dist/events/index.js +1206 -291
  87. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts.map +1 -1
  88. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.js +60 -35
  89. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +1 -1
  90. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
  91. package/dist/migrations/v2.0/checkout-upstream-files.js +1 -2
  92. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts +9 -1
  93. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts.map +1 -1
  94. package/dist/migrations/v2.0/delete-infrastructure-directory.js +66 -20
  95. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts +3 -0
  96. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts.map +1 -0
  97. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.js +110 -0
  98. package/dist/migrations/v2.0/index.d.ts +5 -3
  99. package/dist/migrations/v2.0/index.d.ts.map +1 -1
  100. package/dist/migrations/v2.0/index.js +546 -176
  101. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts.map +1 -1
  102. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.js +90 -1
  103. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts +11 -1
  104. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts.map +1 -1
  105. package/dist/migrations/v2.0/merge-infrastructure-directory.js +17 -16
  106. package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -1
  107. package/dist/migrations/v2.0/migrate-scopes.js +54 -30
  108. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +1 -1
  109. package/dist/migrations/v2.0/migrate-workqueue-configs.js +140 -59
  110. package/dist/notification/index.js +938 -163
  111. package/dist/scopes/index.d.ts +91 -16
  112. package/dist/scopes/index.js +55 -12
  113. package/dist/templates/charts-values/dependencies/values.override.yaml +4 -0
  114. package/dist/templates/charts-values/dependencies/values.yaml +83 -0
  115. package/dist/templates/charts-values/opencrvs-services/values.override.yaml +4 -0
  116. package/dist/templates/charts-values/opencrvs-services/values.yaml +80 -0
  117. package/dist/templates/charts-values/traefik/values.override.yaml +4 -0
  118. package/dist/templates/charts-values/traefik/values.yaml +115 -0
  119. package/dist/templates/inventory/inventory.template.yml +100 -0
  120. package/dist/templates/inventory/production.example.yml +77 -0
  121. package/dist/templates/inventory/qa.example.yml +48 -0
  122. package/opencrvs-toolkit-2.0.0-rc.c2f305f.tgz +0 -0
  123. package/package.json +20 -2
  124. package/tsconfig.tsbuildinfo +1 -1
  125. package/opencrvs-toolkit-2.0.0-rc.c2c75ca.tgz +0 -0
@@ -41,6 +41,7 @@ declare const AllScopeOptions: z.ZodObject<{
41
41
  location: "location";
42
42
  all: "all";
43
43
  }>>;
44
+ role: z.ZodOptional<z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>>;
44
45
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
45
46
  placeOfEvent: z.ZodOptional<z.ZodEnum<{
46
47
  administrativeArea: "administrativeArea";
@@ -66,6 +67,7 @@ declare const AllScopeOptions: z.ZodObject<{
66
67
  }, z.core.$strip>;
67
68
  type AllScopeOptions = z.infer<typeof AllScopeOptions>;
68
69
  export declare const ScopeOptionKey: z.ZodEnum<{
70
+ role: "role";
69
71
  event: "event";
70
72
  placeOfEvent: "placeOfEvent";
71
73
  declaredIn: "declaredIn";
@@ -220,6 +222,56 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
220
222
  templates: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
221
223
  }, z.core.$strip>>;
222
224
  }, z.core.$strip>], "type">;
225
+ declare const SystemScopeType: z.ZodEnum<{
226
+ "organisation.read-locations": "organisation.read-locations";
227
+ "user.read": "user.read";
228
+ "user.create": "user.create";
229
+ "user.edit": "user.edit";
230
+ "user.search": "user.search";
231
+ }>;
232
+ export type SystemScopeType = z.infer<typeof SystemScopeType>;
233
+ declare const UserScopeType: z.ZodEnum<{
234
+ "user.read": "user.read";
235
+ "user.create": "user.create";
236
+ "user.edit": "user.edit";
237
+ "user.search": "user.search";
238
+ }>;
239
+ export type UserScopeType = z.infer<typeof UserScopeType>;
240
+ declare const ScopesWithRoleOption: z.ZodEnum<{
241
+ "user.create": "user.create";
242
+ "user.edit": "user.edit";
243
+ }>;
244
+ export type ScopesWithRoleOption = z.infer<typeof ScopesWithRoleOption>;
245
+ export declare const UserScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
246
+ type: z.ZodEnum<{
247
+ "user.create": "user.create";
248
+ "user.edit": "user.edit";
249
+ }>;
250
+ options: z.ZodOptional<z.ZodObject<{
251
+ accessLevel: z.ZodOptional<z.ZodEnum<{
252
+ administrativeArea: "administrativeArea";
253
+ location: "location";
254
+ all: "all";
255
+ }>>;
256
+ role: z.ZodOptional<z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>>;
257
+ }, z.core.$strip>>;
258
+ }, z.core.$strip>, z.ZodObject<{
259
+ type: z.ZodEnum<{
260
+ "user.read": "user.read";
261
+ "user.search": "user.search";
262
+ }>;
263
+ options: z.ZodOptional<z.ZodObject<{
264
+ accessLevel: z.ZodOptional<z.ZodEnum<{
265
+ administrativeArea: "administrativeArea";
266
+ location: "location";
267
+ all: "all";
268
+ }>>;
269
+ }, z.core.$strip>>;
270
+ }, z.core.$strip>], "type">;
271
+ export type UserScopeV2 = z.infer<typeof UserScopeV2>;
272
+ export declare function scopeUsesRoleOptions(scope: UserScopeV2): scope is Extract<UserScopeV2, {
273
+ type: ScopesWithRoleOption;
274
+ }>;
223
275
  export declare function scopeUsesDeclaredOptions(scope: Scope): scope is Extract<Scope, {
224
276
  type: z.infer<typeof ScopesWithDeclaredOptions>;
225
277
  }>;
@@ -286,13 +338,6 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
286
338
  }, z.core.$strip>], "type">;
287
339
  export type RecordScopeV2 = z.infer<typeof RecordScopeV2>;
288
340
  export type ResolvedRecordScopeV2 = z.infer<typeof ResolvedRecordScopeV2>;
289
- declare const SystemScopeType: z.ZodEnum<{
290
- "organisation.read-locations": "organisation.read-locations";
291
- "user.read": "user.read";
292
- "user.create": "user.create";
293
- "user.edit": "user.edit";
294
- }>;
295
- export type SystemScopeType = z.infer<typeof SystemScopeType>;
296
341
  /** The primary scope schema which gathers all scope types together. All scopes are discriminated by type and options are determined according to the type. */
297
342
  export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
298
343
  type: z.ZodEnum<{
@@ -437,11 +482,31 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
437
482
  }, z.core.$strip>>;
438
483
  }, z.core.$strip>, z.ZodObject<{
439
484
  type: z.ZodEnum<{
440
- "organisation.read-locations": "organisation.read-locations";
441
- "user.read": "user.read";
442
485
  "user.create": "user.create";
443
486
  "user.edit": "user.edit";
444
487
  }>;
488
+ options: z.ZodOptional<z.ZodObject<{
489
+ accessLevel: z.ZodOptional<z.ZodEnum<{
490
+ administrativeArea: "administrativeArea";
491
+ location: "location";
492
+ all: "all";
493
+ }>>;
494
+ role: z.ZodOptional<z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>>;
495
+ }, z.core.$strip>>;
496
+ }, z.core.$strip>, z.ZodObject<{
497
+ type: z.ZodEnum<{
498
+ "user.read": "user.read";
499
+ "user.search": "user.search";
500
+ }>;
501
+ options: z.ZodOptional<z.ZodObject<{
502
+ accessLevel: z.ZodOptional<z.ZodEnum<{
503
+ administrativeArea: "administrativeArea";
504
+ location: "location";
505
+ all: "all";
506
+ }>>;
507
+ }, z.core.$strip>>;
508
+ }, z.core.$strip>, z.ZodObject<{
509
+ type: z.ZodLiteral<"organisation.read-locations">;
445
510
  options: z.ZodOptional<z.ZodObject<{
446
511
  accessLevel: z.ZodOptional<z.ZodEnum<{
447
512
  administrativeArea: "administrativeArea";
@@ -495,6 +560,7 @@ export declare const ScopeType: z.ZodEnum<{
495
560
  "user.read": "user.read";
496
561
  "user.create": "user.create";
497
562
  "user.edit": "user.edit";
563
+ "user.search": "user.search";
498
564
  workqueue: "workqueue";
499
565
  "dashboard.view": "dashboard.view";
500
566
  }>;
@@ -514,14 +580,12 @@ export type EncodedScope = z.infer<typeof EncodedScope>;
514
580
  */
515
581
  export declare const encodeScope: (scope: Scope) => EncodedScope;
516
582
  /**
517
- * Converts a scope object into an encoded query string representation.
583
+ * Converts an encoded scope string into a scope object.
518
584
  *
519
- * @TODO scope param could be defined as EncodedScope instead of string.
520
- *
521
- * @param scope - The scope object to encode.
522
- * @returns The encoded scope as a branded string (`EncodedScope`).
585
+ * @param scope - The encoded scope string to decode.
586
+ * @returns The decoded scope object.
523
587
  */
524
- export declare const decodeScope: (query: EncodedScope) => {
588
+ export declare const decodeScope: (encodedScope: EncodedScope) => {
525
589
  type: "record.create" | "record.declare" | "record.notify";
526
590
  options?: {
527
591
  event?: string[] | undefined;
@@ -567,10 +631,21 @@ export declare const decodeScope: (query: EncodedScope) => {
567
631
  registeredBy?: "user" | undefined;
568
632
  templates?: string[] | undefined;
569
633
  } | undefined;
634
+ } | {
635
+ type: "user.create" | "user.edit";
636
+ options?: {
637
+ accessLevel?: "administrativeArea" | "location" | "all" | undefined;
638
+ role?: string[] | undefined;
639
+ } | undefined;
640
+ } | {
641
+ type: "user.read" | "user.search";
642
+ options?: {
643
+ accessLevel?: "administrativeArea" | "location" | "all" | undefined;
644
+ } | undefined;
570
645
  } | {
571
646
  type: "bypassratelimit" | "record.reindex" | "user.data-seeding" | "integration.create" | "record.import" | "config.update-all" | "attachment.upload" | "profile.electronic-signature" | "user.read-only-my-audit" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "record.confirm-registration" | "record.reject-registration";
572
647
  } | {
573
- type: "organisation.read-locations" | "user.read" | "user.create" | "user.edit";
648
+ type: "organisation.read-locations";
574
649
  options?: {
575
650
  accessLevel?: "administrativeArea" | "location" | "all" | undefined;
576
651
  } | undefined;
@@ -42,6 +42,7 @@ __export(scopes_exports, {
42
42
  ScopesWithFullOptions: () => ScopesWithFullOptions,
43
43
  ScopesWithPlaceEventOptions: () => ScopesWithPlaceEventOptions,
44
44
  UserFilter: () => UserFilter,
45
+ UserScopeV2: () => UserScopeV2,
45
46
  canUserCreateEvent: () => canUserCreateEvent,
46
47
  decodeScope: () => decodeScope,
47
48
  defineRoles: () => defineRoles,
@@ -54,7 +55,8 @@ __export(scopes_exports, {
54
55
  isCustomActionScope: () => isCustomActionScope,
55
56
  scopeUsesDeclaredOptions: () => scopeUsesDeclaredOptions,
56
57
  scopeUsesFullOptions: () => scopeUsesFullOptions,
57
- scopeUsesPrintCertifiedCopiesOptions: () => scopeUsesPrintCertifiedCopiesOptions
58
+ scopeUsesPrintCertifiedCopiesOptions: () => scopeUsesPrintCertifiedCopiesOptions,
59
+ scopeUsesRoleOptions: () => scopeUsesRoleOptions
58
60
  });
59
61
  module.exports = __toCommonJS(scopes_exports);
60
62
  var z4 = __toESM(require("zod/v4"));
@@ -139,6 +141,10 @@ var scopeByEvent = z3.preprocess(
139
141
  (val) => val === void 0 ? void 0 : [val].flat(),
140
142
  z3.array(z3.string()).optional()
141
143
  ).describe("Event type, e.g. birth, death");
144
+ var userRole = z3.preprocess(
145
+ (val) => val === void 0 ? void 0 : [val].flat(),
146
+ z3.array(z3.string()).optional()
147
+ ).describe("User role, e.g. admin, field agent");
142
148
  var scopeOptionsPlaceEvent = z3.object({
143
149
  event: scopeByEvent,
144
150
  placeOfEvent: JurisdictionFilter.optional()
@@ -162,6 +168,9 @@ var CustomActionScopeOptions = AllRecordScopeOptions.extend({
162
168
  var AccessLevelOptions = z3.object({
163
169
  accessLevel: JurisdictionFilter.optional()
164
170
  });
171
+ var AllUserScopeOptions = AccessLevelOptions.extend({
172
+ role: userRole.optional()
173
+ });
165
174
  var WorkqueueOrDashboardOptions = z3.object({
166
175
  ids: z3.preprocess(
167
176
  (val) => val === void 0 ? void 0 : [val].flat(),
@@ -171,6 +180,7 @@ var WorkqueueOrDashboardOptions = z3.object({
171
180
  var AllScopeOptions = z3.object({
172
181
  ...AllRecordScopeOptions.shape,
173
182
  ...AccessLevelOptions.shape,
183
+ ...AllUserScopeOptions.shape,
174
184
  ...WorkqueueOrDashboardOptions.shape
175
185
  });
176
186
  var ScopeOptionKey = AllScopeOptions.keyof();
@@ -243,6 +253,33 @@ var RecordScopeV2 = z3.discriminatedUnion("type", [
243
253
  ]).describe(
244
254
  "Scopes used to check user's permission to perform actions on a record."
245
255
  );
256
+ var SystemScopeType = z3.enum([
257
+ "organisation.read-locations",
258
+ "user.read",
259
+ "user.create",
260
+ "user.edit",
261
+ "user.search"
262
+ ]);
263
+ var UserScopeType = SystemScopeType.extract([
264
+ "user.read",
265
+ "user.create",
266
+ "user.edit",
267
+ "user.search"
268
+ ]);
269
+ var ScopesWithRoleOption = UserScopeType.extract(["user.edit", "user.create"]);
270
+ var UserScopeV2 = z3.discriminatedUnion("type", [
271
+ z3.object({
272
+ type: ScopesWithRoleOption,
273
+ options: AllUserScopeOptions.optional()
274
+ }),
275
+ z3.object({
276
+ type: UserScopeType.extract(["user.read", "user.search"]),
277
+ options: AccessLevelOptions.optional()
278
+ })
279
+ ]);
280
+ function scopeUsesRoleOptions(scope) {
281
+ return ScopesWithRoleOption?.options.some((opt) => opt === scope.type);
282
+ }
246
283
  function scopeUsesDeclaredOptions(scope) {
247
284
  return !ScopesWithPlaceEventOptions.options.some((opt) => opt === scope.type);
248
285
  }
@@ -275,16 +312,14 @@ var ResolvedRecordScopeV2 = z3.discriminatedUnion("type", [
275
312
  }).optional()
276
313
  })
277
314
  ]).describe("Resolved scope with location/user IDs instead of filters.");
278
- var SystemScopeType = z3.enum([
279
- "organisation.read-locations",
280
- "user.read",
281
- "user.create",
282
- "user.edit"
283
- ]);
284
315
  var Scope2 = z3.discriminatedUnion("type", [
285
316
  z3.object({ type: PlainScopeType }),
286
317
  ...RecordScopeV2.options,
287
- z3.object({ type: SystemScopeType, options: AccessLevelOptions.optional() }),
318
+ ...UserScopeV2.options,
319
+ z3.object({
320
+ type: z3.literal("organisation.read-locations"),
321
+ options: AccessLevelOptions.optional()
322
+ }),
288
323
  z3.object({
289
324
  type: z3.literal("workqueue"),
290
325
  options: WorkqueueOrDashboardOptions
@@ -319,18 +354,26 @@ var encodeScope = (scope) => {
319
354
  encode: false
320
355
  });
321
356
  };
322
- var decodeScope = (query) => {
323
- const scope = qs.parse(query, {
357
+ var decodedScopeCache = /* @__PURE__ */ new Map();
358
+ var decodeScope = (encodedScope) => {
359
+ if (decodedScopeCache.has(encodedScope)) {
360
+ return decodedScopeCache.get(encodedScope);
361
+ }
362
+ const scope = qs.parse(encodedScope, {
324
363
  ignoreQueryPrefix: true,
325
364
  comma: true,
326
365
  allowDots: true
327
366
  });
328
367
  const unflattenedScope = unflattenScope(scope);
329
- return Scope2.safeParse(unflattenedScope)?.data;
368
+ const result = Scope2.safeParse(unflattenedScope)?.data;
369
+ decodedScopeCache.set(encodedScope, result);
370
+ return result;
330
371
  };
331
372
  var DEFAULT_SCOPE_OPTIONS = {
332
373
  placeOfEvent: JurisdictionFilter.enum.all,
333
- accessLevel: JurisdictionFilter.enum.all
374
+ accessLevel: JurisdictionFilter.enum.all,
375
+ registeredIn: JurisdictionFilter.enum.all,
376
+ declaredIn: JurisdictionFilter.enum.all
334
377
  };
335
378
  function getScopeOptionValue(scope, option) {
336
379
  const options = "options" in scope ? scope.options : void 0;
@@ -0,0 +1,4 @@
1
+ ##################################################################################
2
+ # Use this file to customize helm chart behavior
3
+ # Please make sure your custom changes doesn't conflict with values.yaml
4
+ ##################################################################################
@@ -0,0 +1,83 @@
1
+ ##################################################################################
2
+ # GENERATED FILE — DO NOT EDIT
3
+ #
4
+ # This file is managed by `opencrvs environment init` and may be overwritten.
5
+ # Put all custom Helm values in values.override.yaml, preserving the same YAML
6
+ # hierarchy used here. To remove a generated section, set its top-level key to
7
+ # null in values.override.yaml.
8
+ ##################################################################################
9
+
10
+ # Default: storage_type: host_path
11
+ # host_path option is backward compatible with Docker Swarm,
12
+ # configured to use sub-directories within /data folder
13
+ # For new installations feel free to remove storage_type
14
+ storage_type: host_path
15
+
16
+ # All datastores are placed on first node (master1) for backward compatibility
17
+ # with Docker Swarm.
18
+ # For new installations feel free to remove node_selector
19
+ node_selector:
20
+ role: data1
21
+
22
+ minio:
23
+ use_default_credentials: false
24
+ {{#if restore_enabled}}
25
+ restore:
26
+ type: {{restore_type}}
27
+ {{/if}}
28
+ {{#if backup_enabled}}
29
+ backup:
30
+ type: {{backup_type}}
31
+ {{/if}}
32
+
33
+ elasticsearch:
34
+ use_default_credentials: false
35
+
36
+ mongodb:
37
+ use_default_credentials: false
38
+
39
+ postgres:
40
+ use_default_credentials: false
41
+ {{#if restore_enabled}}
42
+ restore:
43
+ type: {{restore_type}}
44
+ {{/if}}
45
+ {{#if backup_enabled}}
46
+ backup:
47
+ type: {{backup_type}}
48
+ {{/if}}
49
+
50
+ redis:
51
+ auth_mode: acl
52
+
53
+ monitoring:
54
+ enabled: true
55
+
56
+ elastalert:
57
+ env:
58
+ NOTIFICATION_TYPE: email
59
+ secrets:
60
+ smtp-config:
61
+ - ALERT_EMAIL
62
+ - SENDER_EMAIL_ADDRESS
63
+ - SMTP_HOST
64
+ - SMTP_PASSWORD
65
+ - SMTP_PORT
66
+ - SMTP_SECURE
67
+ - SMTP_USERNAME
68
+
69
+ # Backup configuration
70
+ backup:
71
+ enabled: {{backup_enabled}}
72
+ schedule: "0 1 * * *"
73
+ backup_server_secret: backup-server-ssh-credentials
74
+ backup_server_dir: /home/backup/{{env}}
75
+
76
+
77
+ # Restore configuration
78
+ restore:
79
+ enabled: {{restore_enabled}}
80
+ schedule: "0 0 * * *"
81
+ backup_server_secret: backup-server-ssh-credentials
82
+ backup_server_dir: /home/backup/{{restore_environment_name}}
83
+ backup_encryption_secret: restore-encryption-secret
@@ -0,0 +1,4 @@
1
+ ##################################################################################
2
+ # Use this file to customize helm chart behavior
3
+ # Please make sure your custom changes doesn't conflict with values.yaml
4
+ ##################################################################################
@@ -0,0 +1,80 @@
1
+ ##################################################################################
2
+ # GENERATED FILE — DO NOT EDIT
3
+ #
4
+ # This file is managed by `opencrvs environment init` and may be overwritten.
5
+ # Put all custom Helm values in values.override.yaml, preserving the same YAML
6
+ # hierarchy used here. To remove a generated section, set its top-level key to
7
+ # null in values.override.yaml.
8
+ ##################################################################################
9
+
10
+ ########################################################################################
11
+ # Initial configuration file for OpenCRVS installation
12
+ ########################################################################################
13
+ # Some properties are not defined in this file and should be provided as key/value at
14
+ # installation time:
15
+ # - hostname: valid DNS name for opencrvs
16
+ # - countryconfig.image.name: Countryconfig image repository
17
+ # - countryconfig.image.tag: Countryconfig image tag
18
+ environment_type: {{environment_type}}
19
+
20
+ hpa:
21
+ enabled: false
22
+
23
+ env:
24
+ APN_SERVICE_URL: "http://apm-server.opencrvs-deps-{{env}}.svc.cluster.local:8200"
25
+ MINIO_BUCKET: ocrvs
26
+
27
+ influxdb:
28
+ host: influxdb-0.influxdb.opencrvs-deps-{{env}}.svc.cluster.local
29
+
30
+ elasticsearch:
31
+ auth_mode: auto
32
+ host: elasticsearch.opencrvs-deps-{{env}}.svc.cluster.local
33
+
34
+ minio:
35
+ auth_mode: use_secret
36
+ host: minio-0.minio.opencrvs-deps-{{env}}.svc.cluster.local
37
+
38
+ mongodb:
39
+ auth_mode: auto
40
+ host: mongodb-0.mongodb.opencrvs-deps-{{env}}.svc.cluster.local
41
+
42
+ redis:
43
+ auth_mode: use_secret
44
+ host: redis-0.redis.opencrvs-deps-{{env}}.svc.cluster.local
45
+
46
+ postgres:
47
+ auth_mode: auto
48
+ host: postgres-0.postgres.opencrvs-deps-{{env}}.svc.cluster.local
49
+
50
+ platform:
51
+ imagePullSecrets:
52
+ # Default value for credentials created while yarn environment:init
53
+ - name: dockerhub-credentials
54
+
55
+
56
+ auth:
57
+ env:
58
+ TWO_FA_ENABLED: {{two_fa_enabled}}
59
+
60
+ events:
61
+ env:
62
+ TWO_FA_ENABLED: {{two_fa_enabled}}
63
+
64
+ countryconfig:
65
+ secrets:
66
+ smtp-config:
67
+ - ALERT_EMAIL
68
+ - SENDER_EMAIL_ADDRESS
69
+ - SMTP_HOST
70
+ - SMTP_PASSWORD
71
+ - SMTP_PORT
72
+ - SMTP_SECURE
73
+ - SMTP_USERNAME
74
+
75
+ dashboards:
76
+ use_default_credentials: false
77
+ enabled: true
78
+
79
+ on_restore_cronjob:
80
+ enabled: {{restore_enabled}}
@@ -0,0 +1,4 @@
1
+ ##################################################################################
2
+ # Use this file to customize helm chart behavior
3
+ # Please make sure your custom changes doesn't conflict with values.yaml
4
+ ##################################################################################
@@ -0,0 +1,115 @@
1
+ ##################################################################################
2
+ # GENERATED FILE — DO NOT EDIT
3
+ #
4
+ # This file is managed by `opencrvs environment init` and may be overwritten.
5
+ # Put all custom Helm values in values.override.yaml, preserving the same YAML
6
+ # hierarchy used here. To remove a generated section, set its top-level key to
7
+ # null in values.override.yaml.
8
+ ##################################################################################
9
+
10
+ # Overwriting https://github.com/traefik/traefik-helm-chart/blob/master/traefik/values.yaml
11
+ namespaceOverride: "traefik"
12
+ logs:
13
+ general:
14
+ # "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL", "PANIC"
15
+ level: "INFO"
16
+ # format: "common" # For local environment
17
+ format: "json" # For server environment
18
+ access:
19
+ # -- To enable access logs
20
+ enabled: true
21
+ format: "json"
22
+
23
+ ingressRoute:
24
+ dashboard:
25
+ enabled: false
26
+
27
+ # Be explicit that we only use CRDs, not ingress/gw support
28
+ providers:
29
+ kubernetesCRD:
30
+ enabled: true
31
+ kubernetesIngress:
32
+ enabled: false
33
+ kubernetesGateway:
34
+ enabled: false
35
+
36
+ service:
37
+ enabled: true
38
+ single: false
39
+ type: NodePort
40
+
41
+ ports:
42
+ web:
43
+ port: 8000
44
+ hostPort: 80
45
+ protocol: TCP
46
+ nodePort: 30080
47
+ http:
48
+ redirections:
49
+ entryPoint:
50
+ to: websecure
51
+ scheme: https
52
+ permanent: true
53
+
54
+ websecure:
55
+ port: 8443
56
+ hostPort: 443
57
+ protocol: TCP
58
+ nodePort: 30443
59
+ {{#if lets_encrypt}}
60
+ http:
61
+ tls:
62
+ enabled: true
63
+ certResolver: letsencrypt
64
+ {{/if}}
65
+
66
+
67
+ {{#if lets_encrypt}}
68
+ certificatesResolvers:
69
+ letsencrypt:
70
+ acme:
71
+ tlsChallenge: false
72
+ httpChallenge:
73
+ entryPoint: web
74
+ email: admin@opencrvs.org
75
+ # Storage for certificates:
76
+ storage: /certificates/acme.json
77
+ # NOTE: Sometimes Let's Encrypt hit production SSL certificate issuing limits
78
+ # If you are having issues, switch to staging
79
+ # Staging server
80
+ # caServer: https://acme-staging-v02.api.letsencrypt.org/directory
81
+ # Production server
82
+ caServer: https://acme-v02.api.letsencrypt.org/directory
83
+
84
+ additionalVolumeMounts:
85
+ - name: acme
86
+ mountPath: /certificates
87
+ {{/if}}
88
+ {{#if static_ssl}}
89
+ certificatesResolvers: {}
90
+
91
+ # 👇 Custom TLS configuration
92
+ tlsStore:
93
+ default:
94
+ defaultCertificate:
95
+ # Check documentation how to create secret with static SSL certificate
96
+ secretName: traefik-cert
97
+ {{/if}}
98
+
99
+ deployment:
100
+ hostNetwork: true
101
+ {{#if static_ssl}}
102
+ kind: DaemonSet
103
+ {{/if}}
104
+ {{#if lets_encrypt}}
105
+ additionalVolumes:
106
+ - name: acme
107
+ hostPath:
108
+ path: /data/traefik
109
+ {{/if}}
110
+
111
+ # If you need to run traefik on all cluster nodes
112
+ # Add this line to traefik/values.override.yaml
113
+ # nodeSelector: {}
114
+ nodeSelector:
115
+ traefik-role: ingress