docs: add deprecation warnings for addNoun and addVerb methods
- Add @deprecated JSDoc tags to TypeScript definitions
- Update all documentation examples to use modern add() and relate() API
- Preserve batch operations (addNouns, addVerbs) as they remain current
- Mark deprecated methods in both source and compiled definitions
Migration guide:
- addNoun(data, type, metadata) → add(data, { nounType: type, ...metadata })
- addVerb(source, target, type, metadata) → relate(source, target, type, metadata)
This commit is contained in:
parent
6e299c576c
commit
e311a149df
21 changed files with 343 additions and 331 deletions
|
|
@ -20,6 +20,7 @@ export interface BrainyInterface<T = unknown> {
|
|||
getNoun(id: string): Promise<unknown>
|
||||
|
||||
/**
|
||||
* @deprecated Use add() instead - it's smart by default now
|
||||
* Add a noun (entity with vector and metadata) to the database
|
||||
* @param data Text string or vector representation (will auto-embed strings)
|
||||
* @param nounType Required noun type (one of 31 types)
|
||||
|
|
@ -37,6 +38,7 @@ export interface BrainyInterface<T = unknown> {
|
|||
searchText(text: string, limit?: number): Promise<unknown[]>
|
||||
|
||||
/**
|
||||
* @deprecated Use relate() instead
|
||||
* Create a relationship (verb) between two entities
|
||||
* @param sourceId The ID of the source entity
|
||||
* @param targetId The ID of the target entity
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue