Skip to content

Commit 763e357

Browse files
committed
chore: wip
1 parent b808d7f commit 763e357

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

.stacks/core/types/src/model.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type {
33
VineNumber as Number,
44
VineString as String,
55
} from '@vinejs/vine'
6-
import type { Nullable, SearchIndexSettings } from './'
6+
import type { Nullable, SearchEngineSettings } from './'
77

88
export interface AuthOptions {}
99

@@ -36,10 +36,10 @@ export interface Model extends Base {
3636
}
3737
authenticatable?: boolean | AuthOptions
3838
seedable?: boolean | SeedOptions
39-
searchable?: boolean | SearchIndexSettings
39+
searchable?: boolean | SearchEngineSettings
4040
useSeed?: boolean | SeedOptions
41-
useSearch?: boolean | SearchIndexSettings
42-
useSearchEngine?: boolean | SearchIndexSettings
41+
useSearch?: boolean | SearchEngineSettings
42+
useSearchEngine?: boolean | SearchEngineSettings
4343
useTimestamps?: boolean | TimestampOptions
4444
// useSoftDeletes?: boolean | SoftDeleteOptions
4545
}

.stacks/core/types/src/search-engine.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { EnqueuedTask, Hits, Index, IndexOptions, IndexesResults, MeiliSearch, DocumentOptions as RecordOptions, Settings as SearchIndexSettings, SearchParams, SearchResponse } from 'meilisearch'
1+
import type { EnqueuedTask, Hits, Index, IndexOptions, IndexesResults, MeiliSearch, DocumentOptions as RecordOptions, Settings as SearchEngineSettings, SearchParams, SearchResponse } from 'meilisearch'
22
import type { MaybePromise } from '.'
33

44
type Search = any
@@ -91,7 +91,7 @@ export interface SearchEngineDriver {
9191
getIndex: (name: string) => MaybePromise<Index>
9292
updateIndex?: (name: string, options: IndexOptions) => MaybePromise<EnqueuedTask>
9393
deleteIndex?: (name: string) => MaybePromise<EnqueuedTask>
94-
updateIndexSettings: (name: string, settings: SearchIndexSettings) => MaybePromise<EnqueuedTask>
94+
updateIndexSettings: (name: string, settings: SearchEngineSettings) => MaybePromise<EnqueuedTask>
9595
listAllIndexes: () => MaybePromise<IndexesResults<Index[]>>
9696
listAllIndices: () => MaybePromise<IndexesResults<Index[]>> // alternatives plural spelling
9797

@@ -163,4 +163,4 @@ export interface SearchEngineStorage {
163163
currentPage: number
164164
}
165165

166-
export type { EnqueuedTask, Hits, Index, IndexOptions, IndexesResults, MeiliSearch, RecordOptions, SearchIndexSettings, SearchParams, SearchResponse }
166+
export type { EnqueuedTask, Hits, Index, IndexOptions, IndexesResults, MeiliSearch, RecordOptions, SearchEngineSettings, SearchParams, SearchResponse }

app/models/User.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import { defineModel } from '@stacksjs/utils'
44

55
export default defineModel({
66
name: 'User', // defaults to the sanitized file name
7-
table: 'users',
7+
table: 'users', // defaults to the lowercase, plural name of the model
88

9-
authenticatable: true, // boolean | AuthSettings (including TokenSettings)
10-
searchable: true, // boolean | IndexSettings,
11-
seedable: { // boolean | SeedSettings,
9+
authenticatable: true, // defaults to false, also accepts AuthSettings or TokenSettings
10+
searchable: true, // defaults to false, also accepts SearchEngineSettings
11+
seedable: { // defaults to true & count of ten
1212
count: 10,
1313
},
1414

0 commit comments

Comments
 (0)