Initial commit: Brainy - Multi-Dimensional AI Database
Open source vector database with HNSW indexing, graph relationships, and metadata facets. Features CLI with professional augmentation registry integration for discovering extensions and capabilities.
This commit is contained in:
commit
f8c45f2d8d
448 changed files with 103294 additions and 0 deletions
111
dist/types/paginationTypes.d.ts
vendored
Normal file
111
dist/types/paginationTypes.d.ts
vendored
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
/**
|
||||
* Types for pagination and filtering in data retrieval operations
|
||||
*/
|
||||
/**
|
||||
* Pagination options for data retrieval
|
||||
*/
|
||||
export interface PaginationOptions {
|
||||
/**
|
||||
* The number of items to skip (for offset-based pagination)
|
||||
*/
|
||||
offset?: number;
|
||||
/**
|
||||
* The maximum number of items to return
|
||||
*/
|
||||
limit?: number;
|
||||
/**
|
||||
* Token for cursor-based pagination (for continuing from a previous page)
|
||||
*/
|
||||
cursor?: string;
|
||||
}
|
||||
/**
|
||||
* Filter options for noun retrieval
|
||||
*/
|
||||
export interface NounFilterOptions {
|
||||
/**
|
||||
* Filter by noun type
|
||||
*/
|
||||
nounType?: string | string[];
|
||||
/**
|
||||
* Filter by service
|
||||
*/
|
||||
service?: string | string[];
|
||||
/**
|
||||
* Filter by metadata fields (key-value pairs)
|
||||
*/
|
||||
metadata?: Record<string, any>;
|
||||
/**
|
||||
* Filter by creation date range
|
||||
*/
|
||||
createdAt?: {
|
||||
from?: Date | number;
|
||||
to?: Date | number;
|
||||
};
|
||||
/**
|
||||
* Filter by update date range
|
||||
*/
|
||||
updatedAt?: {
|
||||
from?: Date | number;
|
||||
to?: Date | number;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Filter options for verb retrieval
|
||||
*/
|
||||
export interface VerbFilterOptions {
|
||||
/**
|
||||
* Filter by verb type
|
||||
*/
|
||||
verbType?: string | string[];
|
||||
/**
|
||||
* Filter by source noun ID
|
||||
*/
|
||||
sourceId?: string | string[];
|
||||
/**
|
||||
* Filter by target noun ID
|
||||
*/
|
||||
targetId?: string | string[];
|
||||
/**
|
||||
* Filter by service
|
||||
*/
|
||||
service?: string | string[];
|
||||
/**
|
||||
* Filter by metadata fields (key-value pairs)
|
||||
*/
|
||||
metadata?: Record<string, any>;
|
||||
/**
|
||||
* Filter by creation date range
|
||||
*/
|
||||
createdAt?: {
|
||||
from?: Date | number;
|
||||
to?: Date | number;
|
||||
};
|
||||
/**
|
||||
* Filter by update date range
|
||||
*/
|
||||
updatedAt?: {
|
||||
from?: Date | number;
|
||||
to?: Date | number;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Result of a paginated query
|
||||
*/
|
||||
export interface PaginatedResult<T> {
|
||||
/**
|
||||
* The items for the current page
|
||||
*/
|
||||
items: T[];
|
||||
/**
|
||||
* The total number of items matching the query (may be estimated)
|
||||
*/
|
||||
totalCount?: number;
|
||||
/**
|
||||
* Whether there are more items available
|
||||
*/
|
||||
hasMore: boolean;
|
||||
/**
|
||||
* Cursor for fetching the next page (for cursor-based pagination)
|
||||
*/
|
||||
nextCursor?: string;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue