@opencrvs/toolkit 2.1.0-rc.eb366a1 → 2.1.0-rc.edf2492

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 (41) hide show
  1. package/dist/application-config/index.js +189 -200
  2. package/dist/cli.js +0 -48
  3. package/dist/commons/api/router.d.ts +114 -114
  4. package/dist/commons/conditionals/conditionals.d.ts +1589 -37
  5. package/dist/commons/conditionals/validate.d.ts +1 -2
  6. package/dist/commons/events/ActionConfig.d.ts +0 -21
  7. package/dist/commons/events/ActionDocument.d.ts +7 -1
  8. package/dist/commons/events/AdvancedSearchConfig.d.ts +0 -6
  9. package/dist/commons/events/CountryConfigQueryInput.d.ts +0 -18
  10. package/dist/commons/events/EventIndex.d.ts +24 -5
  11. package/dist/commons/events/EventMetadata.d.ts +1 -2
  12. package/dist/commons/events/FieldConfig.d.ts +0 -5
  13. package/dist/commons/events/Flag.d.ts +0 -48
  14. package/dist/commons/events/WorkqueueColumnConfig.d.ts +4 -4
  15. package/dist/commons/events/WorkqueueConfig.d.ts +5 -20
  16. package/dist/commons/events/field.d.ts +722 -34
  17. package/dist/conditionals/index.js +55 -303
  18. package/dist/environment/derived-variables.d.ts +0 -12
  19. package/dist/environment/derived-variables.d.ts.map +1 -1
  20. package/dist/environment/derived-variables.js +0 -14
  21. package/dist/environment/logger.d.ts +3 -12
  22. package/dist/environment/logger.d.ts.map +1 -1
  23. package/dist/environment/manage-users.js +17 -7
  24. package/dist/environment/setup-environment.js +0 -14
  25. package/dist/environment/swarm-to-k8s.js +17 -7
  26. package/dist/environment/update-workflows.js +17 -7
  27. package/dist/environment/users.js +17 -7
  28. package/dist/environment/utils.js +17 -7
  29. package/dist/events/index.js +2691 -2731
  30. package/dist/migrations/v2.0/convert-config-files-to-ts.js +17 -7
  31. package/dist/migrations/v2.0/remove-hearth-migrations.js +17 -7
  32. package/dist/notification/index.js +963 -1526
  33. package/dist/scopes/index.d.ts +0 -250
  34. package/dist/scopes/index.js +55 -304
  35. package/dist/templates/charts-values/dependencies/values.yaml +0 -3
  36. package/dist/templates/charts-values/opencrvs-services/values.yaml +0 -4
  37. package/opencrvs-toolkit-2.1.0-rc.edf2492.tgz +0 -0
  38. package/package.json +2 -2
  39. package/tsconfig.tsbuildinfo +1 -1
  40. package/dist/commons/events/ActionStatus.d.ts +0 -14
  41. package/opencrvs-toolkit-2.1.0-rc.eb366a1.tgz +0 -0
@@ -47,7 +47,7 @@ __export(conditionals_exports, {
47
47
  user: () => user
48
48
  });
49
49
  module.exports = __toCommonJS(conditionals_exports);
50
- var z12 = __toESM(require("zod/v4"));
50
+ var z8 = __toESM(require("zod/v4"));
51
51
 
52
52
  // ../commons/src/conditionals/conditionals.ts
53
53
  var objectHash = __toESM(require("object-hash"));
@@ -124,7 +124,7 @@ function todayDateTimeValueSerializer() {
124
124
  }
125
125
 
126
126
  // ../commons/src/scopes.ts
127
- var z10 = __toESM(require("zod/v4"));
127
+ var z6 = __toESM(require("zod/v4"));
128
128
  var qs = __toESM(require("qs"));
129
129
 
130
130
  // ../commons/src/uuid.ts
@@ -138,258 +138,12 @@ var z5 = __toESM(require("zod/v4"));
138
138
  var TokenUserType = z5.enum(["user", "system"]);
