@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/browser.d.mts
CHANGED
|
@@ -767,7 +767,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
767
767
|
}
|
|
768
768
|
export { workerConfig_11 as workerConfig };
|
|
769
769
|
}
|
|
770
|
-
namespace
|
|
770
|
+
namespace CONTENT_DOC_COLAB_SESH_SIDE_EFFECTS_QUEUE {
|
|
771
771
|
let id_12: string;
|
|
772
772
|
export { id_12 as id };
|
|
773
773
|
export namespace queueConfig_12 {
|
|
@@ -807,7 +807,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
807
807
|
}
|
|
808
808
|
export { workerConfig_12 as workerConfig };
|
|
809
809
|
}
|
|
810
|
-
namespace
|
|
810
|
+
namespace SARVAM_TRANSCRIPTION_QUEUE {
|
|
811
811
|
let id_13: string;
|
|
812
812
|
export { id_13 as id };
|
|
813
813
|
export namespace queueConfig_13 {
|
|
@@ -847,7 +847,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
847
847
|
}
|
|
848
848
|
export { workerConfig_13 as workerConfig };
|
|
849
849
|
}
|
|
850
|
-
namespace
|
|
850
|
+
namespace INTERCOM_CONVERSATIONS_QUEUE {
|
|
851
851
|
let id_14: string;
|
|
852
852
|
export { id_14 as id };
|
|
853
853
|
export namespace queueConfig_14 {
|
|
@@ -887,7 +887,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
887
887
|
}
|
|
888
888
|
export { workerConfig_14 as workerConfig };
|
|
889
889
|
}
|
|
890
|
-
namespace
|
|
890
|
+
namespace TAG_SYNC_PLAN_QUEUE {
|
|
891
891
|
let id_15: string;
|
|
892
892
|
export { id_15 as id };
|
|
893
893
|
export namespace queueConfig_15 {
|
|
@@ -927,11 +927,13 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
927
927
|
}
|
|
928
928
|
export { workerConfig_15 as workerConfig };
|
|
929
929
|
}
|
|
930
|
-
namespace
|
|
930
|
+
namespace TAG_SYNC_BATCH_QUEUE {
|
|
931
931
|
let id_16: string;
|
|
932
932
|
export { id_16 as id };
|
|
933
933
|
export namespace queueConfig_16 {
|
|
934
934
|
export namespace defaultJobOptions_16 {
|
|
935
|
+
let attempts_16: number;
|
|
936
|
+
export { attempts_16 as attempts };
|
|
935
937
|
export namespace backoff_16 {
|
|
936
938
|
let type_16: string;
|
|
937
939
|
export { type_16 as type };
|
|
@@ -939,8 +941,6 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
939
941
|
export { delay_16 as delay };
|
|
940
942
|
}
|
|
941
943
|
export { backoff_16 as backoff };
|
|
942
|
-
let attempts_16: number;
|
|
943
|
-
export { attempts_16 as attempts };
|
|
944
944
|
let removeOnComplete_16: number;
|
|
945
945
|
export { removeOnComplete_16 as removeOnComplete };
|
|
946
946
|
let removeOnFail_16: number;
|
|
@@ -967,13 +967,11 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
967
967
|
}
|
|
968
968
|
export { workerConfig_16 as workerConfig };
|
|
969
969
|
}
|
|
970
|
-
namespace
|
|
970
|
+
namespace SCHEDULED_EXTERNAL_SYNC_QUEUE {
|
|
971
971
|
let id_17: string;
|
|
972
972
|
export { id_17 as id };
|
|
973
973
|
export namespace queueConfig_17 {
|
|
974
974
|
export namespace defaultJobOptions_17 {
|
|
975
|
-
let attempts_17: number;
|
|
976
|
-
export { attempts_17 as attempts };
|
|
977
975
|
export namespace backoff_17 {
|
|
978
976
|
let type_17: string;
|
|
979
977
|
export { type_17 as type };
|
|
@@ -981,8 +979,8 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
981
979
|
export { delay_17 as delay };
|
|
982
980
|
}
|
|
983
981
|
export { backoff_17 as backoff };
|
|
984
|
-
let
|
|
985
|
-
export {
|
|
982
|
+
let attempts_17: number;
|
|
983
|
+
export { attempts_17 as attempts };
|
|
986
984
|
let removeOnComplete_17: number;
|
|
987
985
|
export { removeOnComplete_17 as removeOnComplete };
|
|
988
986
|
let removeOnFail_17: number;
|
|
@@ -1009,6 +1007,48 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
1009
1007
|
}
|
|
1010
1008
|
export { workerConfig_17 as workerConfig };
|
|
1011
1009
|
}
|
|
1010
|
+
namespace REINDEX_QUEUE {
|
|
1011
|
+
let id_18: string;
|
|
1012
|
+
export { id_18 as id };
|
|
1013
|
+
export namespace queueConfig_18 {
|
|
1014
|
+
export namespace defaultJobOptions_18 {
|
|
1015
|
+
let attempts_18: number;
|
|
1016
|
+
export { attempts_18 as attempts };
|
|
1017
|
+
export namespace backoff_18 {
|
|
1018
|
+
let type_18: string;
|
|
1019
|
+
export { type_18 as type };
|
|
1020
|
+
let delay_18: number;
|
|
1021
|
+
export { delay_18 as delay };
|
|
1022
|
+
}
|
|
1023
|
+
export { backoff_18 as backoff };
|
|
1024
|
+
let delay_19: number;
|
|
1025
|
+
export { delay_19 as delay };
|
|
1026
|
+
let removeOnComplete_18: number;
|
|
1027
|
+
export { removeOnComplete_18 as removeOnComplete };
|
|
1028
|
+
let removeOnFail_18: number;
|
|
1029
|
+
export { removeOnFail_18 as removeOnFail };
|
|
1030
|
+
}
|
|
1031
|
+
export { defaultJobOptions_18 as defaultJobOptions };
|
|
1032
|
+
export namespace streams_18 {
|
|
1033
|
+
export namespace events_18 {
|
|
1034
|
+
let maxLen_18: number;
|
|
1035
|
+
export { maxLen_18 as maxLen };
|
|
1036
|
+
}
|
|
1037
|
+
export { events_18 as events };
|
|
1038
|
+
}
|
|
1039
|
+
export { streams_18 as streams };
|
|
1040
|
+
}
|
|
1041
|
+
export { queueConfig_18 as queueConfig };
|
|
1042
|
+
export namespace workerConfig_18 {
|
|
1043
|
+
let concurrency_18: number;
|
|
1044
|
+
export { concurrency_18 as concurrency };
|
|
1045
|
+
let lockDuration_18: number;
|
|
1046
|
+
export { lockDuration_18 as lockDuration };
|
|
1047
|
+
let maxStalledCount_18: number;
|
|
1048
|
+
export { maxStalledCount_18 as maxStalledCount };
|
|
1049
|
+
}
|
|
1050
|
+
export { workerConfig_18 as workerConfig };
|
|
1051
|
+
}
|
|
1012
1052
|
}
|
|
1013
1053
|
|
|
1014
1054
|
interface PlatformContextContentItem {
|
|
@@ -1054,6 +1094,24 @@ interface MergeParams {
|
|
|
1054
1094
|
*/
|
|
1055
1095
|
declare const mergeAnnoDataIntoAnnotationsTags: ({ prevObj, newLexValue, thisBlockValuePath, author, }: MergeParams) => any;
|
|
1056
1096
|
|
|
1097
|
+
/**
|
|
1098
|
+
* Is this tpl block a collab-editable field? ONE definition, used by BOTH
|
|
1099
|
+
* sides so they can never disagree:
|
|
1100
|
+
* - okf-sub loadContentDocument builds the server-side editable allowlist
|
|
1101
|
+
* from it (the flush drops writes outside that list)
|
|
1102
|
+
* - okf-fe ViewBlockGenerator derives per-block editability from it
|
|
1103
|
+
*
|
|
1104
|
+
* Editable = binds to a real content path. Exclusions:
|
|
1105
|
+
* - no valuePath (display-only blocks) / the odd "." valuePath some legacy
|
|
1106
|
+
* tpls carry (see getTypesForSchemaFromTpl, which skips it too)
|
|
1107
|
+
* - kp_-prefixed segments (publish status, lifecycle dates, author refs —
|
|
1108
|
+
* machinery, not content). NOTE: non-block system fields (lastActivity,
|
|
1109
|
+
* tagId...) are excluded by construction anyway — they're never tpl
|
|
1110
|
+
* blocks; this regex only guards block-defined kp_ paths.
|
|
1111
|
+
*/
|
|
1112
|
+
declare const COLLAB_SYSTEM_PATH_REGEX: RegExp;
|
|
1113
|
+
declare function isCollabEditableBlock(block: any): boolean;
|
|
1114
|
+
|
|
1057
1115
|
declare const parseSpecialConfigSyntax: ({ config, content, returnUndefinedIfReplacementWordNotFound }: {
|
|
1058
1116
|
config: string | object;
|
|
1059
1117
|
content: Record<string, any>;
|
|
@@ -1970,4 +2028,4 @@ declare class BlockRegistry {
|
|
|
1970
2028
|
/** Singleton instance — the one registry shared across the app. */
|
|
1971
2029
|
declare const blockRegistry: BlockRegistry;
|
|
1972
2030
|
|
|
1973
|
-
export { BASE_BULLMQ_CONFIG, type BlockCapabilities, type BlockDef, BlockRegistry, CHUNKING_PRESETS, ELASTIC_MAPPING_PRESETS, FILTER_IDS, MONGO_SCHEMA_PRESETS, TEMP_removeDuplicateFilters, UI_CONTENT, _self_managed_buildAnnoHierarchyConfig, _self_managed_buildDocHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, blockRegistry, buildFilterConfigurations, collectMarkIdsInOrder, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAndOrganizeBlocks, genCleanCamelCaseId, genTagId, generateFilterKey, getAnnoFilterBucketKey, getFilterKeyForBlock, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getVal, isTplAnnotationEnabled, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
|
2031
|
+
export { BASE_BULLMQ_CONFIG, type BlockCapabilities, type BlockDef, BlockRegistry, CHUNKING_PRESETS, COLLAB_SYSTEM_PATH_REGEX, ELASTIC_MAPPING_PRESETS, FILTER_IDS, MONGO_SCHEMA_PRESETS, TEMP_removeDuplicateFilters, UI_CONTENT, _self_managed_buildAnnoHierarchyConfig, _self_managed_buildDocHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, blockRegistry, buildFilterConfigurations, collectMarkIdsInOrder, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAndOrganizeBlocks, genCleanCamelCaseId, genTagId, generateFilterKey, getAnnoFilterBucketKey, getFilterKeyForBlock, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getVal, isCollabEditableBlock, isTplAnnotationEnabled, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
package/dist/browser.d.ts
CHANGED
|
@@ -767,7 +767,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
767
767
|
}
|
|
768
768
|
export { workerConfig_11 as workerConfig };
|
|
769
769
|
}
|
|
770
|
-
namespace
|
|
770
|
+
namespace CONTENT_DOC_COLAB_SESH_SIDE_EFFECTS_QUEUE {
|
|
771
771
|
let id_12: string;
|
|
772
772
|
export { id_12 as id };
|
|
773
773
|
export namespace queueConfig_12 {
|
|
@@ -807,7 +807,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
807
807
|
}
|
|
808
808
|
export { workerConfig_12 as workerConfig };
|
|
809
809
|
}
|
|
810
|
-
namespace
|
|
810
|
+
namespace SARVAM_TRANSCRIPTION_QUEUE {
|
|
811
811
|
let id_13: string;
|
|
812
812
|
export { id_13 as id };
|
|
813
813
|
export namespace queueConfig_13 {
|
|
@@ -847,7 +847,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
847
847
|
}
|
|
848
848
|
export { workerConfig_13 as workerConfig };
|
|
849
849
|
}
|
|
850
|
-
namespace
|
|
850
|
+
namespace INTERCOM_CONVERSATIONS_QUEUE {
|
|
851
851
|
let id_14: string;
|
|
852
852
|
export { id_14 as id };
|
|
853
853
|
export namespace queueConfig_14 {
|
|
@@ -887,7 +887,7 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
887
887
|
}
|
|
888
888
|
export { workerConfig_14 as workerConfig };
|
|
889
889
|
}
|
|
890
|
-
namespace
|
|
890
|
+
namespace TAG_SYNC_PLAN_QUEUE {
|
|
891
891
|
let id_15: string;
|
|
892
892
|
export { id_15 as id };
|
|
893
893
|
export namespace queueConfig_15 {
|
|
@@ -927,11 +927,13 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
927
927
|
}
|
|
928
928
|
export { workerConfig_15 as workerConfig };
|
|
929
929
|
}
|
|
930
|
-
namespace
|
|
930
|
+
namespace TAG_SYNC_BATCH_QUEUE {
|
|
931
931
|
let id_16: string;
|
|
932
932
|
export { id_16 as id };
|
|
933
933
|
export namespace queueConfig_16 {
|
|
934
934
|
export namespace defaultJobOptions_16 {
|
|
935
|
+
let attempts_16: number;
|
|
936
|
+
export { attempts_16 as attempts };
|
|
935
937
|
export namespace backoff_16 {
|
|
936
938
|
let type_16: string;
|
|
937
939
|
export { type_16 as type };
|
|
@@ -939,8 +941,6 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
939
941
|
export { delay_16 as delay };
|
|
940
942
|
}
|
|
941
943
|
export { backoff_16 as backoff };
|
|
942
|
-
let attempts_16: number;
|
|
943
|
-
export { attempts_16 as attempts };
|
|
944
944
|
let removeOnComplete_16: number;
|
|
945
945
|
export { removeOnComplete_16 as removeOnComplete };
|
|
946
946
|
let removeOnFail_16: number;
|
|
@@ -967,13 +967,11 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
967
967
|
}
|
|
968
968
|
export { workerConfig_16 as workerConfig };
|
|
969
969
|
}
|
|
970
|
-
namespace
|
|
970
|
+
namespace SCHEDULED_EXTERNAL_SYNC_QUEUE {
|
|
971
971
|
let id_17: string;
|
|
972
972
|
export { id_17 as id };
|
|
973
973
|
export namespace queueConfig_17 {
|
|
974
974
|
export namespace defaultJobOptions_17 {
|
|
975
|
-
let attempts_17: number;
|
|
976
|
-
export { attempts_17 as attempts };
|
|
977
975
|
export namespace backoff_17 {
|
|
978
976
|
let type_17: string;
|
|
979
977
|
export { type_17 as type };
|
|
@@ -981,8 +979,8 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
981
979
|
export { delay_17 as delay };
|
|
982
980
|
}
|
|
983
981
|
export { backoff_17 as backoff };
|
|
984
|
-
let
|
|
985
|
-
export {
|
|
982
|
+
let attempts_17: number;
|
|
983
|
+
export { attempts_17 as attempts };
|
|
986
984
|
let removeOnComplete_17: number;
|
|
987
985
|
export { removeOnComplete_17 as removeOnComplete };
|
|
988
986
|
let removeOnFail_17: number;
|
|
@@ -1009,6 +1007,48 @@ declare namespace BASE_BULLMQ_CONFIG {
|
|
|
1009
1007
|
}
|
|
1010
1008
|
export { workerConfig_17 as workerConfig };
|
|
1011
1009
|
}
|
|
1010
|
+
namespace REINDEX_QUEUE {
|
|
1011
|
+
let id_18: string;
|
|
1012
|
+
export { id_18 as id };
|
|
1013
|
+
export namespace queueConfig_18 {
|
|
1014
|
+
export namespace defaultJobOptions_18 {
|
|
1015
|
+
let attempts_18: number;
|
|
1016
|
+
export { attempts_18 as attempts };
|
|
1017
|
+
export namespace backoff_18 {
|
|
1018
|
+
let type_18: string;
|
|
1019
|
+
export { type_18 as type };
|
|
1020
|
+
let delay_18: number;
|
|
1021
|
+
export { delay_18 as delay };
|
|
1022
|
+
}
|
|
1023
|
+
export { backoff_18 as backoff };
|
|
1024
|
+
let delay_19: number;
|
|
1025
|
+
export { delay_19 as delay };
|
|
1026
|
+
let removeOnComplete_18: number;
|
|
1027
|
+
export { removeOnComplete_18 as removeOnComplete };
|
|
1028
|
+
let removeOnFail_18: number;
|
|
1029
|
+
export { removeOnFail_18 as removeOnFail };
|
|
1030
|
+
}
|
|
1031
|
+
export { defaultJobOptions_18 as defaultJobOptions };
|
|
1032
|
+
export namespace streams_18 {
|
|
1033
|
+
export namespace events_18 {
|
|
1034
|
+
let maxLen_18: number;
|
|
1035
|
+
export { maxLen_18 as maxLen };
|
|
1036
|
+
}
|
|
1037
|
+
export { events_18 as events };
|
|
1038
|
+
}
|
|
1039
|
+
export { streams_18 as streams };
|
|
1040
|
+
}
|
|
1041
|
+
export { queueConfig_18 as queueConfig };
|
|
1042
|
+
export namespace workerConfig_18 {
|
|
1043
|
+
let concurrency_18: number;
|
|
1044
|
+
export { concurrency_18 as concurrency };
|
|
1045
|
+
let lockDuration_18: number;
|
|
1046
|
+
export { lockDuration_18 as lockDuration };
|
|
1047
|
+
let maxStalledCount_18: number;
|
|
1048
|
+
export { maxStalledCount_18 as maxStalledCount };
|
|
1049
|
+
}
|
|
1050
|
+
export { workerConfig_18 as workerConfig };
|
|
1051
|
+
}
|
|
1012
1052
|
}
|
|
1013
1053
|
|
|
1014
1054
|
interface PlatformContextContentItem {
|
|
@@ -1054,6 +1094,24 @@ interface MergeParams {
|
|
|
1054
1094
|
*/
|
|
1055
1095
|
declare const mergeAnnoDataIntoAnnotationsTags: ({ prevObj, newLexValue, thisBlockValuePath, author, }: MergeParams) => any;
|
|
1056
1096
|
|
|
1097
|
+
/**
|
|
1098
|
+
* Is this tpl block a collab-editable field? ONE definition, used by BOTH
|
|
1099
|
+
* sides so they can never disagree:
|
|
1100
|
+
* - okf-sub loadContentDocument builds the server-side editable allowlist
|
|
1101
|
+
* from it (the flush drops writes outside that list)
|
|
1102
|
+
* - okf-fe ViewBlockGenerator derives per-block editability from it
|
|
1103
|
+
*
|
|
1104
|
+
* Editable = binds to a real content path. Exclusions:
|
|
1105
|
+
* - no valuePath (display-only blocks) / the odd "." valuePath some legacy
|
|
1106
|
+
* tpls carry (see getTypesForSchemaFromTpl, which skips it too)
|
|
1107
|
+
* - kp_-prefixed segments (publish status, lifecycle dates, author refs —
|
|
1108
|
+
* machinery, not content). NOTE: non-block system fields (lastActivity,
|
|
1109
|
+
* tagId...) are excluded by construction anyway — they're never tpl
|
|
1110
|
+
* blocks; this regex only guards block-defined kp_ paths.
|
|
1111
|
+
*/
|
|
1112
|
+
declare const COLLAB_SYSTEM_PATH_REGEX: RegExp;
|
|
1113
|
+
declare function isCollabEditableBlock(block: any): boolean;
|
|
1114
|
+
|
|
1057
1115
|
declare const parseSpecialConfigSyntax: ({ config, content, returnUndefinedIfReplacementWordNotFound }: {
|
|
1058
1116
|
config: string | object;
|
|
1059
1117
|
content: Record<string, any>;
|
|
@@ -1970,4 +2028,4 @@ declare class BlockRegistry {
|
|
|
1970
2028
|
/** Singleton instance — the one registry shared across the app. */
|
|
1971
2029
|
declare const blockRegistry: BlockRegistry;
|
|
1972
2030
|
|
|
1973
|
-
export { BASE_BULLMQ_CONFIG, type BlockCapabilities, type BlockDef, BlockRegistry, CHUNKING_PRESETS, ELASTIC_MAPPING_PRESETS, FILTER_IDS, MONGO_SCHEMA_PRESETS, TEMP_removeDuplicateFilters, UI_CONTENT, _self_managed_buildAnnoHierarchyConfig, _self_managed_buildDocHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, blockRegistry, buildFilterConfigurations, collectMarkIdsInOrder, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAndOrganizeBlocks, genCleanCamelCaseId, genTagId, generateFilterKey, getAnnoFilterBucketKey, getFilterKeyForBlock, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getVal, isTplAnnotationEnabled, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
|
2031
|
+
export { BASE_BULLMQ_CONFIG, type BlockCapabilities, type BlockDef, BlockRegistry, CHUNKING_PRESETS, COLLAB_SYSTEM_PATH_REGEX, ELASTIC_MAPPING_PRESETS, FILTER_IDS, MONGO_SCHEMA_PRESETS, TEMP_removeDuplicateFilters, UI_CONTENT, _self_managed_buildAnnoHierarchyConfig, _self_managed_buildDocHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, blockRegistry, buildFilterConfigurations, collectMarkIdsInOrder, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAndOrganizeBlocks, genCleanCamelCaseId, genTagId, generateFilterKey, getAnnoFilterBucketKey, getFilterKeyForBlock, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getVal, isCollabEditableBlock, isTplAnnotationEnabled, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
package/dist/browser.js
CHANGED
|
@@ -23,6 +23,7 @@ __export(browser_exports, {
|
|
|
23
23
|
BASE_BULLMQ_CONFIG: () => BASE_BULLMQ_CONFIG,
|
|
24
24
|
BlockRegistry: () => BlockRegistry,
|
|
25
25
|
CHUNKING_PRESETS: () => CHUNKING_PRESETS,
|
|
26
|
+
COLLAB_SYSTEM_PATH_REGEX: () => COLLAB_SYSTEM_PATH_REGEX,
|
|
26
27
|
ELASTIC_MAPPING_PRESETS: () => ELASTIC_MAPPING_PRESETS,
|
|
27
28
|
FILTER_IDS: () => FILTER_IDS,
|
|
28
29
|
MONGO_SCHEMA_PRESETS: () => MONGO_SCHEMA_PRESETS,
|
|
@@ -56,6 +57,7 @@ __export(browser_exports, {
|
|
|
56
57
|
getRoutePathToTCI: () => getRoutePathToTCI,
|
|
57
58
|
getRoutePathToTagCategoryLanding: () => getRoutePathToTagCategoryLanding,
|
|
58
59
|
getVal: () => getVal,
|
|
60
|
+
isCollabEditableBlock: () => isCollabEditableBlock,
|
|
59
61
|
isTplAnnotationEnabled: () => isTplAnnotationEnabled,
|
|
60
62
|
mergeAnnoDataIntoAnnotationsTags: () => mergeAnnoDataIntoAnnotationsTags,
|
|
61
63
|
parseSpecialConfigSyntax: () => parseSpecialConfigSyntax,
|
|
@@ -1215,6 +1217,43 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
1215
1217
|
maxStalledCount: 3
|
|
1216
1218
|
}
|
|
1217
1219
|
},
|
|
1220
|
+
/**
|
|
1221
|
+
* Collab-editing session-boundary side effects for CONTENT docs.
|
|
1222
|
+
* Enqueued by okf-sub's collab service when a field lock releases / the
|
|
1223
|
+
* last editor leaves a live doc; the worker calls okf-be's internal
|
|
1224
|
+
* contentDocCollabSessionSideEffects endpoint (tag-rename sync, chunks/annos
|
|
1225
|
+
* producers, Elastic sync, cache invalidations, analytics).
|
|
1226
|
+
* Queued (rather than fire-and-forget HTTP from the boundary) for retry
|
|
1227
|
+
* ability + Bullboard trackability — a failed boundary would otherwise be
|
|
1228
|
+
* silently lost when the doc unloads. Steps are idempotent except
|
|
1229
|
+
* analytics, which runs LAST so retries only duplicate it on a
|
|
1230
|
+
* lost-response network edge.
|
|
1231
|
+
*/
|
|
1232
|
+
CONTENT_DOC_COLAB_SESH_SIDE_EFFECTS_QUEUE: {
|
|
1233
|
+
id: "content-doc-colab-sesh-side-effects-queue",
|
|
1234
|
+
queueConfig: {
|
|
1235
|
+
defaultJobOptions: {
|
|
1236
|
+
attempts: 3,
|
|
1237
|
+
backoff: {
|
|
1238
|
+
type: "exponential",
|
|
1239
|
+
delay: 5e3
|
|
1240
|
+
},
|
|
1241
|
+
removeOnComplete: 50,
|
|
1242
|
+
removeOnFail: 200
|
|
1243
|
+
},
|
|
1244
|
+
streams: {
|
|
1245
|
+
events: {
|
|
1246
|
+
maxLen: 1e3
|
|
1247
|
+
// 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.
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
},
|
|
1251
|
+
workerConfig: {
|
|
1252
|
+
concurrency: 10,
|
|
1253
|
+
lockDuration: 9e4,
|
|
1254
|
+
maxStalledCount: 3
|
|
1255
|
+
}
|
|
1256
|
+
},
|
|
1218
1257
|
SARVAM_TRANSCRIPTION_QUEUE: {
|
|
1219
1258
|
id: "sarvam-transcription-queue",
|
|
1220
1259
|
queueConfig: {
|
|
@@ -1491,6 +1530,10 @@ var mergeAnnoDataIntoAnnotationsTags = ({
|
|
|
1491
1530
|
return newConsolidated;
|
|
1492
1531
|
};
|
|
1493
1532
|
|
|
1533
|
+
// src/collab/isCollabEditableBlock.js
|
|
1534
|
+
var COLLAB_SYSTEM_PATH_REGEX = /(^|\.)kp_/;
|
|
1535
|
+
var isCollabEditableBlock = (block) => !!block?.valuePath && block.valuePath !== "." && !COLLAB_SYSTEM_PATH_REGEX.test(block.valuePath);
|
|
1536
|
+
|
|
1494
1537
|
// src/utils/parseSpecialConfigSyntax.ts
|
|
1495
1538
|
var parseSpecialConfigSyntax = ({
|
|
1496
1539
|
config,
|
|
@@ -2506,6 +2549,13 @@ var deduplicateRollupTagFilters = (rollups) => {
|
|
|
2506
2549
|
var injectFilterOptionsBy = (filters) => filters.map(
|
|
2507
2550
|
(f) => f.parentFilterId ? { ...f, source: { ...f.source, filterOptionsBy: { filterId: f.parentFilterId } } } : f
|
|
2508
2551
|
);
|
|
2552
|
+
var isRollupConfig = (f) => !!f.target?.rollupPath || f.target?.filterType === "rollupValuePathType";
|
|
2553
|
+
var dedupeSharedGroupConfigs = (configs) => {
|
|
2554
|
+
const rollups = configs.filter(isRollupConfig);
|
|
2555
|
+
const rollupSourceKeys = new Set(rollups.map((r) => JSON.stringify(r.source)));
|
|
2556
|
+
const directFilters = configs.filter((f) => !isRollupConfig(f)).filter((f) => !rollupSourceKeys.has(JSON.stringify(f.source)));
|
|
2557
|
+
return [...directFilters, ...deduplicateRollupTagFilters(rollups)];
|
|
2558
|
+
};
|
|
2509
2559
|
var _self_managed_buildDocHierarchyConfig = ({
|
|
2510
2560
|
combinedDocumentBlocks,
|
|
2511
2561
|
docRollupBlocks,
|
|
@@ -2518,17 +2568,19 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
2518
2568
|
const commonGroup = allGroups.find(
|
|
2519
2569
|
(g) => g.contentTypes.length === selectedTpls.length
|
|
2520
2570
|
);
|
|
2521
|
-
const commonFilterConfigs = commonGroup ? injectFilterOptionsBy(
|
|
2571
|
+
const commonFilterConfigs = commonGroup && selectedTpls.length >= 2 ? injectFilterOptionsBy(
|
|
2522
2572
|
sortFiltersHierarchically(
|
|
2523
2573
|
attachParentFields(
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2574
|
+
dedupeSharedGroupConfigs(
|
|
2575
|
+
buildFilterConfigurations({
|
|
2576
|
+
groups: [commonGroup],
|
|
2577
|
+
type: "tags",
|
|
2578
|
+
selectedTpls,
|
|
2579
|
+
allTpls,
|
|
2580
|
+
isRollup: false,
|
|
2581
|
+
isAnno: false
|
|
2582
|
+
}).flatMap((s) => s.configs)
|
|
2583
|
+
),
|
|
2532
2584
|
allTpls
|
|
2533
2585
|
)
|
|
2534
2586
|
)
|
|
@@ -2540,14 +2592,16 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
2540
2592
|
const groupFilterConfigs = injectFilterOptionsBy(
|
|
2541
2593
|
sortFiltersHierarchically(
|
|
2542
2594
|
attachParentFields(
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2595
|
+
dedupeSharedGroupConfigs(
|
|
2596
|
+
buildFilterConfigurations({
|
|
2597
|
+
groups: [group],
|
|
2598
|
+
type: "tags",
|
|
2599
|
+
selectedTpls,
|
|
2600
|
+
allTpls,
|
|
2601
|
+
isRollup: false,
|
|
2602
|
+
isAnno: false
|
|
2603
|
+
}).flatMap((s) => s.configs)
|
|
2604
|
+
),
|
|
2551
2605
|
allTpls
|
|
2552
2606
|
)
|
|
2553
2607
|
)
|
|
@@ -2904,6 +2958,7 @@ var plainTextToLexical = (value) => {
|
|
|
2904
2958
|
BASE_BULLMQ_CONFIG,
|
|
2905
2959
|
BlockRegistry,
|
|
2906
2960
|
CHUNKING_PRESETS,
|
|
2961
|
+
COLLAB_SYSTEM_PATH_REGEX,
|
|
2907
2962
|
ELASTIC_MAPPING_PRESETS,
|
|
2908
2963
|
FILTER_IDS,
|
|
2909
2964
|
MONGO_SCHEMA_PRESETS,
|
|
@@ -2937,6 +2992,7 @@ var plainTextToLexical = (value) => {
|
|
|
2937
2992
|
getRoutePathToTCI,
|
|
2938
2993
|
getRoutePathToTagCategoryLanding,
|
|
2939
2994
|
getVal,
|
|
2995
|
+
isCollabEditableBlock,
|
|
2940
2996
|
isTplAnnotationEnabled,
|
|
2941
2997
|
mergeAnnoDataIntoAnnotationsTags,
|
|
2942
2998
|
parseSpecialConfigSyntax,
|
package/dist/browser.mjs
CHANGED
|
@@ -1145,6 +1145,43 @@ var BASE_BULLMQ_CONFIG = {
|
|
|
1145
1145
|
maxStalledCount: 3
|
|
1146
1146
|
}
|
|
1147
1147
|
},
|
|
1148
|
+
/**
|
|
1149
|
+
* Collab-editing session-boundary side effects for CONTENT docs.
|
|
1150
|
+
* Enqueued by okf-sub's collab service when a field lock releases / the
|
|
1151
|
+
* last editor leaves a live doc; the worker calls okf-be's internal
|
|
1152
|
+
* contentDocCollabSessionSideEffects endpoint (tag-rename sync, chunks/annos
|
|
1153
|
+
* producers, Elastic sync, cache invalidations, analytics).
|
|
1154
|
+
* Queued (rather than fire-and-forget HTTP from the boundary) for retry
|
|
1155
|
+
* ability + Bullboard trackability — a failed boundary would otherwise be
|
|
1156
|
+
* silently lost when the doc unloads. Steps are idempotent except
|
|
1157
|
+
* analytics, which runs LAST so retries only duplicate it on a
|
|
1158
|
+
* lost-response network edge.
|
|
1159
|
+
*/
|
|
1160
|
+
CONTENT_DOC_COLAB_SESH_SIDE_EFFECTS_QUEUE: {
|
|
1161
|
+
id: "content-doc-colab-sesh-side-effects-queue",
|
|
1162
|
+
queueConfig: {
|
|
1163
|
+
defaultJobOptions: {
|
|
1164
|
+
attempts: 3,
|
|
1165
|
+
backoff: {
|
|
1166
|
+
type: "exponential",
|
|
1167
|
+
delay: 5e3
|
|
1168
|
+
},
|
|
1169
|
+
removeOnComplete: 50,
|
|
1170
|
+
removeOnFail: 200
|
|
1171
|
+
},
|
|
1172
|
+
streams: {
|
|
1173
|
+
events: {
|
|
1174
|
+
maxLen: 1e3
|
|
1175
|
+
// 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.
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
},
|
|
1179
|
+
workerConfig: {
|
|
1180
|
+
concurrency: 10,
|
|
1181
|
+
lockDuration: 9e4,
|
|
1182
|
+
maxStalledCount: 3
|
|
1183
|
+
}
|
|
1184
|
+
},
|
|
1148
1185
|
SARVAM_TRANSCRIPTION_QUEUE: {
|
|
1149
1186
|
id: "sarvam-transcription-queue",
|
|
1150
1187
|
queueConfig: {
|
|
@@ -1421,6 +1458,10 @@ var mergeAnnoDataIntoAnnotationsTags = ({
|
|
|
1421
1458
|
return newConsolidated;
|
|
1422
1459
|
};
|
|
1423
1460
|
|
|
1461
|
+
// src/collab/isCollabEditableBlock.js
|
|
1462
|
+
var COLLAB_SYSTEM_PATH_REGEX = /(^|\.)kp_/;
|
|
1463
|
+
var isCollabEditableBlock = (block) => !!block?.valuePath && block.valuePath !== "." && !COLLAB_SYSTEM_PATH_REGEX.test(block.valuePath);
|
|
1464
|
+
|
|
1424
1465
|
// src/utils/parseSpecialConfigSyntax.ts
|
|
1425
1466
|
var parseSpecialConfigSyntax = ({
|
|
1426
1467
|
config,
|
|
@@ -2436,6 +2477,13 @@ var deduplicateRollupTagFilters = (rollups) => {
|
|
|
2436
2477
|
var injectFilterOptionsBy = (filters) => filters.map(
|
|
2437
2478
|
(f) => f.parentFilterId ? { ...f, source: { ...f.source, filterOptionsBy: { filterId: f.parentFilterId } } } : f
|
|
2438
2479
|
);
|
|
2480
|
+
var isRollupConfig = (f) => !!f.target?.rollupPath || f.target?.filterType === "rollupValuePathType";
|
|
2481
|
+
var dedupeSharedGroupConfigs = (configs) => {
|
|
2482
|
+
const rollups = configs.filter(isRollupConfig);
|
|
2483
|
+
const rollupSourceKeys = new Set(rollups.map((r) => JSON.stringify(r.source)));
|
|
2484
|
+
const directFilters = configs.filter((f) => !isRollupConfig(f)).filter((f) => !rollupSourceKeys.has(JSON.stringify(f.source)));
|
|
2485
|
+
return [...directFilters, ...deduplicateRollupTagFilters(rollups)];
|
|
2486
|
+
};
|
|
2439
2487
|
var _self_managed_buildDocHierarchyConfig = ({
|
|
2440
2488
|
combinedDocumentBlocks,
|
|
2441
2489
|
docRollupBlocks,
|
|
@@ -2448,17 +2496,19 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
2448
2496
|
const commonGroup = allGroups.find(
|
|
2449
2497
|
(g) => g.contentTypes.length === selectedTpls.length
|
|
2450
2498
|
);
|
|
2451
|
-
const commonFilterConfigs = commonGroup ? injectFilterOptionsBy(
|
|
2499
|
+
const commonFilterConfigs = commonGroup && selectedTpls.length >= 2 ? injectFilterOptionsBy(
|
|
2452
2500
|
sortFiltersHierarchically(
|
|
2453
2501
|
attachParentFields(
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2502
|
+
dedupeSharedGroupConfigs(
|
|
2503
|
+
buildFilterConfigurations({
|
|
2504
|
+
groups: [commonGroup],
|
|
2505
|
+
type: "tags",
|
|
2506
|
+
selectedTpls,
|
|
2507
|
+
allTpls,
|
|
2508
|
+
isRollup: false,
|
|
2509
|
+
isAnno: false
|
|
2510
|
+
}).flatMap((s) => s.configs)
|
|
2511
|
+
),
|
|
2462
2512
|
allTpls
|
|
2463
2513
|
)
|
|
2464
2514
|
)
|
|
@@ -2470,14 +2520,16 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
2470
2520
|
const groupFilterConfigs = injectFilterOptionsBy(
|
|
2471
2521
|
sortFiltersHierarchically(
|
|
2472
2522
|
attachParentFields(
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2523
|
+
dedupeSharedGroupConfigs(
|
|
2524
|
+
buildFilterConfigurations({
|
|
2525
|
+
groups: [group],
|
|
2526
|
+
type: "tags",
|
|
2527
|
+
selectedTpls,
|
|
2528
|
+
allTpls,
|
|
2529
|
+
isRollup: false,
|
|
2530
|
+
isAnno: false
|
|
2531
|
+
}).flatMap((s) => s.configs)
|
|
2532
|
+
),
|
|
2481
2533
|
allTpls
|
|
2482
2534
|
)
|
|
2483
2535
|
)
|
|
@@ -2833,6 +2885,7 @@ export {
|
|
|
2833
2885
|
BASE_BULLMQ_CONFIG,
|
|
2834
2886
|
BlockRegistry,
|
|
2835
2887
|
CHUNKING_PRESETS,
|
|
2888
|
+
COLLAB_SYSTEM_PATH_REGEX,
|
|
2836
2889
|
ELASTIC_MAPPING_PRESETS,
|
|
2837
2890
|
FILTER_IDS,
|
|
2838
2891
|
MONGO_SCHEMA_PRESETS,
|
|
@@ -2866,6 +2919,7 @@ export {
|
|
|
2866
2919
|
getRoutePathToTCI,
|
|
2867
2920
|
getRoutePathToTagCategoryLanding,
|
|
2868
2921
|
getVal,
|
|
2922
|
+
isCollabEditableBlock,
|
|
2869
2923
|
isTplAnnotationEnabled,
|
|
2870
2924
|
mergeAnnoDataIntoAnnotationsTags,
|
|
2871
2925
|
parseSpecialConfigSyntax,
|