@nexo-labs/payload-typesense 1.14.4 → 1.14.6
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/index.d.mts +23 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +79 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1963,6 +1963,27 @@ declare class TypesenseAdapter implements IndexerAdapter<TypesenseCollectionSche
|
|
|
1963
1963
|
* @typeParam TDoc - The document type to return in results
|
|
1964
1964
|
*/
|
|
1965
1965
|
vectorSearch<TDoc = Record<string, unknown>>(collectionName: string, vector: number[], options?: VectorSearchOptions): Promise<AdapterSearchResult<TDoc>[]>;
|
|
1966
|
+
/**
|
|
1967
|
+
* Fetch documents by filter
|
|
1968
|
+
*/
|
|
1969
|
+
searchDocumentsByFilter<TDoc = Record<string, unknown>>(collectionName: string, filter: Record<string, unknown>, options?: {
|
|
1970
|
+
includeFields?: string[];
|
|
1971
|
+
limit?: number;
|
|
1972
|
+
}): Promise<TDoc[]>;
|
|
1973
|
+
/**
|
|
1974
|
+
* Partial update of a single document by ID.
|
|
1975
|
+
*/
|
|
1976
|
+
updateDocument(collectionName: string, documentId: string, partialDoc: Record<string, unknown>): Promise<void>;
|
|
1977
|
+
/**
|
|
1978
|
+
* Partial update on documents matching a filter.
|
|
1979
|
+
* Collects all matching IDs with pagination, then batch-updates.
|
|
1980
|
+
* Returns the number of updated documents.
|
|
1981
|
+
*/
|
|
1982
|
+
updateDocumentsByFilter(collectionName: string, filter: Record<string, unknown>, partialDoc: Record<string, unknown>): Promise<number>;
|
|
1983
|
+
/**
|
|
1984
|
+
* Collect all document IDs matching a filter, paginating through results.
|
|
1985
|
+
*/
|
|
1986
|
+
private collectIdsByFilter;
|
|
1966
1987
|
/**
|
|
1967
1988
|
* Convert generic schema to Typesense-specific schema
|
|
1968
1989
|
*/
|
|
@@ -2077,6 +2098,7 @@ interface TypesenseDocument {
|
|
|
2077
2098
|
createdAt: number;
|
|
2078
2099
|
updatedAt: number;
|
|
2079
2100
|
embedding?: number[];
|
|
2101
|
+
content_hash?: string;
|
|
2080
2102
|
[key: string]: unknown;
|
|
2081
2103
|
}
|
|
2082
2104
|
interface TypesenseChunkDocument {
|
|
@@ -2091,6 +2113,7 @@ interface TypesenseChunkDocument {
|
|
|
2091
2113
|
chunk_text: string;
|
|
2092
2114
|
is_chunk: boolean;
|
|
2093
2115
|
embedding: number[];
|
|
2116
|
+
content_hash?: string;
|
|
2094
2117
|
}
|
|
2095
2118
|
interface SearchResult<T = TypesenseDocument> {
|
|
2096
2119
|
collection?: string;
|