@clicktap/state 0.11.6 → 0.12.2
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/auth/AuthProvider.d.ts +266 -230
- package/auth/auth.d.ts +127 -109
- package/index.js +24 -24
- package/index.mjs +1301 -1257
- package/package.json +8 -5
- package/toast/ToastProvider.d.ts +142 -42
- package/toast/timer.d.ts +16 -20
- package/toast/toast.d.ts +71 -21
package/auth/AuthProvider.d.ts
CHANGED
|
@@ -1,145 +1,163 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { Actor, InspectionEvent, Observer
|
|
3
|
-
import {
|
|
2
|
+
import { Actor, InspectionEvent, Observer } from 'xstate';
|
|
3
|
+
import { authMachine } from './auth';
|
|
4
4
|
export interface AuthContextType {
|
|
5
5
|
authActor?: Actor<typeof authMachine>;
|
|
6
6
|
isLoggedIn: boolean;
|
|
7
7
|
}
|
|
8
|
-
export declare const AuthContext: import("react").Context<Actor<StateMachine<AuthMachineContext, import("./auth").RefreshTokenEvent | import("./auth").LoginEvent | import("./auth").LogoutEvent | import("./auth").ClearErrorsEvent | import("xstate").DoneActorEvent<import("./auth").AuthenticateSuccessEvent> | import("xstate").DoneActorEvent<import("./auth").RefreshTokenSuccessEvent>, {
|
|
8
|
+
export declare const AuthContext: import("react").Context<Actor<import("xstate").StateMachine<import("./auth").AuthMachineContext, import("./auth").RefreshTokenEvent | import("./auth").LoginEvent | import("./auth").LogoutEvent | import("./auth").ClearErrorsEvent | import("xstate").DoneActorEvent<import("./auth").AuthenticateSuccessEvent> | import("xstate").DoneActorEvent<import("./auth").RefreshTokenSuccessEvent>, {
|
|
9
9
|
[x: string]: import("xstate").ActorRef<import("xstate").PromiseSnapshot<{
|
|
10
10
|
type: string;
|
|
11
11
|
accessToken: string;
|
|
12
12
|
}, {
|
|
13
|
-
context: AuthMachineContext;
|
|
13
|
+
context: import("./auth").AuthMachineContext;
|
|
14
14
|
}>, {
|
|
15
15
|
[k: string]: unknown;
|
|
16
16
|
type: string;
|
|
17
|
-
}> | import("xstate").ActorRef<import("xstate").PromiseSnapshot<{
|
|
17
|
+
}, import("xstate").EventObject> | import("xstate").ActorRef<import("xstate").PromiseSnapshot<{
|
|
18
18
|
type: string;
|
|
19
19
|
accessToken: string;
|
|
20
20
|
}, {
|
|
21
|
-
context: AuthMachineContext;
|
|
21
|
+
context: import("./auth").AuthMachineContext;
|
|
22
22
|
username: string;
|
|
23
23
|
password: string;
|
|
24
24
|
}>, {
|
|
25
25
|
[k: string]: unknown;
|
|
26
26
|
type: string;
|
|
27
|
-
}> | import("xstate").ActorRef<import("xstate").PromiseSnapshot<{
|
|
27
|
+
}, import("xstate").EventObject> | import("xstate").ActorRef<import("xstate").PromiseSnapshot<{
|
|
28
28
|
type: string;
|
|
29
29
|
}, {
|
|
30
|
-
context: AuthMachineContext;
|
|
30
|
+
context: import("./auth").AuthMachineContext;
|
|
31
31
|
}>, {
|
|
32
32
|
[k: string]: unknown;
|
|
33
33
|
type: string;
|
|
34
|
-
}> | undefined;
|
|
35
|
-
}, {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
34
|
+
}, import("xstate").EventObject> | undefined;
|
|
35
|
+
}, import("xstate").Values<{
|
|
36
|
+
refreshAccessToken: {
|
|
37
|
+
src: "refreshAccessToken";
|
|
38
|
+
logic: import("xstate").PromiseActorLogic<{
|
|
39
|
+
type: string;
|
|
40
|
+
accessToken: string;
|
|
41
|
+
}, {
|
|
42
|
+
context: import("./auth").AuthMachineContext;
|
|
43
|
+
}>;
|
|
44
|
+
id: string | undefined;
|
|
45
|
+
};
|
|
46
|
+
authenticate: {
|
|
47
|
+
src: "authenticate";
|
|
48
|
+
logic: import("xstate").PromiseActorLogic<{
|
|
49
|
+
type: string;
|
|
50
|
+
accessToken: string;
|
|
51
|
+
}, {
|
|
52
|
+
context: import("./auth").AuthMachineContext;
|
|
53
|
+
username: string;
|
|
54
|
+
password: string;
|
|
55
|
+
}>;
|
|
56
|
+
id: string | undefined;
|
|
57
|
+
};
|
|
58
|
+
unauthenticate: {
|
|
59
|
+
src: "unauthenticate";
|
|
60
|
+
logic: import("xstate").PromiseActorLogic<{
|
|
61
|
+
type: string;
|
|
62
|
+
}, {
|
|
63
|
+
context: import("./auth").AuthMachineContext;
|
|
64
|
+
}>;
|
|
65
|
+
id: string | undefined;
|
|
66
|
+
};
|
|
67
|
+
}>, import("xstate").Values<{
|
|
68
|
+
setUserContext: {
|
|
69
|
+
type: "setUserContext";
|
|
70
|
+
params: import("xstate").NonReducibleUnknown;
|
|
71
|
+
};
|
|
72
|
+
unsetUserContext: {
|
|
73
|
+
type: "unsetUserContext";
|
|
74
|
+
params: import("xstate").NonReducibleUnknown;
|
|
75
|
+
};
|
|
76
|
+
setAccessToken: {
|
|
77
|
+
type: "setAccessToken";
|
|
78
|
+
params: import("xstate").NonReducibleUnknown;
|
|
79
|
+
};
|
|
80
|
+
unsetRefreshToken: {
|
|
81
|
+
type: "unsetRefreshToken";
|
|
82
|
+
params: import("xstate").NonReducibleUnknown;
|
|
83
|
+
};
|
|
84
|
+
setIgnoreRefreshToken: {
|
|
85
|
+
type: "setIgnoreRefreshToken";
|
|
86
|
+
params: import("xstate").NonReducibleUnknown;
|
|
87
|
+
};
|
|
88
|
+
addError: {
|
|
89
|
+
type: "addError";
|
|
90
|
+
params: import("xstate").NonReducibleUnknown;
|
|
91
|
+
};
|
|
92
|
+
clearErrors: {
|
|
93
|
+
type: "clearErrors";
|
|
94
|
+
params: import("xstate").NonReducibleUnknown;
|
|
95
|
+
};
|
|
96
|
+
}>, never, never, "refreshing" | "authenticating" | "loggedIn" | "loggedOut" | "unauthenticating", string, {
|
|
97
|
+
initialContext: Partial<import("./auth").AuthMachineContext>;
|
|
89
98
|
initialState?: string | undefined;
|
|
90
|
-
}, import("xstate").NonReducibleUnknown, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, import("./auth").RefreshTokenEvent | import("./auth").LoginEvent | import("./auth").LogoutEvent | import("./auth").ClearErrorsEvent | import("xstate").DoneActorEvent<import("./auth").AuthenticateSuccessEvent> | import("xstate").DoneActorEvent<import("./auth").RefreshTokenSuccessEvent>, {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
99
|
+
}, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, import("./auth").RefreshTokenEvent | import("./auth").LoginEvent | import("./auth").LogoutEvent | import("./auth").ClearErrorsEvent | import("xstate").DoneActorEvent<import("./auth").AuthenticateSuccessEvent> | import("xstate").DoneActorEvent<import("./auth").RefreshTokenSuccessEvent>, import("xstate").Values<{
|
|
100
|
+
refreshAccessToken: {
|
|
101
|
+
src: "refreshAccessToken";
|
|
102
|
+
logic: import("xstate").PromiseActorLogic<{
|
|
103
|
+
type: string;
|
|
104
|
+
accessToken: string;
|
|
105
|
+
}, {
|
|
106
|
+
context: import("./auth").AuthMachineContext;
|
|
107
|
+
}>;
|
|
108
|
+
id: string | undefined;
|
|
109
|
+
};
|
|
110
|
+
authenticate: {
|
|
111
|
+
src: "authenticate";
|
|
112
|
+
logic: import("xstate").PromiseActorLogic<{
|
|
113
|
+
type: string;
|
|
114
|
+
accessToken: string;
|
|
115
|
+
}, {
|
|
116
|
+
context: import("./auth").AuthMachineContext;
|
|
117
|
+
username: string;
|
|
118
|
+
password: string;
|
|
119
|
+
}>;
|
|
120
|
+
id: string | undefined;
|
|
121
|
+
};
|
|
122
|
+
unauthenticate: {
|
|
123
|
+
src: "unauthenticate";
|
|
124
|
+
logic: import("xstate").PromiseActorLogic<{
|
|
125
|
+
type: string;
|
|
126
|
+
}, {
|
|
127
|
+
context: import("./auth").AuthMachineContext;
|
|
128
|
+
}>;
|
|
129
|
+
id: string | undefined;
|
|
130
|
+
};
|
|
131
|
+
}>, import("xstate").Values<{
|
|
132
|
+
setUserContext: {
|
|
133
|
+
type: "setUserContext";
|
|
134
|
+
params: import("xstate").NonReducibleUnknown;
|
|
135
|
+
};
|
|
136
|
+
unsetUserContext: {
|
|
137
|
+
type: "unsetUserContext";
|
|
138
|
+
params: import("xstate").NonReducibleUnknown;
|
|
139
|
+
};
|
|
140
|
+
setAccessToken: {
|
|
141
|
+
type: "setAccessToken";
|
|
142
|
+
params: import("xstate").NonReducibleUnknown;
|
|
143
|
+
};
|
|
144
|
+
unsetRefreshToken: {
|
|
145
|
+
type: "unsetRefreshToken";
|
|
146
|
+
params: import("xstate").NonReducibleUnknown;
|
|
147
|
+
};
|
|
148
|
+
setIgnoreRefreshToken: {
|
|
149
|
+
type: "setIgnoreRefreshToken";
|
|
150
|
+
params: import("xstate").NonReducibleUnknown;
|
|
151
|
+
};
|
|
152
|
+
addError: {
|
|
153
|
+
type: "addError";
|
|
154
|
+
params: import("xstate").NonReducibleUnknown;
|
|
155
|
+
};
|
|
156
|
+
clearErrors: {
|
|
157
|
+
type: "clearErrors";
|
|
158
|
+
params: import("xstate").NonReducibleUnknown;
|
|
159
|
+
};
|
|
160
|
+
}>, never, never, string, import("xstate").EventObject>>> | undefined>;
|
|
143
161
|
export declare const useAuth: () => AuthContextType;
|
|
144
162
|
type AuthOptions = {
|
|
145
163
|
inspect: Observer<InspectionEvent> | undefined;
|
|
@@ -156,141 +174,159 @@ type AuthOptions = {
|
|
|
156
174
|
* @todo should probably update signature to pass Partial<AuthContext> and
|
|
157
175
|
* Options, endpoints should probably be moved into context
|
|
158
176
|
*/
|
|
159
|
-
export declare const getAuth: (refreshToken?: string, options?: AuthOptions) => Promise<Actor<StateMachine<AuthMachineContext, import("./auth").RefreshTokenEvent | import("./auth").LoginEvent | import("./auth").LogoutEvent | import("./auth").ClearErrorsEvent | import("xstate").DoneActorEvent<import("./auth").AuthenticateSuccessEvent> | import("xstate").DoneActorEvent<import("./auth").RefreshTokenSuccessEvent>, {
|
|
177
|
+
export declare const getAuth: (refreshToken?: string, options?: AuthOptions) => Promise<Actor<import("xstate").StateMachine<import("./auth").AuthMachineContext, import("./auth").RefreshTokenEvent | import("./auth").LoginEvent | import("./auth").LogoutEvent | import("./auth").ClearErrorsEvent | import("xstate").DoneActorEvent<import("./auth").AuthenticateSuccessEvent> | import("xstate").DoneActorEvent<import("./auth").RefreshTokenSuccessEvent>, {
|
|
160
178
|
[x: string]: import("xstate").ActorRef<import("xstate").PromiseSnapshot<{
|
|
161
179
|
type: string;
|
|
162
180
|
accessToken: string;
|
|
163
181
|
}, {
|
|
164
|
-
context: AuthMachineContext;
|
|
182
|
+
context: import("./auth").AuthMachineContext;
|
|
165
183
|
}>, {
|
|
166
184
|
[k: string]: unknown;
|
|
167
185
|
type: string;
|
|
168
|
-
}> | import("xstate").ActorRef<import("xstate").PromiseSnapshot<{
|
|
186
|
+
}, import("xstate").EventObject> | import("xstate").ActorRef<import("xstate").PromiseSnapshot<{
|
|
169
187
|
type: string;
|
|
170
188
|
accessToken: string;
|
|
171
189
|
}, {
|
|
172
|
-
context: AuthMachineContext;
|
|
190
|
+
context: import("./auth").AuthMachineContext;
|
|
173
191
|
username: string;
|
|
174
192
|
password: string;
|
|
175
193
|
}>, {
|
|
176
194
|
[k: string]: unknown;
|
|
177
195
|
type: string;
|
|
178
|
-
}> | import("xstate").ActorRef<import("xstate").PromiseSnapshot<{
|
|
196
|
+
}, import("xstate").EventObject> | import("xstate").ActorRef<import("xstate").PromiseSnapshot<{
|
|
179
197
|
type: string;
|
|
180
198
|
}, {
|
|
181
|
-
context: AuthMachineContext;
|
|
199
|
+
context: import("./auth").AuthMachineContext;
|
|
182
200
|
}>, {
|
|
183
201
|
[k: string]: unknown;
|
|
184
202
|
type: string;
|
|
185
|
-
}> | undefined;
|
|
186
|
-
}, {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}
|
|
239
|
-
|
|
203
|
+
}, import("xstate").EventObject> | undefined;
|
|
204
|
+
}, import("xstate").Values<{
|
|
205
|
+
refreshAccessToken: {
|
|
206
|
+
src: "refreshAccessToken";
|
|
207
|
+
logic: import("xstate").PromiseActorLogic<{
|
|
208
|
+
type: string;
|
|
209
|
+
accessToken: string;
|
|
210
|
+
}, {
|
|
211
|
+
context: import("./auth").AuthMachineContext;
|
|
212
|
+
}>;
|
|
213
|
+
id: string | undefined;
|
|
214
|
+
};
|
|
215
|
+
authenticate: {
|
|
216
|
+
src: "authenticate";
|
|
217
|
+
logic: import("xstate").PromiseActorLogic<{
|
|
218
|
+
type: string;
|
|
219
|
+
accessToken: string;
|
|
220
|
+
}, {
|
|
221
|
+
context: import("./auth").AuthMachineContext;
|
|
222
|
+
username: string;
|
|
223
|
+
password: string;
|
|
224
|
+
}>;
|
|
225
|
+
id: string | undefined;
|
|
226
|
+
};
|
|
227
|
+
unauthenticate: {
|
|
228
|
+
src: "unauthenticate";
|
|
229
|
+
logic: import("xstate").PromiseActorLogic<{
|
|
230
|
+
type: string;
|
|
231
|
+
}, {
|
|
232
|
+
context: import("./auth").AuthMachineContext;
|
|
233
|
+
}>;
|
|
234
|
+
id: string | undefined;
|
|
235
|
+
};
|
|
236
|
+
}>, import("xstate").Values<{
|
|
237
|
+
setUserContext: {
|
|
238
|
+
type: "setUserContext";
|
|
239
|
+
params: import("xstate").NonReducibleUnknown;
|
|
240
|
+
};
|
|
241
|
+
unsetUserContext: {
|
|
242
|
+
type: "unsetUserContext";
|
|
243
|
+
params: import("xstate").NonReducibleUnknown;
|
|
244
|
+
};
|
|
245
|
+
setAccessToken: {
|
|
246
|
+
type: "setAccessToken";
|
|
247
|
+
params: import("xstate").NonReducibleUnknown;
|
|
248
|
+
};
|
|
249
|
+
unsetRefreshToken: {
|
|
250
|
+
type: "unsetRefreshToken";
|
|
251
|
+
params: import("xstate").NonReducibleUnknown;
|
|
252
|
+
};
|
|
253
|
+
setIgnoreRefreshToken: {
|
|
254
|
+
type: "setIgnoreRefreshToken";
|
|
255
|
+
params: import("xstate").NonReducibleUnknown;
|
|
256
|
+
};
|
|
257
|
+
addError: {
|
|
258
|
+
type: "addError";
|
|
259
|
+
params: import("xstate").NonReducibleUnknown;
|
|
260
|
+
};
|
|
261
|
+
clearErrors: {
|
|
262
|
+
type: "clearErrors";
|
|
263
|
+
params: import("xstate").NonReducibleUnknown;
|
|
264
|
+
};
|
|
265
|
+
}>, never, never, "refreshing" | "authenticating" | "loggedIn" | "loggedOut" | "unauthenticating", string, {
|
|
266
|
+
initialContext: Partial<import("./auth").AuthMachineContext>;
|
|
240
267
|
initialState?: string | undefined;
|
|
241
|
-
}, import("xstate").NonReducibleUnknown, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, import("./auth").RefreshTokenEvent | import("./auth").LoginEvent | import("./auth").LogoutEvent | import("./auth").ClearErrorsEvent | import("xstate").DoneActorEvent<import("./auth").AuthenticateSuccessEvent> | import("xstate").DoneActorEvent<import("./auth").RefreshTokenSuccessEvent>, {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
}
|
|
268
|
+
}, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, import("./auth").RefreshTokenEvent | import("./auth").LoginEvent | import("./auth").LogoutEvent | import("./auth").ClearErrorsEvent | import("xstate").DoneActorEvent<import("./auth").AuthenticateSuccessEvent> | import("xstate").DoneActorEvent<import("./auth").RefreshTokenSuccessEvent>, import("xstate").Values<{
|
|
269
|
+
refreshAccessToken: {
|
|
270
|
+
src: "refreshAccessToken";
|
|
271
|
+
logic: import("xstate").PromiseActorLogic<{
|
|
272
|
+
type: string;
|
|
273
|
+
accessToken: string;
|
|
274
|
+
}, {
|
|
275
|
+
context: import("./auth").AuthMachineContext;
|
|
276
|
+
}>;
|
|
277
|
+
id: string | undefined;
|
|
278
|
+
};
|
|
279
|
+
authenticate: {
|
|
280
|
+
src: "authenticate";
|
|
281
|
+
logic: import("xstate").PromiseActorLogic<{
|
|
282
|
+
type: string;
|
|
283
|
+
accessToken: string;
|
|
284
|
+
}, {
|
|
285
|
+
context: import("./auth").AuthMachineContext;
|
|
286
|
+
username: string;
|
|
287
|
+
password: string;
|
|
288
|
+
}>;
|
|
289
|
+
id: string | undefined;
|
|
290
|
+
};
|
|
291
|
+
unauthenticate: {
|
|
292
|
+
src: "unauthenticate";
|
|
293
|
+
logic: import("xstate").PromiseActorLogic<{
|
|
294
|
+
type: string;
|
|
295
|
+
}, {
|
|
296
|
+
context: import("./auth").AuthMachineContext;
|
|
297
|
+
}>;
|
|
298
|
+
id: string | undefined;
|
|
299
|
+
};
|
|
300
|
+
}>, import("xstate").Values<{
|
|
301
|
+
setUserContext: {
|
|
302
|
+
type: "setUserContext";
|
|
303
|
+
params: import("xstate").NonReducibleUnknown;
|
|
304
|
+
};
|
|
305
|
+
unsetUserContext: {
|
|
306
|
+
type: "unsetUserContext";
|
|
307
|
+
params: import("xstate").NonReducibleUnknown;
|
|
308
|
+
};
|
|
309
|
+
setAccessToken: {
|
|
310
|
+
type: "setAccessToken";
|
|
311
|
+
params: import("xstate").NonReducibleUnknown;
|
|
312
|
+
};
|
|
313
|
+
unsetRefreshToken: {
|
|
314
|
+
type: "unsetRefreshToken";
|
|
315
|
+
params: import("xstate").NonReducibleUnknown;
|
|
316
|
+
};
|
|
317
|
+
setIgnoreRefreshToken: {
|
|
318
|
+
type: "setIgnoreRefreshToken";
|
|
319
|
+
params: import("xstate").NonReducibleUnknown;
|
|
320
|
+
};
|
|
321
|
+
addError: {
|
|
322
|
+
type: "addError";
|
|
323
|
+
params: import("xstate").NonReducibleUnknown;
|
|
324
|
+
};
|
|
325
|
+
clearErrors: {
|
|
326
|
+
type: "clearErrors";
|
|
327
|
+
params: import("xstate").NonReducibleUnknown;
|
|
328
|
+
};
|
|
329
|
+
}>, never, never, string, import("xstate").EventObject>>>>;
|
|
294
330
|
type Props = {
|
|
295
331
|
children: ReactNode;
|
|
296
332
|
actor: Actor<typeof authMachine>;
|