@opencrvs/toolkit 1.9.12-rc.cb552bd → 1.9.12-rc.cb8b567

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 (79) hide show
  1. package/build.sh +4 -0
  2. package/dist/application-config/index.js +2045 -41
  3. package/dist/cli.js +2362 -4
  4. package/dist/commons/api/router.d.ts +106 -75
  5. package/dist/commons/application-config/index.d.ts +13 -16
  6. package/dist/commons/conditionals/conditionals.d.ts +3 -3
  7. package/dist/commons/events/ActionDocument.d.ts +198 -198
  8. package/dist/commons/events/ActionInput.d.ts +113 -113
  9. package/dist/commons/events/ActionType.d.ts +3 -3
  10. package/dist/commons/events/AdvancedSearchConfig.d.ts +16 -10
  11. package/dist/commons/events/CompositeFieldValue.d.ts +4 -4
  12. package/dist/commons/events/CountryConfigQueryInput.d.ts +443 -172
  13. package/dist/commons/events/Draft.d.ts +15 -15
  14. package/dist/commons/events/DynamicFieldValue.d.ts +37 -19
  15. package/dist/commons/events/EventConfig.d.ts +1 -1
  16. package/dist/commons/events/EventDocument.d.ts +81 -81
  17. package/dist/commons/events/EventIndex.d.ts +35 -27
  18. package/dist/commons/events/EventInput.d.ts +1 -1
  19. package/dist/commons/events/EventMetadata.d.ts +24 -24
  20. package/dist/commons/events/FieldConfig.d.ts +155 -44
  21. package/dist/commons/events/FieldType.d.ts +2 -1
  22. package/dist/commons/events/FieldTypeMapping.d.ts +98 -72
  23. package/dist/commons/events/FieldValue.d.ts +54 -26
  24. package/dist/commons/events/PlainDate.d.ts +1 -1
  25. package/dist/commons/events/WorkqueueColumnConfig.d.ts +16 -16
  26. package/dist/commons/events/WorkqueueConfig.d.ts +438 -194
  27. package/dist/commons/events/defineConfig.d.ts +0 -4
  28. package/dist/commons/events/locations.d.ts +4 -4
  29. package/dist/commons/events/state/index.d.ts +2 -2
  30. package/dist/commons/events/state/utils.d.ts +3 -3
  31. package/dist/commons/events/utils.d.ts +5 -177
  32. package/dist/conditionals/index.js +13 -5
  33. package/dist/events/index.js +142 -33
  34. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts +3 -0
  35. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts.map +1 -0
  36. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.js +405 -0
  37. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts +2 -0
  38. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts.map +1 -0
  39. package/dist/migrations/v2.0/convert-config-files-to-ts.js +753 -0
  40. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts +3 -0
  41. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts.map +1 -0
  42. package/dist/migrations/v2.0/convert-paragraph-to-heading.js +159 -0
  43. package/dist/migrations/v2.0/index.d.ts +7 -0
  44. package/dist/migrations/v2.0/index.d.ts.map +1 -0
  45. package/dist/migrations/v2.0/index.js +2361 -0
  46. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts +3 -0
  47. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts.map +1 -0
  48. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.js +344 -0
  49. package/dist/migrations/v2.0/migrate-scopes.d.ts +3 -0
  50. package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -0
  51. package/dist/migrations/v2.0/migrate-scopes.js +281 -0
  52. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts +3 -0
  53. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts.map +1 -0
  54. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.js +268 -0
  55. package/dist/migrations/v2.0/remove-delete-actions.d.ts +3 -0
  56. package/dist/migrations/v2.0/remove-delete-actions.d.ts.map +1 -0
  57. package/dist/migrations/v2.0/remove-delete-actions.js +157 -0
  58. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts +3 -0
  59. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts.map +1 -0
  60. package/dist/migrations/v2.0/remove-deprecated-imports.js +97 -0
  61. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts +3 -0
  62. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts.map +1 -0
  63. package/dist/migrations/v2.0/remove-pending-certification-flag.js +110 -0
  64. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts +3 -0
  65. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts.map +1 -0
  66. package/dist/migrations/v2.0/remove-review-from-register-action.js +164 -0
  67. package/dist/migrations/v2.0/rename-api-paths.d.ts +3 -0
  68. package/dist/migrations/v2.0/rename-api-paths.d.ts.map +1 -0
  69. package/dist/migrations/v2.0/rename-api-paths.js +188 -0
  70. package/dist/migrations/v2.0/rename-location-parent-id.d.ts +3 -0
  71. package/dist/migrations/v2.0/rename-location-parent-id.d.ts.map +1 -0
  72. package/dist/migrations/v2.0/rename-location-parent-id.js +181 -0
  73. package/dist/notification/index.js +73 -23
  74. package/dist/scopes/index.d.ts +31 -10
  75. package/dist/scopes/index.js +17 -5
  76. package/opencrvs-toolkit-1.9.12-rc.cb8b567.tgz +0 -0
  77. package/package.json +8 -7
  78. package/tsconfig.tsbuildinfo +1 -1
  79. package/opencrvs-toolkit-1.9.12-rc.cb552bd.tgz +0 -0
