@clicktap/state 0.16.0 → 0.16.3
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/__mocks__/nanoid.d.ts +7 -0
- package/auth/AuthProvider.d.ts +66 -66
- package/auth/actors/authenticate.d.ts +1 -1
- package/auth/actors/refreshAccessToken.d.ts +1 -1
- package/auth/actors/unauthenticate.d.ts +1 -1
- package/auth/auth.d.ts +32 -32
- package/index.js +33 -33
- package/index.mjs +1460 -1535
- package/package.json +3 -3
- package/quote/CheckoutProvider.d.ts +69 -69
- package/quote/QuoteProvider.d.ts +153 -153
- package/quote/checkout/actions/resetCheckout.d.ts +7 -7
- package/quote/checkout/actions/updateQuote.d.ts +20 -20
- package/quote/checkout/actors/placeOrder.d.ts +1 -1
- package/quote/checkout/actors/submitStepData.d.ts +1 -1
- package/quote/checkout/types.d.ts +2 -2
- package/quote/checkout.d.ts +23 -23
- package/quote/quote/actions/addItems.d.ts +20 -20
- package/quote/quote/actions/refresh.d.ts +20 -20
- package/quote/quote/actions/removeItems.d.ts +20 -20
- package/quote/quote/actions/syncAccessToken.d.ts +6 -6
- package/quote/quote/actions/updateItems.d.ts +20 -20
- package/quote/quote/actors/addItems.d.ts +1 -1
- package/quote/quote/actors/refresh.d.ts +1 -1
- package/quote/quote/actors/removeItems.d.ts +1 -1
- package/quote/quote/actors/updateItems.d.ts +1 -1
- package/quote/quote/types.d.ts +4 -4
- package/quote/quote.d.ts +51 -51
- package/toast/ToastProvider.d.ts +32 -32
- package/toast/timer.d.ts +7 -7
- package/toast/toast.d.ts +29 -29
- package/toast/types.d.ts +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const nanoid: (_size?: number) => string;
|
|
2
|
+
export declare const customAlphabet: (_alphabet: string, _defaultSize?: number) => (_size?: number) => string;
|
|
3
|
+
declare const _default: {
|
|
4
|
+
nanoid: (_size?: number) => string;
|
|
5
|
+
customAlphabet: (_alphabet: string, _defaultSize?: number | undefined) => (_size?: number | undefined) => string;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
package/auth/AuthProvider.d.ts
CHANGED
|
@@ -5,119 +5,119 @@ export interface AuthContextType {
|
|
|
5
5
|
authActor: Actor<typeof authMachine>;
|
|
6
6
|
isLoggedIn: boolean;
|
|
7
7
|
}
|
|
8
|
-
export declare const AuthContext: import(
|
|
9
|
-
[x: string]: import(
|
|
8
|
+
export declare const AuthContext: import('react').Context<Actor<import('xstate').StateMachine<import('./types').AuthMachineContext, import('./types').RefreshTokenEvent | import('./types').LoginEvent | import('./types').LogoutEvent | import('./types').ClearErrorsEvent | import('./types').RestoreEvent | import('xstate').DoneActorEvent<import('./types').AuthenticateSuccessEvent> | import('xstate').DoneActorEvent<import('./types').RefreshTokenSuccessEvent>, {
|
|
9
|
+
[x: string]: import('xstate').ActorRef<import('xstate').PromiseSnapshot<import('./types').AuthenticateSuccessEvent, import('./actors').AuthenticateInput>, {
|
|
10
10
|
[k: string]: unknown;
|
|
11
11
|
type: string;
|
|
12
|
-
}, import(
|
|
12
|
+
}, import('xstate').EventObject> | import('xstate').ActorRef<import('xstate').PromiseSnapshot<import('./types').RefreshTokenSuccessEvent, import('./actors').RefreshTokenInput>, {
|
|
13
13
|
[k: string]: unknown;
|
|
14
14
|
type: string;
|
|
15
|
-
}, import(
|
|
15
|
+
}, import('xstate').EventObject> | import('xstate').ActorRef<import('xstate').PromiseSnapshot<import('./types').UnauthenticateSuccessEvent, import('./actors').UnauthenticateInput>, {
|
|
16
16
|
[k: string]: unknown;
|
|
17
17
|
type: string;
|
|
18
|
-
}, import(
|
|
19
|
-
}, import(
|
|
18
|
+
}, import('xstate').EventObject> | undefined;
|
|
19
|
+
}, import('xstate').Values<{
|
|
20
20
|
authenticate: {
|
|
21
21
|
src: "authenticate";
|
|
22
|
-
logic: import(
|
|
22
|
+
logic: import('xstate').PromiseActorLogic<import('./types').AuthenticateSuccessEvent, import('./actors').AuthenticateInput>;
|
|
23
23
|
id: string | undefined;
|
|
24
24
|
};
|
|
25
25
|
refreshAccessToken: {
|
|
26
26
|
src: "refreshAccessToken";
|
|
27
|
-
logic: import(
|
|
27
|
+
logic: import('xstate').PromiseActorLogic<import('./types').RefreshTokenSuccessEvent, import('./actors').RefreshTokenInput>;
|
|
28
28
|
id: string | undefined;
|
|
29
29
|
};
|
|
30
30
|
unauthenticate: {
|
|
31
31
|
src: "unauthenticate";
|
|
32
|
-
logic: import(
|
|
32
|
+
logic: import('xstate').PromiseActorLogic<import('./types').UnauthenticateSuccessEvent, import('./actors').UnauthenticateInput>;
|
|
33
33
|
id: string | undefined;
|
|
34
34
|
};
|
|
35
|
-
}>, import(
|
|
35
|
+
}>, import('xstate').Values<{
|
|
36
36
|
addError: {
|
|
37
37
|
type: "addError";
|
|
38
|
-
params: import(
|
|
38
|
+
params: import('xstate').NonReducibleUnknown;
|
|
39
39
|
};
|
|
40
40
|
clearErrors: {
|
|
41
41
|
type: "clearErrors";
|
|
42
|
-
params: import(
|
|
42
|
+
params: import('xstate').NonReducibleUnknown;
|
|
43
43
|
};
|
|
44
44
|
notifyAuthenticated: {
|
|
45
45
|
type: "notifyAuthenticated";
|
|
46
|
-
params: import(
|
|
46
|
+
params: import('xstate').NonReducibleUnknown;
|
|
47
47
|
};
|
|
48
48
|
setAccessToken: {
|
|
49
49
|
type: "setAccessToken";
|
|
50
|
-
params: import(
|
|
50
|
+
params: import('xstate').NonReducibleUnknown;
|
|
51
51
|
};
|
|
52
52
|
setIgnoreRefreshToken: {
|
|
53
53
|
type: "setIgnoreRefreshToken";
|
|
54
|
-
params: import(
|
|
54
|
+
params: import('xstate').NonReducibleUnknown;
|
|
55
55
|
};
|
|
56
56
|
setUserContext: {
|
|
57
57
|
type: "setUserContext";
|
|
58
|
-
params: import(
|
|
58
|
+
params: import('xstate').NonReducibleUnknown;
|
|
59
59
|
};
|
|
60
60
|
unsetRefreshToken: {
|
|
61
61
|
type: "unsetRefreshToken";
|
|
62
|
-
params: import(
|
|
62
|
+
params: import('xstate').NonReducibleUnknown;
|
|
63
63
|
};
|
|
64
64
|
unsetUserContext: {
|
|
65
65
|
type: "unsetUserContext";
|
|
66
|
-
params: import(
|
|
66
|
+
params: import('xstate').NonReducibleUnknown;
|
|
67
67
|
};
|
|
68
68
|
}>, never, "refresh", "refreshing" | "authenticating" | "loggedIn" | "loggedOut" | "unauthenticating" | "loggedInReady", string, {
|
|
69
|
-
initialContext: Partial<import(
|
|
69
|
+
initialContext: Partial<import('./types').AuthMachineContext>;
|
|
70
70
|
initialState?: string | undefined;
|
|
71
|
-
}, import(
|
|
71
|
+
}, import('xstate').NonReducibleUnknown, import('./types').AuthenticatedEmittedEvent, import('xstate').MetaObject, import('xstate').ResolveTypegenMeta<import('xstate').TypegenDisabled, import('./types').RefreshTokenEvent | import('./types').LoginEvent | import('./types').LogoutEvent | import('./types').ClearErrorsEvent | import('./types').RestoreEvent | import('xstate').DoneActorEvent<import('./types').AuthenticateSuccessEvent> | import('xstate').DoneActorEvent<import('./types').RefreshTokenSuccessEvent>, import('xstate').Values<{
|
|
72
72
|
authenticate: {
|
|
73
73
|
src: "authenticate";
|
|
74
|
-
logic: import(
|
|
74
|
+
logic: import('xstate').PromiseActorLogic<import('./types').AuthenticateSuccessEvent, import('./actors').AuthenticateInput>;
|
|
75
75
|
id: string | undefined;
|
|
76
76
|
};
|
|
77
77
|
refreshAccessToken: {
|
|
78
78
|
src: "refreshAccessToken";
|
|
79
|
-
logic: import(
|
|
79
|
+
logic: import('xstate').PromiseActorLogic<import('./types').RefreshTokenSuccessEvent, import('./actors').RefreshTokenInput>;
|
|
80
80
|
id: string | undefined;
|
|
81
81
|
};
|
|
82
82
|
unauthenticate: {
|
|
83
83
|
src: "unauthenticate";
|
|
84
|
-
logic: import(
|
|
84
|
+
logic: import('xstate').PromiseActorLogic<import('./types').UnauthenticateSuccessEvent, import('./actors').UnauthenticateInput>;
|
|
85
85
|
id: string | undefined;
|
|
86
86
|
};
|
|
87
|
-
}>, import(
|
|
87
|
+
}>, import('xstate').Values<{
|
|
88
88
|
addError: {
|
|
89
89
|
type: "addError";
|
|
90
|
-
params: import(
|
|
90
|
+
params: import('xstate').NonReducibleUnknown;
|
|
91
91
|
};
|
|
92
92
|
clearErrors: {
|
|
93
93
|
type: "clearErrors";
|
|
94
|
-
params: import(
|
|
94
|
+
params: import('xstate').NonReducibleUnknown;
|
|
95
95
|
};
|
|
96
96
|
notifyAuthenticated: {
|
|
97
97
|
type: "notifyAuthenticated";
|
|
98
|
-
params: import(
|
|
98
|
+
params: import('xstate').NonReducibleUnknown;
|
|
99
99
|
};
|
|
100
100
|
setAccessToken: {
|
|
101
101
|
type: "setAccessToken";
|
|
102
|
-
params: import(
|
|
102
|
+
params: import('xstate').NonReducibleUnknown;
|
|
103
103
|
};
|
|
104
104
|
setIgnoreRefreshToken: {
|
|
105
105
|
type: "setIgnoreRefreshToken";
|
|
106
|
-
params: import(
|
|
106
|
+
params: import('xstate').NonReducibleUnknown;
|
|
107
107
|
};
|
|
108
108
|
setUserContext: {
|
|
109
109
|
type: "setUserContext";
|
|
110
|
-
params: import(
|
|
110
|
+
params: import('xstate').NonReducibleUnknown;
|
|
111
111
|
};
|
|
112
112
|
unsetRefreshToken: {
|
|
113
113
|
type: "unsetRefreshToken";
|
|
114
|
-
params: import(
|
|
114
|
+
params: import('xstate').NonReducibleUnknown;
|
|
115
115
|
};
|
|
116
116
|
unsetUserContext: {
|
|
117
117
|
type: "unsetUserContext";
|
|
118
|
-
params: import(
|
|
118
|
+
params: import('xstate').NonReducibleUnknown;
|
|
119
119
|
};
|
|
120
|
-
}>, never, "refresh", string, import(
|
|
120
|
+
}>, never, "refresh", string, import('./types').AuthenticatedEmittedEvent>>>>;
|
|
121
121
|
export declare const useAuth: () => AuthContextType;
|
|
122
122
|
type AuthOptions = {
|
|
123
123
|
inspect: Observer<InspectionEvent> | undefined;
|
|
@@ -134,119 +134,119 @@ type AuthOptions = {
|
|
|
134
134
|
* @todo should probably update signature to pass Partial<AuthContext> and
|
|
135
135
|
* Options, endpoints should probably be moved into context
|
|
136
136
|
*/
|
|
137
|
-
export declare const getAuth: (refreshToken?: string, options?: AuthOptions) => Promise<Actor<import(
|
|
138
|
-
[x: string]: import(
|
|
137
|
+
export declare const getAuth: (refreshToken?: string, options?: AuthOptions) => Promise<Actor<import('xstate').StateMachine<import('./types').AuthMachineContext, import('./types').RefreshTokenEvent | import('./types').LoginEvent | import('./types').LogoutEvent | import('./types').ClearErrorsEvent | import('./types').RestoreEvent | import('xstate').DoneActorEvent<import('./types').AuthenticateSuccessEvent> | import('xstate').DoneActorEvent<import('./types').RefreshTokenSuccessEvent>, {
|
|
138
|
+
[x: string]: import('xstate').ActorRef<import('xstate').PromiseSnapshot<import('./types').AuthenticateSuccessEvent, import('./actors').AuthenticateInput>, {
|
|
139
139
|
[k: string]: unknown;
|
|
140
140
|
type: string;
|
|
141
|
-
}, import(
|
|
141
|
+
}, import('xstate').EventObject> | import('xstate').ActorRef<import('xstate').PromiseSnapshot<import('./types').RefreshTokenSuccessEvent, import('./actors').RefreshTokenInput>, {
|
|
142
142
|
[k: string]: unknown;
|
|
143
143
|
type: string;
|
|
144
|
-
}, import(
|
|
144
|
+
}, import('xstate').EventObject> | import('xstate').ActorRef<import('xstate').PromiseSnapshot<import('./types').UnauthenticateSuccessEvent, import('./actors').UnauthenticateInput>, {
|
|
145
145
|
[k: string]: unknown;
|
|
146
146
|
type: string;
|
|
147
|
-
}, import(
|
|
148
|
-
}, import(
|
|
147
|
+
}, import('xstate').EventObject> | undefined;
|
|
148
|
+
}, import('xstate').Values<{
|
|
149
149
|
authenticate: {
|
|
150
150
|
src: "authenticate";
|
|
151
|
-
logic: import(
|
|
151
|
+
logic: import('xstate').PromiseActorLogic<import('./types').AuthenticateSuccessEvent, import('./actors').AuthenticateInput>;
|
|
152
152
|
id: string | undefined;
|
|
153
153
|
};
|
|
154
154
|
refreshAccessToken: {
|
|
155
155
|
src: "refreshAccessToken";
|
|
156
|
-
logic: import(
|
|
156
|
+
logic: import('xstate').PromiseActorLogic<import('./types').RefreshTokenSuccessEvent, import('./actors').RefreshTokenInput>;
|
|
157
157
|
id: string | undefined;
|
|
158
158
|
};
|
|
159
159
|
unauthenticate: {
|
|
160
160
|
src: "unauthenticate";
|
|
161
|
-
logic: import(
|
|
161
|
+
logic: import('xstate').PromiseActorLogic<import('./types').UnauthenticateSuccessEvent, import('./actors').UnauthenticateInput>;
|
|
162
162
|
id: string | undefined;
|
|
163
163
|
};
|
|
164
|
-
}>, import(
|
|
164
|
+
}>, import('xstate').Values<{
|
|
165
165
|
addError: {
|
|
166
166
|
type: "addError";
|
|
167
|
-
params: import(
|
|
167
|
+
params: import('xstate').NonReducibleUnknown;
|
|
168
168
|
};
|
|
169
169
|
clearErrors: {
|
|
170
170
|
type: "clearErrors";
|
|
171
|
-
params: import(
|
|
171
|
+
params: import('xstate').NonReducibleUnknown;
|
|
172
172
|
};
|
|
173
173
|
notifyAuthenticated: {
|
|
174
174
|
type: "notifyAuthenticated";
|
|
175
|
-
params: import(
|
|
175
|
+
params: import('xstate').NonReducibleUnknown;
|
|
176
176
|
};
|
|
177
177
|
setAccessToken: {
|
|
178
178
|
type: "setAccessToken";
|
|
179
|
-
params: import(
|
|
179
|
+
params: import('xstate').NonReducibleUnknown;
|
|
180
180
|
};
|
|
181
181
|
setIgnoreRefreshToken: {
|
|
182
182
|
type: "setIgnoreRefreshToken";
|
|
183
|
-
params: import(
|
|
183
|
+
params: import('xstate').NonReducibleUnknown;
|
|
184
184
|
};
|
|
185
185
|
setUserContext: {
|
|
186
186
|
type: "setUserContext";
|
|
187
|
-
params: import(
|
|
187
|
+
params: import('xstate').NonReducibleUnknown;
|
|
188
188
|
};
|
|
189
189
|
unsetRefreshToken: {
|
|
190
190
|
type: "unsetRefreshToken";
|
|
191
|
-
params: import(
|
|
191
|
+
params: import('xstate').NonReducibleUnknown;
|
|
192
192
|
};
|
|
193
193
|
unsetUserContext: {
|
|
194
194
|
type: "unsetUserContext";
|
|
195
|
-
params: import(
|
|
195
|
+
params: import('xstate').NonReducibleUnknown;
|
|
196
196
|
};
|
|
197
197
|
}>, never, "refresh", "refreshing" | "authenticating" | "loggedIn" | "loggedOut" | "unauthenticating" | "loggedInReady", string, {
|
|
198
|
-
initialContext: Partial<import(
|
|
198
|
+
initialContext: Partial<import('./types').AuthMachineContext>;
|
|
199
199
|
initialState?: string | undefined;
|
|
200
|
-
}, import(
|
|
200
|
+
}, import('xstate').NonReducibleUnknown, import('./types').AuthenticatedEmittedEvent, import('xstate').MetaObject, import('xstate').ResolveTypegenMeta<import('xstate').TypegenDisabled, import('./types').RefreshTokenEvent | import('./types').LoginEvent | import('./types').LogoutEvent | import('./types').ClearErrorsEvent | import('./types').RestoreEvent | import('xstate').DoneActorEvent<import('./types').AuthenticateSuccessEvent> | import('xstate').DoneActorEvent<import('./types').RefreshTokenSuccessEvent>, import('xstate').Values<{
|
|
201
201
|
authenticate: {
|
|
202
202
|
src: "authenticate";
|
|
203
|
-
logic: import(
|
|
203
|
+
logic: import('xstate').PromiseActorLogic<import('./types').AuthenticateSuccessEvent, import('./actors').AuthenticateInput>;
|
|
204
204
|
id: string | undefined;
|
|
205
205
|
};
|
|
206
206
|
refreshAccessToken: {
|
|
207
207
|
src: "refreshAccessToken";
|
|
208
|
-
logic: import(
|
|
208
|
+
logic: import('xstate').PromiseActorLogic<import('./types').RefreshTokenSuccessEvent, import('./actors').RefreshTokenInput>;
|
|
209
209
|
id: string | undefined;
|
|
210
210
|
};
|
|
211
211
|
unauthenticate: {
|
|
212
212
|
src: "unauthenticate";
|
|
213
|
-
logic: import(
|
|
213
|
+
logic: import('xstate').PromiseActorLogic<import('./types').UnauthenticateSuccessEvent, import('./actors').UnauthenticateInput>;
|
|
214
214
|
id: string | undefined;
|
|
215
215
|
};
|
|
216
|
-
}>, import(
|
|
216
|
+
}>, import('xstate').Values<{
|
|
217
217
|
addError: {
|
|
218
218
|
type: "addError";
|
|
219
|
-
params: import(
|
|
219
|
+
params: import('xstate').NonReducibleUnknown;
|
|
220
220
|
};
|
|
221
221
|
clearErrors: {
|
|
222
222
|
type: "clearErrors";
|
|
223
|
-
params: import(
|
|
223
|
+
params: import('xstate').NonReducibleUnknown;
|
|
224
224
|
};
|
|
225
225
|
notifyAuthenticated: {
|
|
226
226
|
type: "notifyAuthenticated";
|
|
227
|
-
params: import(
|
|
227
|
+
params: import('xstate').NonReducibleUnknown;
|
|
228
228
|
};
|
|
229
229
|
setAccessToken: {
|
|
230
230
|
type: "setAccessToken";
|
|
231
|
-
params: import(
|
|
231
|
+
params: import('xstate').NonReducibleUnknown;
|
|
232
232
|
};
|
|
233
233
|
setIgnoreRefreshToken: {
|
|
234
234
|
type: "setIgnoreRefreshToken";
|
|
235
|
-
params: import(
|
|
235
|
+
params: import('xstate').NonReducibleUnknown;
|
|
236
236
|
};
|
|
237
237
|
setUserContext: {
|
|
238
238
|
type: "setUserContext";
|
|
239
|
-
params: import(
|
|
239
|
+
params: import('xstate').NonReducibleUnknown;
|
|
240
240
|
};
|
|
241
241
|
unsetRefreshToken: {
|
|
242
242
|
type: "unsetRefreshToken";
|
|
243
|
-
params: import(
|
|
243
|
+
params: import('xstate').NonReducibleUnknown;
|
|
244
244
|
};
|
|
245
245
|
unsetUserContext: {
|
|
246
246
|
type: "unsetUserContext";
|
|
247
|
-
params: import(
|
|
247
|
+
params: import('xstate').NonReducibleUnknown;
|
|
248
248
|
};
|
|
249
|
-
}>, never, "refresh", string, import(
|
|
249
|
+
}>, never, "refresh", string, import('./types').AuthenticatedEmittedEvent>>>>;
|
|
250
250
|
type Props = {
|
|
251
251
|
children: ReactNode;
|
|
252
252
|
actor: Actor<typeof authMachine>;
|
|
@@ -12,5 +12,5 @@ export type AuthenticateResponse = {
|
|
|
12
12
|
accessToken?: string;
|
|
13
13
|
};
|
|
14
14
|
/** @todo pass locale for auth server? */
|
|
15
|
-
export declare const authenticate: import(
|
|
15
|
+
export declare const authenticate: import('xstate').PromiseActorLogic<AuthenticateSuccessEvent, AuthenticateInput>;
|
|
16
16
|
export default authenticate;
|
|
@@ -14,5 +14,5 @@ export type RefreshTokenOutput = {
|
|
|
14
14
|
accessToken: string;
|
|
15
15
|
};
|
|
16
16
|
/** @todo pass locale for auth server? */
|
|
17
|
-
export declare const refreshAccessToken: import(
|
|
17
|
+
export declare const refreshAccessToken: import('xstate').PromiseActorLogic<RefreshTokenSuccessEvent, RefreshTokenInput>;
|
|
18
18
|
export default refreshAccessToken;
|
|
@@ -10,5 +10,5 @@ export type UnauthenticateResponse = {
|
|
|
10
10
|
accessToken?: string;
|
|
11
11
|
};
|
|
12
12
|
/** @todo pass locale for auth server? */
|
|
13
|
-
export declare const unauthenticate: import(
|
|
13
|
+
export declare const unauthenticate: import('xstate').PromiseActorLogic<UnauthenticateSuccessEvent, UnauthenticateInput>;
|
|
14
14
|
export default unauthenticate;
|
package/auth/auth.d.ts
CHANGED
|
@@ -1,115 +1,115 @@
|
|
|
1
1
|
import { AuthMachineContext } from './types';
|
|
2
|
-
export declare const authMachine: import(
|
|
3
|
-
[x: string]: import(
|
|
2
|
+
export declare const authMachine: import('xstate').StateMachine<AuthMachineContext, import('./types').RefreshTokenEvent | import('./types').LoginEvent | import('./types').LogoutEvent | import('./types').ClearErrorsEvent | import('./types').RestoreEvent | import('xstate').DoneActorEvent<import('./types').AuthenticateSuccessEvent> | import('xstate').DoneActorEvent<import('./types').RefreshTokenSuccessEvent>, {
|
|
3
|
+
[x: string]: import('xstate').ActorRef<import('xstate').PromiseSnapshot<import('./types').AuthenticateSuccessEvent, import('./actors').AuthenticateInput>, {
|
|
4
4
|
[k: string]: unknown;
|
|
5
5
|
type: string;
|
|
6
|
-
}, import(
|
|
6
|
+
}, import('xstate').EventObject> | import('xstate').ActorRef<import('xstate').PromiseSnapshot<import('./types').RefreshTokenSuccessEvent, import('./actors').RefreshTokenInput>, {
|
|
7
7
|
[k: string]: unknown;
|
|
8
8
|
type: string;
|
|
9
|
-
}, import(
|
|
9
|
+
}, import('xstate').EventObject> | import('xstate').ActorRef<import('xstate').PromiseSnapshot<import('./types').UnauthenticateSuccessEvent, import('./actors').UnauthenticateInput>, {
|
|
10
10
|
[k: string]: unknown;
|
|
11
11
|
type: string;
|
|
12
|
-
}, import(
|
|
13
|
-
}, import(
|
|
12
|
+
}, import('xstate').EventObject> | undefined;
|
|
13
|
+
}, import('xstate').Values<{
|
|
14
14
|
authenticate: {
|
|
15
15
|
src: "authenticate";
|
|
16
|
-
logic: import(
|
|
16
|
+
logic: import('xstate').PromiseActorLogic<import('./types').AuthenticateSuccessEvent, import('./actors').AuthenticateInput>;
|
|
17
17
|
id: string | undefined;
|
|
18
18
|
};
|
|
19
19
|
refreshAccessToken: {
|
|
20
20
|
src: "refreshAccessToken";
|
|
21
|
-
logic: import(
|
|
21
|
+
logic: import('xstate').PromiseActorLogic<import('./types').RefreshTokenSuccessEvent, import('./actors').RefreshTokenInput>;
|
|
22
22
|
id: string | undefined;
|
|
23
23
|
};
|
|
24
24
|
unauthenticate: {
|
|
25
25
|
src: "unauthenticate";
|
|
26
|
-
logic: import(
|
|
26
|
+
logic: import('xstate').PromiseActorLogic<import('./types').UnauthenticateSuccessEvent, import('./actors').UnauthenticateInput>;
|
|
27
27
|
id: string | undefined;
|
|
28
28
|
};
|
|
29
|
-
}>, import(
|
|
29
|
+
}>, import('xstate').Values<{
|
|
30
30
|
addError: {
|
|
31
31
|
type: "addError";
|
|
32
|
-
params: import(
|
|
32
|
+
params: import('xstate').NonReducibleUnknown;
|
|
33
33
|
};
|
|
34
34
|
clearErrors: {
|
|
35
35
|
type: "clearErrors";
|
|
36
|
-
params: import(
|
|
36
|
+
params: import('xstate').NonReducibleUnknown;
|
|
37
37
|
};
|
|
38
38
|
notifyAuthenticated: {
|
|
39
39
|
type: "notifyAuthenticated";
|
|
40
|
-
params: import(
|
|
40
|
+
params: import('xstate').NonReducibleUnknown;
|
|
41
41
|
};
|
|
42
42
|
setAccessToken: {
|
|
43
43
|
type: "setAccessToken";
|
|
44
|
-
params: import(
|
|
44
|
+
params: import('xstate').NonReducibleUnknown;
|
|
45
45
|
};
|
|
46
46
|
setIgnoreRefreshToken: {
|
|
47
47
|
type: "setIgnoreRefreshToken";
|
|
48
|
-
params: import(
|
|
48
|
+
params: import('xstate').NonReducibleUnknown;
|
|
49
49
|
};
|
|
50
50
|
setUserContext: {
|
|
51
51
|
type: "setUserContext";
|
|
52
|
-
params: import(
|
|
52
|
+
params: import('xstate').NonReducibleUnknown;
|
|
53
53
|
};
|
|
54
54
|
unsetRefreshToken: {
|
|
55
55
|
type: "unsetRefreshToken";
|
|
56
|
-
params: import(
|
|
56
|
+
params: import('xstate').NonReducibleUnknown;
|
|
57
57
|
};
|
|
58
58
|
unsetUserContext: {
|
|
59
59
|
type: "unsetUserContext";
|
|
60
|
-
params: import(
|
|
60
|
+
params: import('xstate').NonReducibleUnknown;
|
|
61
61
|
};
|
|
62
62
|
}>, never, "refresh", "refreshing" | "authenticating" | "loggedIn" | "loggedOut" | "unauthenticating" | "loggedInReady", string, {
|
|
63
63
|
initialContext: Partial<AuthMachineContext>;
|
|
64
64
|
initialState?: string | undefined;
|
|
65
|
-
}, import(
|
|
65
|
+
}, import('xstate').NonReducibleUnknown, import('./types').AuthenticatedEmittedEvent, import('xstate').MetaObject, import('xstate').ResolveTypegenMeta<import('xstate').TypegenDisabled, import('./types').RefreshTokenEvent | import('./types').LoginEvent | import('./types').LogoutEvent | import('./types').ClearErrorsEvent | import('./types').RestoreEvent | import('xstate').DoneActorEvent<import('./types').AuthenticateSuccessEvent> | import('xstate').DoneActorEvent<import('./types').RefreshTokenSuccessEvent>, import('xstate').Values<{
|
|
66
66
|
authenticate: {
|
|
67
67
|
src: "authenticate";
|
|
68
|
-
logic: import(
|
|
68
|
+
logic: import('xstate').PromiseActorLogic<import('./types').AuthenticateSuccessEvent, import('./actors').AuthenticateInput>;
|
|
69
69
|
id: string | undefined;
|
|
70
70
|
};
|
|
71
71
|
refreshAccessToken: {
|
|
72
72
|
src: "refreshAccessToken";
|
|
73
|
-
logic: import(
|
|
73
|
+
logic: import('xstate').PromiseActorLogic<import('./types').RefreshTokenSuccessEvent, import('./actors').RefreshTokenInput>;
|
|
74
74
|
id: string | undefined;
|
|
75
75
|
};
|
|
76
76
|
unauthenticate: {
|
|
77
77
|
src: "unauthenticate";
|
|
78
|
-
logic: import(
|
|
78
|
+
logic: import('xstate').PromiseActorLogic<import('./types').UnauthenticateSuccessEvent, import('./actors').UnauthenticateInput>;
|
|
79
79
|
id: string | undefined;
|
|
80
80
|
};
|
|
81
|
-
}>, import(
|
|
81
|
+
}>, import('xstate').Values<{
|
|
82
82
|
addError: {
|
|
83
83
|
type: "addError";
|
|
84
|
-
params: import(
|
|
84
|
+
params: import('xstate').NonReducibleUnknown;
|
|
85
85
|
};
|
|
86
86
|
clearErrors: {
|
|
87
87
|
type: "clearErrors";
|
|
88
|
-
params: import(
|
|
88
|
+
params: import('xstate').NonReducibleUnknown;
|
|
89
89
|
};
|
|
90
90
|
notifyAuthenticated: {
|
|
91
91
|
type: "notifyAuthenticated";
|
|
92
|
-
params: import(
|
|
92
|
+
params: import('xstate').NonReducibleUnknown;
|
|
93
93
|
};
|
|
94
94
|
setAccessToken: {
|
|
95
95
|
type: "setAccessToken";
|
|
96
|
-
params: import(
|
|
96
|
+
params: import('xstate').NonReducibleUnknown;
|
|
97
97
|
};
|
|
98
98
|
setIgnoreRefreshToken: {
|
|
99
99
|
type: "setIgnoreRefreshToken";
|
|
100
|
-
params: import(
|
|
100
|
+
params: import('xstate').NonReducibleUnknown;
|
|
101
101
|
};
|
|
102
102
|
setUserContext: {
|
|
103
103
|
type: "setUserContext";
|
|
104
|
-
params: import(
|
|
104
|
+
params: import('xstate').NonReducibleUnknown;
|
|
105
105
|
};
|
|
106
106
|
unsetRefreshToken: {
|
|
107
107
|
type: "unsetRefreshToken";
|
|
108
|
-
params: import(
|
|
108
|
+
params: import('xstate').NonReducibleUnknown;
|
|
109
109
|
};
|
|
110
110
|
unsetUserContext: {
|
|
111
111
|
type: "unsetUserContext";
|
|
112
|
-
params: import(
|
|
112
|
+
params: import('xstate').NonReducibleUnknown;
|
|
113
113
|
};
|
|
114
|
-
}>, never, "refresh", string, import(
|
|
114
|
+
}>, never, "refresh", string, import('./types').AuthenticatedEmittedEvent>>;
|
|
115
115
|
export default authMachine;
|