@okf/ootils 1.44.1 → 1.45.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 +71 -13
- package/dist/browser.d.ts +71 -13
- package/dist/browser.js +73 -17
- package/dist/browser.mjs +71 -17
- package/dist/node.d.mts +74 -13
- package/dist/node.d.ts +74 -13
- package/dist/node.js +82 -17
- package/dist/node.mjs +77 -17
- package/dist/universal.d.mts +71 -13
- package/dist/universal.d.ts +71 -13
- package/dist/universal.js +73 -17
- package/dist/universal.mjs +71 -17
- package/package.json +1 -1
package/dist/node.d.mts
CHANGED
|
@@ -775,7 +775,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
775
775
|
}
|
|
776
776
|
export { workerConfig_11 as workerConfig };
|
|
777
777
|
}
|
|
778
|
-
namespace
|
|
778
|
+
namespace CONTENT_DOC_COLAB_SESH_SIDE_EFFECTS_QUEUE {
|
|
779
779
|
let id_12: string;
|
|
780
780
|
export { id_12 as id };
|
|
781
781
|
export namespace queueConfig_12 {
|
|
@@ -815,7 +815,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
815
815
|
}
|
|
816
816
|
export { workerConfig_12 as workerConfig };
|
|
817
817
|
}
|
|
818
|
-
namespace
|
|
818
|
+
namespace SARVAM_TRANSCRIPTION_QUEUE {
|
|
819
819
|
let id_13: string;
|
|
820
820
|
export { id_13 as id };
|
|
821
821
|
export namespace queueConfig_13 {
|
|
@@ -855,7 +855,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
855
855
|
}
|
|
856
856
|
export { workerConfig_13 as workerConfig };
|
|
857
857
|
}
|
|
858
|
-
namespace
|
|
858
|
+
namespace INTERCOM_CONVERSATIONS_QUEUE {
|
|
859
859
|
let id_14: string;
|
|
860
860
|
export { id_14 as id };
|
|
861
861
|
export namespace queueConfig_14 {
|
|
@@ -895,7 +895,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
895
895
|
}
|
|
896
896
|
export { workerConfig_14 as workerConfig };
|
|
897
897
|
}
|
|
898
|
-
namespace
|
|
898
|
+
namespace TAG_SYNC_PLAN_QUEUE {
|
|
899
899
|
let id_15: string;
|
|
900
900
|
export { id_15 as id };
|
|
901
901
|
export namespace queueConfig_15 {
|
|
@@ -935,11 +935,13 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
935
935
|
}
|
|
936
936
|
export { workerConfig_15 as workerConfig };
|
|
937
937
|
}
|
|
938
|
-
namespace
|
|
938
|
+
namespace TAG_SYNC_BATCH_QUEUE {
|
|
939
939
|
let id_16: string;
|
|
940
940
|
export { id_16 as id };
|
|
941
941
|
export namespace queueConfig_16 {
|
|
942
942
|
export namespace defaultJobOptions_16 {
|
|
943
|
+
let attempts_16: number;
|
|
944
|
+
export { attempts_16 as attempts };
|
|
943
945
|
export namespace backoff_16 {
|
|
944
946
|
let type_16: string;
|
|
945
947
|
export { type_16 as type };
|
|
@@ -947,8 +949,6 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
947
949
|
export { delay_16 as delay };
|
|
948
950
|
}
|
|
949
951
|
export { backoff_16 as backoff };
|
|
950
|
-
let attempts_16: number;
|
|
951
|
-
export { attempts_16 as attempts };
|
|
952
952
|
let removeOnComplete_16: number;
|
|
953
953
|
export { removeOnComplete_16 as removeOnComplete };
|
|
954
954
|
let removeOnFail_16: number;
|
|
@@ -975,13 +975,11 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
975
975
|
}
|
|
976
976
|
export { workerConfig_16 as workerConfig };
|
|
977
977
|
}
|
|
978
|
-
namespace
|
|
978
|
+
namespace SCHEDULED_EXTERNAL_SYNC_QUEUE {
|
|
979
979
|
let id_17: string;
|
|
980
980
|
export { id_17 as id };
|
|
981
981
|
export namespace queueConfig_17 {
|
|
982
982
|
export namespace defaultJobOptions_17 {
|
|
983
|
-
let attempts_17: number;
|
|
984
|
-
export { attempts_17 as attempts };
|
|
985
983
|
export namespace backoff_17 {
|
|
986
984
|
let type_17: string;
|
|
987
985
|
export { type_17 as type };
|
|
@@ -989,8 +987,8 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
989
987
|
export { delay_17 as delay };
|
|
990
988
|
}
|
|
991
989
|
export { backoff_17 as backoff };
|
|
992
|
-
let
|
|
993
|
-
export {
|
|
990
|
+
let attempts_17: number;
|
|
991
|
+
export { attempts_17 as attempts };
|
|
994
992
|
let removeOnComplete_17: number;
|
|
995
993
|
export { removeOnComplete_17 as removeOnComplete };
|
|
996
994
|
let removeOnFail_17: number;
|
|
@@ -1017,6 +1015,48 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
1017
1015
|
}
|
|
1018
1016
|
export { workerConfig_17 as workerConfig };
|
|
1019
1017
|
}
|
|
1018
|
+
namespace REINDEX_QUEUE {
|
|
1019
|
+
let id_18: string;
|
|
1020
|
+
export { id_18 as id };
|
|
1021
|
+
export namespace queueConfig_18 {
|
|
1022
|
+
export namespace defaultJobOptions_18 {
|
|
1023
|
+
let attempts_18: number;
|
|
1024
|
+
export { attempts_18 as attempts };
|
|
1025
|
+
export namespace backoff_18 {
|
|
1026
|
+
let type_18: string;
|
|
1027
|
+
export { type_18 as type };
|
|
1028
|
+
let delay_18: number;
|
|
1029
|
+
export { delay_18 as delay };
|
|
1030
|
+
}
|
|
1031
|
+
export { backoff_18 as backoff };
|
|
1032
|
+
let delay_19: number;
|
|
1033
|
+
export { delay_19 as delay };
|
|
1034
|
+
let removeOnComplete_18: number;
|
|
1035
|
+
export { removeOnComplete_18 as removeOnComplete };
|
|
1036
|
+
let removeOnFail_18: number;
|
|
1037
|
+
export { removeOnFail_18 as removeOnFail };
|
|
1038
|
+
}
|
|
1039
|
+
export { defaultJobOptions_18 as defaultJobOptions };
|
|
1040
|
+
export namespace streams_18 {
|
|
1041
|
+
export namespace events_18 {
|
|
1042
|
+
let maxLen_18: number;
|
|
1043
|
+
export { maxLen_18 as maxLen };
|
|
1044
|
+
}
|
|
1045
|
+
export { events_18 as events };
|
|
1046
|
+
}
|
|
1047
|
+
export { streams_18 as streams };
|
|
1048
|
+
}
|
|
1049
|
+
export { queueConfig_18 as queueConfig };
|
|
1050
|
+
export namespace workerConfig_18 {
|
|
1051
|
+
let concurrency_18: number;
|
|
1052
|
+
export { concurrency_18 as concurrency };
|
|
1053
|
+
let lockDuration_18: number;
|
|
1054
|
+
export { lockDuration_18 as lockDuration };
|
|
1055
|
+
let maxStalledCount_18: number;
|
|
1056
|
+
export { maxStalledCount_18 as maxStalledCount };
|
|
1057
|
+
}
|
|
1058
|
+
export { workerConfig_18 as workerConfig };
|
|
1059
|
+
}
|
|
1020
1060
|
}
|
|
1021
1061
|
|
|
1022
1062
|
interface PlatformContextContentItem {
|
|
@@ -1062,6 +1102,24 @@ interface MergeParams {
|
|
|
1062
1102
|
*/
|
|
1063
1103
|
declare const mergeAnnoDataIntoAnnotationsTags: ({ prevObj, newLexValue, thisBlockValuePath, author, }: MergeParams) => any;
|
|
1064
1104
|
|
|
1105
|
+
/**
|
|
1106
|
+
* Is this tpl block a collab-editable field? ONE definition, used by BOTH
|
|
1107
|
+
* sides so they can never disagree:
|
|
1108
|
+
* - okf-sub loadContentDocument builds the server-side editable allowlist
|
|
1109
|
+
* from it (the flush drops writes outside that list)
|
|
1110
|
+
* - okf-fe ViewBlockGenerator derives per-block editability from it
|
|
1111
|
+
*
|
|
1112
|
+
* Editable = binds to a real content path. Exclusions:
|
|
1113
|
+
* - no valuePath (display-only blocks) / the odd "." valuePath some legacy
|
|
1114
|
+
* tpls carry (see getTypesForSchemaFromTpl, which skips it too)
|
|
1115
|
+
* - kp_-prefixed segments (publish status, lifecycle dates, author refs —
|
|
1116
|
+
* machinery, not content). NOTE: non-block system fields (lastActivity,
|
|
1117
|
+
* tagId...) are excluded by construction anyway — they're never tpl
|
|
1118
|
+
* blocks; this regex only guards block-defined kp_ paths.
|
|
1119
|
+
*/
|
|
1120
|
+
declare const COLLAB_SYSTEM_PATH_REGEX: RegExp;
|
|
1121
|
+
declare function isCollabEditableBlock(block: any): boolean;
|
|
1122
|
+
|
|
1065
1123
|
declare const parseSpecialConfigSyntax: ({ config, content, returnUndefinedIfReplacementWordNotFound }: {
|
|
1066
1124
|
config: string | object;
|
|
1067
1125
|
content: Record<string, any>;
|
|
@@ -9096,6 +9154,9 @@ declare class TenantRegistry {
|
|
|
9096
9154
|
}
|
|
9097
9155
|
|
|
9098
9156
|
declare const LIVE_COLLAB_DOC_REFRESH_MS: 120000;
|
|
9157
|
+
declare const LIVE_COLLAB_DEFER_MS: 120000;
|
|
9158
|
+
declare const LIVE_COLLAB_MAX_DEFERRALS: 30;
|
|
9159
|
+
declare const DOC_IN_LIVE_COLLAB_SESSION_ERROR: "aiApply_docInLiveCollabSession";
|
|
9099
9160
|
declare function markLiveCollabDoc({ tenant, contentType, docId, env }: {
|
|
9100
9161
|
tenant: any;
|
|
9101
9162
|
contentType: any;
|
|
@@ -9385,4 +9446,4 @@ declare function GET_GLOBAL_BULLMQ_CONFIG({ env, redisCredentials }: {
|
|
|
9385
9446
|
};
|
|
9386
9447
|
}): Object;
|
|
9387
9448
|
|
|
9388
|
-
export { AIChatSchema, AnnosElasticSyncProducer, AnnotationSchema, BASE_BULLMQ_CONFIG, BaseFlowProducer, BaseProducer, BaseWorker, type BlockCapabilities, type BlockDef, BlockRegistry, CHUNKING_PRESETS, ChunksElasticSyncProducer, ContentElasticSyncProducer, ELASTIC_MAPPING_PRESETS, ElasticSearchConnector, FILTER_IDS, GET_GLOBAL_BULLMQ_CONFIG, GeneratedEntitiesSchema, GeneratedTopicsSchema, LIVE_COLLAB_DOC_REFRESH_MS, MONGO_SCHEMA_PRESETS, MongoConnector, PlatformConfigsSchema, ProducerManager, RedisCacheConnector, SecretManagerConnector, TEMP_removeDuplicateFilters, TenantRegistry, TplSchema, UI_CONTENT, WorkerManager, _backOfficeFields__contr, _constantMeta__contr, _fixedMainFields__contr, _self_managed_buildAnnoHierarchyConfig, _self_managed_buildDocHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, blockRegistry, buildFilterConfigurations, clearLiveCollabDoc, collectMarkIdsInOrder, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAllUniqueAnnoTagTypesFromTpl, extractAndOrganizeBlocks, extractNumberFromValue, genCleanCamelCaseId, genContentTypeSchema, genTagId, generateFilterKey, getAIChatModelByTenant, getAnnoFilterBucketKey, getAnnotationsModelByTenant, getContrModelByTenant, getDbByTenant, getFilterKeyForBlock, getGeneratedEntitiesModelByTenant, getGeneratedTopicsModelByTenant, getModelByTenant, getPlatformConfigsModelByTenant, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getTpl, getTplModelByTenant, getTypesForSchemaFromTpl, getVal, isLiveCollabDoc, isTplAnnotationEnabled, markLiveCollabDoc, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
|
9449
|
+
export { AIChatSchema, AnnosElasticSyncProducer, AnnotationSchema, BASE_BULLMQ_CONFIG, BaseFlowProducer, BaseProducer, BaseWorker, type BlockCapabilities, type BlockDef, BlockRegistry, CHUNKING_PRESETS, COLLAB_SYSTEM_PATH_REGEX, ChunksElasticSyncProducer, ContentElasticSyncProducer, DOC_IN_LIVE_COLLAB_SESSION_ERROR, ELASTIC_MAPPING_PRESETS, ElasticSearchConnector, FILTER_IDS, GET_GLOBAL_BULLMQ_CONFIG, GeneratedEntitiesSchema, GeneratedTopicsSchema, LIVE_COLLAB_DEFER_MS, LIVE_COLLAB_DOC_REFRESH_MS, LIVE_COLLAB_MAX_DEFERRALS, MONGO_SCHEMA_PRESETS, MongoConnector, PlatformConfigsSchema, ProducerManager, RedisCacheConnector, SecretManagerConnector, TEMP_removeDuplicateFilters, TenantRegistry, TplSchema, UI_CONTENT, WorkerManager, _backOfficeFields__contr, _constantMeta__contr, _fixedMainFields__contr, _self_managed_buildAnnoHierarchyConfig, _self_managed_buildDocHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, blockRegistry, buildFilterConfigurations, clearLiveCollabDoc, collectMarkIdsInOrder, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAllUniqueAnnoTagTypesFromTpl, extractAndOrganizeBlocks, extractNumberFromValue, genCleanCamelCaseId, genContentTypeSchema, genTagId, generateFilterKey, getAIChatModelByTenant, getAnnoFilterBucketKey, getAnnotationsModelByTenant, getContrModelByTenant, getDbByTenant, getFilterKeyForBlock, getGeneratedEntitiesModelByTenant, getGeneratedTopicsModelByTenant, getModelByTenant, getPlatformConfigsModelByTenant, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getTpl, getTplModelByTenant, getTypesForSchemaFromTpl, getVal, isCollabEditableBlock, isLiveCollabDoc, isTplAnnotationEnabled, markLiveCollabDoc, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
package/dist/node.d.ts
CHANGED
|
@@ -775,7 +775,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
775
775
|
}
|
|
776
776
|
export { workerConfig_11 as workerConfig };
|
|
777
777
|
}
|
|
778
|
-
namespace
|
|
778
|
+
namespace CONTENT_DOC_COLAB_SESH_SIDE_EFFECTS_QUEUE {
|
|
779
779
|
let id_12: string;
|
|
780
780
|
export { id_12 as id };
|
|
781
781
|
export namespace queueConfig_12 {
|
|
@@ -815,7 +815,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
815
815
|
}
|
|
816
816
|
export { workerConfig_12 as workerConfig };
|
|
817
817
|
}
|
|
818
|
-
namespace
|
|
818
|
+
namespace SARVAM_TRANSCRIPTION_QUEUE {
|
|
819
819
|
let id_13: string;
|
|
820
820
|
export { id_13 as id };
|
|
821
821
|
export namespace queueConfig_13 {
|
|
@@ -855,7 +855,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
855
855
|
}
|
|
856
856
|
export { workerConfig_13 as workerConfig };
|
|
857
857
|
}
|
|
858
|
-
namespace
|
|
858
|
+
namespace INTERCOM_CONVERSATIONS_QUEUE {
|
|
859
859
|
let id_14: string;
|
|
860
860
|
export { id_14 as id };
|
|
861
861
|
export namespace queueConfig_14 {
|
|
@@ -895,7 +895,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
895
895
|
}
|
|
896
896
|
export { workerConfig_14 as workerConfig };
|
|
897
897
|
}
|
|
898
|
-
namespace
|
|
898
|
+
namespace TAG_SYNC_PLAN_QUEUE {
|
|
899
899
|
let id_15: string;
|
|
900
900
|
export { id_15 as id };
|
|
901
901
|
export namespace queueConfig_15 {
|
|
@@ -935,11 +935,13 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
935
935
|
}
|
|
936
936
|
export { workerConfig_15 as workerConfig };
|
|
937
937
|
}
|
|
938
|
-
namespace
|
|
938
|
+
namespace TAG_SYNC_BATCH_QUEUE {
|
|
939
939
|
let id_16: string;
|
|
940
940
|
export { id_16 as id };
|
|
941
941
|
export namespace queueConfig_16 {
|
|
942
942
|
export namespace defaultJobOptions_16 {
|
|
943
|
+
let attempts_16: number;
|
|
944
|
+
export { attempts_16 as attempts };
|
|
943
945
|
export namespace backoff_16 {
|
|
944
946
|
let type_16: string;
|
|
945
947
|
export { type_16 as type };
|
|
@@ -947,8 +949,6 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
947
949
|
export { delay_16 as delay };
|
|
948
950
|
}
|
|
949
951
|
export { backoff_16 as backoff };
|
|
950
|
-
let attempts_16: number;
|
|
951
|
-
export { attempts_16 as attempts };
|
|
952
952
|
let removeOnComplete_16: number;
|
|
953
953
|
export { removeOnComplete_16 as removeOnComplete };
|
|
954
954
|
let removeOnFail_16: number;
|
|
@@ -975,13 +975,11 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
975
975
|
}
|
|
976
976
|
export { workerConfig_16 as workerConfig };
|
|
977
977
|
}
|
|
978
|
-
namespace
|
|
978
|
+
namespace SCHEDULED_EXTERNAL_SYNC_QUEUE {
|
|
979
979
|
let id_17: string;
|
|
980
980
|
export { id_17 as id };
|
|
981
981
|
export namespace queueConfig_17 {
|
|
982
982
|
export namespace defaultJobOptions_17 {
|
|
983
|
-
let attempts_17: number;
|
|
984
|
-
export { attempts_17 as attempts };
|
|
985
983
|
export namespace backoff_17 {
|
|
986
984
|
let type_17: string;
|
|
987
985
|
export { type_17 as type };
|
|
@@ -989,8 +987,8 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
989
987
|
export { delay_17 as delay };
|
|
990
988
|
}
|
|
991
989
|
export { backoff_17 as backoff };
|
|
992
|
-
let
|
|
993
|
-
export {
|
|
990
|
+
let attempts_17: number;
|
|
991
|
+
export { attempts_17 as attempts };
|
|
994
992
|
let removeOnComplete_17: number;
|
|
995
993
|
export { removeOnComplete_17 as removeOnComplete };
|
|
996
994
|
let removeOnFail_17: number;
|
|
@@ -1017,6 +1015,48 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
1017
1015
|
}
|
|
1018
1016
|
export { workerConfig_17 as workerConfig };
|
|
1019
1017
|
}
|
|
1018
|
+
namespace REINDEX_QUEUE {
|
|
1019
|
+
let id_18: string;
|
|
1020
|
+
export { id_18 as id };
|
|
1021
|
+
export namespace queueConfig_18 {
|
|
1022
|
+
export namespace defaultJobOptions_18 {
|
|
1023
|
+
let attempts_18: number;
|
|
1024
|
+
export { attempts_18 as attempts };
|
|
1025
|
+
export namespace backoff_18 {
|
|
1026
|
+
let type_18: string;
|
|
1027
|
+
export { type_18 as type };
|
|
1028
|
+
let delay_18: number;
|
|
1029
|
+
export { delay_18 as delay };
|
|
1030
|
+
}
|
|
1031
|
+
export { backoff_18 as backoff };
|
|
1032
|
+
let delay_19: number;
|
|
1033
|
+
export { delay_19 as delay };
|
|
1034
|
+
let removeOnComplete_18: number;
|
|
1035
|
+
export { removeOnComplete_18 as removeOnComplete };
|
|
1036
|
+
let removeOnFail_18: number;
|
|
1037
|
+
export { removeOnFail_18 as removeOnFail };
|
|
1038
|
+
}
|
|
1039
|
+
export { defaultJobOptions_18 as defaultJobOptions };
|
|
1040
|
+
export namespace streams_18 {
|
|
1041
|
+
export namespace events_18 {
|
|
1042
|
+
let maxLen_18: number;
|
|
1043
|
+
export { maxLen_18 as maxLen };
|
|
1044
|
+
}
|
|
1045
|
+
export { events_18 as events };
|
|
1046
|
+
}
|
|
1047
|
+
export { streams_18 as streams };
|
|
1048
|
+
}
|
|
1049
|
+
export { queueConfig_18 as queueConfig };
|
|
1050
|
+
export namespace workerConfig_18 {
|
|
1051
|
+
let concurrency_18: number;
|
|
1052
|
+
export { concurrency_18 as concurrency };
|
|
1053
|
+
let lockDuration_18: number;
|
|
1054
|
+
export { lockDuration_18 as lockDuration };
|
|
1055
|
+
let maxStalledCount_18: number;
|
|
1056
|
+
export { maxStalledCount_18 as maxStalledCount };
|
|
1057
|
+
}
|
|
1058
|
+
export { workerConfig_18 as workerConfig };
|
|
1059
|
+
}
|
|
1020
1060
|
}
|
|
1021
1061
|
|
|
1022
1062
|
interface PlatformContextContentItem {
|
|
@@ -1062,6 +1102,24 @@ interface MergeParams {
|
|
|
1062
1102
|
*/
|
|
1063
1103
|
declare const mergeAnnoDataIntoAnnotationsTags: ({ prevObj, newLexValue, thisBlockValuePath, author, }: MergeParams) => any;
|
|
1064
1104
|
|
|
1105
|
+
/**
|
|
1106
|
+
* Is this tpl block a collab-editable field? ONE definition, used by BOTH
|
|
1107
|
+
* sides so they can never disagree:
|
|
1108
|
+
* - okf-sub loadContentDocument builds the server-side editable allowlist
|
|
1109
|
+
* from it (the flush drops writes outside that list)
|
|
1110
|
+
* - okf-fe ViewBlockGenerator derives per-block editability from it
|
|
1111
|
+
*
|
|
1112
|
+
* Editable = binds to a real content path. Exclusions:
|
|
1113
|
+
* - no valuePath (display-only blocks) / the odd "." valuePath some legacy
|
|
1114
|
+
* tpls carry (see getTypesForSchemaFromTpl, which skips it too)
|
|
1115
|
+
* - kp_-prefixed segments (publish status, lifecycle dates, author refs —
|
|
1116
|
+
* machinery, not content). NOTE: non-block system fields (lastActivity,
|
|
1117
|
+
* tagId...) are excluded by construction anyway — they're never tpl
|
|
1118
|
+
* blocks; this regex only guards block-defined kp_ paths.
|
|
1119
|
+
*/
|
|
1120
|
+
declare const COLLAB_SYSTEM_PATH_REGEX: RegExp;
|
|
1121
|
+
declare function isCollabEditableBlock(block: any): boolean;
|
|
1122
|
+
|
|
1065
1123
|
declare const parseSpecialConfigSyntax: ({ config, content, returnUndefinedIfReplacementWordNotFound }: {
|
|
1066
1124
|
config: string | object;
|
|
1067
1125
|
content: Record<string, any>;
|
|
@@ -9096,6 +9154,9 @@ declare class TenantRegistry {
|
|
|
9096
9154
|
}
|
|
9097
9155
|
|
|
9098
9156
|
declare const LIVE_COLLAB_DOC_REFRESH_MS: 120000;
|
|
9157
|
+
declare const LIVE_COLLAB_DEFER_MS: 120000;
|
|
9158
|
+
declare const LIVE_COLLAB_MAX_DEFERRALS: 30;
|
|
9159
|
+
declare const DOC_IN_LIVE_COLLAB_SESSION_ERROR: "aiApply_docInLiveCollabSession";
|
|
9099
9160
|
declare function markLiveCollabDoc({ tenant, contentType, docId, env }: {
|
|
9100
9161
|
tenant: any;
|
|
9101
9162
|
contentType: any;
|
|
@@ -9385,4 +9446,4 @@ declare function GET_GLOBAL_BULLMQ_CONFIG({ env, redisCredentials }: {
|
|
|
9385
9446
|
};
|
|
9386
9447
|
}): Object;
|
|
9387
9448
|
|
|
9388
|
-
export { AIChatSchema, AnnosElasticSyncProducer, AnnotationSchema, BASE_BULLMQ_CONFIG, BaseFlowProducer, BaseProducer, BaseWorker, type BlockCapabilities, type BlockDef, BlockRegistry, CHUNKING_PRESETS, ChunksElasticSyncProducer, ContentElasticSyncProducer, ELASTIC_MAPPING_PRESETS, ElasticSearchConnector, FILTER_IDS, GET_GLOBAL_BULLMQ_CONFIG, GeneratedEntitiesSchema, GeneratedTopicsSchema, LIVE_COLLAB_DOC_REFRESH_MS, MONGO_SCHEMA_PRESETS, MongoConnector, PlatformConfigsSchema, ProducerManager, RedisCacheConnector, SecretManagerConnector, TEMP_removeDuplicateFilters, TenantRegistry, TplSchema, UI_CONTENT, WorkerManager, _backOfficeFields__contr, _constantMeta__contr, _fixedMainFields__contr, _self_managed_buildAnnoHierarchyConfig, _self_managed_buildDocHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, blockRegistry, buildFilterConfigurations, clearLiveCollabDoc, collectMarkIdsInOrder, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAllUniqueAnnoTagTypesFromTpl, extractAndOrganizeBlocks, extractNumberFromValue, genCleanCamelCaseId, genContentTypeSchema, genTagId, generateFilterKey, getAIChatModelByTenant, getAnnoFilterBucketKey, getAnnotationsModelByTenant, getContrModelByTenant, getDbByTenant, getFilterKeyForBlock, getGeneratedEntitiesModelByTenant, getGeneratedTopicsModelByTenant, getModelByTenant, getPlatformConfigsModelByTenant, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getTpl, getTplModelByTenant, getTypesForSchemaFromTpl, getVal, isLiveCollabDoc, isTplAnnotationEnabled, markLiveCollabDoc, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
|
9449
|
+
export { AIChatSchema, AnnosElasticSyncProducer, AnnotationSchema, BASE_BULLMQ_CONFIG, BaseFlowProducer, BaseProducer, BaseWorker, type BlockCapabilities, type BlockDef, BlockRegistry, CHUNKING_PRESETS, COLLAB_SYSTEM_PATH_REGEX, ChunksElasticSyncProducer, ContentElasticSyncProducer, DOC_IN_LIVE_COLLAB_SESSION_ERROR, ELASTIC_MAPPING_PRESETS, ElasticSearchConnector, FILTER_IDS, GET_GLOBAL_BULLMQ_CONFIG, GeneratedEntitiesSchema, GeneratedTopicsSchema, LIVE_COLLAB_DEFER_MS, LIVE_COLLAB_DOC_REFRESH_MS, LIVE_COLLAB_MAX_DEFERRALS, MONGO_SCHEMA_PRESETS, MongoConnector, PlatformConfigsSchema, ProducerManager, RedisCacheConnector, SecretManagerConnector, TEMP_removeDuplicateFilters, TenantRegistry, TplSchema, UI_CONTENT, WorkerManager, _backOfficeFields__contr, _constantMeta__contr, _fixedMainFields__contr, _self_managed_buildAnnoHierarchyConfig, _self_managed_buildDocHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, blockRegistry, buildFilterConfigurations, clearLiveCollabDoc, collectMarkIdsInOrder, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAllUniqueAnnoTagTypesFromTpl, extractAndOrganizeBlocks, extractNumberFromValue, genCleanCamelCaseId, genContentTypeSchema, genTagId, generateFilterKey, getAIChatModelByTenant, getAnnoFilterBucketKey, getAnnotationsModelByTenant, getContrModelByTenant, getDbByTenant, getFilterKeyForBlock, getGeneratedEntitiesModelByTenant, getGeneratedTopicsModelByTenant, getModelByTenant, getPlatformConfigsModelByTenant, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getTpl, getTplModelByTenant, getTypesForSchemaFromTpl, getVal, isCollabEditableBlock, isLiveCollabDoc, isTplAnnotationEnabled, markLiveCollabDoc, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
package/dist/node.js
CHANGED
|
@@ -442,6 +442,43 @@ var init_GLOBAL_BULLMQ_CONFIG = __esm({
|
|
|
442
442
|
maxStalledCount: 3
|
|
443
443
|
}
|
|
444
444
|
},
|
|
445
|
+
/**
|
|
446
|
+
* Collab-editing session-boundary side effects for CONTENT docs.
|
|
447
|
+
* Enqueued by okf-sub's collab service when a field lock releases / the
|
|
448
|
+
* last editor leaves a live doc; the worker calls okf-be's internal
|
|
449
|
+
* contentDocCollabSessionSideEffects endpoint (tag-rename sync, chunks/annos
|
|
450
|
+
* producers, Elastic sync, cache invalidations, analytics).
|
|
451
|
+
* Queued (rather than fire-and-forget HTTP from the boundary) for retry
|
|
452
|
+
* ability + Bullboard trackability — a failed boundary would otherwise be
|
|
453
|
+
* silently lost when the doc unloads. Steps are idempotent except
|
|
454
|
+
* analytics, which runs LAST so retries only duplicate it on a
|
|
455
|
+
* lost-response network edge.
|
|
456
|
+
*/
|
|
457
|
+
CONTENT_DOC_COLAB_SESH_SIDE_EFFECTS_QUEUE: {
|
|
458
|
+
id: "content-doc-colab-sesh-side-effects-queue",
|
|
459
|
+
queueConfig: {
|
|
460
|
+
defaultJobOptions: {
|
|
461
|
+
attempts: 3,
|
|
462
|
+
backoff: {
|
|
463
|
+
type: "exponential",
|
|
464
|
+
delay: 5e3
|
|
465
|
+
},
|
|
466
|
+
removeOnComplete: 50,
|
|
467
|
+
removeOnFail: 200
|
|
468
|
+
},
|
|
469
|
+
streams: {
|
|
470
|
+
events: {
|
|
471
|
+
maxLen: 1e3
|
|
472
|
+
// SockerIOService QueueEvents tails this stream for progress tracking; trimming at 10 dropped completion events mid-burst (stuck FE tracker). Entries are small now that job returnvalues are trimmed, so 1000 is cheap.
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
workerConfig: {
|
|
477
|
+
concurrency: 10,
|
|
478
|
+
lockDuration: 9e4,
|
|
479
|
+
maxStalledCount: 3
|
|
480
|
+
}
|
|
481
|
+
},
|
|
445
482
|
SARVAM_TRANSCRIPTION_QUEUE: {
|
|
446
483
|
id: "sarvam-transcription-queue",
|
|
447
484
|
queueConfig: {
|
|
@@ -2386,15 +2423,19 @@ __export(node_exports, {
|
|
|
2386
2423
|
BaseWorker: () => import_BaseWorker.BaseWorker,
|
|
2387
2424
|
BlockRegistry: () => BlockRegistry,
|
|
2388
2425
|
CHUNKING_PRESETS: () => CHUNKING_PRESETS,
|
|
2426
|
+
COLLAB_SYSTEM_PATH_REGEX: () => COLLAB_SYSTEM_PATH_REGEX,
|
|
2389
2427
|
ChunksElasticSyncProducer: () => import_ChunksElasticSyncProducer.ChunksElasticSyncProducer,
|
|
2390
2428
|
ContentElasticSyncProducer: () => import_ContentElasticSyncProducer.ContentElasticSyncProducer,
|
|
2429
|
+
DOC_IN_LIVE_COLLAB_SESSION_ERROR: () => DOC_IN_LIVE_COLLAB_SESSION_ERROR,
|
|
2391
2430
|
ELASTIC_MAPPING_PRESETS: () => ELASTIC_MAPPING_PRESETS,
|
|
2392
2431
|
ElasticSearchConnector: () => import_ElasticSearchConnector.ElasticSearchConnector,
|
|
2393
2432
|
FILTER_IDS: () => FILTER_IDS,
|
|
2394
2433
|
GET_GLOBAL_BULLMQ_CONFIG: () => import_GET_GLOBAL_BULLMQ_CONFIG.GET_GLOBAL_BULLMQ_CONFIG,
|
|
2395
2434
|
GeneratedEntitiesSchema: () => GeneratedEntities_default,
|
|
2396
2435
|
GeneratedTopicsSchema: () => GeneratedTopics_default,
|
|
2436
|
+
LIVE_COLLAB_DEFER_MS: () => LIVE_COLLAB_DEFER_MS,
|
|
2397
2437
|
LIVE_COLLAB_DOC_REFRESH_MS: () => LIVE_COLLAB_DOC_REFRESH_MS,
|
|
2438
|
+
LIVE_COLLAB_MAX_DEFERRALS: () => LIVE_COLLAB_MAX_DEFERRALS,
|
|
2398
2439
|
MONGO_SCHEMA_PRESETS: () => MONGO_SCHEMA_PRESETS,
|
|
2399
2440
|
MongoConnector: () => import_MongoConnector3.MongoConnector,
|
|
2400
2441
|
PlatformConfigsSchema: () => PlatformConfigs_default,
|
|
@@ -2452,6 +2493,7 @@ __export(node_exports, {
|
|
|
2452
2493
|
getTplModelByTenant: () => import_getModelByTenant4.getTplModelByTenant,
|
|
2453
2494
|
getTypesForSchemaFromTpl: () => getTypesForSchemaFromTpl,
|
|
2454
2495
|
getVal: () => getVal,
|
|
2496
|
+
isCollabEditableBlock: () => isCollabEditableBlock,
|
|
2455
2497
|
isLiveCollabDoc: () => isLiveCollabDoc,
|
|
2456
2498
|
isTplAnnotationEnabled: () => isTplAnnotationEnabled,
|
|
2457
2499
|
markLiveCollabDoc: () => markLiveCollabDoc,
|
|
@@ -3331,6 +3373,10 @@ var mergeAnnoDataIntoAnnotationsTags = ({
|
|
|
3331
3373
|
return newConsolidated;
|
|
3332
3374
|
};
|
|
3333
3375
|
|
|
3376
|
+
// src/collab/isCollabEditableBlock.js
|
|
3377
|
+
var COLLAB_SYSTEM_PATH_REGEX = /(^|\.)kp_/;
|
|
3378
|
+
var isCollabEditableBlock = (block) => !!block?.valuePath && block.valuePath !== "." && !COLLAB_SYSTEM_PATH_REGEX.test(block.valuePath);
|
|
3379
|
+
|
|
3334
3380
|
// src/utils/parseSpecialConfigSyntax.ts
|
|
3335
3381
|
var parseSpecialConfigSyntax = ({
|
|
3336
3382
|
config,
|
|
@@ -4346,6 +4392,13 @@ var deduplicateRollupTagFilters = (rollups) => {
|
|
|
4346
4392
|
var injectFilterOptionsBy = (filters) => filters.map(
|
|
4347
4393
|
(f) => f.parentFilterId ? { ...f, source: { ...f.source, filterOptionsBy: { filterId: f.parentFilterId } } } : f
|
|
4348
4394
|
);
|
|
4395
|
+
var isRollupConfig = (f) => !!f.target?.rollupPath || f.target?.filterType === "rollupValuePathType";
|
|
4396
|
+
var dedupeSharedGroupConfigs = (configs) => {
|
|
4397
|
+
const rollups = configs.filter(isRollupConfig);
|
|
4398
|
+
const rollupSourceKeys = new Set(rollups.map((r) => JSON.stringify(r.source)));
|
|
4399
|
+
const directFilters = configs.filter((f) => !isRollupConfig(f)).filter((f) => !rollupSourceKeys.has(JSON.stringify(f.source)));
|
|
4400
|
+
return [...directFilters, ...deduplicateRollupTagFilters(rollups)];
|
|
4401
|
+
};
|
|
4349
4402
|
var _self_managed_buildDocHierarchyConfig = ({
|
|
4350
4403
|
combinedDocumentBlocks,
|
|
4351
4404
|
docRollupBlocks,
|
|
@@ -4358,17 +4411,19 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
4358
4411
|
const commonGroup = allGroups.find(
|
|
4359
4412
|
(g) => g.contentTypes.length === selectedTpls.length
|
|
4360
4413
|
);
|
|
4361
|
-
const commonFilterConfigs = commonGroup ? injectFilterOptionsBy(
|
|
4414
|
+
const commonFilterConfigs = commonGroup && selectedTpls.length >= 2 ? injectFilterOptionsBy(
|
|
4362
4415
|
sortFiltersHierarchically(
|
|
4363
4416
|
attachParentFields(
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4417
|
+
dedupeSharedGroupConfigs(
|
|
4418
|
+
buildFilterConfigurations({
|
|
4419
|
+
groups: [commonGroup],
|
|
4420
|
+
type: "tags",
|
|
4421
|
+
selectedTpls,
|
|
4422
|
+
allTpls,
|
|
4423
|
+
isRollup: false,
|
|
4424
|
+
isAnno: false
|
|
4425
|
+
}).flatMap((s) => s.configs)
|
|
4426
|
+
),
|
|
4372
4427
|
allTpls
|
|
4373
4428
|
)
|
|
4374
4429
|
)
|
|
@@ -4380,14 +4435,16 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
4380
4435
|
const groupFilterConfigs = injectFilterOptionsBy(
|
|
4381
4436
|
sortFiltersHierarchically(
|
|
4382
4437
|
attachParentFields(
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4438
|
+
dedupeSharedGroupConfigs(
|
|
4439
|
+
buildFilterConfigurations({
|
|
4440
|
+
groups: [group],
|
|
4441
|
+
type: "tags",
|
|
4442
|
+
selectedTpls,
|
|
4443
|
+
allTpls,
|
|
4444
|
+
isRollup: false,
|
|
4445
|
+
isAnno: false
|
|
4446
|
+
}).flatMap((s) => s.configs)
|
|
4447
|
+
),
|
|
4391
4448
|
allTpls
|
|
4392
4449
|
)
|
|
4393
4450
|
)
|
|
@@ -5865,6 +5922,9 @@ init_models();
|
|
|
5865
5922
|
// src/collab/liveCollabDocMarker.js
|
|
5866
5923
|
var TTL_SECONDS = 300;
|
|
5867
5924
|
var LIVE_COLLAB_DOC_REFRESH_MS = 12e4;
|
|
5925
|
+
var LIVE_COLLAB_DEFER_MS = 12e4;
|
|
5926
|
+
var LIVE_COLLAB_MAX_DEFERRALS = 30;
|
|
5927
|
+
var DOC_IN_LIVE_COLLAB_SESSION_ERROR = "aiApply_docInLiveCollabSession";
|
|
5868
5928
|
var buildKey = ({ env, tenant, contentType, docId }) => `${env || RedisCacheConnector.getEnv()}:liveCollabDoc:${tenant}:${contentType}:${docId}`;
|
|
5869
5929
|
var markLiveCollabDoc = async ({ tenant, contentType, docId, env }) => {
|
|
5870
5930
|
const client = RedisCacheConnector.getClient(env || RedisCacheConnector.getEnv());
|
|
@@ -5900,15 +5960,19 @@ var import_GET_GLOBAL_BULLMQ_CONFIG = __toESM(require_GET_GLOBAL_BULLMQ_CONFIG()
|
|
|
5900
5960
|
BaseWorker,
|
|
5901
5961
|
BlockRegistry,
|
|
5902
5962
|
CHUNKING_PRESETS,
|
|
5963
|
+
COLLAB_SYSTEM_PATH_REGEX,
|
|
5903
5964
|
ChunksElasticSyncProducer,
|
|
5904
5965
|
ContentElasticSyncProducer,
|
|
5966
|
+
DOC_IN_LIVE_COLLAB_SESSION_ERROR,
|
|
5905
5967
|
ELASTIC_MAPPING_PRESETS,
|
|
5906
5968
|
ElasticSearchConnector,
|
|
5907
5969
|
FILTER_IDS,
|
|
5908
5970
|
GET_GLOBAL_BULLMQ_CONFIG,
|
|
5909
5971
|
GeneratedEntitiesSchema,
|
|
5910
5972
|
GeneratedTopicsSchema,
|
|
5973
|
+
LIVE_COLLAB_DEFER_MS,
|
|
5911
5974
|
LIVE_COLLAB_DOC_REFRESH_MS,
|
|
5975
|
+
LIVE_COLLAB_MAX_DEFERRALS,
|
|
5912
5976
|
MONGO_SCHEMA_PRESETS,
|
|
5913
5977
|
MongoConnector,
|
|
5914
5978
|
PlatformConfigsSchema,
|
|
@@ -5966,6 +6030,7 @@ var import_GET_GLOBAL_BULLMQ_CONFIG = __toESM(require_GET_GLOBAL_BULLMQ_CONFIG()
|
|
|
5966
6030
|
getTplModelByTenant,
|
|
5967
6031
|
getTypesForSchemaFromTpl,
|
|
5968
6032
|
getVal,
|
|
6033
|
+
isCollabEditableBlock,
|
|
5969
6034
|
isLiveCollabDoc,
|
|
5970
6035
|
isTplAnnotationEnabled,
|
|
5971
6036
|
markLiveCollabDoc,
|