@okf/ootils 1.7.0 → 1.8.1

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.
@@ -567,6 +567,49 @@ declare namespace BASE_BULLMQ_CONFIG {
567
567
  }
568
568
  export { workerConfig_8 as workerConfig };
569
569
  }
570
+ namespace REINDEX_QUEUE {
571
+ let id_9: string;
572
+ export { id_9 as id };
573
+ export namespace queueConfig_9 {
574
+ export namespace defaultJobOptions_9 {
575
+ let attempts_9: number;
576
+ export { attempts_9 as attempts };
577
+ export namespace backoff_9 {
578
+ let type_9: string;
579
+ export { type_9 as type };
580
+ let delay_9: number;
581
+ export { delay_9 as delay };
582
+ }
583
+ export { backoff_9 as backoff };
584
+ let removeOnComplete_9: number;
585
+ export { removeOnComplete_9 as removeOnComplete };
586
+ let removeOnFail_9: number;
587
+ export { removeOnFail_9 as removeOnFail };
588
+ }
589
+ export { defaultJobOptions_9 as defaultJobOptions };
590
+ export namespace streams_9 {
591
+ export namespace events_9 {
592
+ let maxLen_9: number;
593
+ export { maxLen_9 as maxLen };
594
+ }
595
+ export { events_9 as events };
596
+ }
597
+ export { streams_9 as streams };
598
+ }
599
+ export { queueConfig_9 as queueConfig };
600
+ export namespace workerConfig_9 {
601
+ let concurrency_9: number;
602
+ export { concurrency_9 as concurrency };
603
+ export namespace limiter_9 {
604
+ let max_9: number;
605
+ export { max_9 as max };
606
+ let duration_9: number;
607
+ export { duration_9 as duration };
608
+ }
609
+ export { limiter_9 as limiter };
610
+ }
611
+ export { workerConfig_9 as workerConfig };
612
+ }
570
613
  }
571
614
 
572
615
  interface PlatformContextContentItem {
package/dist/browser.d.ts CHANGED
@@ -567,6 +567,49 @@ declare namespace BASE_BULLMQ_CONFIG {
567
567
  }
568
568
  export { workerConfig_8 as workerConfig };
569
569
  }
570
+ namespace REINDEX_QUEUE {
571
+ let id_9: string;
572
+ export { id_9 as id };
573
+ export namespace queueConfig_9 {
574
+ export namespace defaultJobOptions_9 {
575
+ let attempts_9: number;
576
+ export { attempts_9 as attempts };
577
+ export namespace backoff_9 {
578
+ let type_9: string;
579
+ export { type_9 as type };
580
+ let delay_9: number;
581
+ export { delay_9 as delay };
582
+ }
583
+ export { backoff_9 as backoff };
584
+ let removeOnComplete_9: number;
585
+ export { removeOnComplete_9 as removeOnComplete };
586
+ let removeOnFail_9: number;
587
+ export { removeOnFail_9 as removeOnFail };
588
+ }
589
+ export { defaultJobOptions_9 as defaultJobOptions };
590
+ export namespace streams_9 {
591
+ export namespace events_9 {
592
+ let maxLen_9: number;
593
+ export { maxLen_9 as maxLen };
594
+ }
595
+ export { events_9 as events };
596
+ }
597
+ export { streams_9 as streams };
598
+ }
599
+ export { queueConfig_9 as queueConfig };
600
+ export namespace workerConfig_9 {
601
+ let concurrency_9: number;
602
+ export { concurrency_9 as concurrency };
603
+ export namespace limiter_9 {
604
+ let max_9: number;
605
+ export { max_9 as max };
606
+ let duration_9: number;
607
+ export { duration_9 as duration };
608
+ }
609
+ export { limiter_9 as limiter };
610
+ }
611
+ export { workerConfig_9 as workerConfig };
612
+ }
570
613
  }
571
614
 
572
615
  interface PlatformContextContentItem {
package/dist/browser.js CHANGED
@@ -654,6 +654,33 @@ var BASE_BULLMQ_CONFIG = {
654
654
  // ...60 seconds (higher throughput for chunking)
655
655
  }
656
656
  }
657
+ },
658
+ REINDEX_QUEUE: {
659
+ id: "reindex-queue",
660
+ queueConfig: {
661
+ defaultJobOptions: {
662
+ attempts: 3,
663
+ backoff: {
664
+ type: "exponential",
665
+ delay: 2e3
666
+ },
667
+ removeOnComplete: 30,
668
+ removeOnFail: 100
669
+ },
670
+ streams: {
671
+ events: {
672
+ maxLen: 10
673
+ // Keep very low, cuz we dont really use historical stream events as of now
674
+ }
675
+ }
676
+ },
677
+ workerConfig: {
678
+ concurrency: 1,
679
+ limiter: {
680
+ max: 3,
681
+ duration: 6e4
682
+ }
683
+ }
657
684
  }
658
685
  };
659
686
 
package/dist/browser.mjs CHANGED
@@ -619,6 +619,33 @@ var BASE_BULLMQ_CONFIG = {
619
619
  // ...60 seconds (higher throughput for chunking)
620
620
  }
621
621
  }
622
+ },
623
+ REINDEX_QUEUE: {
624
+ id: "reindex-queue",
625
+ queueConfig: {
626
+ defaultJobOptions: {
627
+ attempts: 3,
628
+ backoff: {
629
+ type: "exponential",
630
+ delay: 2e3
631
+ },
632
+ removeOnComplete: 30,
633
+ removeOnFail: 100
634
+ },
635
+ streams: {
636
+ events: {
637
+ maxLen: 10
638
+ // Keep very low, cuz we dont really use historical stream events as of now
639
+ }
640
+ }
641
+ },
642
+ workerConfig: {
643
+ concurrency: 1,
644
+ limiter: {
645
+ max: 3,
646
+ duration: 6e4
647
+ }
648
+ }
622
649
  }
623
650
  };
624
651
 
package/dist/node.d.mts CHANGED
@@ -574,6 +574,49 @@ declare namespace BASE_BULLMQ_CONFIG {
574
574
  }
575
575
  export { workerConfig_8 as workerConfig };
576
576
  }
577
+ namespace REINDEX_QUEUE {
578
+ let id_9: string;
579
+ export { id_9 as id };
580
+ export namespace queueConfig_9 {
581
+ export namespace defaultJobOptions_9 {
582
+ let attempts_9: number;
583
+ export { attempts_9 as attempts };
584
+ export namespace backoff_9 {
585
+ let type_9: string;
586
+ export { type_9 as type };
587
+ let delay_9: number;
588
+ export { delay_9 as delay };
589
+ }
590
+ export { backoff_9 as backoff };
591
+ let removeOnComplete_9: number;
592
+ export { removeOnComplete_9 as removeOnComplete };
593
+ let removeOnFail_9: number;
594
+ export { removeOnFail_9 as removeOnFail };
595
+ }
596
+ export { defaultJobOptions_9 as defaultJobOptions };
597
+ export namespace streams_9 {
598
+ export namespace events_9 {
599
+ let maxLen_9: number;
600
+ export { maxLen_9 as maxLen };
601
+ }
602
+ export { events_9 as events };
603
+ }
604
+ export { streams_9 as streams };
605
+ }
606
+ export { queueConfig_9 as queueConfig };
607
+ export namespace workerConfig_9 {
608
+ let concurrency_9: number;
609
+ export { concurrency_9 as concurrency };
610
+ export namespace limiter_9 {
611
+ let max_9: number;
612
+ export { max_9 as max };
613
+ let duration_9: number;
614
+ export { duration_9 as duration };
615
+ }
616
+ export { limiter_9 as limiter };
617
+ }
618
+ export { workerConfig_9 as workerConfig };
619
+ }
577
620
  }
578
621
 
579
622
  interface PlatformContextContentItem {
@@ -862,11 +905,13 @@ interface IMessage {
862
905
  vectorSearchInfo: {
863
906
  chunks: typeof AnnotationSchema[];
864
907
  };
908
+ relatedChunks: mongoose.Schema.Types.ObjectId[];
865
909
  args: {
866
910
  query: string;
867
911
  reframedQuery: string;
868
912
  summary: object;
869
913
  };
914
+ metadata: object;
870
915
  userFeedback: {
871
916
  reaction: "positive" | "negative";
872
917
  comments: string;
@@ -875,7 +920,7 @@ interface IMessage {
875
920
  interface IAIChat extends Document {
876
921
  userId: mongoose.Schema.Types.ObjectId;
877
922
  createdAt: Date;
878
- lastAcitivity: Date;
923
+ lastActivity: Date;
879
924
  messages: IMessage[];
880
925
  }
881
926
  declare const AIChatSchema: mongoose.Schema<IAIChat, mongoose.Model<IAIChat, any, any, any, mongoose.Document<unknown, any, IAIChat, any> & IAIChat & Required<{
package/dist/node.d.ts CHANGED
@@ -574,6 +574,49 @@ declare namespace BASE_BULLMQ_CONFIG {
574
574
  }
575
575
  export { workerConfig_8 as workerConfig };
576
576
  }
577
+ namespace REINDEX_QUEUE {
578
+ let id_9: string;
579
+ export { id_9 as id };
580
+ export namespace queueConfig_9 {
581
+ export namespace defaultJobOptions_9 {
582
+ let attempts_9: number;
583
+ export { attempts_9 as attempts };
584
+ export namespace backoff_9 {
585
+ let type_9: string;
586
+ export { type_9 as type };
587
+ let delay_9: number;
588
+ export { delay_9 as delay };
589
+ }
590
+ export { backoff_9 as backoff };
591
+ let removeOnComplete_9: number;
592
+ export { removeOnComplete_9 as removeOnComplete };
593
+ let removeOnFail_9: number;
594
+ export { removeOnFail_9 as removeOnFail };
595
+ }
596
+ export { defaultJobOptions_9 as defaultJobOptions };
597
+ export namespace streams_9 {
598
+ export namespace events_9 {
599
+ let maxLen_9: number;
600
+ export { maxLen_9 as maxLen };
601
+ }
602
+ export { events_9 as events };
603
+ }
604
+ export { streams_9 as streams };
605
+ }
606
+ export { queueConfig_9 as queueConfig };
607
+ export namespace workerConfig_9 {
608
+ let concurrency_9: number;
609
+ export { concurrency_9 as concurrency };
610
+ export namespace limiter_9 {
611
+ let max_9: number;
612
+ export { max_9 as max };
613
+ let duration_9: number;
614
+ export { duration_9 as duration };
615
+ }
616
+ export { limiter_9 as limiter };
617
+ }
618
+ export { workerConfig_9 as workerConfig };
619
+ }
577
620
  }
578
621
 
579
622
  interface PlatformContextContentItem {
@@ -862,11 +905,13 @@ interface IMessage {
862
905
  vectorSearchInfo: {
863
906
  chunks: typeof AnnotationSchema[];
864
907
  };
908
+ relatedChunks: mongoose.Schema.Types.ObjectId[];
865
909
  args: {
866
910
  query: string;
867
911
  reframedQuery: string;
868
912
  summary: object;
869
913
  };
914
+ metadata: object;
870
915
  userFeedback: {
871
916
  reaction: "positive" | "negative";
872
917
  comments: string;
@@ -875,7 +920,7 @@ interface IMessage {
875
920
  interface IAIChat extends Document {
876
921
  userId: mongoose.Schema.Types.ObjectId;
877
922
  createdAt: Date;
878
- lastAcitivity: Date;
923
+ lastActivity: Date;
879
924
  messages: IMessage[];
880
925
  }
881
926
  declare const AIChatSchema: mongoose.Schema<IAIChat, mongoose.Model<IAIChat, any, any, any, mongoose.Document<unknown, any, IAIChat, any> & IAIChat & Required<{
package/dist/node.js CHANGED
@@ -310,6 +310,33 @@ var init_GLOBAL_BULLMQ_CONFIG = __esm({
310
310
  // ...60 seconds (higher throughput for chunking)
311
311
  }
312
312
  }
313
+ },
314
+ REINDEX_QUEUE: {
315
+ id: "reindex-queue",
316
+ queueConfig: {
317
+ defaultJobOptions: {
318
+ attempts: 3,
319
+ backoff: {
320
+ type: "exponential",
321
+ delay: 2e3
322
+ },
323
+ removeOnComplete: 30,
324
+ removeOnFail: 100
325
+ },
326
+ streams: {
327
+ events: {
328
+ maxLen: 10
329
+ // Keep very low, cuz we dont really use historical stream events as of now
330
+ }
331
+ }
332
+ },
333
+ workerConfig: {
334
+ concurrency: 1,
335
+ limiter: {
336
+ max: 3,
337
+ duration: 6e4
338
+ }
339
+ }
313
340
  }
314
341
  };
315
342
  }
@@ -884,7 +911,7 @@ var init_AIChat = __esm({
884
911
  {
885
912
  userId: { type: import_mongoose4.default.Schema.Types.ObjectId, index: { unique: true } },
886
913
  createdAt: Date,
887
- lastAcitivity: Date,
914
+ lastActivity: Date,
888
915
  messages: [
889
916
  {
890
917
  id: String,
@@ -898,13 +925,16 @@ var init_AIChat = __esm({
898
925
  viz: Object
899
926
  },
900
927
  vectorSearchInfo: {
928
+ //depreca
901
929
  chunks: [Annotations_default]
902
930
  },
931
+ relatedChunks: [{ type: import_mongoose4.default.Schema.Types.ObjectId, ref: "chunks" }],
903
932
  args: {
904
933
  query: String,
905
934
  reframedQuery: String,
906
935
  summary: Object
907
936
  },
937
+ metadata: Object,
908
938
  userFeedback: {
909
939
  reaction: { type: String, enum: ["positive", "negative"] },
910
940
  comments: String
package/dist/node.mjs CHANGED
@@ -315,6 +315,33 @@ var init_GLOBAL_BULLMQ_CONFIG = __esm({
315
315
  // ...60 seconds (higher throughput for chunking)
316
316
  }
317
317
  }
318
+ },
319
+ REINDEX_QUEUE: {
320
+ id: "reindex-queue",
321
+ queueConfig: {
322
+ defaultJobOptions: {
323
+ attempts: 3,
324
+ backoff: {
325
+ type: "exponential",
326
+ delay: 2e3
327
+ },
328
+ removeOnComplete: 30,
329
+ removeOnFail: 100
330
+ },
331
+ streams: {
332
+ events: {
333
+ maxLen: 10
334
+ // Keep very low, cuz we dont really use historical stream events as of now
335
+ }
336
+ }
337
+ },
338
+ workerConfig: {
339
+ concurrency: 1,
340
+ limiter: {
341
+ max: 3,
342
+ duration: 6e4
343
+ }
344
+ }
318
345
  }
319
346
  };
320
347
  }
@@ -889,7 +916,7 @@ var init_AIChat = __esm({
889
916
  {
890
917
  userId: { type: mongoose4.Schema.Types.ObjectId, index: { unique: true } },
891
918
  createdAt: Date,
892
- lastAcitivity: Date,
919
+ lastActivity: Date,
893
920
  messages: [
894
921
  {
895
922
  id: String,
@@ -903,13 +930,16 @@ var init_AIChat = __esm({
903
930
  viz: Object
904
931
  },
905
932
  vectorSearchInfo: {
933
+ //depreca
906
934
  chunks: [Annotations_default]
907
935
  },
936
+ relatedChunks: [{ type: mongoose4.Schema.Types.ObjectId, ref: "chunks" }],
908
937
  args: {
909
938
  query: String,
910
939
  reframedQuery: String,
911
940
  summary: Object
912
941
  },
942
+ metadata: Object,
913
943
  userFeedback: {
914
944
  reaction: { type: String, enum: ["positive", "negative"] },
915
945
  comments: String
@@ -567,6 +567,49 @@ declare namespace BASE_BULLMQ_CONFIG {
567
567
  }
568
568
  export { workerConfig_8 as workerConfig };
569
569
  }
570
+ namespace REINDEX_QUEUE {
571
+ let id_9: string;
572
+ export { id_9 as id };
573
+ export namespace queueConfig_9 {
574
+ export namespace defaultJobOptions_9 {
575
+ let attempts_9: number;
576
+ export { attempts_9 as attempts };
577
+ export namespace backoff_9 {
578
+ let type_9: string;
579
+ export { type_9 as type };
580
+ let delay_9: number;
581
+ export { delay_9 as delay };
582
+ }
583
+ export { backoff_9 as backoff };
584
+ let removeOnComplete_9: number;
585
+ export { removeOnComplete_9 as removeOnComplete };
586
+ let removeOnFail_9: number;
587
+ export { removeOnFail_9 as removeOnFail };
588
+ }
589
+ export { defaultJobOptions_9 as defaultJobOptions };
590
+ export namespace streams_9 {
591
+ export namespace events_9 {
592
+ let maxLen_9: number;
593
+ export { maxLen_9 as maxLen };
594
+ }
595
+ export { events_9 as events };
596
+ }
597
+ export { streams_9 as streams };
598
+ }
599
+ export { queueConfig_9 as queueConfig };
600
+ export namespace workerConfig_9 {
601
+ let concurrency_9: number;
602
+ export { concurrency_9 as concurrency };
603
+ export namespace limiter_9 {
604
+ let max_9: number;
605
+ export { max_9 as max };
606
+ let duration_9: number;
607
+ export { duration_9 as duration };
608
+ }
609
+ export { limiter_9 as limiter };
610
+ }
611
+ export { workerConfig_9 as workerConfig };
612
+ }
570
613
  }
571
614
 
572
615
  interface PlatformContextContentItem {
@@ -567,6 +567,49 @@ declare namespace BASE_BULLMQ_CONFIG {
567
567
  }
568
568
  export { workerConfig_8 as workerConfig };
569
569
  }
570
+ namespace REINDEX_QUEUE {
571
+ let id_9: string;
572
+ export { id_9 as id };
573
+ export namespace queueConfig_9 {
574
+ export namespace defaultJobOptions_9 {
575
+ let attempts_9: number;
576
+ export { attempts_9 as attempts };
577
+ export namespace backoff_9 {
578
+ let type_9: string;
579
+ export { type_9 as type };
580
+ let delay_9: number;
581
+ export { delay_9 as delay };
582
+ }
583
+ export { backoff_9 as backoff };
584
+ let removeOnComplete_9: number;
585
+ export { removeOnComplete_9 as removeOnComplete };
586
+ let removeOnFail_9: number;
587
+ export { removeOnFail_9 as removeOnFail };
588
+ }
589
+ export { defaultJobOptions_9 as defaultJobOptions };
590
+ export namespace streams_9 {
591
+ export namespace events_9 {
592
+ let maxLen_9: number;
593
+ export { maxLen_9 as maxLen };
594
+ }
595
+ export { events_9 as events };
596
+ }
597
+ export { streams_9 as streams };
598
+ }
599
+ export { queueConfig_9 as queueConfig };
600
+ export namespace workerConfig_9 {
601
+ let concurrency_9: number;
602
+ export { concurrency_9 as concurrency };
603
+ export namespace limiter_9 {
604
+ let max_9: number;
605
+ export { max_9 as max };
606
+ let duration_9: number;
607
+ export { duration_9 as duration };
608
+ }
609
+ export { limiter_9 as limiter };
610
+ }
611
+ export { workerConfig_9 as workerConfig };
612
+ }
570
613
  }
571
614
 
572
615
  interface PlatformContextContentItem {
package/dist/universal.js CHANGED
@@ -654,6 +654,33 @@ var BASE_BULLMQ_CONFIG = {
654
654
  // ...60 seconds (higher throughput for chunking)
655
655
  }
656
656
  }
657
+ },
658
+ REINDEX_QUEUE: {
659
+ id: "reindex-queue",
660
+ queueConfig: {
661
+ defaultJobOptions: {
662
+ attempts: 3,
663
+ backoff: {
664
+ type: "exponential",
665
+ delay: 2e3
666
+ },
667
+ removeOnComplete: 30,
668
+ removeOnFail: 100
669
+ },
670
+ streams: {
671
+ events: {
672
+ maxLen: 10
673
+ // Keep very low, cuz we dont really use historical stream events as of now
674
+ }
675
+ }
676
+ },
677
+ workerConfig: {
678
+ concurrency: 1,
679
+ limiter: {
680
+ max: 3,
681
+ duration: 6e4
682
+ }
683
+ }
657
684
  }
658
685
  };
659
686
 
@@ -619,6 +619,33 @@ var BASE_BULLMQ_CONFIG = {
619
619
  // ...60 seconds (higher throughput for chunking)
620
620
  }
621
621
  }
622
+ },
623
+ REINDEX_QUEUE: {
624
+ id: "reindex-queue",
625
+ queueConfig: {
626
+ defaultJobOptions: {
627
+ attempts: 3,
628
+ backoff: {
629
+ type: "exponential",
630
+ delay: 2e3
631
+ },
632
+ removeOnComplete: 30,
633
+ removeOnFail: 100
634
+ },
635
+ streams: {
636
+ events: {
637
+ maxLen: 10
638
+ // Keep very low, cuz we dont really use historical stream events as of now
639
+ }
640
+ }
641
+ },
642
+ workerConfig: {
643
+ concurrency: 1,
644
+ limiter: {
645
+ max: 3,
646
+ duration: 6e4
647
+ }
648
+ }
622
649
  }
623
650
  };
624
651
 
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.7.0",
6
+ "version": "1.8.1",
7
7
  "description": "Utility functions for both browser and Node.js",
8
8
  "main": "dist/index.js",
9
9
  "module": "dist/index.mjs",