@okf/ootils 1.18.2 → 1.19.0

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.
@@ -502,7 +502,7 @@ declare namespace BASE_BULLMQ_CONFIG {
502
502
  }
503
503
  export { workerConfig_5 as workerConfig };
504
504
  }
505
- namespace ANNOS_ELASTIC_SYNC_QUEUE {
505
+ namespace AI_AUTO_ANNOTATE_QUEUE {
506
506
  let id_6: string;
507
507
  export { id_6 as id };
508
508
  export namespace queueConfig_6 {
@@ -542,7 +542,7 @@ declare namespace BASE_BULLMQ_CONFIG {
542
542
  }
543
543
  export { workerConfig_6 as workerConfig };
544
544
  }
545
- namespace CHUNKS_ELASTIC_SYNC_QUEUE {
545
+ namespace ANNOS_ELASTIC_SYNC_QUEUE {
546
546
  let id_7: string;
547
547
  export { id_7 as id };
548
548
  export namespace queueConfig_7 {
@@ -582,7 +582,7 @@ declare namespace BASE_BULLMQ_CONFIG {
582
582
  }
583
583
  export { workerConfig_7 as workerConfig };
584
584
  }
585
- namespace CONTENT_ELASTIC_SYNC_QUEUE {
585
+ namespace CHUNKS_ELASTIC_SYNC_QUEUE {
586
586
  let id_8: string;
587
587
  export { id_8 as id };
588
588
  export namespace queueConfig_8 {
@@ -622,7 +622,7 @@ declare namespace BASE_BULLMQ_CONFIG {
622
622
  }
623
623
  export { workerConfig_8 as workerConfig };
624
624
  }
625
- namespace REINDEX_QUEUE {
625
+ namespace CONTENT_ELASTIC_SYNC_QUEUE {
626
626
  let id_9: string;
627
627
  export { id_9 as id };
628
628
  export namespace queueConfig_9 {
@@ -636,8 +636,6 @@ declare namespace BASE_BULLMQ_CONFIG {
636
636
  export { delay_9 as delay };
637
637
  }
638
638
  export { backoff_9 as backoff };
639
- let delay_10: number;
640
- export { delay_10 as delay };
641
639
  let removeOnComplete_9: number;
642
640
  export { removeOnComplete_9 as removeOnComplete };
643
641
  let removeOnFail_9: number;
@@ -664,6 +662,48 @@ declare namespace BASE_BULLMQ_CONFIG {
664
662
  }
665
663
  export { workerConfig_9 as workerConfig };
666
664
  }
665
+ namespace REINDEX_QUEUE {
666
+ let id_10: string;
667
+ export { id_10 as id };
668
+ export namespace queueConfig_10 {
669
+ export namespace defaultJobOptions_10 {
670
+ let attempts_10: number;
671
+ export { attempts_10 as attempts };
672
+ export namespace backoff_10 {
673
+ let type_10: string;
674
+ export { type_10 as type };
675
+ let delay_10: number;
676
+ export { delay_10 as delay };
677
+ }
678
+ export { backoff_10 as backoff };
679
+ let delay_11: number;
680
+ export { delay_11 as delay };
681
+ let removeOnComplete_10: number;
682
+ export { removeOnComplete_10 as removeOnComplete };
683
+ let removeOnFail_10: number;
684
+ export { removeOnFail_10 as removeOnFail };
685
+ }
686
+ export { defaultJobOptions_10 as defaultJobOptions };
687
+ export namespace streams_10 {
688
+ export namespace events_10 {
689
+ let maxLen_10: number;
690
+ export { maxLen_10 as maxLen };
691
+ }
692
+ export { events_10 as events };
693
+ }
694
+ export { streams_10 as streams };
695
+ }
696
+ export { queueConfig_10 as queueConfig };
697
+ export namespace workerConfig_10 {
698
+ let concurrency_10: number;
699
+ export { concurrency_10 as concurrency };
700
+ let lockDuration_10: number;
701
+ export { lockDuration_10 as lockDuration };
702
+ let maxStalledCount_10: number;
703
+ export { maxStalledCount_10 as maxStalledCount };
704
+ }
705
+ export { workerConfig_10 as workerConfig };
706
+ }
667
707
  }
668
708
 
669
709
  interface PlatformContextContentItem {
@@ -683,4 +723,30 @@ interface GetPlatformContextContentParams {
683
723
  }
684
724
  declare const getPlatformContextContent: ({ platformConfigs_ai, }: GetPlatformContextContentParams) => string;
685
725
 
686
- export { BASE_BULLMQ_CONFIG, deleteVal, extractAllBlocksFromTpl, genTagId, getPlatformContextContent, getRollupPossibilities, getVal, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
726
+ interface Author {
727
+ id: string | null;
728
+ name: string;
729
+ }
730
+ interface MergeParams {
731
+ prevObj: any;
732
+ newLexValue: any;
733
+ thisBlockValuePath: string;
734
+ author?: Author;
735
+ }
736
+ /**
737
+ * Merges annoData from a Lexical field into the consolidated annotations.tags structure.
738
+ *
739
+ * This function:
740
+ * 1. Removes all fragments from prevObj that belong to the given valuePath
741
+ * 2. Injects new fragments from annoData into the consolidated structure
742
+ * 3. Removes tags that have no fragments left
743
+ *
744
+ * @param prevObj - The existing consolidated annotations.tags object
745
+ * @param newLexValue - The new Lexical field value containing annoData
746
+ * @param thisBlockValuePath - The valuePath of the Lexical field being processed
747
+ * @param author - Optional author object. Defaults to { id: null, name: "AI" } for backend usage
748
+ * @returns The updated consolidated annotations.tags object
749
+ */
750
+ declare const mergeAnnoDataIntoAnnotationsTags: ({ prevObj, newLexValue, thisBlockValuePath, author, }: MergeParams) => any;
751
+
752
+ export { BASE_BULLMQ_CONFIG, deleteVal, extractAllBlocksFromTpl, genTagId, getPlatformContextContent, getRollupPossibilities, getVal, mergeAnnoDataIntoAnnotationsTags, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
package/dist/browser.d.ts CHANGED
@@ -502,7 +502,7 @@ declare namespace BASE_BULLMQ_CONFIG {
502
502
  }
503
503
  export { workerConfig_5 as workerConfig };
504
504
  }
505
- namespace ANNOS_ELASTIC_SYNC_QUEUE {
505
+ namespace AI_AUTO_ANNOTATE_QUEUE {
506
506
  let id_6: string;
507
507
  export { id_6 as id };
508
508
  export namespace queueConfig_6 {
@@ -542,7 +542,7 @@ declare namespace BASE_BULLMQ_CONFIG {
542
542
  }
543
543
  export { workerConfig_6 as workerConfig };
544
544
  }
545
- namespace CHUNKS_ELASTIC_SYNC_QUEUE {
545
+ namespace ANNOS_ELASTIC_SYNC_QUEUE {
546
546
  let id_7: string;
547
547
  export { id_7 as id };
548
548
  export namespace queueConfig_7 {
@@ -582,7 +582,7 @@ declare namespace BASE_BULLMQ_CONFIG {
582
582
  }
583
583
  export { workerConfig_7 as workerConfig };
584
584
  }
585
- namespace CONTENT_ELASTIC_SYNC_QUEUE {
585
+ namespace CHUNKS_ELASTIC_SYNC_QUEUE {
586
586
  let id_8: string;
587
587
  export { id_8 as id };
588
588
  export namespace queueConfig_8 {
@@ -622,7 +622,7 @@ declare namespace BASE_BULLMQ_CONFIG {
622
622
  }
623
623
  export { workerConfig_8 as workerConfig };
624
624
  }
625
- namespace REINDEX_QUEUE {
625
+ namespace CONTENT_ELASTIC_SYNC_QUEUE {
626
626
  let id_9: string;
627
627
  export { id_9 as id };
628
628
  export namespace queueConfig_9 {
@@ -636,8 +636,6 @@ declare namespace BASE_BULLMQ_CONFIG {
636
636
  export { delay_9 as delay };
637
637
  }
638
638
  export { backoff_9 as backoff };
639
- let delay_10: number;
640
- export { delay_10 as delay };
641
639
  let removeOnComplete_9: number;
642
640
  export { removeOnComplete_9 as removeOnComplete };
643
641
  let removeOnFail_9: number;
@@ -664,6 +662,48 @@ declare namespace BASE_BULLMQ_CONFIG {
664
662
  }
665
663
  export { workerConfig_9 as workerConfig };
666
664
  }
665
+ namespace REINDEX_QUEUE {
666
+ let id_10: string;
667
+ export { id_10 as id };
668
+ export namespace queueConfig_10 {
669
+ export namespace defaultJobOptions_10 {
670
+ let attempts_10: number;
671
+ export { attempts_10 as attempts };
672
+ export namespace backoff_10 {
673
+ let type_10: string;
674
+ export { type_10 as type };
675
+ let delay_10: number;
676
+ export { delay_10 as delay };
677
+ }
678
+ export { backoff_10 as backoff };
679
+ let delay_11: number;
680
+ export { delay_11 as delay };
681
+ let removeOnComplete_10: number;
682
+ export { removeOnComplete_10 as removeOnComplete };
683
+ let removeOnFail_10: number;
684
+ export { removeOnFail_10 as removeOnFail };
685
+ }
686
+ export { defaultJobOptions_10 as defaultJobOptions };
687
+ export namespace streams_10 {
688
+ export namespace events_10 {
689
+ let maxLen_10: number;
690
+ export { maxLen_10 as maxLen };
691
+ }
692
+ export { events_10 as events };
693
+ }
694
+ export { streams_10 as streams };
695
+ }
696
+ export { queueConfig_10 as queueConfig };
697
+ export namespace workerConfig_10 {
698
+ let concurrency_10: number;
699
+ export { concurrency_10 as concurrency };
700
+ let lockDuration_10: number;
701
+ export { lockDuration_10 as lockDuration };
702
+ let maxStalledCount_10: number;
703
+ export { maxStalledCount_10 as maxStalledCount };
704
+ }
705
+ export { workerConfig_10 as workerConfig };
706
+ }
667
707
  }
668
708
 
669
709
  interface PlatformContextContentItem {
@@ -683,4 +723,30 @@ interface GetPlatformContextContentParams {
683
723
  }
684
724
  declare const getPlatformContextContent: ({ platformConfigs_ai, }: GetPlatformContextContentParams) => string;
685
725
 
686
- export { BASE_BULLMQ_CONFIG, deleteVal, extractAllBlocksFromTpl, genTagId, getPlatformContextContent, getRollupPossibilities, getVal, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
726
+ interface Author {
727
+ id: string | null;
728
+ name: string;
729
+ }
730
+ interface MergeParams {
731
+ prevObj: any;
732
+ newLexValue: any;
733
+ thisBlockValuePath: string;
734
+ author?: Author;
735
+ }
736
+ /**
737
+ * Merges annoData from a Lexical field into the consolidated annotations.tags structure.
738
+ *
739
+ * This function:
740
+ * 1. Removes all fragments from prevObj that belong to the given valuePath
741
+ * 2. Injects new fragments from annoData into the consolidated structure
742
+ * 3. Removes tags that have no fragments left
743
+ *
744
+ * @param prevObj - The existing consolidated annotations.tags object
745
+ * @param newLexValue - The new Lexical field value containing annoData
746
+ * @param thisBlockValuePath - The valuePath of the Lexical field being processed
747
+ * @param author - Optional author object. Defaults to { id: null, name: "AI" } for backend usage
748
+ * @returns The updated consolidated annotations.tags object
749
+ */
750
+ declare const mergeAnnoDataIntoAnnotationsTags: ({ prevObj, newLexValue, thisBlockValuePath, author, }: MergeParams) => any;
751
+
752
+ export { BASE_BULLMQ_CONFIG, deleteVal, extractAllBlocksFromTpl, genTagId, getPlatformContextContent, getRollupPossibilities, getVal, mergeAnnoDataIntoAnnotationsTags, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
package/dist/browser.js CHANGED
@@ -27,6 +27,7 @@ __export(browser_exports, {
27
27
  getPlatformContextContent: () => getPlatformContextContent,
28
28
  getRollupPossibilities: () => getRollupPossibilities,
29
29
  getVal: () => getVal,
30
+ mergeAnnoDataIntoAnnotationsTags: () => mergeAnnoDataIntoAnnotationsTags,
30
31
  recursivelyExtractBlocks: () => _recursExtractBlocks,
31
32
  segrigateDocs: () => segrigateDocs,
32
33
  setVal: () => setVal,
@@ -614,6 +615,31 @@ var BASE_BULLMQ_CONFIG = {
614
615
  }
615
616
  }
616
617
  },
618
+ AI_AUTO_ANNOTATE_QUEUE: {
619
+ id: "ai-auto-annotate-queue",
620
+ queueConfig: {
621
+ defaultJobOptions: {
622
+ attempts: 3,
623
+ backoff: {
624
+ type: "exponential",
625
+ delay: 5e3
626
+ },
627
+ removeOnComplete: 30,
628
+ removeOnFail: 100
629
+ },
630
+ streams: {
631
+ events: {
632
+ maxLen: 10
633
+ }
634
+ }
635
+ },
636
+ workerConfig: {
637
+ concurrency: 50,
638
+ lockDuration: 3e5,
639
+ // 5 minutes lock duration since annotation can be slow
640
+ maxStalledCount: 3
641
+ }
642
+ },
617
643
  ANNOS_ELASTIC_SYNC_QUEUE: {
618
644
  id: "annos-elastic-sync-queue",
619
645
  queueConfig: {
@@ -740,6 +766,90 @@ ${v?.markdownText || ""}` : v?.markdownText || "";
740
766
  }
741
767
  return "";
742
768
  };
769
+
770
+ // src/utils/mergeAnnoDataIntoAnnotationsTags.ts
771
+ var import_lodash = require("lodash");
772
+ var mergeAnnoDataIntoAnnotationsTags = ({
773
+ prevObj,
774
+ newLexValue,
775
+ thisBlockValuePath,
776
+ author = { id: null, name: "AI" }
777
+ }) => {
778
+ let newConsolidated = (0, import_lodash.cloneDeep)(prevObj) || {};
779
+ const { annoData = {} } = newLexValue || {};
780
+ const existingKeys = /* @__PURE__ */ new Map();
781
+ Object.keys(newConsolidated).map((tagType) => {
782
+ if (newConsolidated[tagType].data?.length > 0) {
783
+ newConsolidated[tagType].data.forEach((tag, tagIdx) => {
784
+ if (tag.fragments?.length > 0) {
785
+ newConsolidated[tagType].data[tagIdx].fragments = newConsolidated[tagType].data[tagIdx].fragments.filter((frag) => {
786
+ existingKeys.set(frag.annoDataId, frag?.author ?? "");
787
+ if (frag.extractedFromValuePath !== thisBlockValuePath) {
788
+ return true;
789
+ } else {
790
+ return false;
791
+ }
792
+ });
793
+ }
794
+ });
795
+ }
796
+ });
797
+ Object.keys(annoData).map((annoDataId) => {
798
+ const { tags, fragment = {}, ...restAnnoData } = annoData[annoDataId];
799
+ const tagTypes = Object.keys(tags || {});
800
+ const buildFragment = () => ({
801
+ ...fragment,
802
+ ...restAnnoData,
803
+ annoDataId,
804
+ // Fallback to provided author if author not set (for backwards compatibility)
805
+ author: restAnnoData.author || existingKeys.get(annoDataId) || author,
806
+ extractedFromValuePath: thisBlockValuePath
807
+ });
808
+ if (tagTypes.length > 0) {
809
+ tagTypes.forEach((tagType) => {
810
+ const value = tags[tagType];
811
+ if (newConsolidated[tagType]?.data?.length > 0) {
812
+ value.data.forEach((d) => {
813
+ const foundTagIdx = newConsolidated[tagType].data.findIndex(
814
+ (dd) => dd._id === d._id
815
+ );
816
+ if (foundTagIdx !== -1) {
817
+ const fragsAry = newConsolidated[tagType].data[foundTagIdx].fragments || [];
818
+ if (fragsAry.length === 0) {
819
+ newConsolidated[tagType].data[foundTagIdx].fragments = [
820
+ buildFragment()
821
+ ];
822
+ } else {
823
+ newConsolidated[tagType].data[foundTagIdx].fragments.push(
824
+ buildFragment()
825
+ );
826
+ }
827
+ } else {
828
+ newConsolidated[tagType].data.push({
829
+ ...d,
830
+ fragments: [buildFragment()]
831
+ });
832
+ }
833
+ });
834
+ } else {
835
+ newConsolidated[tagType] = {
836
+ collectionId: value.collectionId,
837
+ data: value.data.map((d) => ({
838
+ ...d,
839
+ fragments: [buildFragment()]
840
+ }))
841
+ };
842
+ }
843
+ });
844
+ }
845
+ });
846
+ Object.keys(newConsolidated).forEach((tagType) => {
847
+ newConsolidated[tagType].data = newConsolidated[tagType].data.filter(
848
+ (d) => d.fragments?.length > 0
849
+ );
850
+ });
851
+ return newConsolidated;
852
+ };
743
853
  // Annotate the CommonJS export names for ESM import in node:
744
854
  0 && (module.exports = {
745
855
  BASE_BULLMQ_CONFIG,
@@ -749,6 +859,7 @@ ${v?.markdownText || ""}` : v?.markdownText || "";
749
859
  getPlatformContextContent,
750
860
  getRollupPossibilities,
751
861
  getVal,
862
+ mergeAnnoDataIntoAnnotationsTags,
752
863
  recursivelyExtractBlocks,
753
864
  segrigateDocs,
754
865
  setVal,
package/dist/browser.mjs CHANGED
@@ -578,6 +578,31 @@ var BASE_BULLMQ_CONFIG = {
578
578
  }
579
579
  }
580
580
  },
581
+ AI_AUTO_ANNOTATE_QUEUE: {
582
+ id: "ai-auto-annotate-queue",
583
+ queueConfig: {
584
+ defaultJobOptions: {
585
+ attempts: 3,
586
+ backoff: {
587
+ type: "exponential",
588
+ delay: 5e3
589
+ },
590
+ removeOnComplete: 30,
591
+ removeOnFail: 100
592
+ },
593
+ streams: {
594
+ events: {
595
+ maxLen: 10
596
+ }
597
+ }
598
+ },
599
+ workerConfig: {
600
+ concurrency: 50,
601
+ lockDuration: 3e5,
602
+ // 5 minutes lock duration since annotation can be slow
603
+ maxStalledCount: 3
604
+ }
605
+ },
581
606
  ANNOS_ELASTIC_SYNC_QUEUE: {
582
607
  id: "annos-elastic-sync-queue",
583
608
  queueConfig: {
@@ -704,6 +729,90 @@ ${v?.markdownText || ""}` : v?.markdownText || "";
704
729
  }
705
730
  return "";
706
731
  };
732
+
733
+ // src/utils/mergeAnnoDataIntoAnnotationsTags.ts
734
+ import { cloneDeep } from "lodash";
735
+ var mergeAnnoDataIntoAnnotationsTags = ({
736
+ prevObj,
737
+ newLexValue,
738
+ thisBlockValuePath,
739
+ author = { id: null, name: "AI" }
740
+ }) => {
741
+ let newConsolidated = cloneDeep(prevObj) || {};
742
+ const { annoData = {} } = newLexValue || {};
743
+ const existingKeys = /* @__PURE__ */ new Map();
744
+ Object.keys(newConsolidated).map((tagType) => {
745
+ if (newConsolidated[tagType].data?.length > 0) {
746
+ newConsolidated[tagType].data.forEach((tag, tagIdx) => {
747
+ if (tag.fragments?.length > 0) {
748
+ newConsolidated[tagType].data[tagIdx].fragments = newConsolidated[tagType].data[tagIdx].fragments.filter((frag) => {
749
+ existingKeys.set(frag.annoDataId, frag?.author ?? "");
750
+ if (frag.extractedFromValuePath !== thisBlockValuePath) {
751
+ return true;
752
+ } else {
753
+ return false;
754
+ }
755
+ });
756
+ }
757
+ });
758
+ }
759
+ });
760
+ Object.keys(annoData).map((annoDataId) => {
761
+ const { tags, fragment = {}, ...restAnnoData } = annoData[annoDataId];
762
+ const tagTypes = Object.keys(tags || {});
763
+ const buildFragment = () => ({
764
+ ...fragment,
765
+ ...restAnnoData,
766
+ annoDataId,
767
+ // Fallback to provided author if author not set (for backwards compatibility)
768
+ author: restAnnoData.author || existingKeys.get(annoDataId) || author,
769
+ extractedFromValuePath: thisBlockValuePath
770
+ });
771
+ if (tagTypes.length > 0) {
772
+ tagTypes.forEach((tagType) => {
773
+ const value = tags[tagType];
774
+ if (newConsolidated[tagType]?.data?.length > 0) {
775
+ value.data.forEach((d) => {
776
+ const foundTagIdx = newConsolidated[tagType].data.findIndex(
777
+ (dd) => dd._id === d._id
778
+ );
779
+ if (foundTagIdx !== -1) {
780
+ const fragsAry = newConsolidated[tagType].data[foundTagIdx].fragments || [];
781
+ if (fragsAry.length === 0) {
782
+ newConsolidated[tagType].data[foundTagIdx].fragments = [
783
+ buildFragment()
784
+ ];
785
+ } else {
786
+ newConsolidated[tagType].data[foundTagIdx].fragments.push(
787
+ buildFragment()
788
+ );
789
+ }
790
+ } else {
791
+ newConsolidated[tagType].data.push({
792
+ ...d,
793
+ fragments: [buildFragment()]
794
+ });
795
+ }
796
+ });
797
+ } else {
798
+ newConsolidated[tagType] = {
799
+ collectionId: value.collectionId,
800
+ data: value.data.map((d) => ({
801
+ ...d,
802
+ fragments: [buildFragment()]
803
+ }))
804
+ };
805
+ }
806
+ });
807
+ }
808
+ });
809
+ Object.keys(newConsolidated).forEach((tagType) => {
810
+ newConsolidated[tagType].data = newConsolidated[tagType].data.filter(
811
+ (d) => d.fragments?.length > 0
812
+ );
813
+ });
814
+ return newConsolidated;
815
+ };
707
816
  export {
708
817
  BASE_BULLMQ_CONFIG,
709
818
  deleteVal,
@@ -712,6 +821,7 @@ export {
712
821
  getPlatformContextContent,
713
822
  getRollupPossibilities,
714
823
  getVal,
824
+ mergeAnnoDataIntoAnnotationsTags,
715
825
  _recursExtractBlocks as recursivelyExtractBlocks,
716
826
  segrigateDocs,
717
827
  setVal,
package/dist/node.d.mts CHANGED
@@ -510,7 +510,7 @@ declare namespace BASE_BULLMQ_CONFIG {
510
510
  }
511
511
  export { workerConfig_5 as workerConfig };
512
512
  }
513
- namespace ANNOS_ELASTIC_SYNC_QUEUE {
513
+ namespace AI_AUTO_ANNOTATE_QUEUE {
514
514
  let id_6: string;
515
515
  export { id_6 as id };
516
516
  export namespace queueConfig_6 {
@@ -550,7 +550,7 @@ declare namespace BASE_BULLMQ_CONFIG {
550
550
  }
551
551
  export { workerConfig_6 as workerConfig };
552
552
  }
553
- namespace CHUNKS_ELASTIC_SYNC_QUEUE {
553
+ namespace ANNOS_ELASTIC_SYNC_QUEUE {
554
554
  let id_7: string;
555
555
  export { id_7 as id };
556
556
  export namespace queueConfig_7 {
@@ -590,7 +590,7 @@ declare namespace BASE_BULLMQ_CONFIG {
590
590
  }
591
591
  export { workerConfig_7 as workerConfig };
592
592
  }
593
- namespace CONTENT_ELASTIC_SYNC_QUEUE {
593
+ namespace CHUNKS_ELASTIC_SYNC_QUEUE {
594
594
  let id_8: string;
595
595
  export { id_8 as id };
596
596
  export namespace queueConfig_8 {
@@ -630,7 +630,7 @@ declare namespace BASE_BULLMQ_CONFIG {
630
630
  }
631
631
  export { workerConfig_8 as workerConfig };
632
632
  }
633
- namespace REINDEX_QUEUE {
633
+ namespace CONTENT_ELASTIC_SYNC_QUEUE {
634
634
  let id_9: string;
635
635
  export { id_9 as id };
636
636
  export namespace queueConfig_9 {
@@ -644,8 +644,6 @@ declare namespace BASE_BULLMQ_CONFIG {
644
644
  export { delay_9 as delay };
645
645
  }
646
646
  export { backoff_9 as backoff };
647
- let delay_10: number;
648
- export { delay_10 as delay };
649
647
  let removeOnComplete_9: number;
650
648
  export { removeOnComplete_9 as removeOnComplete };
651
649
  let removeOnFail_9: number;
@@ -672,6 +670,48 @@ declare namespace BASE_BULLMQ_CONFIG {
672
670
  }
673
671
  export { workerConfig_9 as workerConfig };
674
672
  }
673
+ namespace REINDEX_QUEUE {
674
+ let id_10: string;
675
+ export { id_10 as id };
676
+ export namespace queueConfig_10 {
677
+ export namespace defaultJobOptions_10 {
678
+ let attempts_10: number;
679
+ export { attempts_10 as attempts };
680
+ export namespace backoff_10 {
681
+ let type_10: string;
682
+ export { type_10 as type };
683
+ let delay_10: number;
684
+ export { delay_10 as delay };
685
+ }
686
+ export { backoff_10 as backoff };
687
+ let delay_11: number;
688
+ export { delay_11 as delay };
689
+ let removeOnComplete_10: number;
690
+ export { removeOnComplete_10 as removeOnComplete };
691
+ let removeOnFail_10: number;
692
+ export { removeOnFail_10 as removeOnFail };
693
+ }
694
+ export { defaultJobOptions_10 as defaultJobOptions };
695
+ export namespace streams_10 {
696
+ export namespace events_10 {
697
+ let maxLen_10: number;
698
+ export { maxLen_10 as maxLen };
699
+ }
700
+ export { events_10 as events };
701
+ }
702
+ export { streams_10 as streams };
703
+ }
704
+ export { queueConfig_10 as queueConfig };
705
+ export namespace workerConfig_10 {
706
+ let concurrency_10: number;
707
+ export { concurrency_10 as concurrency };
708
+ let lockDuration_10: number;
709
+ export { lockDuration_10 as lockDuration };
710
+ let maxStalledCount_10: number;
711
+ export { maxStalledCount_10 as maxStalledCount };
712
+ }
713
+ export { workerConfig_10 as workerConfig };
714
+ }
675
715
  }
676
716
 
677
717
  interface PlatformContextContentItem {
@@ -691,6 +731,32 @@ interface GetPlatformContextContentParams {
691
731
  }
692
732
  declare const getPlatformContextContent: ({ platformConfigs_ai, }: GetPlatformContextContentParams) => string;
693
733
 
734
+ interface Author {
735
+ id: string | null;
736
+ name: string;
737
+ }
738
+ interface MergeParams {
739
+ prevObj: any;
740
+ newLexValue: any;
741
+ thisBlockValuePath: string;
742
+ author?: Author;
743
+ }
744
+ /**
745
+ * Merges annoData from a Lexical field into the consolidated annotations.tags structure.
746
+ *
747
+ * This function:
748
+ * 1. Removes all fragments from prevObj that belong to the given valuePath
749
+ * 2. Injects new fragments from annoData into the consolidated structure
750
+ * 3. Removes tags that have no fragments left
751
+ *
752
+ * @param prevObj - The existing consolidated annotations.tags object
753
+ * @param newLexValue - The new Lexical field value containing annoData
754
+ * @param thisBlockValuePath - The valuePath of the Lexical field being processed
755
+ * @param author - Optional author object. Defaults to { id: null, name: "AI" } for backend usage
756
+ * @returns The updated consolidated annotations.tags object
757
+ */
758
+ declare const mergeAnnoDataIntoAnnotationsTags: ({ prevObj, newLexValue, thisBlockValuePath, author, }: MergeParams) => any;
759
+
694
760
  declare class MongoConnector {
695
761
  static getInstance(): any;
696
762
  static getClusterConnections(): any;
@@ -1256,4 +1322,4 @@ declare function GET_GLOBAL_BULLMQ_CONFIG({ env, redisCredentials }: {
1256
1322
  };
1257
1323
  }): Object;
1258
1324
 
1259
- export { AIChatSchema, AnnotationSchema, BASE_BULLMQ_CONFIG, BaseProducer, BaseWorker, ElasticSearchConnector, GET_GLOBAL_BULLMQ_CONFIG, GeneratedTopicsSchema, MongoConnector, PlatformConfigsSchema, ProducerManager, RedisCacheConnector, TplSchema, WorkerManager, deleteVal, extractAllBlocksFromTpl, genTagId, getAIChatModelByTenant, getAnnotationsModelByTenant, getDbByTenant, getGeneratedTopicsModelByTenant, getModelByTenant, getPlatformConfigsModelByTenant, getPlatformContextContent, getRollupPossibilities, getTplModelByTenant, getVal, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
1325
+ export { AIChatSchema, AnnotationSchema, BASE_BULLMQ_CONFIG, BaseProducer, BaseWorker, ElasticSearchConnector, GET_GLOBAL_BULLMQ_CONFIG, GeneratedTopicsSchema, MongoConnector, PlatformConfigsSchema, ProducerManager, RedisCacheConnector, TplSchema, WorkerManager, deleteVal, extractAllBlocksFromTpl, genTagId, getAIChatModelByTenant, getAnnotationsModelByTenant, getDbByTenant, getGeneratedTopicsModelByTenant, getModelByTenant, getPlatformConfigsModelByTenant, getPlatformContextContent, getRollupPossibilities, getTplModelByTenant, getVal, mergeAnnoDataIntoAnnotationsTags, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };