@@ -7,17 +7,17 @@ import type {
7
7
} from '@data-client/normalizr' ;
8
8
9
9
import type {
10
- SET_TYPE ,
11
- RESET_TYPE ,
12
- FETCH_TYPE ,
13
- SUBSCRIBE_TYPE ,
14
- UNSUBSCRIBE_TYPE ,
15
- INVALIDATE_TYPE ,
16
- GC_TYPE ,
17
- OPTIMISTIC_TYPE ,
18
- INVALIDATEALL_TYPE ,
19
- EXPIREALL_TYPE ,
20
- SET_RESPONSE_TYPE ,
10
+ SET ,
11
+ RESET ,
12
+ FETCH ,
13
+ SUBSCRIBE ,
14
+ UNSUBSCRIBE ,
15
+ INVALIDATE ,
16
+ GC ,
17
+ OPTIMISTIC ,
18
+ INVALIDATEALL ,
19
+ EXPIREALL ,
20
+ SET_RESPONSE ,
21
21
} from './actionTypes.js' ;
22
22
import type { EndpointUpdateFunction } from './controller/types.js' ;
23
23
@@ -37,7 +37,7 @@ export interface ActionMeta {
37
37
38
38
/** Action for Controller.set() */
39
39
export interface SetAction < S extends Queryable = any > {
40
- type : typeof SET_TYPE ;
40
+ type : typeof SET ;
41
41
schema : S ;
42
42
args : readonly any [ ] ;
43
43
meta : ActionMeta ;
@@ -48,7 +48,7 @@ export interface SetAction<S extends Queryable = any> {
48
48
export interface SetResponseActionBase <
49
49
E extends EndpointAndUpdate < E > = EndpointDefault ,
50
50
> {
51
- type : typeof SET_RESPONSE_TYPE ;
51
+ type : typeof SET_RESPONSE ;
52
52
endpoint : E ;
53
53
args : readonly any [ ] ;
54
54
key : string ;
@@ -81,7 +81,7 @@ export interface FetchMeta {
81
81
82
82
/** Action for Controller.fetch() */
83
83
export interface FetchAction < E extends EndpointAndUpdate < E > = EndpointDefault > {
84
- type : typeof FETCH_TYPE ;
84
+ type : typeof FETCH ;
85
85
endpoint : E ;
86
86
args : readonly [ ...Parameters < E > ] ;
87
87
key : string ;
@@ -93,7 +93,7 @@ export interface FetchAction<E extends EndpointAndUpdate<E> = EndpointDefault> {
93
93
export interface OptimisticAction <
94
94
E extends EndpointAndUpdate < E > = EndpointDefault ,
95
95
> {
96
- type : typeof OPTIMISTIC_TYPE ;
96
+ type : typeof OPTIMISTIC ;
97
97
endpoint : E ;
98
98
args : readonly any [ ] ;
99
99
key : string ;
@@ -106,7 +106,7 @@ export interface OptimisticAction<
106
106
export interface SubscribeAction <
107
107
E extends EndpointAndUpdate < E > = EndpointDefault ,
108
108
> {
109
- type : typeof SUBSCRIBE_TYPE ;
109
+ type : typeof SUBSCRIBE ;
110
110
endpoint : E ;
111
111
args : readonly any [ ] ;
112
112
key : string ;
@@ -116,38 +116,38 @@ export interface SubscribeAction<
116
116
export interface UnsubscribeAction <
117
117
E extends EndpointAndUpdate < E > = EndpointDefault ,
118
118
> {
119
- type : typeof UNSUBSCRIBE_TYPE ;
119
+ type : typeof UNSUBSCRIBE ;
120
120
endpoint : E ;
121
121
args : readonly any [ ] ;
122
122
key : string ;
123
123
}
124
124
125
125
/* EXPIRY */
126
126
export interface ExpireAllAction {
127
- type : typeof EXPIREALL_TYPE ;
127
+ type : typeof EXPIREALL ;
128
128
testKey : ( key : string ) => boolean ;
129
129
}
130
130
131
131
/* INVALIDATE */
132
132
export interface InvalidateAllAction {
133
- type : typeof INVALIDATEALL_TYPE ;
133
+ type : typeof INVALIDATEALL ;
134
134
testKey : ( key : string ) => boolean ;
135
135
}
136
136
137
137
export interface InvalidateAction {
138
- type : typeof INVALIDATE_TYPE ;
138
+ type : typeof INVALIDATE ;
139
139
key : string ;
140
140
}
141
141
142
142
/* RESET */
143
143
export interface ResetAction {
144
- type : typeof RESET_TYPE ;
144
+ type : typeof RESET ;
145
145
date : number ;
146
146
}
147
147
148
148
/* GC */
149
149
export interface GCAction {
150
- type : typeof GC_TYPE ;
150
+ type : typeof GC ;
151
151
entities : [ string , string ] [ ] ;
152
152
endpoints : string [ ] ;
153
153
}
0 commit comments