fix: export ImportManager and add getStats() convenience method
Resolves API accessibility issues reported by Brain Cloud Studio team: 1. Export ImportManager and createImportManager - ImportManager class was fully implemented but not exported - Consumers can now access AI-powered import features - Includes ImportOptions and ImportResult types 2. Add brain.getStats() convenience method - Documentation showed getStats() as top-level method - Implementation had it nested under brain.counts.getStats() - Added convenience method that delegates to counts API - Maintains backward compatibility 3. Update API documentation - Corrected getStats() signature and return type - Added comprehensive ImportManager documentation - Included examples for all import patterns These changes expose existing, tested functionality without modifying core behavior. All tests pass.
This commit is contained in:
parent
544c9f8a5e
commit
06b3bc77e1
3 changed files with 127 additions and 8 deletions
|
|
@ -2101,6 +2101,15 @@ export class Brainy<T = any> implements BrainyInterface<T> {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get complete statistics - convenience method
|
||||
* For more granular counting, use brain.counts API
|
||||
* @returns Complete statistics including entities, relationships, and density
|
||||
*/
|
||||
getStats() {
|
||||
return this.counts.getStats()
|
||||
}
|
||||
|
||||
// ============= HELPER METHODS =============
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -62,14 +62,18 @@ export {
|
|||
|
||||
// Export Neural Import (AI data understanding)
|
||||
export { NeuralImport } from './cortex/neuralImport.js'
|
||||
export type {
|
||||
export type {
|
||||
NeuralAnalysisResult,
|
||||
DetectedEntity,
|
||||
DetectedRelationship,
|
||||
NeuralInsight,
|
||||
NeuralImportOptions
|
||||
NeuralImportOptions
|
||||
} from './cortex/neuralImport.js'
|
||||
|
||||
// Export Import Manager (comprehensive data import)
|
||||
export { ImportManager, createImportManager } from './importManager.js'
|
||||
export type { ImportOptions, ImportResult } from './importManager.js'
|
||||
|
||||
// Augmentation types are already exported later in the file
|
||||
|
||||
// Export distance functions for convenience
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue