@clicktap/state 0.11.6 → 0.12.1

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/auth.d.ts CHANGED
@@ -46,7 +46,7 @@ export declare const authMachine: import("xstate").StateMachine<AuthMachineConte
46
46
  }>, {
47
47
  [k: string]: unknown;
48
48
  type: string;
49
- }> | import("xstate").ActorRef<import("xstate").PromiseSnapshot<{
49
+ }, import("xstate").EventObject> | import("xstate").ActorRef<import("xstate").PromiseSnapshot<{
50
50
  type: string;
51
51
  accessToken: string;
52
52
  }, {
@@ -56,119 +56,137 @@ export declare const authMachine: import("xstate").StateMachine<AuthMachineConte
56
56
  }>, {
57
57
  [k: string]: unknown;
58
58
  type: string;
59
- }> | import("xstate").ActorRef<import("xstate").PromiseSnapshot<{
59
+ }, import("xstate").EventObject> | import("xstate").ActorRef<import("xstate").PromiseSnapshot<{
60
60
  type: string;
61
61
  }, {
62
62
  context: AuthMachineContext;
63
63
  }>, {
64
64
  [k: string]: unknown;
65
65
  type: string;
66
- }> | undefined;
67
- }, {
68
- src: "refreshAccessToken";
69
- logic: import("xstate").PromiseActorLogic<{
70
- type: string;
71
- accessToken: string;
72
- }, {
73
- context: AuthMachineContext;
74
- }>;
75
- id: string | undefined;
76
- } | {
77
- src: "authenticate";
78
- logic: import("xstate").PromiseActorLogic<{
79
- type: string;
80
- accessToken: string;
81
- }, {
82
- context: AuthMachineContext;
83
- username: string;
84
- password: string;
85
- }>;
86
- id: string | undefined;
87
- } | {
88
- src: "unauthenticate";
89
- logic: import("xstate").PromiseActorLogic<{
90
- type: string;
91
- }, {
92
- context: AuthMachineContext;
93
- }>;
94
- id: string | undefined;
95
- }, {
96
- type: "setUserContext";
97
- params: import("xstate").NonReducibleUnknown;
98
- } | {
99
- type: "unsetUserContext";
100
- params: import("xstate").NonReducibleUnknown;
101
- } | {
102
- type: "setAccessToken";
103
- params: import("xstate").NonReducibleUnknown;
104
- } | {
105
- type: "unsetRefreshToken";
106
- params: import("xstate").NonReducibleUnknown;
107
- } | {
108
- type: "setIgnoreRefreshToken";
109
- params: import("xstate").NonReducibleUnknown;
110
- } | {
111
- type: "addError";
112
- params: import("xstate").NonReducibleUnknown;
113
- } | {
114
- type: "clearErrors";
115
- params: import("xstate").NonReducibleUnknown;
116
- }, {
117
- type: string;
118
- params: import("xstate").NonReducibleUnknown;
119
- }, string, "refreshing" | "authenticating" | "loggedIn" | "loggedOut" | "unauthenticating", string, {
66
+ }, import("xstate").EventObject> | undefined;
67
+ }, import("xstate").Values<{
68
+ refreshAccessToken: {
69
+ src: "refreshAccessToken";
70
+ logic: import("xstate").PromiseActorLogic<{
71
+ type: string;
72
+ accessToken: string;
73
+ }, {
74
+ context: AuthMachineContext;
75
+ }>;
76
+ id: string | undefined;
77
+ };
78
+ authenticate: {
79
+ src: "authenticate";
80
+ logic: import("xstate").PromiseActorLogic<{
81
+ type: string;
82
+ accessToken: string;
83
+ }, {
84
+ context: AuthMachineContext;
85
+ username: string;
86
+ password: string;
87
+ }>;
88
+ id: string | undefined;
89
+ };
90
+ unauthenticate: {
91
+ src: "unauthenticate";
92
+ logic: import("xstate").PromiseActorLogic<{
93
+ type: string;
94
+ }, {
95
+ context: AuthMachineContext;
96
+ }>;
97
+ id: string | undefined;
98
+ };
99
+ }>, import("xstate").Values<{
100
+ setUserContext: {
101
+ type: "setUserContext";
102
+ params: import("xstate").NonReducibleUnknown;
103
+ };
104
+ unsetUserContext: {
105
+ type: "unsetUserContext";
106
+ params: import("xstate").NonReducibleUnknown;
107
+ };
108
+ setAccessToken: {
109
+ type: "setAccessToken";
110
+ params: import("xstate").NonReducibleUnknown;
111
+ };
112
+ unsetRefreshToken: {
113
+ type: "unsetRefreshToken";
114
+ params: import("xstate").NonReducibleUnknown;
115
+ };
116
+ setIgnoreRefreshToken: {
117
+ type: "setIgnoreRefreshToken";
118
+ params: import("xstate").NonReducibleUnknown;
119
+ };
120
+ addError: {
121
+ type: "addError";
122
+ params: import("xstate").NonReducibleUnknown;
123
+ };
124
+ clearErrors: {
125
+ type: "clearErrors";
126
+ params: import("xstate").NonReducibleUnknown;
127
+ };
128
+ }>, never, never, "refreshing" | "authenticating" | "loggedIn" | "loggedOut" | "unauthenticating", string, {
120
129
  initialContext: Partial<AuthMachineContext>;
121
130
  initialState?: string | undefined;
122
- }, import("xstate").NonReducibleUnknown, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, RefreshTokenEvent | LoginEvent | LogoutEvent | ClearErrorsEvent | DoneActorEvent<AuthenticateSuccessEvent> | DoneActorEvent<RefreshTokenSuccessEvent>, {
123
- src: "refreshAccessToken";
124
- logic: import("xstate").PromiseActorLogic<{
125
- type: string;
126
- accessToken: string;
127
- }, {
128
- context: AuthMachineContext;
129
- }>;
130
- id: string | undefined;
131
- } | {
132
- src: "authenticate";
133
- logic: import("xstate").PromiseActorLogic<{
134
- type: string;
135
- accessToken: string;
136
- }, {
137
- context: AuthMachineContext;
138
- username: string;
139
- password: string;
140
- }>;
141
- id: string | undefined;
142
- } | {
143
- src: "unauthenticate";
144
- logic: import("xstate").PromiseActorLogic<{
145
- type: string;
146
- }, {
147
- context: AuthMachineContext;
148
- }>;
149
- id: string | undefined;
150
- }, {
151
- type: "setUserContext";
152
- params: import("xstate").NonReducibleUnknown;
153
- } | {
154
- type: "unsetUserContext";
155
- params: import("xstate").NonReducibleUnknown;
156
- } | {
157
- type: "setAccessToken";
158
- params: import("xstate").NonReducibleUnknown;
159
- } | {
160
- type: "unsetRefreshToken";
161
- params: import("xstate").NonReducibleUnknown;
162
- } | {
163
- type: "setIgnoreRefreshToken";
164
- params: import("xstate").NonReducibleUnknown;
165
- } | {
166
- type: "addError";
167
- params: import("xstate").NonReducibleUnknown;
168
- } | {
169
- type: "clearErrors";
170
- params: import("xstate").NonReducibleUnknown;
171
- }, {
172
- type: string;
173
- params: import("xstate").NonReducibleUnknown;
174
- }, string, string>>;
131
+ }, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, RefreshTokenEvent | LoginEvent | LogoutEvent | ClearErrorsEvent | DoneActorEvent<AuthenticateSuccessEvent> | DoneActorEvent<RefreshTokenSuccessEvent>, import("xstate").Values<{
132
+ refreshAccessToken: {
133
+ src: "refreshAccessToken";
134
+ logic: import("xstate").PromiseActorLogic<{
135
+ type: string;
136
+ accessToken: string;
137
+ }, {
138
+ context: AuthMachineContext;
139
+ }>;
140
+ id: string | undefined;
141
+ };
142
+ authenticate: {
143
+ src: "authenticate";
144
+ logic: import("xstate").PromiseActorLogic<{
145
+ type: string;
146
+ accessToken: string;
147
+ }, {
148
+ context: AuthMachineContext;
149
+ username: string;
150
+ password: string;
151
+ }>;
152
+ id: string | undefined;
153
+ };
154
+ unauthenticate: {
155
+ src: "unauthenticate";
156
+ logic: import("xstate").PromiseActorLogic<{
157
+ type: string;
158
+ }, {
159
+ context: AuthMachineContext;
160
+ }>;
161
+ id: string | undefined;
162
+ };
163
+ }>, import("xstate").Values<{
164
+ setUserContext: {
165
+ type: "setUserContext";
166
+ params: import("xstate").NonReducibleUnknown;
167
+ };
168
+ unsetUserContext: {
169
+ type: "unsetUserContext";
170
+ params: import("xstate").NonReducibleUnknown;
171
+ };
172
+ setAccessToken: {
173
+ type: "setAccessToken";
174
+ params: import("xstate").NonReducibleUnknown;
175
+ };
176
+ unsetRefreshToken: {
177
+ type: "unsetRefreshToken";
178
+ params: import("xstate").NonReducibleUnknown;
179
+ };
180
+ setIgnoreRefreshToken: {
181
+ type: "setIgnoreRefreshToken";
182
+ params: import("xstate").NonReducibleUnknown;
183
+ };
184
+ addError: {
185
+ type: "addError";
186
+ params: import("xstate").NonReducibleUnknown;
187
+ };
188
+ clearErrors: {
189
+ type: "clearErrors";
190
+ params: import("xstate").NonReducibleUnknown;
191
+ };
192
+ }>, never, never, string, import("xstate").EventObject>>;