@@ -64,6 +64,8 @@ __export(events_exports, {
64
64
  AssignmentStatus: () => AssignmentStatus,
65
65
  AsyncRejectActionDocument: () => AsyncRejectActionDocument,
66
66
  AuditLogEntrySchema: () => AuditLogEntrySchema,
67
+ AutocompleteUpdateValue: () => AutocompleteUpdateValue,
68
+ AutocompleteValue: () => AutocompleteValue,
67
69
  BaseActionInput: () => BaseActionInput,
68
70
  BearerTokenByUserType: () => BearerTokenByUserType,
69
71
  ButtonFieldValue: () => ButtonFieldValue,
@@ -330,6 +332,7 @@ __export(events_exports, {
330
332
  isAddressFieldType: () => isAddressFieldType,
331
333
  isAdministrativeAreaFieldType: () => isAdministrativeAreaFieldType,
332
334
  isAgeFieldType: () => isAgeFieldType,
335
+ isAutocompleteFieldType: () => isAutocompleteFieldType,
333
336
  isBulletListFieldType: () => isBulletListFieldType,
334
337
  isButtonFieldType: () => isButtonFieldType,
335
338
  isCheckboxFieldType: () => isCheckboxFieldType,
@@ -509,16 +512,16 @@ var CustomActionScopeOptions = AllRecordScopeOptions.extend({
509
512
  var AccessLevelOptions = z2.object({
510
513
  accessLevel: JurisdictionFilter.optional()
511
514
  });
512
- var WorkqueueOptions = z2.object({
515
+ var WorkqueueOrDashboardOptions = z2.object({
513
516
  ids: z2.preprocess(
514
517
  (val) => val === void 0 ? void 0 : [val].flat(),
515
518
  z2.array(z2.string())
516
- ).describe("Must contain a list of workqueue ids.")
519
+ ).describe("Must contain a list of workqueue or dashboard ids.")
517
520
  });
518
521
  var AllScopeOptions = z2.object({
519
522
  ...AllRecordScopeOptions.shape,
520
523
  ...AccessLevelOptions.shape,
521
- ...WorkqueueOptions.shape
524
+ ...WorkqueueOrDashboardOptions.shape
522
525
  });
523
526
  var ScopeOptionKey = AllScopeOptions.keyof();
524
527
  var ResolvedScopeOptionsPlaceEvent = z2.object({
@@ -632,13 +635,21 @@ var Scope = z2.discriminatedUnion("type", [
632
635
  z2.object({ type: PlainScopeType }),
633
636
  ...RecordScopeV2.options,
634
637
  z2.object({ type: SystemScopeType, options: AccessLevelOptions.optional() }),
635
- z2.object({ type: z2.literal("workqueue"), options: WorkqueueOptions })
638
+ z2.object({
639
+ type: z2.literal("workqueue"),
640
+ options: WorkqueueOrDashboardOptions
641
+ }),
642
+ z2.object({
643
+ type: z2.literal("dashboard.view"),
644
+ options: WorkqueueOrDashboardOptions
645
+ })
636
646
  ]);
637
647
  var ScopeType = z2.enum([
638
648
  ...SystemScopeType.options,
639
649
  ...RecordScopeTypeV2.options,
640
650
  ...PlainScopeType.options,
641
- "workqueue"
651
+ "workqueue",
652
+ "dashboard.view"
642
653
  ]);
643
654
  var unflattenScope = (input) => {
644
655
  const { type, ...options } = input;
@@ -1088,6 +1099,7 @@ var FieldType = {
1088
1099
  SIGNATURE: "SIGNATURE",
1089
1100
  DATA: "DATA",
1090
1101
  BUTTON: "BUTTON",
1102
+ AUTOCOMPLETE: "AUTOCOMPLETE",
1091
1103
  SEARCH: "SEARCH",
1092
1104
  ALPHA_PRINT_BUTTON: "ALPHA_PRINT_BUTTON",
1093
1105
  HTTP: "HTTP",
@@ -1273,6 +1285,11 @@ var AgeValue = z12.object({
1273
1285
  asOfDateRef: z12.string()
1274
1286
  });
1275
1287
  var AgeUpdateValue = AgeValue.optional().nullable();
1288
+ var AutocompleteValue = z12.object({
1289
+ label: z12.string(),
1290
+ value: z12.string()
1291
+ });
1292
+ var AutocompleteUpdateValue = AutocompleteValue.optional().nullable();
1276
1293
  var TimeValue = z12.string().regex(/^([01][0-9]|2[0-3]):[0-5][0-9]$/);
1277
1294
  var DatetimeValue = z12.iso.datetime();
1278
1295
  var SelectDateRangeValue = z12.enum([
@@ -1319,7 +1336,9 @@ var LeafFieldValues = z12.union([
1319
1336
  IdReaderFieldValue,
1320
1337
  NumberWithUnitFieldValue,
1321
1338
  NumberWithUnitFieldUpdateValue,
1322
- CustomFieldValue
1339
+ CustomFieldValue,
1340
+ AutocompleteValue,
1341
+ AutocompleteUpdateValue
1323
1342
  ]);
1324
1343
  var FieldGroupValue = z12.record(z12.string(), LeafFieldValues);
1325
1344
  var DataFieldValue = z12.object({
@@ -1401,7 +1420,8 @@ var FieldUpdateValue = safeUnion([
1401
1420
  HttpFieldUpdateValue.describe("HttpFieldUpdateValue"),
1402
1421
  QueryParamReaderFieldUpdateValue.describe("QueryParamReaderFieldUpdateValue"),
1403
1422
  CustomFieldValue.describe("CustomFieldValue"),
1404
- HiddenFieldValue.describe("HiddenFieldValue")
1423
+ HiddenFieldValue.describe("HiddenFieldValue"),
1424
+ AutocompleteUpdateValue.describe("AutocompleteUpdateValue")
1405
1425
  ]);
1406
1426
 
1407
1427
  // ../commons/src/events/serializers/user/serializer.ts
@@ -1980,8 +2000,8 @@ var QueryExpression = import_v4.z.object({
1980
2000
  "legalStatuses.REGISTERED.createdAtLocation": import_v4.z.optional(Within).nullable(),
1981
2001
  "legalStatuses.REGISTERED.createdByRole": import_v4.z.optional(AnyOf),
1982
2002
  "legalStatuses.REGISTERED.registrationNumber": import_v4.z.optional(Exact),
1983
- createdAtLocation: import_v4.z.optional(Within),
1984
- updatedAtLocation: import_v4.z.optional(Within),
2003
+ createdAtLocation: import_v4.z.optional(import_v4.z.union([Within, Exact])),
2004
+ updatedAtLocation: import_v4.z.optional(import_v4.z.union([Within, Exact])),
1985
2005
  assignedTo: import_v4.z.optional(Exact),
1986
2006
  createdByUserType: import_v4.z.optional(ExactUserType),
1987
2007
  updatedByUserRole: import_v4.z.optional(Exact),
@@ -2318,17 +2338,14 @@ var ImageViewField = BaseField.extend({
2318
2338
  }).describe("A read-only image component for form pages");
2319
2339
  var Paragraph = BaseField.extend({
2320
2340
  type: import_v43.default.literal(FieldType.PARAGRAPH),
2321
- defaultValue: NonEmptyTextValue.optional(),
2322
2341
  configuration: ParagraphConfiguration
2323
2342
  }).describe("A read-only HTML <p> paragraph");
2324
2343
  var Heading = BaseField.extend({
2325
2344
  type: import_v43.default.literal(FieldType.HEADING),
2326
- defaultValue: NonEmptyTextValue.optional(),
2327
2345
  configuration: HeadingConfiguration
2328
2346
  }).describe("A read-only heading component for form pages");
2329
2347
  var PageHeader = BaseField.extend({
2330
- type: import_v43.default.literal(FieldType.PAGE_HEADER),
2331
- defaultValue: NonEmptyTextValue.optional()
2348
+ type: import_v43.default.literal(FieldType.PAGE_HEADER)
2332
2349
  }).describe("A read-only header component for form pages");
2333
2350
  var File = BaseField.extend({
2334
2351
  type: import_v43.default.literal(FieldType.FILE),
@@ -2378,7 +2395,6 @@ var RadioGroup = BaseField.extend({
2378
2395
  }).describe("Grouped radio options");
2379
2396
  var BulletList = BaseField.extend({
2380
2397
  type: import_v43.default.literal(FieldType.BULLET_LIST),
2381
- defaultValue: TextValue.optional(),
2382
2398
  items: import_v43.default.array(TranslationConfig).describe("A list of items"),
2383
2399
  configuration: import_v43.default.object({
2384
2400
  styles: import_v43.default.object({
@@ -2560,16 +2576,32 @@ var DataField = BaseField.extend({
2560
2576
  data: import_v43.default.array(DataEntry)
2561
2577
  })
2562
2578
  }).describe("Data field for displaying read-only data");
2579
+ var ButtonSize = import_v43.default.enum(["small", "medium", "large"]);
2580
+ var ButtonType = import_v43.default.enum([
2581
+ "primary",
2582
+ "secondary",
2583
+ "tertiary",
2584
+ "positive",
2585
+ "negative",
2586
+ "secondaryNegative",
2587
+ "icon",
2588
+ "iconPrimary"
2589
+ ]);
2590
+ var TextColor = import_v43.default.enum(["primary", "copy"]);
2591
+ var TextVariant = import_v43.default.enum(["bold14", "reg14"]);
2592
+ var ButtonConfiguration = import_v43.default.object({
2593
+ icon: import_v43.default.string().optional().describe("Icon for the button. You can find icons from OpenCRVS UI-Kit."),
2594
+ loading: import_v43.default.boolean().optional().describe("Whether the button is in a loading state and shows a spinner"),
2595
+ buttonSize: ButtonSize.optional().describe("Size of the button."),
2596
+ buttonType: ButtonType.optional().describe("Type of the button."),
2597
+ textColor: TextColor.optional().describe("Color of the text."),
2598
+ textVariant: TextVariant.optional().describe("Variant of the text."),
2599
+ text: TranslationConfig.describe("Text to display on the button")
2600
+ });
2563
2601
  var ButtonField = BaseField.extend({
2564
2602
  type: import_v43.default.literal(FieldType.BUTTON),
2565
2603
  defaultValue: ButtonFieldValue.optional(),
2566
- configuration: import_v43.default.object({
2567
- icon: import_v43.default.string().optional().describe(
2568
- "Icon for the button. You can find icons from OpenCRVS UI-Kit."
2569
- ),
2570
- loading: import_v43.default.boolean().optional().describe("Whether the button is in a loading state and shows a spinner"),
2571
- text: TranslationConfig.describe("Text to display on the button")
2572
- })
2604
+ configuration: ButtonConfiguration
2573
2605
  }).describe("Generic button without any built-in functionality");
2574
2606
  var FieldGroup = BaseField.extend({
2575
2607
  type: import_v43.default.literal(FieldType.FIELD_GROUP),
@@ -2601,6 +2633,19 @@ var HttpField = BaseField.extend({
2601
2633
  timeout: import_v43.default.number().default(15e3).describe("Request timeout in milliseconds")
2602
2634
  })
2603
2635
  }).describe("HTTP request function triggered by a button click or other event");
2636
+ var AutocompleteField = BaseField.extend({
2637
+ type: import_v43.default.literal(FieldType.AUTOCOMPLETE),
2638
+ configuration: import_v43.default.object({
2639
+ url: import_v43.default.string().describe("URL to fetch autocomplete suggestions from").optional(),
2640
+ method: import_v43.default.enum(["GET", "POST"]).default("GET").optional(),
2641
+ defaultOptions: import_v43.default.array(
2642
+ import_v43.default.object({
2643
+ label: import_v43.default.string(),
2644
+ value: import_v43.default.string()
2645
+ })
2646
+ ).optional()
2647
+ })
2648
+ }).describe("Autocomplete input field");
2604
2649
  var SearchField = HttpField.extend({
2605
2650
  type: import_v43.default.literal(FieldType.SEARCH),
2606
2651
  configuration: SearchQuery.pick({
@@ -2686,8 +2731,11 @@ var CustomField = BaseField.extend({
2686
2731
  src: import_v43.default.string().describe("Module source path for the custom field component"),
2687
2732
  configuration: import_v43.default.unknown().optional()
2688
2733
  });
2734
+ var FieldStyleVariant = import_v43.default.enum(["default", "highlighted"]);
2689
2735
  var LoaderField = BaseField.extend({
2690
2736
  type: import_v43.default.literal(FieldType.LOADER),
2737
+ variant: FieldStyleVariant.default("default").optional(),
2738
+ hideLabel: import_v43.default.boolean().default(true).optional().describe("Loader field does not show a label by default"),
2691
2739
  configuration: import_v43.default.object({
2692
2740
  text: TranslationConfig.describe("Display text above the loading spinner")
2693
2741
  })
@@ -2744,6 +2792,7 @@ var FieldConfig = import_v43.default.discriminatedUnion("type", [
2744
2792
  ButtonField,
2745
2793
  AlphaPrintButton,
2746
2794
  HttpField,
2795
+ AutocompleteField,
2747
2796
  LinkButtonField,
2748
2797
  VerificationStatus,
2749
2798
  QrReaderField,
@@ -3370,6 +3419,9 @@ function mapFieldTypeToZod(field3, actionType) {
3370
3419
  case FieldType.ALPHA_PRINT_BUTTON:
3371
3420
  schema = TextValue;
3372
3421
  break;
3422
+ case FieldType.AUTOCOMPLETE:
3423
+ schema = AutocompleteValue;
3424
+ break;
3373
3425
  case FieldType.HTTP:
3374
3426
  case FieldType.SEARCH:
3375
3427
  schema = HttpFieldUpdateValue;
@@ -3430,6 +3482,7 @@ function mapFieldTypeToEmptyValue(field3) {
3430
3482
  case FieldType.BUTTON:
3431
3483
  case FieldType.ALPHA_PRINT_BUTTON:
3432
3484
  case FieldType.HTTP:
3485
+ case FieldType.AUTOCOMPLETE:
3433
3486
  case FieldType.SEARCH:
3434
3487
  case FieldType.LINK_BUTTON:
3435
3488
  case FieldType.QUERY_PARAM_READER:
@@ -3569,6 +3622,9 @@ var isPrintButtonFieldType = (field3) => {
3569
3622
  var isHttpFieldType = (field3) => {
3570
3623
  return field3.config.type === FieldType.HTTP;
3571
3624
  };
3625
+ var isAutocompleteFieldType = (field3) => {
3626
+ return field3.config.type === FieldType.AUTOCOMPLETE;
3627
+ };
3572
3628
  var isSearchFieldType = (field3) => {
3573
3629
  return field3.config.type === FieldType.SEARCH;
3574
3630
  };
@@ -4212,16 +4268,17 @@ function isPageVisible(page, formValues, context) {
4212
4268
  }
4213
4269
  return isConditionMet(page.conditional, formValues, context);
4214
4270
  }
4215
- function omitHiddenFields(fields, formValues, validatorContext, includeHiddenFieldsWithNullValues = false) {
4271
+ function omitHiddenFields(fields, formValues, validatorContext, includeHiddenFieldsWithNullValues = false, declarationContext) {
4216
4272
  const base = (0, import_lodash.cloneDeep)(formValues);
4217
4273
  function fn(prevVisibilityContext) {
4274
+ const visibilityForm = declarationContext ? { ...declarationContext, ...prevVisibilityContext } : prevVisibilityContext;
4218
4275
  const cleaned = (0, import_lodash.omitBy)(base, (value, fieldId) => {
4219
4276
  const fieldConfig = fields.filter((f) => f.id === fieldId);
4220
4277
  if (!fieldConfig.length) {
4221
4278
  return false;
4222
4279
  }
4223
4280
  const isHidden = fieldConfig.every(
4224
- (f) => !isFieldVisible(f, prevVisibilityContext, validatorContext)
4281
+ (f) => !isFieldVisible(f, visibilityForm, validatorContext)
4225
4282
  );
4226
4283
  if (!isHidden) {
4227
4284
  return false;
@@ -4288,8 +4345,10 @@ function omitHiddenAnnotationFields(actionConfig, declaration, annotation, conte
4288
4345
  const annotationFields = getActionAnnotationFields(actionConfig);
4289
4346
  return omitHiddenFields(
4290
4347
  annotationFields,
4291
- { ...declaration, ...annotation },
4292
- context
4348
+ annotation,
4349
+ context,
4350
+ false,
4351
+ declaration
4293
4352
  );
4294
4353
  }
4295
4354
  function deepMerge(currentDocument, actionDocument) {
@@ -5544,8 +5603,12 @@ var SerializedQueryExpression = z35.object({
5544
5603
  "legalStatuses.REGISTERED.createdAtLocation": z35.optional(SerializableWithin),
5545
5604
  "legalStatuses.REGISTERED.createdByRole": z35.optional(AnyOf),
5546
5605
  "legalStatuses.REGISTERED.registrationNumber": z35.optional(Exact),
5547
- createdAtLocation: z35.optional(SerializableWithin),
5548
- updatedAtLocation: z35.optional(SerializableWithin),
5606
+ createdAtLocation: z35.optional(
5607
+ z35.union([SerializableWithin, SerializableExact])
5608
+ ),
5609
+ updatedAtLocation: z35.optional(
5610
+ z35.union([SerializableWithin, SerializableExact])
5611
+ ),
5549
5612
  updatedByUserRole: z35.optional(SerializableExact),
5550
5613
  assignedTo: z35.optional(SerializableExact),
5551
5614
  createdBy: z35.optional(SerializableExact),
@@ -5732,7 +5795,20 @@ function defineWorkqueue(workqueueInput) {
5732
5795
  const query = "type" in queryInput ? queryInput : { type: "and", clauses: [queryInput] };
5733
5796
  return WorkqueueConfig.parse({ ...workqueueInput, query });
5734
5797
  }
5798
+ function warnOnConfigurationIssues(workqueue) {
5799
+ if (workqueue.actions) {
5800
+ console.warn(
5801
+ `
5802
+ ************** WARNING **************
5803
+ 'actions' property is deprecated, but used on workqueue: '${workqueue.slug}'.
5804
+ Use 'action' property instead!
5805
+ ************** WARNING **************
5806
+ `
5807
+ );
5808
+ }
5809
+ }
5735
5810
  function defineWorkqueues(workqueues) {
5811
+ workqueues.forEach(warnOnConfigurationIssues);
5736
5812
  return workqueues.map((workqueue) => defineWorkqueue(workqueue));
5737
5813
  }
5738
5814
  var WorkqueueCountInput = z37.array(
@@ -6467,7 +6543,7 @@ var IGNORED_EVENT_TYPES = [
6467
6543
  "digital-identity",
6468
6544
  "event-with-optional-address"
6469
6545
  ];
6470
- function warnOnConfigurationIssues(config) {
6546
+ function warnOnConfigurationIssues2(config) {
6471
6547
  const eventId = config.id;
6472
6548
  if (IGNORED_EVENT_TYPES.includes(eventId)) {
6473
6549
  return;
@@ -6490,7 +6566,7 @@ function warnOnConfigurationIssues(config) {
6490
6566
  }
6491
6567
  var defineConfig = (config) => {
6492
6568
  const input = EventConfig.parse(config);
6493
- warnOnConfigurationIssues(input);
6569
+ warnOnConfigurationIssues2(input);
6494
6570
  return input;
6495
6571
  };
6496
6572
 
@@ -9055,6 +9131,7 @@ function mapFieldTypeToMockValue(field3, i, rng, administrativeHierarchy) {
9055
9131
  type: "image/png"
9056
9132
  };
9057
9133
  case FieldType.SEARCH:
9134
+ case FieldType.AUTOCOMPLETE:
9058
9135
  case FieldType.HTTP:
9059
9136
  return {
9060
9137
  error: null,
@@ -9938,12 +10015,44 @@ function userDeserializer(serializedUserField, user2) {
9938
10015
  function isDefined(value) {
9939
10016
  return value !== void 0;
9940
10017
  }
10018
+ function serializeLocationField(expression, user2) {
10019
+ if (expression.type === "exact") {
10020
+ return userDeserializer(expression.term, user2);
10021
+ }
10022
+ if (expression.type === "within") {
10023
+ return userDeserializer(expression.location, user2);
10024
+ }
10025
+ return void 0;
10026
+ }
10027
+ function deserializeExpression(expression, user2) {
10028
+ if (expression.type === "exact") {
10029
+ const term = userDeserializer(expression.term, user2);
10030
+ if (!term) {
10031
+ return void 0;
10032
+ }
10033
+ return {
10034
+ ...expression,
10035
+ term
10036
+ };
10037
+ }
10038
+ if (expression.type === "within") {
10039
+ const location = userDeserializer(expression.location, user2);
10040
+ if (!location) {
10041
+ return void 0;
10042
+ }
10043
+ return {
10044
+ ...expression,
10045
+ location
10046
+ };
10047
+ }
10048
+ return void 0;
10049
+ }
9941
10050
  function deserializeQueryExpression(expression, user2) {
9942
10051
  const assignedTo = expression.assignedTo ? userDeserializer(expression.assignedTo.term, user2) : void 0;
9943
10052
  const createdBy = expression.createdBy ? userDeserializer(expression.createdBy.term, user2) : void 0;
9944
10053
  const updatedBy = expression.updatedBy ? userDeserializer(expression.updatedBy.term, user2) : void 0;
9945
- const createdAtLocation = expression.createdAtLocation ? userDeserializer(expression.createdAtLocation.location, user2) : void 0;
9946
- const updatedAtLocation = expression.updatedAtLocation ? userDeserializer(expression.updatedAtLocation.location, user2) : void 0;
10054
+ const createdAtLocation = expression.createdAtLocation ? serializeLocationField(expression.createdAtLocation, user2) : void 0;
10055
+ const updatedAtLocation = expression.updatedAtLocation ? serializeLocationField(expression.updatedAtLocation, user2) : void 0;
9947
10056
  const updatedByUserRole = expression.updatedByUserRole ? userDeserializer(expression.updatedByUserRole.term, user2) : void 0;
9948
10057
  const declaredLocation = expression["legalStatuses.DECLARED.createdAtLocation"] ? userDeserializer(
9949
10058
  expression["legalStatuses.DECLARED.createdAtLocation"].location,
@@ -9962,8 +10071,8 @@ function deserializeQueryExpression(expression, user2) {
9962
10071
  ...expression.updatedByUserRole,
9963
10072
  term: updatedByUserRole
9964
10073
  } : void 0,
9965
- createdAtLocation: expression.createdAtLocation && isDefined(createdAtLocation) ? { ...expression.createdAtLocation, location: createdAtLocation } : void 0,
9966
- updatedAtLocation: expression.updatedAtLocation && isDefined(updatedAtLocation) ? { ...expression.updatedAtLocation, location: updatedAtLocation } : void 0,
10074
+ createdAtLocation: expression.createdAtLocation && isDefined(createdAtLocation) ? deserializeExpression(expression.createdAtLocation, user2) : void 0,
10075
+ updatedAtLocation: expression.updatedAtLocation && isDefined(updatedAtLocation) ? deserializeExpression(expression.updatedAtLocation, user2) : void 0,
9967
10076
  ["legalStatuses.DECLARED.createdAtLocation"]: expression["legalStatuses.DECLARED.createdAtLocation"] && isDefined(declaredLocation) ? {
9968
10077
  ...expression["legalStatuses.DECLARED.createdAtLocation"],
9969
10078
  location: declaredLocation
@@ -0,0 +1,3 @@
1
+ declare function main(): Promise<void>;
2
+ export { main };
3
+ //# sourceMappingURL=add-birth-certificate-issuance-flag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-birth-certificate-issuance-flag.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/add-birth-certificate-issuance-flag.ts"],"names":[],"mappings":"AA6aA,iBAAe,IAAI,kBAiDlB;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}