@stacksjs/search-engine 0.58.72 → 0.59.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.
@@ -0,0 +1,95 @@
1
+ /**
2
+ * This file is used to define the types/interfaces used in the project.
3
+ */
4
+ import type { Hits, SearchResponse } from 'meilisearch';
5
+ export interface SearchEngineStore {
6
+ /**
7
+ * The search engine index.
8
+ */
9
+ index: string;
10
+ /**
11
+ * The search engine host.
12
+ * @default 'http://127.0.0.1:7700'
13
+ */
14
+ source?: string;
15
+ /**
16
+ * The search engine password/API key.
17
+ */
18
+ password?: string;
19
+ /**
20
+ * The search query.
21
+ * @default 20
22
+ * @type {string}
23
+ * @default: ''
24
+ */
25
+ query?: string;
26
+ /**
27
+ * The number of results to return.
28
+ * @default 20
29
+ * @type {number}
30
+ */
31
+ perPage?: number;
32
+ /**
33
+ * The current page number
34
+ * @default 1
35
+ * @type {number}
36
+ */
37
+ currentPage?: number;
38
+ /**
39
+ * The results object returned from the search engine.
40
+ */
41
+ results?: SearchResponse<Record<string, any>>;
42
+ /**
43
+ * The hits object returned from the search engine.
44
+ */
45
+ hits?: Hits<Record<string, any>>;
46
+ /**
47
+ * The search Filter Name
48
+ */
49
+ filterName?: string;
50
+ /**
51
+ * The search filters
52
+ */
53
+ filters?: object;
54
+ /**
55
+ * The next page value
56
+ */
57
+ goToNextPage?: number;
58
+ /**
59
+ * Set to go to a specific page
60
+ */
61
+ goToPage?: number;
62
+ /**
63
+ * Set to go to the previous page
64
+ */
65
+ goToPrevPage?: number;
66
+ /**
67
+ * The last page number value
68
+ */
69
+ lastPageNumber?: number;
70
+ /**
71
+ * The searched term to use for the search
72
+ */
73
+ search?: string;
74
+ /**
75
+ * The search params filters to use for the search
76
+ */
77
+ searchFilters?: object;
78
+ /**
79
+ * The search params to use for the search
80
+ */
81
+ searchParams?: object;
82
+ /**
83
+ * Total hits value to use for the search
84
+ */
85
+ setTotalHits?: number;
86
+ /**
87
+ * The sort value to use for the search
88
+ */
89
+ sort?: string;
90
+ /**
91
+ * The sorts value to use for the search
92
+ */
93
+ sorts?: object;
94
+ }
95
+ export declare function determineState(): SearchEngineStore;
@@ -0,0 +1,21 @@
1
+ export declare const totalPages: any;
2
+ export declare const currentPage: any;
3
+ export declare const filterName: any;
4
+ export declare const filters: any;
5
+ export declare const goToNextPage: any;
6
+ export declare const goToPage: any;
7
+ export declare const goToPrevPage: any;
8
+ export declare const hits: any;
9
+ export declare const index: any;
10
+ export declare const lastPageNumber: any;
11
+ export declare const perPage: any;
12
+ export declare const query: any;
13
+ export declare const results: any;
14
+ export declare const searchFilters: any;
15
+ export declare const searchParams: any;
16
+ export declare const setTotalHits: any;
17
+ export declare const sort: any;
18
+ export declare const sorts: any;
19
+ export declare function client(): string;
20
+ export declare function useSearchEngine(): string;
21
+ export declare function calculatePagination(): void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/search-engine",
3
3
  "type": "module",
4
- "version": "0.58.72",
4
+ "version": "0.59.1",
5
5
  "description": "The Stacks search engine integrations.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",