Skip to content

Commit ac9f60b

Browse files
committed
feat: add whitelist/paramsForServer for service
- src/MakeServicePluginOptions - test/ServiceState
1 parent 04c18ab commit ac9f60b

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

src/service-module/types.ts

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,28 @@ export interface HandleEvents {
3030
export interface MakeServicePluginOptions {
3131
Model: any
3232
service: any
33-
addOnUpsert?: boolean
34-
enableEvents?: boolean
33+
3534
idField?: string
3635
tempIdField?: string
37-
nameStyle?: string
38-
namespace?: string
39-
preferUpdate?: boolean
36+
37+
addOnUpsert?: boolean
4038
autoRemove?: boolean
39+
debug?: boolean
40+
enableEvents?: boolean
41+
preferUpdate?: boolean
42+
replaceItems?: boolean
43+
skipRequestIfExists?: boolean
44+
nameStyle?: string
45+
4146
servicePath?: string
47+
namespace?: string
48+
49+
whitelist?: string[]
50+
paramsForServer?: string[]
51+
4252
instanceDefaults?: () => {}
4353
setupInstance?: (data, { models, store }) => {}
54+
handleEvents?: HandleEvents
4455
state?: {}
4556
getters?: {}
4657
mutations?: {}

test/service-module/types.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ export interface ServiceState {
2323
idField: string
2424
keyedById: {}
2525
tempsById: {}
26+
whitelist: string[]
27+
paramsForServer: string[]
2628
namespace: string
2729
nameStyle: string // Should be enum of 'short' or 'path'
2830
pagination?: {
@@ -35,7 +37,7 @@ export interface PaginationState {
3537
limit: number
3638
skip: number
3739
ip: number
38-
total: number,
40+
total: number
3941
mostRecent: any
4042
}
4143

0 commit comments

Comments
 (0)