@fluxo-dev/state 0.0.32 → 0.0.34
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/index.esm.js +6 -2
- package/package.json +3 -2
- package/src/lib/user/userActions.d.ts +2 -2
package/index.esm.js
CHANGED
|
@@ -32,6 +32,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
32
32
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
33
33
|
PERFORMANCE OF THIS SOFTWARE.
|
|
34
34
|
***************************************************************************** */
|
|
35
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
36
|
+
|
|
35
37
|
|
|
36
38
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
37
39
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -48,12 +50,12 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
48
50
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
49
51
|
};
|
|
50
52
|
|
|
51
|
-
const userLogin = createAsyncThunk('user/login', ({
|
|
53
|
+
const userLogin = createAsyncThunk('user/login', (_a, _b) => __awaiter(void 0, [_a, _b], void 0, function* ({
|
|
52
54
|
data
|
|
53
55
|
}, {
|
|
54
56
|
rejectWithValue,
|
|
55
57
|
getState
|
|
56
|
-
})
|
|
58
|
+
}) {
|
|
57
59
|
try {
|
|
58
60
|
return data;
|
|
59
61
|
} catch (error) {
|
|
@@ -82,7 +84,9 @@ var _a, _b;
|
|
|
82
84
|
const initialState$1 = {
|
|
83
85
|
loading: false,
|
|
84
86
|
userInfo: JSON.parse((_a = localStorage.getItem(LocalStorageConstants.userData)) !== null && _a !== void 0 ? _a : '{}'),
|
|
87
|
+
// for user object
|
|
85
88
|
accessToken: localStorage.getItem((_b = LocalStorageConstants.accessToken) !== null && _b !== void 0 ? _b : ''),
|
|
89
|
+
// for storing the JWT
|
|
86
90
|
error: false,
|
|
87
91
|
success: false,
|
|
88
92
|
loggedIn: false,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ export declare const userLogin: import("@reduxjs/toolkit").AsyncThunk<any, {
|
|
|
3
3
|
} & Partial<any>, {
|
|
4
4
|
rejectValue: any;
|
|
5
5
|
state?: unknown;
|
|
6
|
-
dispatch?: import("redux").Dispatch
|
|
6
|
+
dispatch?: import("redux").Dispatch | undefined;
|
|
7
7
|
extra?: unknown;
|
|
8
8
|
serializedErrorType?: unknown;
|
|
9
9
|
pendingMeta?: unknown;
|
|
@@ -12,7 +12,7 @@ export declare const userLogin: import("@reduxjs/toolkit").AsyncThunk<any, {
|
|
|
12
12
|
}>;
|
|
13
13
|
export declare const userLogout: import("@reduxjs/toolkit").AsyncThunk<boolean, void, {
|
|
14
14
|
state?: unknown;
|
|
15
|
-
dispatch?: import("redux").Dispatch
|
|
15
|
+
dispatch?: import("redux").Dispatch;
|
|
16
16
|
extra?: unknown;
|
|
17
17
|
rejectValue?: unknown;
|
|
18
18
|
serializedErrorType?: unknown;
|