139
139
  var TokenWithBearer = z5.string().regex(/^Bearer\s/);
140
140
 
141
- // ../commons/src/events/ActionType.ts
142
- var z6 = __toESM(require("zod/v4"));
143
- var ActionType = {
144
- // Pre-declaration actions
145
- DELETE: "DELETE",
146
- CREATE: "CREATE",
147
- NOTIFY: "NOTIFY",
148
- // Declaration actions
149
- DECLARE: "DECLARE",
150
- REGISTER: "REGISTER",
151
- EDIT: "EDIT",
152
- // Declaration system actions. Non-configurable.
153
- DUPLICATE_DETECTED: "DUPLICATE_DETECTED",
154
- REJECT: "REJECT",
155
- // REJECT_DECLARATION
156
- MARK_AS_DUPLICATE: "MARK_AS_DUPLICATE",
157
- MARK_AS_NOT_DUPLICATE: "MARK_AS_NOT_DUPLICATE",
158
- ARCHIVE: "ARCHIVE",
159
- UNARCHIVE: "UNARCHIVE",
160
- // Record actions
161
- PRINT_CERTIFICATE: "PRINT_CERTIFICATE",
162
- REQUEST_CORRECTION: "REQUEST_CORRECTION",
163
- REJECT_CORRECTION: "REJECT_CORRECTION",
164
- APPROVE_CORRECTION: "APPROVE_CORRECTION",
165
- // General actions
166
- READ: "READ",
167
- ASSIGN: "ASSIGN",
168
- UNASSIGN: "UNASSIGN",
169
- // Custom action
170
- CUSTOM: "CUSTOM"
171
- };
172
- var ConfirmableActions = [
173
- ActionType.NOTIFY,
174
- ActionType.DECLARE,
175
- ActionType.EDIT,
176
- ActionType.REGISTER,
177
- ActionType.REJECT,
178
- ActionType.ARCHIVE,
179
- ActionType.UNARCHIVE,
180
- ActionType.PRINT_CERTIFICATE,
181
- ActionType.REQUEST_CORRECTION,
182
- ActionType.APPROVE_CORRECTION,
183
- ActionType.REJECT_CORRECTION,
184
- ActionType.CUSTOM
185
- ];
186
- var ActionTypes = z6.enum([
187
- "DELETE",
188
- "CREATE",
189
- "NOTIFY",
190
- "DECLARE",
191
- "EDIT",
192
- "REGISTER",
193
- "DUPLICATE_DETECTED",
194
- "REJECT",
195
- "MARK_AS_DUPLICATE",
196
- "MARK_AS_NOT_DUPLICATE",
197
- "ARCHIVE",
198
- "UNARCHIVE",
199
- "PRINT_CERTIFICATE",
200
- "REQUEST_CORRECTION",
201
- "REJECT_CORRECTION",
202
- "APPROVE_CORRECTION",
203
- "READ",
204
- "ASSIGN",
205
- "UNASSIGN",
206
- "CUSTOM"
207
- ]);
208
- var declarationActionValues = [
209
- ActionTypes.enum.DECLARE,
210
- ActionTypes.enum.EDIT,
211
- ActionTypes.enum.REGISTER,
212
- ActionTypes.enum.NOTIFY,
213
- ActionTypes.enum.DUPLICATE_DETECTED
214
- ];
215
- var DeclarationActions = ActionTypes.extract(declarationActionValues);
216
- var declarationUpdateActionValues = [
217
- ...declarationActionValues,
218
- ActionTypes.enum.REQUEST_CORRECTION
219
- ];
220
- var DeclarationUpdateActions = ActionTypes.extract(
221
- declarationUpdateActionValues
222
- );
223
- var annotationActions = ActionTypes.exclude(declarationActionValues);
224
- var writeActions = ActionTypes.exclude([
225
- ActionType.CREATE,
226
- ActionType.READ,
227
- ActionType.ASSIGN,
228
- ActionType.UNASSIGN
229
- ]);
230
- var WorkqueueActionType = ActionTypes.extract([
231
- ActionType.READ,
232
- ActionType.DELETE,
233
- ActionType.DECLARE,
234
- ActionType.REGISTER,
235
- ActionType.EDIT,
236
- ActionType.REJECT,
237
- ActionType.MARK_AS_DUPLICATE,
238
- ActionType.ARCHIVE,
239
- ActionType.UNARCHIVE,
240
- ActionType.PRINT_CERTIFICATE,
241
- ActionType.REQUEST_CORRECTION
242
- ]);
243
- var META_ACTIONS = [
244
- ActionType.ASSIGN,
245
- ActionType.UNASSIGN,
246
- ActionType.READ
247
- ];
248
-
249
- // ../commons/src/events/ActionStatus.ts
250
- var ActionStatus = {
251
- Requested: "Requested",
252
- Accepted: "Accepted",
253
- Rejected: "Rejected"
254
- };
255
-
256
- // ../commons/src/events/Flag.ts
257
- var z9 = __toESM(require("zod/v4"));
258
-
259
- // ../commons/src/events/TranslationConfig.ts
260
- var z7 = __toESM(require("zod/v4"));
261
- var TranslationConfig = z7.object({
262
- id: z7.string().describe(
263
- "The identifier of the translation referred in translation CSV files"
264
- ),
265
- defaultMessage: z7.string().describe("Default translation message"),
266
- description: z7.string().describe(
267
- "Describe the translation for a translator to be able to identify it."
268
- )
269
- }).meta({
270
- description: "Translation configuration",
271
- id: "TranslationConfig"
272
- });
273
-
274
- // ../commons/src/events/Conditional.ts
275
- var z8 = __toESM(require("zod/v4"));
276
- var Conditional = z8.any().describe("JSONSchema").meta({
277
- description: "JSON schema conditional configuration",
278
- id: "Conditional"
279
- });
280
- var ConditionalType = {
281
- SHOW: "SHOW",
282
- ENABLE: "ENABLE",
283
- DISPLAY_ON_REVIEW: "DISPLAY_ON_REVIEW"
284
- };
285
- var ShowConditional = z8.object({
286
- type: z8.literal(ConditionalType.SHOW),
287
- conditional: Conditional
288
- }).describe(
289
- "If 'SHOW' conditional is defined, the component is shown to the user only if the condition is met"
290
- );
291
- var EnableConditional = z8.object({
292
- type: z8.literal(ConditionalType.ENABLE),
293
- conditional: Conditional
294
- }).describe(
295
- "If 'ENABLE' conditional is defined, the component is enabled only if the condition is met"
296
- );
297
- var ActionConditional = z8.discriminatedUnion("type", [
298
- // Action can be shown / hidden
299
- ShowConditional,
300
- // Action can be shown to the user in the list but as disabled
301
- EnableConditional
302
- ]).meta({
303
- id: "ActionConditional",
304
- description: "Conditional gating whether an action is shown (SHOW) or enabled (ENABLE). When omitted from an action, the action is shown and enabled for everyone."
305
- });
306
- var DisplayOnReviewConditional = z8.object({
307
- type: z8.literal(ConditionalType.DISPLAY_ON_REVIEW),
308
- conditional: Conditional
309
- }).describe(
310
- "If 'DISPLAY_ON_REVIEW' conditional is defined, the component is shown on the review page only if both the 'DISPLAY_ON_REVIEW' and 'SHOW' conditions are met. This should only be used for fields within declaration forms, as they are the only ones with review pages."
311
- );
312
- var FieldConditional = z8.discriminatedUnion("type", [
313
- // Field input can be shown / hidden
314
- ShowConditional,
315
- // Field input can be shown to the user but as disabled
316
- EnableConditional,
317
- // Field output can be shown / hidden on the review page
318
- DisplayOnReviewConditional
319
- ]).meta({
320
- id: "FieldConditional",
321
- description: "Conditional gating whether a form field is shown (SHOW), enabled (ENABLE), or displayed on the review page (DISPLAY_ON_REVIEW). When omitted, the field is shown and enabled for everyone, and is displayed on review whenever it has a value."
322
- });
323
-
324
- // ../commons/src/events/Flag.ts
325
- var InherentFlags = {
326
- INCOMPLETE: "incomplete",
327
- REJECTED: "rejected",
328
- CORRECTION_REQUESTED: "correction-requested",
329
- POTENTIAL_DUPLICATE: "potential-duplicate",
330
- /**
331
- * This flag is set by the Edit-action and removed after the declaration or registration.
332
- * A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
333
- *
334
- * We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
335
- */
336
- EDIT_IN_PROGRESS: "edit-in-progress",
337
- SEALED: "sealed"
338
- };
339
- var actionFlagPattern;
340
- function getActionFlagPattern() {
341
- actionFlagPattern ??= new RegExp(
342
- `^(${Object.values(ActionType).join("|").toLowerCase()}):(${Object.values(
343
- ActionStatus
344
- ).join("|").toLowerCase()})$`
345
- );
346
- return actionFlagPattern;
347
- }
348
- var ActionFlag = z9.string().refine((value) => getActionFlagPattern().test(value), {
349
- message: "Flag must be in the format ActionType:ActionStatus (lowerCase)"
350
- });
351
- var CustomFlag = z9.string().refine((val) => !Object.values(InherentFlags).includes(val), {
352
- message: `Custom flag cannot be one of the inherent flags: ${Object.values(
353
- InherentFlags
354
- ).join(", ")}`
355
- }).refine((val) => !ActionFlag.safeParse(val).success, {
356
- message: "Custom flag cannot match the ActionFlag pattern (ActionType:ActionStatus)."
357
- }).describe("Custom flag identifier defined by the country config.");
358
- var Flag = ActionFlag.or(z9.enum(InherentFlags)).or(CustomFlag);
359
- var ContainsFlags = z9.object({
360
- anyOf: z9.array(Flag).optional(),
361
- noneOf: z9.array(Flag).optional(),
362
- allOf: z9.array(Flag).optional()
363
- }).meta({
364
- id: "ContainsFlags"
365
- });
366
- var FlagConfig = z9.object({
367
- id: CustomFlag,
368
- requiresAction: z9.boolean().describe(
369
- "Indicates if this flag expects an action to be performed to be cleared."
370
- ),
371
- label: TranslationConfig.describe("Human readable label of the flag.")
372
- }).meta({
373
- id: "FlagConfig",
374
- description: "Configuration for a custom flag that can be added to or removed from records by event actions."
375
- });
376
- var ActionFlagConfig = z9.object({
377
- id: Flag,
378
- operation: z9.enum(["add", "remove"]).describe("Operation to perform on the flag."),
379
- conditional: Conditional.optional().describe(
380
- "When conditional is met, the operation is performed on the flag. If not provided, the operation is performed unconditionally."
381
- )
382
- }).meta({
383
- id: "ActionFlagConfig",
384
- description: "Add or remove operation applied to a flag when the parent action is accepted. Optionally gated by a conditional."
385
- });
386
-
387
141
  // ../commons/src/scopes.ts
