@stacksjs/search-engine 0.68.2 → 0.69.1
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/add.d.ts +3 -0
- package/dist/flush.d.ts +3 -0
- package/dist/helpers.d.ts +0 -1
- package/dist/index-list.d.ts +3 -0
- package/dist/index.d.ts +4 -17
- package/dist/index.js +3265 -42
- package/dist/meilisearch.d.ts +58 -0
- package/dist/settings.d.ts +3 -0
- package/package.json +5 -7
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Dictionary, DocumentOptions, EnqueuedTask, Faceting, IndexOptions, PaginationSettings, Settings, Synonyms, TypoTolerance } from 'meilisearch';
|
|
2
|
+
import type { SearchEngineDriver } from '@stacksjs/types';
|
|
3
|
+
|
|
4
|
+
declare function client(): Meilisearch;
|
|
5
|
+
declare function search(index: string, params: any): Promise<SearchResponse<Record<string, any>>>;
|
|
6
|
+
declare function addDocument(indexName: string, params: any): Promise<EnqueuedTask>;
|
|
7
|
+
declare function addDocuments(indexName: string, params: any[]): Promise<EnqueuedTask>;
|
|
8
|
+
declare function getIndex(name: string): Promise<Index<Record<string, any>>>;
|
|
9
|
+
declare function createIndex(name: string, options?: IndexOptions): Promise<EnqueuedTask>;
|
|
10
|
+
declare function updateIndex(indexName: string, params: IndexOptions): Promise<EnqueuedTask>;
|
|
11
|
+
declare function updateDocument(indexName: string, params: DocumentOptions): Promise<EnqueuedTask>;
|
|
12
|
+
declare function updateDocuments(indexName: string, params: DocumentOptions[]): Promise<EnqueuedTask>;
|
|
13
|
+
declare function deleteDocument(indexName: string, id: number): Promise<EnqueuedTask>;
|
|
14
|
+
declare function deleteDocuments(indexName: string, filters: string | string[]): Promise<EnqueuedTask>;
|
|
15
|
+
declare function getDocument(indexName: string, id: number, fields: any): Promise<EnqueuedTask>;
|
|
16
|
+
declare function deleteIndex(indexName: string): Promise<EnqueuedTask>;
|
|
17
|
+
declare function listAllIndexes(): Promise<IndexesResults<Index[]>>;
|
|
18
|
+
declare function getFilterableAttributes(index: string): Promise<string[]>;
|
|
19
|
+
declare function updateFilterableAttributes(index: string, filterableAttributes: string[] | null): Promise<EnqueuedTask>;
|
|
20
|
+
declare function resetFilterableAttributes(index: string): Promise<EnqueuedTask>;
|
|
21
|
+
declare function updateSearchableAttributes(index: string, searchableAttributes: string[] | null): Promise<EnqueuedTask>;
|
|
22
|
+
declare function resetSearchableAttributes(index: string): Promise<EnqueuedTask>;
|
|
23
|
+
declare function getSearchableAttributes(index: string): Promise<string[]>;
|
|
24
|
+
declare function updateSortableAttributes(index: string, sortableAttributes: string[] | null): Promise<EnqueuedTask>;
|
|
25
|
+
declare function resetSortableAttributes(index: string): Promise<EnqueuedTask>;
|
|
26
|
+
declare function getSortableAttributes(index: string): Promise<string[]>;
|
|
27
|
+
declare function updateDisplayedAttributes(index: string, displayedAttributes: string[] | null): Promise<EnqueuedTask>;
|
|
28
|
+
declare function getDisplayedAttributes(index: string): Promise<string[]>;
|
|
29
|
+
declare function resetDisplayedAttributes(index: string): Promise<EnqueuedTask>;
|
|
30
|
+
declare function getSettings(index: string): Promise<Settings>;
|
|
31
|
+
declare function updateSettings(index: string, settings: Settings): Promise<EnqueuedTask>;
|
|
32
|
+
declare function resetSettings(index: string): Promise<EnqueuedTask>;
|
|
33
|
+
declare function getPagination(index: string): Promise<PaginationSettings>;
|
|
34
|
+
declare function updatePagination(index: string, pagination: PaginationSettings): Promise<EnqueuedTask>;
|
|
35
|
+
declare function resetPagination(index: string): Promise<EnqueuedTask>;
|
|
36
|
+
declare function getSynonyms(index: string): Promise<object>;
|
|
37
|
+
declare function updateSynonyms(index: string, synonyms: Synonyms): Promise<EnqueuedTask>;
|
|
38
|
+
declare function resetSynonyms(index: string): Promise<EnqueuedTask>;
|
|
39
|
+
declare function getRankingRules(index: string): Promise<string[]>;
|
|
40
|
+
declare function updateRankingRules(index: string, rankingRules: string[] | null): Promise<EnqueuedTask>;
|
|
41
|
+
declare function resetRankingRules(index: string): Promise<EnqueuedTask>;
|
|
42
|
+
declare function getDistinctAttribute(index: string): Promise<string | null>;
|
|
43
|
+
declare function updateDistinctAttribute(index: string, distinctAttribute: string | null): Promise<EnqueuedTask>;
|
|
44
|
+
declare function resetDistinctAttribute(index: string): Promise<EnqueuedTask>;
|
|
45
|
+
declare function getFaceting(index: string): Promise<Faceting>;
|
|
46
|
+
declare function updateFaceting(index: string, faceting: Faceting): Promise<EnqueuedTask>;
|
|
47
|
+
declare function resetFaceting(index: string): Promise<EnqueuedTask>;
|
|
48
|
+
declare function getTypoTolerance(index: string): Promise<TypoTolerance>;
|
|
49
|
+
declare function updateTypoTolerance(index: string, typoTolerance: TypoTolerance | null): Promise<EnqueuedTask>;
|
|
50
|
+
declare function resetTypoTolerance(index: string): Promise<EnqueuedTask>;
|
|
51
|
+
declare function getDictionary(index: string): Promise<Dictionary>;
|
|
52
|
+
declare function updateDictionary(index: string, dictionary: Dictionary | null): Promise<EnqueuedTask>;
|
|
53
|
+
declare function resetDictionary(index: string): Promise<EnqueuedTask>;
|
|
54
|
+
declare function convertToFilter(jsonData: any): string[];
|
|
55
|
+
declare function convertToMeilisearchSorting(jsonData: any): string[];
|
|
56
|
+
declare const meilisearch: SearchEngineDriver;
|
|
57
|
+
|
|
58
|
+
export default meilisearch;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/search-engine",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.69.1",
|
|
5
5
|
"description": "The Stacks search engine integrations.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"contributors": ["Chris Breuer <chris@stacksjs.org>"],
|
|
@@ -45,12 +45,10 @@
|
|
|
45
45
|
"typecheck": "bun tsc --noEmit",
|
|
46
46
|
"prepublishOnly": "bun run build"
|
|
47
47
|
},
|
|
48
|
-
"dependencies": {
|
|
49
|
-
"@opensearch-project/opensearch": "^2.12.0",
|
|
50
|
-
"meilisearch": "^0.44.1"
|
|
51
|
-
},
|
|
52
48
|
"devDependencies": {
|
|
53
|
-
"@
|
|
54
|
-
"@stacksjs/
|
|
49
|
+
"@opensearch-project/opensearch": "^3.3.0",
|
|
50
|
+
"@stacksjs/config": "0.68.2",
|
|
51
|
+
"@stacksjs/development": "0.68.2",
|
|
52
|
+
"meilisearch": "^0.49.0"
|
|
55
53
|
}
|
|
56
54
|
}
|