@okf/ootils 1.20.0 → 1.21.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/node.d.mts +11 -1
- package/dist/node.d.ts +11 -1
- package/dist/node.js +45 -0
- package/dist/node.mjs +45 -0
- package/package.json +1 -1
package/dist/node.d.mts
CHANGED
|
@@ -1316,6 +1316,16 @@ declare class ChunksElasticSyncProducer extends BaseProducer {
|
|
|
1316
1316
|
addJobWithName(jobData: Object): Promise<Object>;
|
|
1317
1317
|
}
|
|
1318
1318
|
|
|
1319
|
+
declare class AnnosElasticSyncProducer extends BaseProducer {
|
|
1320
|
+
constructor(options?: {});
|
|
1321
|
+
/**
|
|
1322
|
+
* Add a single sync job
|
|
1323
|
+
* @param {Object} jobData - Job data containing docIds, tenant, operationType
|
|
1324
|
+
* @returns {Promise<Object>} Job creation result
|
|
1325
|
+
*/
|
|
1326
|
+
addJobWithName(jobData: Object): Promise<Object>;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1319
1329
|
/**
|
|
1320
1330
|
* Creates BullMQ configuration with explicit dependencies
|
|
1321
1331
|
* @param {Object} params Configuration parameters
|
|
@@ -1335,4 +1345,4 @@ declare function GET_GLOBAL_BULLMQ_CONFIG({ env, redisCredentials }: {
|
|
|
1335
1345
|
};
|
|
1336
1346
|
}): Object;
|
|
1337
1347
|
|
|
1338
|
-
export { AIChatSchema, AnnotationSchema, BASE_BULLMQ_CONFIG, BaseProducer, BaseWorker, ChunksElasticSyncProducer, ElasticSearchConnector, GET_GLOBAL_BULLMQ_CONFIG, GeneratedTopicsSchema, MongoConnector, PlatformConfigsSchema, ProducerManager, RedisCacheConnector, TplSchema, WorkerManager, deleteVal, extractAllBlocksFromTpl, genTagId, getAIChatModelByTenant, getAnnotationsModelByTenant, getDbByTenant, getGeneratedTopicsModelByTenant, getModelByTenant, getPlatformConfigsModelByTenant, getPlatformContextContent, getRollupPossibilities, getTplModelByTenant, getVal, mergeAnnoDataIntoAnnotationsTags, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
|
1348
|
+
export { AIChatSchema, AnnosElasticSyncProducer, AnnotationSchema, BASE_BULLMQ_CONFIG, BaseProducer, BaseWorker, ChunksElasticSyncProducer, ElasticSearchConnector, GET_GLOBAL_BULLMQ_CONFIG, GeneratedTopicsSchema, MongoConnector, PlatformConfigsSchema, ProducerManager, RedisCacheConnector, TplSchema, WorkerManager, deleteVal, extractAllBlocksFromTpl, genTagId, getAIChatModelByTenant, getAnnotationsModelByTenant, getDbByTenant, getGeneratedTopicsModelByTenant, getModelByTenant, getPlatformConfigsModelByTenant, getPlatformContextContent, getRollupPossibilities, getTplModelByTenant, getVal, mergeAnnoDataIntoAnnotationsTags, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
package/dist/node.d.ts
CHANGED
|
@@ -1316,6 +1316,16 @@ declare class ChunksElasticSyncProducer extends BaseProducer {
|
|
|
1316
1316
|
addJobWithName(jobData: Object): Promise<Object>;
|
|
1317
1317
|
}
|
|
1318
1318
|
|
|
1319
|
+
declare class AnnosElasticSyncProducer extends BaseProducer {
|
|
1320
|
+
constructor(options?: {});
|
|
1321
|
+
/**
|
|
1322
|
+
* Add a single sync job
|
|
1323
|
+
* @param {Object} jobData - Job data containing docIds, tenant, operationType
|
|
1324
|
+
* @returns {Promise<Object>} Job creation result
|
|
1325
|
+
*/
|
|
1326
|
+
addJobWithName(jobData: Object): Promise<Object>;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1319
1329
|
/**
|
|
1320
1330
|
* Creates BullMQ configuration with explicit dependencies
|
|
1321
1331
|
* @param {Object} params Configuration parameters
|
|
@@ -1335,4 +1345,4 @@ declare function GET_GLOBAL_BULLMQ_CONFIG({ env, redisCredentials }: {
|
|
|
1335
1345
|
};
|
|
1336
1346
|
}): Object;
|
|
1337
1347
|
|
|
1338
|
-
export { AIChatSchema, AnnotationSchema, BASE_BULLMQ_CONFIG, BaseProducer, BaseWorker, ChunksElasticSyncProducer, ElasticSearchConnector, GET_GLOBAL_BULLMQ_CONFIG, GeneratedTopicsSchema, MongoConnector, PlatformConfigsSchema, ProducerManager, RedisCacheConnector, TplSchema, WorkerManager, deleteVal, extractAllBlocksFromTpl, genTagId, getAIChatModelByTenant, getAnnotationsModelByTenant, getDbByTenant, getGeneratedTopicsModelByTenant, getModelByTenant, getPlatformConfigsModelByTenant, getPlatformContextContent, getRollupPossibilities, getTplModelByTenant, getVal, mergeAnnoDataIntoAnnotationsTags, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
|
1348
|
+
export { AIChatSchema, AnnosElasticSyncProducer, AnnotationSchema, BASE_BULLMQ_CONFIG, BaseProducer, BaseWorker, ChunksElasticSyncProducer, ElasticSearchConnector, GET_GLOBAL_BULLMQ_CONFIG, GeneratedTopicsSchema, MongoConnector, PlatformConfigsSchema, ProducerManager, RedisCacheConnector, TplSchema, WorkerManager, deleteVal, extractAllBlocksFromTpl, genTagId, getAIChatModelByTenant, getAnnotationsModelByTenant, getDbByTenant, getGeneratedTopicsModelByTenant, getModelByTenant, getPlatformConfigsModelByTenant, getPlatformContextContent, getRollupPossibilities, getTplModelByTenant, getVal, mergeAnnoDataIntoAnnotationsTags, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
package/dist/node.js
CHANGED
|
@@ -1594,10 +1594,53 @@ var require_ChunksElasticSyncProducer = __commonJS({
|
|
|
1594
1594
|
}
|
|
1595
1595
|
});
|
|
1596
1596
|
|
|
1597
|
+
// src/bullmq/AnnosElasticSyncProducer.js
|
|
1598
|
+
var require_AnnosElasticSyncProducer = __commonJS({
|
|
1599
|
+
"src/bullmq/AnnosElasticSyncProducer.js"(exports2, module2) {
|
|
1600
|
+
"use strict";
|
|
1601
|
+
var { BaseProducer: BaseProducer2 } = require_BaseProducer();
|
|
1602
|
+
var { GET_GLOBAL_BULLMQ_CONFIG: GET_GLOBAL_BULLMQ_CONFIG2 } = require_GET_GLOBAL_BULLMQ_CONFIG();
|
|
1603
|
+
var AnnosElasticSyncProducer2 = class extends BaseProducer2 {
|
|
1604
|
+
// Preserve class name through minification for ProducerManager lookup
|
|
1605
|
+
static get name() {
|
|
1606
|
+
return "AnnosElasticSyncProducer";
|
|
1607
|
+
}
|
|
1608
|
+
// options - Configuration options (optional, defaults to process.env)
|
|
1609
|
+
constructor(options = {}) {
|
|
1610
|
+
const env = options.env || process.env.ENV;
|
|
1611
|
+
const redisCredentials = options.redisCredentials || {
|
|
1612
|
+
REDIS_HOST: process.env.REDIS_HOST,
|
|
1613
|
+
REDIS_PORT: process.env.REDIS_PORT,
|
|
1614
|
+
REDIS_PASSWORD: process.env.REDIS_PASSWORD
|
|
1615
|
+
};
|
|
1616
|
+
const GLOBAL_BULLMQ_CONFIG = GET_GLOBAL_BULLMQ_CONFIG2({
|
|
1617
|
+
env,
|
|
1618
|
+
redisCredentials
|
|
1619
|
+
});
|
|
1620
|
+
super(GLOBAL_BULLMQ_CONFIG.ANNOS_ELASTIC_SYNC_QUEUE);
|
|
1621
|
+
}
|
|
1622
|
+
/**
|
|
1623
|
+
* Add a single sync job
|
|
1624
|
+
* @param {Object} jobData - Job data containing docIds, tenant, operationType
|
|
1625
|
+
* @returns {Promise<Object>} Job creation result
|
|
1626
|
+
*/
|
|
1627
|
+
async addJobWithName(jobData) {
|
|
1628
|
+
const job = await this.addJob("processAnnosElasticSync", jobData);
|
|
1629
|
+
console.log(`\u{1F4C8} Added process annos elastic sync job: ${job.id}`);
|
|
1630
|
+
return { jobId: job.id };
|
|
1631
|
+
}
|
|
1632
|
+
};
|
|
1633
|
+
module2.exports = {
|
|
1634
|
+
AnnosElasticSyncProducer: AnnosElasticSyncProducer2
|
|
1635
|
+
};
|
|
1636
|
+
}
|
|
1637
|
+
});
|
|
1638
|
+
|
|
1597
1639
|
// src/node.ts
|
|
1598
1640
|
var node_exports = {};
|
|
1599
1641
|
__export(node_exports, {
|
|
1600
1642
|
AIChatSchema: () => AIChat_default,
|
|
1643
|
+
AnnosElasticSyncProducer: () => import_AnnosElasticSyncProducer.AnnosElasticSyncProducer,
|
|
1601
1644
|
AnnotationSchema: () => Annotations_default,
|
|
1602
1645
|
BASE_BULLMQ_CONFIG: () => BASE_BULLMQ_CONFIG,
|
|
1603
1646
|
BaseProducer: () => import_BaseProducer.BaseProducer,
|
|
@@ -2482,10 +2525,12 @@ var import_ProducerManager = __toESM(require_ProducerManager());
|
|
|
2482
2525
|
var import_BaseProducer = __toESM(require_BaseProducer());
|
|
2483
2526
|
var import_BaseWorker = __toESM(require_BaseWorker());
|
|
2484
2527
|
var import_ChunksElasticSyncProducer = __toESM(require_ChunksElasticSyncProducer());
|
|
2528
|
+
var import_AnnosElasticSyncProducer = __toESM(require_AnnosElasticSyncProducer());
|
|
2485
2529
|
var import_GET_GLOBAL_BULLMQ_CONFIG = __toESM(require_GET_GLOBAL_BULLMQ_CONFIG());
|
|
2486
2530
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2487
2531
|
0 && (module.exports = {
|
|
2488
2532
|
AIChatSchema,
|
|
2533
|
+
AnnosElasticSyncProducer,
|
|
2489
2534
|
AnnotationSchema,
|
|
2490
2535
|
BASE_BULLMQ_CONFIG,
|
|
2491
2536
|
BaseProducer,
|
package/dist/node.mjs
CHANGED
|
@@ -1599,6 +1599,48 @@ var require_ChunksElasticSyncProducer = __commonJS({
|
|
|
1599
1599
|
}
|
|
1600
1600
|
});
|
|
1601
1601
|
|
|
1602
|
+
// src/bullmq/AnnosElasticSyncProducer.js
|
|
1603
|
+
var require_AnnosElasticSyncProducer = __commonJS({
|
|
1604
|
+
"src/bullmq/AnnosElasticSyncProducer.js"(exports, module) {
|
|
1605
|
+
"use strict";
|
|
1606
|
+
var { BaseProducer: BaseProducer2 } = require_BaseProducer();
|
|
1607
|
+
var { GET_GLOBAL_BULLMQ_CONFIG: GET_GLOBAL_BULLMQ_CONFIG2 } = require_GET_GLOBAL_BULLMQ_CONFIG();
|
|
1608
|
+
var AnnosElasticSyncProducer2 = class extends BaseProducer2 {
|
|
1609
|
+
// Preserve class name through minification for ProducerManager lookup
|
|
1610
|
+
static get name() {
|
|
1611
|
+
return "AnnosElasticSyncProducer";
|
|
1612
|
+
}
|
|
1613
|
+
// options - Configuration options (optional, defaults to process.env)
|
|
1614
|
+
constructor(options = {}) {
|
|
1615
|
+
const env = options.env || process.env.ENV;
|
|
1616
|
+
const redisCredentials = options.redisCredentials || {
|
|
1617
|
+
REDIS_HOST: process.env.REDIS_HOST,
|
|
1618
|
+
REDIS_PORT: process.env.REDIS_PORT,
|
|
1619
|
+
REDIS_PASSWORD: process.env.REDIS_PASSWORD
|
|
1620
|
+
};
|
|
1621
|
+
const GLOBAL_BULLMQ_CONFIG = GET_GLOBAL_BULLMQ_CONFIG2({
|
|
1622
|
+
env,
|
|
1623
|
+
redisCredentials
|
|
1624
|
+
});
|
|
1625
|
+
super(GLOBAL_BULLMQ_CONFIG.ANNOS_ELASTIC_SYNC_QUEUE);
|
|
1626
|
+
}
|
|
1627
|
+
/**
|
|
1628
|
+
* Add a single sync job
|
|
1629
|
+
* @param {Object} jobData - Job data containing docIds, tenant, operationType
|
|
1630
|
+
* @returns {Promise<Object>} Job creation result
|
|
1631
|
+
*/
|
|
1632
|
+
async addJobWithName(jobData) {
|
|
1633
|
+
const job = await this.addJob("processAnnosElasticSync", jobData);
|
|
1634
|
+
console.log(`\u{1F4C8} Added process annos elastic sync job: ${job.id}`);
|
|
1635
|
+
return { jobId: job.id };
|
|
1636
|
+
}
|
|
1637
|
+
};
|
|
1638
|
+
module.exports = {
|
|
1639
|
+
AnnosElasticSyncProducer: AnnosElasticSyncProducer2
|
|
1640
|
+
};
|
|
1641
|
+
}
|
|
1642
|
+
});
|
|
1643
|
+
|
|
1602
1644
|
// src/utils/getterSetterDeleter/utils/set_deleteVal.ts
|
|
1603
1645
|
var set_deleteVal = (action, data, valuePath, value) => {
|
|
1604
1646
|
if (valuePath === void 0) return;
|
|
@@ -2448,7 +2490,9 @@ var import_ProducerManager = __toESM(require_ProducerManager());
|
|
|
2448
2490
|
var import_BaseProducer = __toESM(require_BaseProducer());
|
|
2449
2491
|
var import_BaseWorker = __toESM(require_BaseWorker());
|
|
2450
2492
|
var import_ChunksElasticSyncProducer = __toESM(require_ChunksElasticSyncProducer());
|
|
2493
|
+
var import_AnnosElasticSyncProducer = __toESM(require_AnnosElasticSyncProducer());
|
|
2451
2494
|
var import_GET_GLOBAL_BULLMQ_CONFIG = __toESM(require_GET_GLOBAL_BULLMQ_CONFIG());
|
|
2495
|
+
var export_AnnosElasticSyncProducer = import_AnnosElasticSyncProducer.AnnosElasticSyncProducer;
|
|
2452
2496
|
var export_BaseProducer = import_BaseProducer.BaseProducer;
|
|
2453
2497
|
var export_BaseWorker = import_BaseWorker.BaseWorker;
|
|
2454
2498
|
var export_ChunksElasticSyncProducer = import_ChunksElasticSyncProducer.ChunksElasticSyncProducer;
|
|
@@ -2465,6 +2509,7 @@ var export_getPlatformConfigsModelByTenant = import_getModelByTenant2.getPlatfor
|
|
|
2465
2509
|
var export_getTplModelByTenant = import_getModelByTenant2.getTplModelByTenant;
|
|
2466
2510
|
export {
|
|
2467
2511
|
AIChat_default as AIChatSchema,
|
|
2512
|
+
export_AnnosElasticSyncProducer as AnnosElasticSyncProducer,
|
|
2468
2513
|
Annotations_default as AnnotationSchema,
|
|
2469
2514
|
BASE_BULLMQ_CONFIG,
|
|
2470
2515
|
export_BaseProducer as BaseProducer,
|