388
- var JurisdictionFilter = z10.enum(["administrativeArea", "location", "all"]).describe(
142
+ var JurisdictionFilter = z6.enum(["administrativeArea", "location", "all"]).describe(
389
143
  "Filters based on user jurisdiction relative to their office location in hierarchy."
390
144
  );
391
- var UserFilter = z10.enum(["user"]).describe("Filters based on the user. Limits to self.");
392
- var RecordScopeTypeV2 = z10.enum([
145
+ var UserFilter = z6.enum(["user"]).describe("Filters based on the user. Limits to self.");
146
+ var RecordScopeTypeV2 = z6.enum([
393
147
  "record.search",
394
148
  "record.create",
395
149
  "record.read",
@@ -407,7 +161,7 @@ var RecordScopeTypeV2 = z10.enum([
407
161
  "record.unassign-others",
408
162
  "record.custom-action"
409
163
  ]);
410
- var PlainScopeType = z10.enum([
164
+ var PlainScopeType = z6.enum([
411
165
  // Misc. system scopes
412
166
  "bypassratelimit",
413
167
  "record.reindex",
@@ -426,15 +180,15 @@ var PlainScopeType = z10.enum([
426
180
  "record.confirm-registration",
427
181
  "record.reject-registration"
428
182
  ]);
429
- var scopeByEvent = z10.preprocess(
183
+ var scopeByEvent = z6.preprocess(
430
184
  (val) => val === void 0 ? void 0 : [val].flat(),
431
- z10.array(z10.string()).optional()
185
+ z6.array(z6.string()).optional()
432
186
  ).describe("Event type, e.g. birth, death");
433
- var userRole = z10.preprocess(
187
+ var userRole = z6.preprocess(
434
188
  (val) => val === void 0 ? void 0 : [val].flat(),
435
- z10.array(z10.string()).optional()
189
+ z6.array(z6.string()).optional()
436
190
  ).describe("User role, e.g. admin, field agent");
437
- var scopeOptionsPlaceEvent = z10.object({
191
+ var scopeOptionsPlaceEvent = z6.object({
438
192
  event: scopeByEvent,
439
193
  placeOfEvent: JurisdictionFilter.optional()
440
194
  }).describe("Options applicable to all record scopes.");
@@ -446,37 +200,36 @@ var scopeOptionsDeclaredOrNotified = scopeOptionsPlaceEvent.extend({
446
200
  }).describe("Options applicable to actions that may take place after DECLARE");
447
201
  var AllRecordScopeOptions = scopeOptionsDeclaredOrNotified.extend({
448
202
  registeredIn: JurisdictionFilter.optional(),
449
- registeredBy: UserFilter.optional(),
450
- flags: ContainsFlags.optional()
203
+ registeredBy: UserFilter.optional()
451
204
  }).describe(
452
205
  "Options applicable to actions that may take place after REGISTER, with full filtering capabilities."
453
206
  );
454
207
  var CustomActionScopeOptions = AllRecordScopeOptions.extend({
455
- customActionTypes: z10.preprocess(
208
+ customActionTypes: z6.preprocess(
456
209
  (val) => val === void 0 ? void 0 : [val].flat(),
457
- z10.array(z10.string()).optional()
210
+ z6.array(z6.string()).optional()
458
211
  ).describe("Allowed custom action types")
459
212
  });
460
- var AccessLevelOptions = z10.object({
213
+ var AccessLevelOptions = z6.object({
461
214
  accessLevel: JurisdictionFilter.optional()
462
215
  });
463
216
  var AllUserScopeOptions = AccessLevelOptions.extend({
464
217
  role: userRole.optional()
465
218
  });
466
- var WorkqueueOrDashboardOptions = z10.object({
467
- ids: z10.preprocess(
219
+ var WorkqueueOrDashboardOptions = z6.object({
220
+ ids: z6.preprocess(
468
221
  (val) => val === void 0 ? void 0 : [val].flat(),
469
- z10.array(z10.string())
222
+ z6.array(z6.string())
470
223
  ).describe("Must contain a list of workqueue or dashboard ids.")
471
224
  });
472
- var AllScopeOptions = z10.object({
225
+ var AllScopeOptions = z6.object({
473
226
  ...AllRecordScopeOptions.shape,
474
227
  ...AccessLevelOptions.shape,
475
228
  ...AllUserScopeOptions.shape,
476
229
  ...WorkqueueOrDashboardOptions.shape
477
230
  });
478
231
  var ScopeOptionKey = AllScopeOptions.keyof();
479
- var ResolvedScopeOptionsPlaceEvent = z10.object({
232
+ var ResolvedScopeOptionsPlaceEvent = z6.object({
480
233
  event: scopeByEvent,
481
234
  placeOfEvent: UUID.nullish()
482
235
  }).describe(
@@ -484,16 +237,15 @@ var ResolvedScopeOptionsPlaceEvent = z10.object({
484
237
  );
485
238
  var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
486
239
  notifiedIn: UUID.nullish(),
487
- notifiedBy: z10.string().optional(),
240
+ notifiedBy: z6.string().optional(),
488
241
  declaredIn: UUID.nullish(),
489
- declaredBy: z10.string().optional()
242
+ declaredBy: z6.string().optional()
490
243
  }).describe(
491
244
  "Resolved options applicable to actions that may take place after DECLARE, with location ID and user ID instead of filters."
492
245
  );
493
246
  var ResolvedScopeOptionsFull = ResolvedScopeOptionsDeclared.extend({
494
247
  registeredIn: UUID.nullish(),
495
- registeredBy: z10.string().optional(),
496
- flags: ContainsFlags.optional()
248
+ registeredBy: z6.string().optional()
497
249
  }).describe(
498
250
  "Resolved options applicable to actions that may take place after REGISTER, with full filtering capabilities and location/user IDs instead of filters."
499
251
  );
@@ -518,38 +270,38 @@ var ScopesWithFullOptions = RecordScopeTypeV2.extract([
518
270
  "record.unassign-others"
519
271
  ]);
520
272
  var ScopeOptionsPrintCertifiedCopies = AllRecordScopeOptions.extend({
521
- templates: z10.preprocess(
273
+ templates: z6.preprocess(
522
274
  (val) => val === void 0 ? void 0 : [val].flat(),
523
- z10.array(z10.string()).optional()
275
+ z6.array(z6.string()).optional()
524
276
  ).describe(
525
277
  "Template IDs for certified copies. Controls which certificate templates are returned to the client via the config service. Certificate printing is a client-side operation \u2014 this option is not validated when the printCertificate action is submitted."
526
278
  )
527
279
  });
528
- var RecordScopeV2 = z10.discriminatedUnion("type", [
529
- z10.object({
280
+ var RecordScopeV2 = z6.discriminatedUnion("type", [
281
+ z6.object({
530
282
  type: ScopesWithPlaceEventOptions,
531
283
  options: scopeOptionsPlaceEvent.optional()
532
284
  }),
533
- z10.object({
285
+ z6.object({
534
286
  type: ScopesWithDeclaredOptions,
535
287
  options: scopeOptionsDeclaredOrNotified.optional()
536
288
  }),
537
- z10.object({
289
+ z6.object({
538
290
  type: ScopesWithFullOptions,
539
291
  options: AllRecordScopeOptions.optional()
540
292
  }),
541
- z10.object({
542
- type: z10.literal("record.custom-action"),
293
+ z6.object({
294
+ type: z6.literal("record.custom-action"),
543
295
  options: CustomActionScopeOptions.optional()
544
296
  }),
545
- z10.object({
546
- type: z10.literal("record.print-certified-copies"),
297
+ z6.object({
298
+ type: z6.literal("record.print-certified-copies"),
547
299
  options: ScopeOptionsPrintCertifiedCopies.optional()
548
300
  })
549
301
  ]).describe(
550
302
  "Scopes used to check user's permission to perform actions on a record."
551
303
  );
552
- var SystemScopeType = z10.enum([
304
+ var SystemScopeType = z6.enum([
553
305
  "organisation.read-locations",
554
306
  "user.read",
555
307
  "user.create",
@@ -563,61 +315,61 @@ var UserScopeType = SystemScopeType.extract([
563
315
  "user.search"
564
316
  ]);
565
317
  var ScopesWithRoleOption = UserScopeType.extract(["user.edit", "user.create"]);
566
- var UserScopeV2 = z10.discriminatedUnion("type", [
567
- z10.object({
318
+ var UserScopeV2 = z6.discriminatedUnion("type", [
319
+ z6.object({
568
320
  type: ScopesWithRoleOption,
569
321
  options: AllUserScopeOptions.optional()
570
322
  }),
571
- z10.object({
323
+ z6.object({
572
324
  type: UserScopeType.extract(["user.read", "user.search"]),
573
325
  options: AccessLevelOptions.optional()
574
326
  })
575
327
  ]);
576
- var ResolvedRecordScopeV2 = z10.discriminatedUnion("type", [
577
- z10.object({
328
+ var ResolvedRecordScopeV2 = z6.discriminatedUnion("type", [
329
+ z6.object({
578
330
  type: ScopesWithPlaceEventOptions,
579
331
  options: ResolvedScopeOptionsPlaceEvent.optional()
580
332
  }),
581
- z10.object({
333
+ z6.object({
582
334
  type: ScopesWithDeclaredOptions,
583
335
  options: ResolvedScopeOptionsDeclared.optional()
584
336
  }),
585
- z10.object({
337
+ z6.object({
586
338
  type: ScopesWithFullOptions,
587
339
  options: ResolvedScopeOptionsFull.optional()
588
340
  }),
589
- z10.object({
590
- type: z10.literal("record.print-certified-copies"),
341
+ z6.object({
342
+ type: z6.literal("record.print-certified-copies"),
591
343
  options: ResolvedScopeOptionsFull.extend({
592
- templates: z10.array(z10.string()).optional()
344
+ templates: z6.array(z6.string()).optional()
593
345
  }).optional()
594
346
  })
595
347
  ]).describe("Resolved scope with location/user IDs instead of filters.");
596
- var Scope2 = z10.discriminatedUnion("type", [
597
- z10.object({ type: PlainScopeType }),
348
+ var Scope2 = z6.discriminatedUnion("type", [
349
+ z6.object({ type: PlainScopeType }),
598
350
  ...RecordScopeV2.options,
599
351
  ...UserScopeV2.options,
600
- z10.object({
601
- type: z10.literal("organisation.read-locations"),
352
+ z6.object({
353
+ type: z6.literal("organisation.read-locations"),
602
354
  options: AccessLevelOptions.optional()
603
355
  }),
604
- z10.object({
605
- type: z10.literal("workqueue"),
356
+ z6.object({
357
+ type: z6.literal("workqueue"),
606
358
  options: WorkqueueOrDashboardOptions
607
359
  }),
608
- z10.object({
609
- type: z10.literal("dashboard.view"),
360
+ z6.object({
361
+ type: z6.literal("dashboard.view"),
610
362
  options: WorkqueueOrDashboardOptions
611
363
  })
612
364
  ]);
613
- var ScopeType2 = z10.enum([
365
+ var ScopeType2 = z6.enum([
614
366
  ...SystemScopeType.options,
615
367
  ...RecordScopeTypeV2.options,
616
368
  ...PlainScopeType.options,
617
369
  "workqueue",
618
370
  "dashboard.view"
619
371
  ]);
620
- var EncodedScope2 = z10.string().brand("EncodedScope");
372
+ var EncodedScope2 = z6.string().brand("EncodedScope");
621
373
  var DEFAULT_SCOPE_OPTIONS = {
622
374
  placeOfEvent: JurisdictionFilter.enum.all,
623
375
  accessLevel: JurisdictionFilter.enum.all,
@@ -1312,4 +1064,4 @@ function createFieldConditionals(fieldId) {
1312
1064
  }
1313
1065
 
1314
1066
  // src/conditionals/index.ts
1315
- z12.globalRegistry.clear();
1067
+ z8.globalRegistry.clear();
@@ -58,18 +58,6 @@ export declare const derivedVariables: readonly [{
58
58
  readonly valueType: "SECRET";
59
59
  readonly type: "disabled";
60
60
  readonly scope: "ENVIRONMENT";
61
- }, {
62
- readonly name: "MONGODB_ADMIN_USER";
63
- readonly valueLabel: "MONGODB_ADMIN_USER";
64
- readonly valueType: "SECRET";
65
- readonly type: "disabled";
66
- readonly scope: "ENVIRONMENT";
67
- }, {
68
- readonly name: "MONGODB_ADMIN_PASSWORD";
69
- readonly valueLabel: "MONGODB_ADMIN_PASSWORD";
70
- readonly valueType: "SECRET";
71
- readonly type: "disabled";
72
- readonly scope: "ENVIRONMENT";
73
61
  }, {
74
62
  readonly name: "POSTGRES_USER";
75
63
  readonly valueLabel: "POSTGRES_USER";
@@ -1 +1 @@
1
- {"version":3,"file":"derived-variables.d.ts","sourceRoot":"","sources":["../../src/environment/derived-variables.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2JnB,CAAA"}
1
+ {"version":3,"file":"derived-variables.d.ts","sourceRoot":"","sources":["../../src/environment/derived-variables.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6InB,CAAA"}
@@ -82,20 +82,6 @@ exports.derivedVariables = [
82
82
  type: 'disabled',
83
83
  scope: 'ENVIRONMENT'
84
84
  },
85
- {
86
- name: 'MONGODB_ADMIN_USER',
87
- valueLabel: 'MONGODB_ADMIN_USER',
88
- valueType: 'SECRET',
89
- type: 'disabled',
90
- scope: 'ENVIRONMENT'
91
- },
92
- {
93
- name: 'MONGODB_ADMIN_PASSWORD',
94
- valueLabel: 'MONGODB_ADMIN_PASSWORD',
95
- valueType: 'SECRET',
96
- type: 'disabled',
97
- scope: 'ENVIRONMENT'
98
- },
99
85
  {
100
86
  name: 'POSTGRES_USER',
101
87
  valueLabel: 'POSTGRES_USER',
@@ -1,15 +1,6 @@
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
- };
1
+ export declare const log: (message?: any, ...optionalParams: any[]) => void;
2
+ export declare const warn: (message?: any, ...optionalParams: any[]) => void;
9
3
  export declare const success: (...args: any[]) => void;
10
- export declare const info: {
11
- (...data: any[]): void;
12
- (message?: any, ...optionalParams: any[]): void;
13
- };
4
+ export declare const info: (message?: any, ...optionalParams: any[]) => void;
14
5
  export declare const error: (...args: any[]) => void;
15
6
  //# 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;;;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"}
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"}
@@ -25,13 +25,23 @@ 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 (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
- };
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
+ })();
35
45
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
46
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
47
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -490,20 +490,6 @@ ALL_QUESTIONS.push(...questions_1.githubTokenQuestion, ...questions_1.githubOthe
490
490
  value: findExistingOrDefine('MINIO_ROOT_PASSWORD', 'SECRET', 'ENVIRONMENT', (0, utils_1.generateLongPassword)()),
491
491
  scope: 'ENVIRONMENT'
492
492
  },
493
- {
494
- name: 'MONGODB_ADMIN_USER',
495
- type: 'SECRET',
496
- didExist: (0, utils_1.findExistingValue)('MONGODB_ADMIN_USER', 'SECRET', 'ENVIRONMENT', existingValues),
497
- value: findExistingOrDefine('MONGODB_ADMIN_USER', 'SECRET', 'ENVIRONMENT', (0, utils_1.generateLongPassword)()),
498
- scope: 'ENVIRONMENT'
499
- },
500
- {
501
- name: 'MONGODB_ADMIN_PASSWORD',
502
- type: 'SECRET',
503
- didExist: (0, utils_1.findExistingValue)('MONGODB_ADMIN_PASSWORD', 'SECRET', 'ENVIRONMENT', existingValues),
504
- value: findExistingOrDefine('MONGODB_ADMIN_PASSWORD', 'SECRET', 'ENVIRONMENT', (0, utils_1.generateLongPassword)()),
505
- scope: 'ENVIRONMENT'
506
- },
507
493
  {
508
494
  name: 'POSTGRES_USER',
509
495
  type: 'SECRET',
@@ -25,13 +25,23 @@ 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 (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
- };
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
+ })();
35
45
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
46
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
47
  return new (P || (P = Promise))(function (resolve, reject) {