Reorganize repo structure and standards references
This commit is contained in:
1 parent
3cb93a81be
commit
be2054274d
5885 files changed
+2588
-195
No files matched your search
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
* Public entry point for `@toolctrl/search`.
|
||||
*
|
||||
* The package exposes a typed wrapper around Meilisearch with two
|
||||
* non-negotiable invariants:
|
||||
*
|
||||
* 1. Every search call accepts (and routes through) an explicit
|
||||
* `tenantId`. The wrapper injects `tenantId = "<id>"` as a filter so
|
||||
* domain code cannot accidentally read across tenants.
|
||||
* 2. The raw Meilisearch SDK is never re-exported. Callers receive a
|
||||
* narrow `SearchClient` / `IndexHandle` instead. This is enforced by
|
||||
* keeping the SDK module-private and by the code-review checklist
|
||||
* documented in docs/improvement-plan/04-search-rag/meilisearch.md.
|
||||
*/
|
||||
|
||||
export { createSearchClient } from "./client.js";
|
||||
export type {
|
||||
CreateSearchClientOptions,
|
||||
IndexHandle,
|
||||
IndexSearchOptions,
|
||||
IndexSettingsInput,
|
||||
MeiliFactory,
|
||||
SearchClient,
|
||||
SearchDocument,
|
||||
SearchHit,
|
||||
SearchHits,
|
||||
} from "./client.js";
|
||||
|
||||
export { createSearchIndex, IndexSchemaValidationError, validateIndexSchema } from "./index-helper.js";
|
||||
export type { CreateSearchIndexInput } from "./index-helper.js";
|
||||
|
||||
export { bulkIndex, deleteFromIndex, health, searchInIndex, searchWithFallback, TenantScopeError } from "./query.js";
|
||||
export type { BulkIndexInput, DeleteFromIndexInput, SearchFallback, SearchInIndexInput, SearchWithFallbackInput } from "./query.js";
|
||||
|
||||
export {
|
||||
ALL_SEARCH_INDEXES,
|
||||
BULK_REINDEX_SUPPORTED_INDEXES,
|
||||
BULK_REINDEX_SUPPORTED_INDEX_NAMES,
|
||||
crmContactsIndex,
|
||||
entitiesIndex,
|
||||
getSearchIndexSchema,
|
||||
kbArticlesIndex,
|
||||
rowsIndex,
|
||||
usersIndex,
|
||||
} from "./schemas/index.js";
|
||||
export type { SearchIndexSchema } from "./schemas/index.js";
|
||||
|
||||
export {
|
||||
getIndexedEntitiesForPermissions,
|
||||
getIndexedEntity,
|
||||
indexedEntities,
|
||||
listIndexedEntities,
|
||||
validateIndexedEntities,
|
||||
} from "./indexed-entities.js";
|
||||
export type { IndexedEntity, IndexedEntityConfig, IndexedEntityKey, IndexedEntityRegistry } from "./indexed-entities.js";
|
||||
|
||||
export { sanitizeDocument } from "./sanitize.js";
|
||||
|
||||
export { publishSearchBulkReindexEvent, publishSearchDeleteEvent, publishSearchUpsertEvent, searchEventType } from "./outbox-publisher.js";
|
||||
export type {
|
||||
PublishSearchBulkReindexEventInput,
|
||||
PublishSearchDeleteEventInput,
|
||||
PublishSearchUpsertEventInput,
|
||||
SearchOutboxPublisher,
|
||||
SearchOutboxVerb,
|
||||
} from "./outbox-publisher.js";
|
||||
Reference in new issue
Block a user