@okf/ootils 1.37.1 → 1.39.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.
- package/dist/browser.d.mts +80 -17
- package/dist/browser.d.ts +80 -17
- package/dist/browser.js +99 -7
- package/dist/browser.mjs +98 -7
- package/dist/node.d.mts +80 -17
- package/dist/node.d.ts +80 -17
- package/dist/node.js +99 -7
- package/dist/node.mjs +98 -7
- package/dist/universal.d.mts +80 -17
- package/dist/universal.d.ts +80 -17
- package/dist/universal.js +99 -7
- package/dist/universal.mjs +98 -7
- package/package.json +1 -1
package/dist/browser.mjs
CHANGED
|
@@ -623,6 +623,31 @@ var isTplAnnotationEnabled = (tpl) => {
|
|
|
623
623
|
return blockRegistry.getAnnotationEnabledBlocks(allBlocks).length > 0;
|
|
624
624
|
};
|
|
625
625
|
|
|
626
|
+
// src/utils/collectMarkIdsInOrder.ts
|
|
627
|
+
var collectMarkIdsInOrder = (editorState) => {
|
|
628
|
+
const ordered = [];
|
|
629
|
+
const seen = /* @__PURE__ */ new Set();
|
|
630
|
+
const walk = (node) => {
|
|
631
|
+
if (Array.isArray(node)) {
|
|
632
|
+
for (const n of node) walk(n);
|
|
633
|
+
return;
|
|
634
|
+
}
|
|
635
|
+
if (node && typeof node === "object") {
|
|
636
|
+
if (node.type === "mark" && Array.isArray(node.ids)) {
|
|
637
|
+
for (const id of node.ids) {
|
|
638
|
+
if (!seen.has(id)) {
|
|
639
|
+
seen.add(id);
|
|
640
|
+
ordered.push(id);
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
for (const key in node) walk(node[key]);
|
|
645
|
+
}
|
|
646
|
+
};
|
|
647
|
+
walk(editorState);
|
|
648
|
+
return ordered;
|
|
649
|
+
};
|
|
650
|
+
|
|
626
651
|
// src/utils/getRollupPossibilities.ts
|
|
627
652
|
var MAX_DEPTH_ROLLUP_POSSIBILITIES = 10;
|
|
628
653
|
function getRollupPossibilities({
|
|
@@ -921,6 +946,15 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
921
946
|
}
|
|
922
947
|
},
|
|
923
948
|
AI_AUTO_ANNOTATE_QUEUE: {
|
|
949
|
+
// PARENT queue in the per-doc Flow. One job per doc; child jobs (one
|
|
950
|
+
// per chunk) live on AI_AUTO_ANNOTATE_CHUNK_QUEUE. BullMQ Flow fires
|
|
951
|
+
// the parent only after all children settle. Parent job's worker
|
|
952
|
+
// collects children's suggestions, runs ONE doc-level inductive batch
|
|
953
|
+
// dedup, applies merged annotations to editor state, writes the doc.
|
|
954
|
+
//
|
|
955
|
+
// The progress tracker aggregator (calculateSegByAutoAnnotateIdJobs in
|
|
956
|
+
// okf-sub) filters by this queue's id, so parents = 1 job per doc
|
|
957
|
+
// matches the existing FE progress counting semantics 1:1.
|
|
924
958
|
id: "ai-auto-annotate-queue",
|
|
925
959
|
queueConfig: {
|
|
926
960
|
defaultJobOptions: {
|
|
@@ -939,14 +973,70 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
939
973
|
}
|
|
940
974
|
},
|
|
941
975
|
workerConfig: {
|
|
942
|
-
// Parallel-safe:
|
|
943
|
-
//
|
|
944
|
-
//
|
|
945
|
-
//
|
|
946
|
-
|
|
976
|
+
// Parallel-safe across docs: per-doc isolation on annotations.tags
|
|
977
|
+
// rollup (each parent processes a different doc); tenant-level Redis
|
|
978
|
+
// lock in resolveInductiveBatch serializes inductive dedup across
|
|
979
|
+
// concurrent parents; createTag/createSubTheme catch E11000 on the
|
|
980
|
+
// unique tagId index. See ai/dualAgentAnnotation/tools/createTaxonomyItem.js
|
|
981
|
+
// + ai/dualAgentAnnotation/tools/resolveInductiveBatch.js.
|
|
982
|
+
concurrency: 5,
|
|
947
983
|
lockDuration: 3e5,
|
|
948
|
-
// 5
|
|
949
|
-
|
|
984
|
+
// 5 min — generous ceiling so heartbeat stutters don't trip stalled detection
|
|
985
|
+
// With attempts:1 a stalled job has no retry left anyway, but keeping
|
|
986
|
+
// stalled-count low ensures BullMQ doesn't mis-pickup a job whose
|
|
987
|
+
// worker is just CPU-busy.
|
|
988
|
+
maxStalledCount: 1
|
|
989
|
+
}
|
|
990
|
+
},
|
|
991
|
+
AI_AUTO_ANNOTATE_CHUNK_QUEUE: {
|
|
992
|
+
// CHILDREN queue in the per-doc Flow. One job per (doc, field, chunk).
|
|
993
|
+
// Each job calls okf-be /internal/getChunkSuggestions for its one chunk
|
|
994
|
+
// — a small fast call well under App Engine's 60s ceiling regardless
|
|
995
|
+
// of how large the source doc is. Failure of a single chunk does NOT
|
|
996
|
+
// kill the parent (children opt in via failParentOnFailure: false) —
|
|
997
|
+
// the parent's worker handles partial-success aggregation, mirroring
|
|
998
|
+
// the Promise.allSettled semantic at the BullMQ level.
|
|
999
|
+
//
|
|
1000
|
+
// The progress tracker IGNORES this queue (the aggregator filters on
|
|
1001
|
+
// AI_AUTO_ANNOTATE_QUEUE.id), so chunk granularity is available in
|
|
1002
|
+
// job state for any future drill-in UI without disrupting today's
|
|
1003
|
+
// doc-level progress UI.
|
|
1004
|
+
id: "ai-auto-annotate-chunk-queue",
|
|
1005
|
+
queueConfig: {
|
|
1006
|
+
defaultJobOptions: {
|
|
1007
|
+
// One try, no retries. A retry would re-fire the dual-agent LLM
|
|
1008
|
+
// chain (annotator + moderator + attribute classifier) for the
|
|
1009
|
+
// same chunk — expensive, and if the first try hit an OpenAI
|
|
1010
|
+
// 429/timeout the retry will likely hit the same condition.
|
|
1011
|
+
// Failed chunks surface to the parent via getFailedChildrenValues
|
|
1012
|
+
// and become a partial-success on the field (the rest still apply).
|
|
1013
|
+
attempts: 1,
|
|
1014
|
+
backoff: {
|
|
1015
|
+
type: "exponential",
|
|
1016
|
+
delay: 5e3
|
|
1017
|
+
},
|
|
1018
|
+
removeOnComplete: 100,
|
|
1019
|
+
// chunks fan out wider; keep a few more
|
|
1020
|
+
removeOnFail: 300
|
|
1021
|
+
},
|
|
1022
|
+
streams: {
|
|
1023
|
+
events: {
|
|
1024
|
+
maxLen: 10
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
},
|
|
1028
|
+
workerConfig: {
|
|
1029
|
+
// OpenAI gpt-4.1-mini TPM ceiling is 10M tokens/min. Each chunk
|
|
1030
|
+
// does ~4 LLM calls in series totalling ~22K tokens.
|
|
1031
|
+
// 5 chunks in flight × 4 calls/chunk × 60s / 15s-per-call
|
|
1032
|
+
// ≈ 80 calls/min × 6.5K tokens
|
|
1033
|
+
// ≈ 520K tokens/min sustained → ~5% of TPM ceiling.
|
|
1034
|
+
// Comfortable headroom for variance (long-tail chunks, bigger
|
|
1035
|
+
// taxonomies, mixed-tenant batches).
|
|
1036
|
+
concurrency: 5,
|
|
1037
|
+
lockDuration: 18e4,
|
|
1038
|
+
// 3 min — a single chunk's dual-agent run fits well under
|
|
1039
|
+
maxStalledCount: 1
|
|
950
1040
|
}
|
|
951
1041
|
},
|
|
952
1042
|
ANNOS_ELASTIC_SYNC_QUEUE: {
|
|
@@ -2695,6 +2785,7 @@ export {
|
|
|
2695
2785
|
autoGenFilterConfigsFromTpl,
|
|
2696
2786
|
blockRegistry,
|
|
2697
2787
|
buildFilterConfigurations,
|
|
2788
|
+
collectMarkIdsInOrder,
|
|
2698
2789
|
compareAndGroupBlocks,
|
|
2699
2790
|
deleteVal,
|
|
2700
2791
|
extractAllBlocksFromTpl,
|
package/dist/node.d.mts
CHANGED
|
@@ -229,6 +229,29 @@ declare const _recursExtractBlocks: ({ data, cb, sectionStack, blockPathPrefix }
|
|
|
229
229
|
*/
|
|
230
230
|
declare const isTplAnnotationEnabled: (tpl: any) => boolean;
|
|
231
231
|
|
|
232
|
+
/**
|
|
233
|
+
* Collect annotation (mark-node) ids from a serialized Lexical editorState tree,
|
|
234
|
+
* in document reading order, deduped on FIRST occurrence.
|
|
235
|
+
*
|
|
236
|
+
* Lexical stores annotation highlights as MarkNodes: `{ type: "mark", ids: [...],
|
|
237
|
+
* children: [...] }`. Overlapping annotations split the text into contiguous
|
|
238
|
+
* segments, each a mark whose `ids` lists every annotation covering that segment —
|
|
239
|
+
* so a single annotation can appear across multiple marks, and a single mark can
|
|
240
|
+
* carry multiple ids. A depth-first walk visits segments left-to-right (document
|
|
241
|
+
* order); taking each id's first appearance yields the position where that
|
|
242
|
+
* annotation's highlight first starts. Two annotations that start at the exact
|
|
243
|
+
* same character share their first segment, so their relative order falls to that
|
|
244
|
+
* segment's `ids` array order — an inherent tie with no positional answer.
|
|
245
|
+
*
|
|
246
|
+
* Pass the editorState root (the `{ root: { children } }` tree). It walks generic
|
|
247
|
+
* JSON, so any subtree works too — but never pass an object that also nests
|
|
248
|
+
* unrelated mark-bearing states (e.g. a Lexical value's sibling `annoData`, whose
|
|
249
|
+
* per-anno `fragment` mini-states would inject out-of-order marks).
|
|
250
|
+
*
|
|
251
|
+
* Callers that only need the unordered SET of ids can wrap the result in `new Set(...)`.
|
|
252
|
+
*/
|
|
253
|
+
declare const collectMarkIdsInOrder: (editorState: any) => string[];
|
|
254
|
+
|
|
232
255
|
/**
|
|
233
256
|
* Calculates all possible rollup relationships for a tag type
|
|
234
257
|
*
|
|
@@ -604,7 +627,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
604
627
|
}
|
|
605
628
|
export { workerConfig_7 as workerConfig };
|
|
606
629
|
}
|
|
607
|
-
namespace
|
|
630
|
+
namespace AI_AUTO_ANNOTATE_CHUNK_QUEUE {
|
|
608
631
|
let id_8: string;
|
|
609
632
|
export { id_8 as id };
|
|
610
633
|
export namespace queueConfig_8 {
|
|
@@ -644,7 +667,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
644
667
|
}
|
|
645
668
|
export { workerConfig_8 as workerConfig };
|
|
646
669
|
}
|
|
647
|
-
namespace
|
|
670
|
+
namespace ANNOS_ELASTIC_SYNC_QUEUE {
|
|
648
671
|
let id_9: string;
|
|
649
672
|
export { id_9 as id };
|
|
650
673
|
export namespace queueConfig_9 {
|
|
@@ -684,7 +707,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
684
707
|
}
|
|
685
708
|
export { workerConfig_9 as workerConfig };
|
|
686
709
|
}
|
|
687
|
-
namespace
|
|
710
|
+
namespace CHUNKS_ELASTIC_SYNC_QUEUE {
|
|
688
711
|
let id_10: string;
|
|
689
712
|
export { id_10 as id };
|
|
690
713
|
export namespace queueConfig_10 {
|
|
@@ -724,7 +747,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
724
747
|
}
|
|
725
748
|
export { workerConfig_10 as workerConfig };
|
|
726
749
|
}
|
|
727
|
-
namespace
|
|
750
|
+
namespace USERS_ELASTIC_SYNC_QUEUE {
|
|
728
751
|
let id_11: string;
|
|
729
752
|
export { id_11 as id };
|
|
730
753
|
export namespace queueConfig_11 {
|
|
@@ -764,7 +787,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
764
787
|
}
|
|
765
788
|
export { workerConfig_11 as workerConfig };
|
|
766
789
|
}
|
|
767
|
-
namespace
|
|
790
|
+
namespace CONTENT_ELASTIC_SYNC_QUEUE {
|
|
768
791
|
let id_12: string;
|
|
769
792
|
export { id_12 as id };
|
|
770
793
|
export namespace queueConfig_12 {
|
|
@@ -804,7 +827,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
804
827
|
}
|
|
805
828
|
export { workerConfig_12 as workerConfig };
|
|
806
829
|
}
|
|
807
|
-
namespace
|
|
830
|
+
namespace SARVAM_TRANSCRIPTION_QUEUE {
|
|
808
831
|
let id_13: string;
|
|
809
832
|
export { id_13 as id };
|
|
810
833
|
export namespace queueConfig_13 {
|
|
@@ -844,7 +867,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
844
867
|
}
|
|
845
868
|
export { workerConfig_13 as workerConfig };
|
|
846
869
|
}
|
|
847
|
-
namespace
|
|
870
|
+
namespace INTERCOM_CONVERSATIONS_QUEUE {
|
|
848
871
|
let id_14: string;
|
|
849
872
|
export { id_14 as id };
|
|
850
873
|
export namespace queueConfig_14 {
|
|
@@ -884,7 +907,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
884
907
|
}
|
|
885
908
|
export { workerConfig_14 as workerConfig };
|
|
886
909
|
}
|
|
887
|
-
namespace
|
|
910
|
+
namespace TAG_SYNC_PLAN_QUEUE {
|
|
888
911
|
let id_15: string;
|
|
889
912
|
export { id_15 as id };
|
|
890
913
|
export namespace queueConfig_15 {
|
|
@@ -924,11 +947,13 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
924
947
|
}
|
|
925
948
|
export { workerConfig_15 as workerConfig };
|
|
926
949
|
}
|
|
927
|
-
namespace
|
|
950
|
+
namespace TAG_SYNC_BATCH_QUEUE {
|
|
928
951
|
let id_16: string;
|
|
929
952
|
export { id_16 as id };
|
|
930
953
|
export namespace queueConfig_16 {
|
|
931
954
|
export namespace defaultJobOptions_16 {
|
|
955
|
+
let attempts_16: number;
|
|
956
|
+
export { attempts_16 as attempts };
|
|
932
957
|
export namespace backoff_16 {
|
|
933
958
|
let type_16: string;
|
|
934
959
|
export { type_16 as type };
|
|
@@ -936,8 +961,6 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
936
961
|
export { delay_16 as delay };
|
|
937
962
|
}
|
|
938
963
|
export { backoff_16 as backoff };
|
|
939
|
-
let attempts_16: number;
|
|
940
|
-
export { attempts_16 as attempts };
|
|
941
964
|
let removeOnComplete_16: number;
|
|
942
965
|
export { removeOnComplete_16 as removeOnComplete };
|
|
943
966
|
let removeOnFail_16: number;
|
|
@@ -964,13 +987,11 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
964
987
|
}
|
|
965
988
|
export { workerConfig_16 as workerConfig };
|
|
966
989
|
}
|
|
967
|
-
namespace
|
|
990
|
+
namespace SCHEDULED_EXTERNAL_SYNC_QUEUE {
|
|
968
991
|
let id_17: string;
|
|
969
992
|
export { id_17 as id };
|
|
970
993
|
export namespace queueConfig_17 {
|
|
971
994
|
export namespace defaultJobOptions_17 {
|
|
972
|
-
let attempts_17: number;
|
|
973
|
-
export { attempts_17 as attempts };
|
|
974
995
|
export namespace backoff_17 {
|
|
975
996
|
let type_17: string;
|
|
976
997
|
export { type_17 as type };
|
|
@@ -978,8 +999,8 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
978
999
|
export { delay_17 as delay };
|
|
979
1000
|
}
|
|
980
1001
|
export { backoff_17 as backoff };
|
|
981
|
-
let
|
|
982
|
-
export {
|
|
1002
|
+
let attempts_17: number;
|
|
1003
|
+
export { attempts_17 as attempts };
|
|
983
1004
|
let removeOnComplete_17: number;
|
|
984
1005
|
export { removeOnComplete_17 as removeOnComplete };
|
|
985
1006
|
let removeOnFail_17: number;
|
|
@@ -1006,6 +1027,48 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
1006
1027
|
}
|
|
1007
1028
|
export { workerConfig_17 as workerConfig };
|
|
1008
1029
|
}
|
|
1030
|
+
namespace REINDEX_QUEUE {
|
|
1031
|
+
let id_18: string;
|
|
1032
|
+
export { id_18 as id };
|
|
1033
|
+
export namespace queueConfig_18 {
|
|
1034
|
+
export namespace defaultJobOptions_18 {
|
|
1035
|
+
let attempts_18: number;
|
|
1036
|
+
export { attempts_18 as attempts };
|
|
1037
|
+
export namespace backoff_18 {
|
|
1038
|
+
let type_18: string;
|
|
1039
|
+
export { type_18 as type };
|
|
1040
|
+
let delay_18: number;
|
|
1041
|
+
export { delay_18 as delay };
|
|
1042
|
+
}
|
|
1043
|
+
export { backoff_18 as backoff };
|
|
1044
|
+
let delay_19: number;
|
|
1045
|
+
export { delay_19 as delay };
|
|
1046
|
+
let removeOnComplete_18: number;
|
|
1047
|
+
export { removeOnComplete_18 as removeOnComplete };
|
|
1048
|
+
let removeOnFail_18: number;
|
|
1049
|
+
export { removeOnFail_18 as removeOnFail };
|
|
1050
|
+
}
|
|
1051
|
+
export { defaultJobOptions_18 as defaultJobOptions };
|
|
1052
|
+
export namespace streams_18 {
|
|
1053
|
+
export namespace events_18 {
|
|
1054
|
+
let maxLen_18: number;
|
|
1055
|
+
export { maxLen_18 as maxLen };
|
|
1056
|
+
}
|
|
1057
|
+
export { events_18 as events };
|
|
1058
|
+
}
|
|
1059
|
+
export { streams_18 as streams };
|
|
1060
|
+
}
|
|
1061
|
+
export { queueConfig_18 as queueConfig };
|
|
1062
|
+
export namespace workerConfig_18 {
|
|
1063
|
+
let concurrency_18: number;
|
|
1064
|
+
export { concurrency_18 as concurrency };
|
|
1065
|
+
let lockDuration_18: number;
|
|
1066
|
+
export { lockDuration_18 as lockDuration };
|
|
1067
|
+
let maxStalledCount_18: number;
|
|
1068
|
+
export { maxStalledCount_18 as maxStalledCount };
|
|
1069
|
+
}
|
|
1070
|
+
export { workerConfig_18 as workerConfig };
|
|
1071
|
+
}
|
|
1009
1072
|
}
|
|
1010
1073
|
|
|
1011
1074
|
interface PlatformContextContentItem {
|
|
@@ -2679,4 +2742,4 @@ declare function GET_GLOBAL_BULLMQ_CONFIG({ env, redisCredentials }: {
|
|
|
2679
2742
|
};
|
|
2680
2743
|
}): Object;
|
|
2681
2744
|
|
|
2682
|
-
export { AIChatSchema, AnnosElasticSyncProducer, AnnotationSchema, BASE_BULLMQ_CONFIG, BaseProducer, BaseWorker, type BlockCapabilities, type BlockDef, BlockRegistry, CHUNKING_PRESETS, ChunksElasticSyncProducer, ELASTIC_MAPPING_PRESETS, ElasticSearchConnector, FILTER_IDS, GET_GLOBAL_BULLMQ_CONFIG, GeneratedEntitiesSchema, GeneratedTopicsSchema, MONGO_SCHEMA_PRESETS, MongoConnector, PlatformConfigsSchema, ProducerManager, RedisCacheConnector, SecretManagerConnector, TEMP_removeDuplicateFilters, TplSchema, UI_CONTENT, WorkerManager, _self_managed_buildAnnoHierarchyConfig, _self_managed_buildDocHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, blockRegistry, buildFilterConfigurations, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAndOrganizeBlocks, genCleanCamelCaseId, genTagId, generateFilterKey, getAIChatModelByTenant, getAnnoFilterBucketKey, getAnnotationsModelByTenant, getDbByTenant, getFilterKeyForBlock, getGeneratedEntitiesModelByTenant, getGeneratedTopicsModelByTenant, getModelByTenant, getPlatformConfigsModelByTenant, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getTplModelByTenant, getVal, isTplAnnotationEnabled, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
|
2745
|
+
export { AIChatSchema, AnnosElasticSyncProducer, AnnotationSchema, BASE_BULLMQ_CONFIG, BaseProducer, BaseWorker, type BlockCapabilities, type BlockDef, BlockRegistry, CHUNKING_PRESETS, ChunksElasticSyncProducer, ELASTIC_MAPPING_PRESETS, ElasticSearchConnector, FILTER_IDS, GET_GLOBAL_BULLMQ_CONFIG, GeneratedEntitiesSchema, GeneratedTopicsSchema, MONGO_SCHEMA_PRESETS, MongoConnector, PlatformConfigsSchema, ProducerManager, RedisCacheConnector, SecretManagerConnector, TEMP_removeDuplicateFilters, TplSchema, UI_CONTENT, WorkerManager, _self_managed_buildAnnoHierarchyConfig, _self_managed_buildDocHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, blockRegistry, buildFilterConfigurations, collectMarkIdsInOrder, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAndOrganizeBlocks, genCleanCamelCaseId, genTagId, generateFilterKey, getAIChatModelByTenant, getAnnoFilterBucketKey, getAnnotationsModelByTenant, getDbByTenant, getFilterKeyForBlock, getGeneratedEntitiesModelByTenant, getGeneratedTopicsModelByTenant, getModelByTenant, getPlatformConfigsModelByTenant, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getTplModelByTenant, getVal, isTplAnnotationEnabled, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
package/dist/node.d.ts
CHANGED
|
@@ -229,6 +229,29 @@ declare const _recursExtractBlocks: ({ data, cb, sectionStack, blockPathPrefix }
|
|
|
229
229
|
*/
|
|
230
230
|
declare const isTplAnnotationEnabled: (tpl: any) => boolean;
|
|
231
231
|
|
|
232
|
+
/**
|
|
233
|
+
* Collect annotation (mark-node) ids from a serialized Lexical editorState tree,
|
|
234
|
+
* in document reading order, deduped on FIRST occurrence.
|
|
235
|
+
*
|
|
236
|
+
* Lexical stores annotation highlights as MarkNodes: `{ type: "mark", ids: [...],
|
|
237
|
+
* children: [...] }`. Overlapping annotations split the text into contiguous
|
|
238
|
+
* segments, each a mark whose `ids` lists every annotation covering that segment —
|
|
239
|
+
* so a single annotation can appear across multiple marks, and a single mark can
|
|
240
|
+
* carry multiple ids. A depth-first walk visits segments left-to-right (document
|
|
241
|
+
* order); taking each id's first appearance yields the position where that
|
|
242
|
+
* annotation's highlight first starts. Two annotations that start at the exact
|
|
243
|
+
* same character share their first segment, so their relative order falls to that
|
|
244
|
+
* segment's `ids` array order — an inherent tie with no positional answer.
|
|
245
|
+
*
|
|
246
|
+
* Pass the editorState root (the `{ root: { children } }` tree). It walks generic
|
|
247
|
+
* JSON, so any subtree works too — but never pass an object that also nests
|
|
248
|
+
* unrelated mark-bearing states (e.g. a Lexical value's sibling `annoData`, whose
|
|
249
|
+
* per-anno `fragment` mini-states would inject out-of-order marks).
|
|
250
|
+
*
|
|
251
|
+
* Callers that only need the unordered SET of ids can wrap the result in `new Set(...)`.
|
|
252
|
+
*/
|
|
253
|
+
declare const collectMarkIdsInOrder: (editorState: any) => string[];
|
|
254
|
+
|
|
232
255
|
/**
|
|
233
256
|
* Calculates all possible rollup relationships for a tag type
|
|
234
257
|
*
|
|
@@ -604,7 +627,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
604
627
|
}
|
|
605
628
|
export { workerConfig_7 as workerConfig };
|
|
606
629
|
}
|
|
607
|
-
namespace
|
|
630
|
+
namespace AI_AUTO_ANNOTATE_CHUNK_QUEUE {
|
|
608
631
|
let id_8: string;
|
|
609
632
|
export { id_8 as id };
|
|
610
633
|
export namespace queueConfig_8 {
|
|
@@ -644,7 +667,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
644
667
|
}
|
|
645
668
|
export { workerConfig_8 as workerConfig };
|
|
646
669
|
}
|
|
647
|
-
namespace
|
|
670
|
+
namespace ANNOS_ELASTIC_SYNC_QUEUE {
|
|
648
671
|
let id_9: string;
|
|
649
672
|
export { id_9 as id };
|
|
650
673
|
export namespace queueConfig_9 {
|
|
@@ -684,7 +707,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
684
707
|
}
|
|
685
708
|
export { workerConfig_9 as workerConfig };
|
|
686
709
|
}
|
|
687
|
-
namespace
|
|
710
|
+
namespace CHUNKS_ELASTIC_SYNC_QUEUE {
|
|
688
711
|
let id_10: string;
|
|
689
712
|
export { id_10 as id };
|
|
690
713
|
export namespace queueConfig_10 {
|
|
@@ -724,7 +747,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
724
747
|
}
|
|
725
748
|
export { workerConfig_10 as workerConfig };
|
|
726
749
|
}
|
|
727
|
-
namespace
|
|
750
|
+
namespace USERS_ELASTIC_SYNC_QUEUE {
|
|
728
751
|
let id_11: string;
|
|
729
752
|
export { id_11 as id };
|
|
730
753
|
export namespace queueConfig_11 {
|
|
@@ -764,7 +787,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
764
787
|
}
|
|
765
788
|
export { workerConfig_11 as workerConfig };
|
|
766
789
|
}
|
|
767
|
-
namespace
|
|
790
|
+
namespace CONTENT_ELASTIC_SYNC_QUEUE {
|
|
768
791
|
let id_12: string;
|
|
769
792
|
export { id_12 as id };
|
|
770
793
|
export namespace queueConfig_12 {
|
|
@@ -804,7 +827,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
804
827
|
}
|
|
805
828
|
export { workerConfig_12 as workerConfig };
|
|
806
829
|
}
|
|
807
|
-
namespace
|
|
830
|
+
namespace SARVAM_TRANSCRIPTION_QUEUE {
|
|
808
831
|
let id_13: string;
|
|
809
832
|
export { id_13 as id };
|
|
810
833
|
export namespace queueConfig_13 {
|
|
@@ -844,7 +867,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
844
867
|
}
|
|
845
868
|
export { workerConfig_13 as workerConfig };
|
|
846
869
|
}
|
|
847
|
-
namespace
|
|
870
|
+
namespace INTERCOM_CONVERSATIONS_QUEUE {
|
|
848
871
|
let id_14: string;
|
|
849
872
|
export { id_14 as id };
|
|
850
873
|
export namespace queueConfig_14 {
|
|
@@ -884,7 +907,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
884
907
|
}
|
|
885
908
|
export { workerConfig_14 as workerConfig };
|
|
886
909
|
}
|
|
887
|
-
namespace
|
|
910
|
+
namespace TAG_SYNC_PLAN_QUEUE {
|
|
888
911
|
let id_15: string;
|
|
889
912
|
export { id_15 as id };
|
|
890
913
|
export namespace queueConfig_15 {
|
|
@@ -924,11 +947,13 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
924
947
|
}
|
|
925
948
|
export { workerConfig_15 as workerConfig };
|
|
926
949
|
}
|
|
927
|
-
namespace
|
|
950
|
+
namespace TAG_SYNC_BATCH_QUEUE {
|
|
928
951
|
let id_16: string;
|
|
929
952
|
export { id_16 as id };
|
|
930
953
|
export namespace queueConfig_16 {
|
|
931
954
|
export namespace defaultJobOptions_16 {
|
|
955
|
+
let attempts_16: number;
|
|
956
|
+
export { attempts_16 as attempts };
|
|
932
957
|
export namespace backoff_16 {
|
|
933
958
|
let type_16: string;
|
|
934
959
|
export { type_16 as type };
|
|
@@ -936,8 +961,6 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
936
961
|
export { delay_16 as delay };
|
|
937
962
|
}
|
|
938
963
|
export { backoff_16 as backoff };
|
|
939
|
-
let attempts_16: number;
|
|
940
|
-
export { attempts_16 as attempts };
|
|
941
964
|
let removeOnComplete_16: number;
|
|
942
965
|
export { removeOnComplete_16 as removeOnComplete };
|
|
943
966
|
let removeOnFail_16: number;
|
|
@@ -964,13 +987,11 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
964
987
|
}
|
|
965
988
|
export { workerConfig_16 as workerConfig };
|
|
966
989
|
}
|
|
967
|
-
namespace
|
|
990
|
+
namespace SCHEDULED_EXTERNAL_SYNC_QUEUE {
|
|
968
991
|
let id_17: string;
|
|
969
992
|
export { id_17 as id };
|
|
970
993
|
export namespace queueConfig_17 {
|
|
971
994
|
export namespace defaultJobOptions_17 {
|
|
972
|
-
let attempts_17: number;
|
|
973
|
-
export { attempts_17 as attempts };
|
|
974
995
|
export namespace backoff_17 {
|
|
975
996
|
let type_17: string;
|
|
976
997
|
export { type_17 as type };
|
|
@@ -978,8 +999,8 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
978
999
|
export { delay_17 as delay };
|
|
979
1000
|
}
|
|
980
1001
|
export { backoff_17 as backoff };
|
|
981
|
-
let
|
|
982
|
-
export {
|
|
1002
|
+
let attempts_17: number;
|
|
1003
|
+
export { attempts_17 as attempts };
|
|
983
1004
|
let removeOnComplete_17: number;
|
|
984
1005
|
export { removeOnComplete_17 as removeOnComplete };
|
|
985
1006
|
let removeOnFail_17: number;
|
|
@@ -1006,6 +1027,48 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
1006
1027
|
}
|
|
1007
1028
|
export { workerConfig_17 as workerConfig };
|
|
1008
1029
|
}
|
|
1030
|
+
namespace REINDEX_QUEUE {
|
|
1031
|
+
let id_18: string;
|
|
1032
|
+
export { id_18 as id };
|
|
1033
|
+
export namespace queueConfig_18 {
|
|
1034
|
+
export namespace defaultJobOptions_18 {
|
|
1035
|
+
let attempts_18: number;
|
|
1036
|
+
export { attempts_18 as attempts };
|
|
1037
|
+
export namespace backoff_18 {
|
|
1038
|
+
let type_18: string;
|
|
1039
|
+
export { type_18 as type };
|
|
1040
|
+
let delay_18: number;
|
|
1041
|
+
export { delay_18 as delay };
|
|
1042
|
+
}
|
|
1043
|
+
export { backoff_18 as backoff };
|
|
1044
|
+
let delay_19: number;
|
|
1045
|
+
export { delay_19 as delay };
|
|
1046
|
+
let removeOnComplete_18: number;
|
|
1047
|
+
export { removeOnComplete_18 as removeOnComplete };
|
|
1048
|
+
let removeOnFail_18: number;
|
|
1049
|
+
export { removeOnFail_18 as removeOnFail };
|
|
1050
|
+
}
|
|
1051
|
+
export { defaultJobOptions_18 as defaultJobOptions };
|
|
1052
|
+
export namespace streams_18 {
|
|
1053
|
+
export namespace events_18 {
|
|
1054
|
+
let maxLen_18: number;
|
|
1055
|
+
export { maxLen_18 as maxLen };
|
|
1056
|
+
}
|
|
1057
|
+
export { events_18 as events };
|
|
1058
|
+
}
|
|
1059
|
+
export { streams_18 as streams };
|
|
1060
|
+
}
|
|
1061
|
+
export { queueConfig_18 as queueConfig };
|
|
1062
|
+
export namespace workerConfig_18 {
|
|
1063
|
+
let concurrency_18: number;
|
|
1064
|
+
export { concurrency_18 as concurrency };
|
|
1065
|
+
let lockDuration_18: number;
|
|
1066
|
+
export { lockDuration_18 as lockDuration };
|
|
1067
|
+
let maxStalledCount_18: number;
|
|
1068
|
+
export { maxStalledCount_18 as maxStalledCount };
|
|
1069
|
+
}
|
|
1070
|
+
export { workerConfig_18 as workerConfig };
|
|
1071
|
+
}
|
|
1009
1072
|
}
|
|
1010
1073
|
|
|
1011
1074
|
interface PlatformContextContentItem {
|
|
@@ -2679,4 +2742,4 @@ declare function GET_GLOBAL_BULLMQ_CONFIG({ env, redisCredentials }: {
|
|
|
2679
2742
|
};
|
|
2680
2743
|
}): Object;
|
|
2681
2744
|
|
|
2682
|
-
export { AIChatSchema, AnnosElasticSyncProducer, AnnotationSchema, BASE_BULLMQ_CONFIG, BaseProducer, BaseWorker, type BlockCapabilities, type BlockDef, BlockRegistry, CHUNKING_PRESETS, ChunksElasticSyncProducer, ELASTIC_MAPPING_PRESETS, ElasticSearchConnector, FILTER_IDS, GET_GLOBAL_BULLMQ_CONFIG, GeneratedEntitiesSchema, GeneratedTopicsSchema, MONGO_SCHEMA_PRESETS, MongoConnector, PlatformConfigsSchema, ProducerManager, RedisCacheConnector, SecretManagerConnector, TEMP_removeDuplicateFilters, TplSchema, UI_CONTENT, WorkerManager, _self_managed_buildAnnoHierarchyConfig, _self_managed_buildDocHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, blockRegistry, buildFilterConfigurations, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAndOrganizeBlocks, genCleanCamelCaseId, genTagId, generateFilterKey, getAIChatModelByTenant, getAnnoFilterBucketKey, getAnnotationsModelByTenant, getDbByTenant, getFilterKeyForBlock, getGeneratedEntitiesModelByTenant, getGeneratedTopicsModelByTenant, getModelByTenant, getPlatformConfigsModelByTenant, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getTplModelByTenant, getVal, isTplAnnotationEnabled, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
|
2745
|
+
export { AIChatSchema, AnnosElasticSyncProducer, AnnotationSchema, BASE_BULLMQ_CONFIG, BaseProducer, BaseWorker, type BlockCapabilities, type BlockDef, BlockRegistry, CHUNKING_PRESETS, ChunksElasticSyncProducer, ELASTIC_MAPPING_PRESETS, ElasticSearchConnector, FILTER_IDS, GET_GLOBAL_BULLMQ_CONFIG, GeneratedEntitiesSchema, GeneratedTopicsSchema, MONGO_SCHEMA_PRESETS, MongoConnector, PlatformConfigsSchema, ProducerManager, RedisCacheConnector, SecretManagerConnector, TEMP_removeDuplicateFilters, TplSchema, UI_CONTENT, WorkerManager, _self_managed_buildAnnoHierarchyConfig, _self_managed_buildDocHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, blockRegistry, buildFilterConfigurations, collectMarkIdsInOrder, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAndOrganizeBlocks, genCleanCamelCaseId, genTagId, generateFilterKey, getAIChatModelByTenant, getAnnoFilterBucketKey, getAnnotationsModelByTenant, getDbByTenant, getFilterKeyForBlock, getGeneratedEntitiesModelByTenant, getGeneratedTopicsModelByTenant, getModelByTenant, getPlatformConfigsModelByTenant, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getTplModelByTenant, getVal, isTplAnnotationEnabled, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|