@solidxai/core-ui 0.1.8-beta.7 → 0.1.8-beta.9
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/dist/components/auth/AuthLayout.d.ts.map +1 -1
- package/dist/components/auth/AuthLayout.js +16 -32
- package/dist/components/auth/AuthLayout.js.map +1 -1
- package/dist/components/auth/AuthLayout.tsx +4 -20
- package/dist/components/auth/AuthTabs.d.ts.map +1 -1
- package/dist/components/auth/AuthTabs.js +9 -9
- package/dist/components/auth/AuthTabs.js.map +1 -1
- package/dist/components/auth/AuthTabs.tsx +14 -15
- package/dist/components/auth/SolidOTPVerify.d.ts +3 -0
- package/dist/components/auth/SolidOTPVerify.d.ts.map +1 -0
- package/dist/components/auth/SolidOTPVerify.js +67 -0
- package/dist/components/auth/SolidOTPVerify.js.map +1 -0
- package/dist/components/auth/SolidOTPVerify.tsx +133 -0
- package/dist/components/auth/SolidRegister.d.ts.map +1 -1
- package/dist/components/auth/SolidRegister.js +1 -1
- package/dist/components/auth/SolidRegister.js.map +1 -1
- package/dist/components/auth/SolidRegister.tsx +12 -5
- package/dist/components/common/AuthBanner.js.map +1 -1
- package/dist/components/common/GeneralSettings.d.ts.map +1 -1
- package/dist/components/common/GeneralSettings.js +41 -46
- package/dist/components/common/GeneralSettings.js.map +1 -1
- package/dist/components/common/GeneralSettings.tsx +0 -19
- package/dist/components/common/SolidThemeProvider.d.ts.map +1 -1
- package/dist/components/common/SolidThemeProvider.js +5 -21
- package/dist/components/common/SolidThemeProvider.js.map +1 -1
- package/dist/components/common/SolidThemeProvider.tsx +6 -24
- package/dist/components/core/common/LoadDynamicJsxComponent.d.ts +2 -0
- package/dist/components/core/common/LoadDynamicJsxComponent.d.ts.map +1 -0
- package/dist/components/core/common/LoadDynamicJsxComponent.js +50 -0
- package/dist/components/core/common/LoadDynamicJsxComponent.js.map +1 -0
- package/dist/components/core/common/LoadDynamicJsxComponent.tsx +70 -0
- package/dist/components/core/form/SolidFormView.js +42 -41
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/SolidFormView.tsx +16 -16
- package/dist/components/core/form/fields/widgets/SolidS3FileViewerWidget.d.ts +1 -1
- package/dist/components/core/form/fields/widgets/SolidS3FileViewerWidget.js +1 -1
- package/dist/components/core/form/fields/widgets/SolidS3FileViewerWidget.js.map +1 -1
- package/dist/components/core/form/fields/widgets/SolidS3FileViewerWidget.tsx +1 -1
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +41 -44
- package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.tsx +16 -25
- package/dist/components/core/kanban/SolidManyToOneFilterElement.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidManyToOneFilterElement.js.map +1 -1
- package/dist/components/core/kanban/SolidManyToOneFilterElement.tsx +2 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.d.ts.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.js +2 -2
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.tsx +10 -21
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.d.ts.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.js +2 -2
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.tsx +10 -18
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.d.ts.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js +6 -3
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.tsx +24 -30
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.tsx +2 -2
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +3 -11
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/SolidListView.tsx +27 -48
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.d.ts +1 -1
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.d.ts.map +1 -1
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.js +7 -6
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.js.map +1 -1
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.tsx +10 -9
- package/dist/components/core/users/ApiKeysTab/ApiKeysTab.css +283 -9
- package/dist/components/core/users/ApiKeysTab/ApiKeysTab.d.ts.map +1 -1
- package/dist/components/core/users/ApiKeysTab/ApiKeysTab.js +35 -28
- package/dist/components/core/users/ApiKeysTab/ApiKeysTab.js.map +1 -1
- package/dist/components/core/users/ApiKeysTab/ApiKeysTab.tsx +64 -62
- package/dist/components/core/users/ApiKeysTab/GenerateApiKeyModal.d.ts +2 -1
- package/dist/components/core/users/ApiKeysTab/GenerateApiKeyModal.d.ts.map +1 -1
- package/dist/components/core/users/ApiKeysTab/GenerateApiKeyModal.js +4 -4
- package/dist/components/core/users/ApiKeysTab/GenerateApiKeyModal.js.map +1 -1
- package/dist/components/core/users/ApiKeysTab/GenerateApiKeyModal.tsx +17 -10
- package/dist/components/core/users/ApiKeysTab/RevealApiKeyModal.d.ts.map +1 -1
- package/dist/components/core/users/ApiKeysTab/RevealApiKeyModal.js +2 -19
- package/dist/components/core/users/ApiKeysTab/RevealApiKeyModal.js.map +1 -1
- package/dist/components/core/users/ApiKeysTab/RevealApiKeyModal.tsx +24 -43
- package/dist/components/core/users/CreateUser.css +114 -0
- package/dist/components/core/users/CreateUser.d.ts +1 -0
- package/dist/components/core/users/CreateUser.d.ts.map +1 -1
- package/dist/components/core/users/CreateUser.js +4 -3
- package/dist/components/core/users/CreateUser.js.map +1 -1
- package/dist/components/core/users/CreateUser.tsx +32 -26
- package/dist/components/layout/context/layoutcontext.js +2 -2
- package/dist/components/layout/context/layoutcontext.js.map +1 -1
- package/dist/components/layout/context/layoutcontext.tsx +2 -2
- package/dist/components/shad-cn-ui/SolidConfirmDialog.d.ts +6 -1
- package/dist/components/shad-cn-ui/SolidConfirmDialog.d.ts.map +1 -1
- package/dist/components/shad-cn-ui/SolidConfirmDialog.js +3 -3
- package/dist/components/shad-cn-ui/SolidConfirmDialog.js.map +1 -1
- package/dist/components/shad-cn-ui/SolidConfirmDialog.tsx +15 -3
- package/dist/components/shad-cn-ui/SolidTabs.d.ts.map +1 -1
- package/dist/components/shad-cn-ui/SolidTabs.js +2 -2
- package/dist/components/shad-cn-ui/SolidTabs.js.map +1 -1
- package/dist/components/shad-cn-ui/SolidTabs.tsx +0 -2
- package/dist/nextAuth/authProviders.d.ts +4 -0
- package/dist/nextAuth/authProviders.d.ts.map +1 -0
- package/dist/nextAuth/authProviders.js +198 -0
- package/dist/nextAuth/authProviders.js.map +1 -0
- package/dist/nextAuth/authProviders.tsx +232 -0
- package/dist/nextAuth/handleLogout.d.ts +2 -0
- package/dist/nextAuth/handleLogout.d.ts.map +1 -0
- package/dist/nextAuth/handleLogout.js +36 -0
- package/dist/nextAuth/handleLogout.js.map +1 -0
- package/dist/nextAuth/handleLogout.tsx +39 -0
- package/dist/nextAuth/refreshAccessToken.d.ts +2 -0
- package/dist/nextAuth/refreshAccessToken.d.ts.map +1 -0
- package/dist/nextAuth/refreshAccessToken.js +24 -0
- package/dist/nextAuth/refreshAccessToken.js.map +1 -0
- package/dist/nextAuth/refreshAccessToken.tsx +28 -0
- package/dist/redux/features/settingsSlice.d.ts +20 -0
- package/dist/redux/features/settingsSlice.d.ts.map +1 -0
- package/dist/redux/features/settingsSlice.js +39 -0
- package/dist/redux/features/settingsSlice.js.map +1 -0
- package/dist/redux/features/settingsSlice.ts +60 -0
- package/dist/resources/globals.css +97 -77
- package/dist/resources/shadcn-base.css +62 -304
- package/package.json +1 -1
- package/dist/components/core/list/SolidDataTablePagination.d.ts +0 -15
- package/dist/components/core/list/SolidDataTablePagination.d.ts.map +0 -1
- package/dist/components/core/list/SolidDataTablePagination.js +0 -22
- package/dist/components/core/list/SolidDataTablePagination.js.map +0 -1
- package/dist/components/core/list/SolidDataTablePagination.tsx +0 -71
- package/dist/components/solid-ui/SolidButton.d.ts +0 -14
- package/dist/components/solid-ui/SolidButton.d.ts.map +0 -1
- package/dist/components/solid-ui/SolidButton.js +0 -36
- package/dist/components/solid-ui/SolidButton.js.map +0 -1
- package/dist/components/solid-ui/SolidButton.tsx +0 -54
- package/dist/components/solid-ui/SolidTabs.d.ts +0 -18
- package/dist/components/solid-ui/SolidTabs.d.ts.map +0 -1
- package/dist/components/solid-ui/SolidTabs.js +0 -22
- package/dist/components/solid-ui/SolidTabs.js.map +0 -1
- package/dist/components/solid-ui/SolidTabs.tsx +0 -73
- package/dist/components/solid-ui/index.d.ts +0 -3
- package/dist/components/solid-ui/index.d.ts.map +0 -1
- package/dist/components/solid-ui/index.js +0 -3
- package/dist/components/solid-ui/index.js.map +0 -1
- package/dist/components/solid-ui/index.ts +0 -2
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import CredentialsProvider from "next-auth/providers/credentials";
|
|
2
|
+
import GoogleProvider from "next-auth/providers/google";
|
|
3
|
+
import { NextRequest } from "next/server";
|
|
4
|
+
import { jwtDecode } from "jwt-decode";
|
|
5
|
+
import { JWT } from "next-auth/jwt";
|
|
6
|
+
import axios from "axios";
|
|
7
|
+
import { signOut } from "next-auth/react";
|
|
8
|
+
import { refreshAccessToken } from "./refreshAccessToken";
|
|
9
|
+
import { NextAuthOptions } from "next-auth";
|
|
10
|
+
|
|
11
|
+
type Credentials = {
|
|
12
|
+
username: string,
|
|
13
|
+
email: string,
|
|
14
|
+
password: string,
|
|
15
|
+
identifier:string,
|
|
16
|
+
accessToken: string,
|
|
17
|
+
accessCode: string,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const authProviders: NextAuthOptions = {
|
|
21
|
+
session: {
|
|
22
|
+
strategy: "jwt",
|
|
23
|
+
},
|
|
24
|
+
providers: [
|
|
25
|
+
GoogleProvider({
|
|
26
|
+
clientId: process.env.GOOGLE_ID!,
|
|
27
|
+
clientSecret: process.env.GOOGLE_CLIENT_SECRET!
|
|
28
|
+
}),
|
|
29
|
+
CredentialsProvider({
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
async authorize(credentials: Credentials, req: any) {
|
|
32
|
+
const userAgent = req.headers['user-agent'];
|
|
33
|
+
|
|
34
|
+
const { username, email, password, identifier, accessToken, accessCode } = credentials;
|
|
35
|
+
try {
|
|
36
|
+
if (accessCode) {
|
|
37
|
+
let config = {
|
|
38
|
+
method: 'get',
|
|
39
|
+
url: `${process.env.API_URL}/api/iam/google/authenticate?accessCode=${accessCode}`,
|
|
40
|
+
headers: {
|
|
41
|
+
'User-Agent': userAgent,
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const loginResponse = await axios.request(config);
|
|
45
|
+
if (loginResponse.status == 400) {
|
|
46
|
+
throw new Error(loginResponse.data.message);
|
|
47
|
+
}
|
|
48
|
+
if (loginResponse.status == 401) {
|
|
49
|
+
throw new Error(loginResponse.data.message);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
let base64decoded = jwtDecode(loginResponse.data.data.accessToken);
|
|
53
|
+
// let accessTokenExpires = base64decoded.exp;
|
|
54
|
+
let accessTokenExpires = base64decoded.exp && base64decoded.exp * 1000;
|
|
55
|
+
|
|
56
|
+
return {
|
|
57
|
+
accessToken: loginResponse.data.data.accessToken,
|
|
58
|
+
refreshToken: loginResponse.data.data.refreshToken,
|
|
59
|
+
accessTokenExpires: accessTokenExpires,
|
|
60
|
+
...loginResponse.data.data,
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
} else {
|
|
64
|
+
if (accessToken) {
|
|
65
|
+
let data = JSON.stringify({
|
|
66
|
+
username: identifier,
|
|
67
|
+
email: identifier.includes('@')? identifier : null,
|
|
68
|
+
password: password
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
let config = {
|
|
72
|
+
method: 'get',
|
|
73
|
+
url: `${process.env.API_URL}/api/iam/me`,
|
|
74
|
+
headers: {
|
|
75
|
+
'accept': '*/*',
|
|
76
|
+
'Content-Type': 'application/json',
|
|
77
|
+
'Authorization': `Bearer ${accessToken}`
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
const loginResponse = await axios.request(config);
|
|
83
|
+
|
|
84
|
+
if (loginResponse.status == 400) {
|
|
85
|
+
throw new Error(loginResponse.data.message);
|
|
86
|
+
}
|
|
87
|
+
if (loginResponse.status == 401) {
|
|
88
|
+
throw new Error(loginResponse.data.message);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
let base64decoded = jwtDecode(accessToken);
|
|
92
|
+
// let accessTokenExpires = base64decoded.exp;
|
|
93
|
+
let accessTokenExpires = base64decoded.exp && base64decoded.exp * 1000;
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
accessToken: accessToken,
|
|
97
|
+
refreshToken: loginResponse.data.data.refreshToken,
|
|
98
|
+
accessTokenExpires: accessTokenExpires,
|
|
99
|
+
...loginResponse.data.data,
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
} else {
|
|
103
|
+
|
|
104
|
+
let data = JSON.stringify({
|
|
105
|
+
username: identifier,
|
|
106
|
+
email: identifier.includes('@')? identifier : null,
|
|
107
|
+
password: password
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
let config = {
|
|
111
|
+
method: 'post',
|
|
112
|
+
maxBodyLength: Infinity,
|
|
113
|
+
url: `${process.env.API_URL}/api/iam/authenticate`,
|
|
114
|
+
headers: {
|
|
115
|
+
'accept': '*/*',
|
|
116
|
+
'Content-Type': 'application/json',
|
|
117
|
+
'User-Agent': userAgent,
|
|
118
|
+
},
|
|
119
|
+
data: data
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
const loginResponse = await axios.request(config);
|
|
124
|
+
|
|
125
|
+
// const authenticateResponse = await fetch(
|
|
126
|
+
// `${process.env.API_URL}/api/iam/authenticate`,
|
|
127
|
+
// {
|
|
128
|
+
// method: "Post",
|
|
129
|
+
// headers: {
|
|
130
|
+
// 'accept': '*/*',
|
|
131
|
+
// "Content-Type": "application/json"
|
|
132
|
+
// },
|
|
133
|
+
// body: JSON.stringify({
|
|
134
|
+
// username: email,
|
|
135
|
+
// email: email,
|
|
136
|
+
// password: password
|
|
137
|
+
// })
|
|
138
|
+
// }
|
|
139
|
+
// );
|
|
140
|
+
|
|
141
|
+
// const loginResponse = await authenticateResponse.json();
|
|
142
|
+
|
|
143
|
+
// const response = await fetch(
|
|
144
|
+
// `${process.env.API_URL}/api/iam/me`,
|
|
145
|
+
// {
|
|
146
|
+
// method: "Get",
|
|
147
|
+
// headers: {
|
|
148
|
+
// "Content-Type": "application/json",
|
|
149
|
+
// "Authorization": `Bearer ${loginResponse.data.accessToken}`,
|
|
150
|
+
// },
|
|
151
|
+
// }
|
|
152
|
+
// );
|
|
153
|
+
|
|
154
|
+
// const responseData = await response.json();
|
|
155
|
+
|
|
156
|
+
if (loginResponse.status == 400) {
|
|
157
|
+
throw new Error(loginResponse.data.message);
|
|
158
|
+
}
|
|
159
|
+
if (loginResponse.status == 401) {
|
|
160
|
+
throw new Error(loginResponse.data.data.message);
|
|
161
|
+
}
|
|
162
|
+
let base64decoded = jwtDecode(loginResponse.data.data.accessToken);
|
|
163
|
+
// let accessTokenExpires = base64decoded.exp;
|
|
164
|
+
let accessTokenExpires = base64decoded.exp && base64decoded.exp * 1000;
|
|
165
|
+
const returnResponse = {
|
|
166
|
+
accessToken: loginResponse.data.data.accessToken,
|
|
167
|
+
refreshToken: loginResponse.data.data.refreshToken,
|
|
168
|
+
accessTokenExpires: accessTokenExpires,
|
|
169
|
+
...loginResponse.data.data,
|
|
170
|
+
}
|
|
171
|
+
return returnResponse;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
} catch (error: any) {
|
|
175
|
+
throw new Error(error?.response?.data?.message);
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
}),
|
|
179
|
+
],
|
|
180
|
+
callbacks: {
|
|
181
|
+
// @ts-ignore
|
|
182
|
+
jwt: async ({ token, user }) => {
|
|
183
|
+
// console.log("JWT callback called");
|
|
184
|
+
const bufferTime = 60000;
|
|
185
|
+
if (Date.now() >= (token.accessTokenExpires as number - bufferTime)) {
|
|
186
|
+
// Call the refresh token function
|
|
187
|
+
return await refreshAccessToken(token);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// If there is no user (first time login or session), we return the user data
|
|
191
|
+
if (user) {
|
|
192
|
+
// const base64decoded = jwtDecode(user.accessToken);
|
|
193
|
+
// Convert from seconds to milliseconds
|
|
194
|
+
// const accessTokenExpires = base64decoded.exp && base64decoded.exp * 1000;
|
|
195
|
+
// const accessTokenExpires = user.accessTokenExpires * 1000;
|
|
196
|
+
return {
|
|
197
|
+
...token,
|
|
198
|
+
accessToken: user.accessToken,
|
|
199
|
+
refreshToken: user.refreshToken,
|
|
200
|
+
accessTokenExpires: user.accessTokenExpires,
|
|
201
|
+
user: user, // Include the user data here
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
return token; // If no update needed, just return the existing token
|
|
206
|
+
},
|
|
207
|
+
// @ts-ignore
|
|
208
|
+
session: async ({ session, token }) => {
|
|
209
|
+
// console.log("Session callback called");
|
|
210
|
+
|
|
211
|
+
const user = token.user || {}; // Default to an empty object if user is undefined or null
|
|
212
|
+
session.error = token.error ? token.error : null;
|
|
213
|
+
// if (token.error) {
|
|
214
|
+
// return null
|
|
215
|
+
// }
|
|
216
|
+
session.user = {
|
|
217
|
+
...user, // Include the user info from the token
|
|
218
|
+
accessToken: token?.accessToken, // Add the access token to session for client use
|
|
219
|
+
refreshToken: token?.refreshToken, // Add refresh token to session for future use
|
|
220
|
+
accessTokenExpires: token?.accessTokenExpires && token?.accessTokenExpires, // Store the expiry time
|
|
221
|
+
};
|
|
222
|
+
return session;
|
|
223
|
+
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
pages: {
|
|
227
|
+
signIn: "/auth/login",
|
|
228
|
+
},
|
|
229
|
+
secret: process.env.NEXTAUTH_SECRET,
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export default authProviders
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleLogout.d.ts","sourceRoot":"./","sources":["nextAuth/handleLogout.tsx"],"names":[],"mappings":"AAIA,wBAAsB,YAAY,CAAC,EAAE,KAAK,EAAE,EAAE,GAAG,iBAkChD"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ERROR_MESSAGES } from '../constants/error-messages';
|
|
2
|
+
import axios from 'axios';
|
|
3
|
+
import { getSession, signOut } from 'next-auth/react';
|
|
4
|
+
export async function handleLogout({ toast }) {
|
|
5
|
+
const session = await getSession();
|
|
6
|
+
// const token = session?.user?.accessToken;
|
|
7
|
+
const refreshToken = session?.user?.refreshToken;
|
|
8
|
+
try {
|
|
9
|
+
const response = await axios.post(`${process.env.NEXT_PUBLIC_BACKEND_API_URL}/api/iam/logout`, {
|
|
10
|
+
refreshToken: refreshToken, // Pass refresh token in body
|
|
11
|
+
});
|
|
12
|
+
console.log("logout response", response);
|
|
13
|
+
if (response?.data?.statusCode === 200) {
|
|
14
|
+
await signOut({ callbackUrl: '/auth/login' });
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
toast?.current?.show({
|
|
18
|
+
severity: 'error',
|
|
19
|
+
summary: ERROR_MESSAGES.LOGOUT_FAILED,
|
|
20
|
+
detail: `${response?.data?.data?.status}`,
|
|
21
|
+
life: 3000,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
const err = error;
|
|
27
|
+
const message = err.response?.data?.data?.message || err.message || ERROR_MESSAGES.LOGOUT_FAILED;
|
|
28
|
+
toast?.current?.show({
|
|
29
|
+
severity: 'error',
|
|
30
|
+
summary: ERROR_MESSAGES.LOGOUT_FAILED,
|
|
31
|
+
detail: message,
|
|
32
|
+
life: 3000,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=handleLogout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleLogout.js","sourceRoot":"./","sources":["nextAuth/handleLogout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,EAAE,KAAK,EAAO;IAC7C,MAAM,OAAO,GAAG,MAAM,UAAU,EAAE,CAAC;IACnC,4CAA4C;IAC5C,MAAM,YAAY,GAAG,OAAO,EAAE,IAAI,EAAE,YAAY,CAAC;IACjD,IAAI;QACA,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,2BAA2B,iBAAiB,EAC7F;YACI,YAAY,EAAE,YAAY,EAAE,6BAA6B;SAC5D,CACA,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;QAEzC,IAAI,QAAQ,EAAE,IAAI,EAAE,UAAU,KAAK,GAAG,EAAE;YACpC,MAAM,OAAO,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC,CAAC;SACjD;aAAM;YACH,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC;gBACjB,QAAQ,EAAE,OAAO;gBACjB,OAAO,EAAE,cAAc,CAAC,aAAa;gBACrC,MAAM,EAAE,GAAG,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE;gBACzC,IAAI,EAAE,IAAI;aACb,CAAC,CAAC;SACN;KACJ;IAAC,OAAO,KAAK,EAAE;QACZ,MAAM,GAAG,GAAG,KAAY,CAAC;QACzB,MAAM,OAAO,GACT,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,IAAI,GAAG,CAAC,OAAO,IAAI,cAAc,CAAC,aAAa,CAAC;QAErF,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC;YACjB,QAAQ,EAAE,OAAO;YACjB,OAAO,EAAE,cAAc,CAAC,aAAa;YACrC,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,IAAI;SACb,CAAC,CAAC;KACN;AACL,CAAC","sourcesContent":["import { ERROR_MESSAGES } from '../constants/error-messages';\nimport axios, { AxiosError } from 'axios';\nimport { getSession, signOut } from 'next-auth/react';\n\nexport async function handleLogout({ toast }: any) {\n const session = await getSession();\n // const token = session?.user?.accessToken;\n const refreshToken = session?.user?.refreshToken; \n try {\n const response = await axios.post(`${process.env.NEXT_PUBLIC_BACKEND_API_URL}/api/iam/logout`, \n {\n refreshToken: refreshToken, // Pass refresh token in body\n }\n );\n console.log(\"logout response\", response);\n\n if (response?.data?.statusCode === 200) {\n await signOut({ callbackUrl: '/auth/login' });\n } else {\n toast?.current?.show({\n severity: 'error',\n summary: ERROR_MESSAGES.LOGOUT_FAILED,\n detail: `${response?.data?.data?.status}`,\n life: 3000,\n });\n }\n } catch (error) {\n const err = error as any;\n const message =\n err.response?.data?.data?.message || err.message || ERROR_MESSAGES.LOGOUT_FAILED;\n\n toast?.current?.show({\n severity: 'error',\n summary: ERROR_MESSAGES.LOGOUT_FAILED,\n detail: message,\n life: 3000,\n });\n }\n}"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ERROR_MESSAGES } from '../constants/error-messages';
|
|
2
|
+
import axios, { AxiosError } from 'axios';
|
|
3
|
+
import { getSession, signOut } from 'next-auth/react';
|
|
4
|
+
|
|
5
|
+
export async function handleLogout({ toast }: any) {
|
|
6
|
+
const session = await getSession();
|
|
7
|
+
// const token = session?.user?.accessToken;
|
|
8
|
+
const refreshToken = session?.user?.refreshToken;
|
|
9
|
+
try {
|
|
10
|
+
const response = await axios.post(`${process.env.NEXT_PUBLIC_BACKEND_API_URL}/api/iam/logout`,
|
|
11
|
+
{
|
|
12
|
+
refreshToken: refreshToken, // Pass refresh token in body
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
console.log("logout response", response);
|
|
16
|
+
|
|
17
|
+
if (response?.data?.statusCode === 200) {
|
|
18
|
+
await signOut({ callbackUrl: '/auth/login' });
|
|
19
|
+
} else {
|
|
20
|
+
toast?.current?.show({
|
|
21
|
+
severity: 'error',
|
|
22
|
+
summary: ERROR_MESSAGES.LOGOUT_FAILED,
|
|
23
|
+
detail: `${response?.data?.data?.status}`,
|
|
24
|
+
life: 3000,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
} catch (error) {
|
|
28
|
+
const err = error as any;
|
|
29
|
+
const message =
|
|
30
|
+
err.response?.data?.data?.message || err.message || ERROR_MESSAGES.LOGOUT_FAILED;
|
|
31
|
+
|
|
32
|
+
toast?.current?.show({
|
|
33
|
+
severity: 'error',
|
|
34
|
+
summary: ERROR_MESSAGES.LOGOUT_FAILED,
|
|
35
|
+
detail: message,
|
|
36
|
+
life: 3000,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refreshAccessToken.d.ts","sourceRoot":"./","sources":["nextAuth/refreshAccessToken.tsx"],"names":[],"mappings":"AAIA,wBAAsB,kBAAkB,CAAC,KAAK,EAAE,GAAG,gBAuBhD"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ERROR_MESSAGES } from "../constants/error-messages";
|
|
2
|
+
import axios from "axios";
|
|
3
|
+
import { jwtDecode } from "jwt-decode";
|
|
4
|
+
export async function refreshAccessToken(token) {
|
|
5
|
+
try {
|
|
6
|
+
const response = await axios.post(`${process.env.NEXT_PUBLIC_BACKEND_API_URL}/api/iam/refresh-tokens`, { refreshToken: token.refreshToken });
|
|
7
|
+
const { accessToken, refreshToken } = response.data.data;
|
|
8
|
+
const { exp: accessTokenExpires } = jwtDecode(accessToken);
|
|
9
|
+
return {
|
|
10
|
+
...token,
|
|
11
|
+
accessToken,
|
|
12
|
+
refreshToken,
|
|
13
|
+
accessTokenExpires: accessTokenExpires * 1000, // Convert seconds to milliseconds
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
console.error(ERROR_MESSAGES.FAILED_REFRESH_TOKEN, error.message || error.response?.data);
|
|
18
|
+
return {
|
|
19
|
+
// ...token,
|
|
20
|
+
error: "RefreshAccessTokenError",
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=refreshAccessToken.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refreshAccessToken.js","sourceRoot":"./","sources":["nextAuth/refreshAccessToken.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,KAAU;IAC/C,IAAI;QACF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,CAC/B,GAAG,OAAO,CAAC,GAAG,CAAC,2BAA2B,yBAAyB,EACnE,EAAE,YAAY,EAAE,KAAK,CAAC,YAAY,EAAE,CACrC,CAAC;QAEF,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;QACzD,MAAM,EAAE,GAAG,EAAE,kBAAkB,EAAE,GAAG,SAAS,CAAkB,WAAW,CAAC,CAAC;QAE5E,OAAO;YACL,GAAG,KAAK;YACR,WAAW;YACX,YAAY;YACZ,kBAAkB,EAAE,kBAAkB,GAAG,IAAI,EAAE,kCAAkC;SAClF,CAAC;KACH;IAAC,OAAO,KAAU,EAAE;QACnB,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,oBAAoB,EAAE,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAC1F,OAAO;YACL,YAAY;YACZ,KAAK,EAAE,yBAAyB;SACjC,CAAC;KACH;AACH,CAAC","sourcesContent":["import { ERROR_MESSAGES } from \"../constants/error-messages\";\nimport axios from \"axios\";\nimport { jwtDecode } from \"jwt-decode\";\n\nexport async function refreshAccessToken(token: any) {\n try {\n const response = await axios.post(\n `${process.env.NEXT_PUBLIC_BACKEND_API_URL}/api/iam/refresh-tokens`,\n { refreshToken: token.refreshToken }\n );\n \n const { accessToken, refreshToken } = response.data.data;\n const { exp: accessTokenExpires } = jwtDecode<{ exp: number }>(accessToken);\n \n return {\n ...token,\n accessToken,\n refreshToken,\n accessTokenExpires: accessTokenExpires * 1000, // Convert seconds to milliseconds\n };\n } catch (error: any) {\n console.error(ERROR_MESSAGES.FAILED_REFRESH_TOKEN, error.message || error.response?.data);\n return {\n // ...token,\n error: \"RefreshAccessTokenError\",\n };\n }\n }"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ERROR_MESSAGES } from "../constants/error-messages";
|
|
2
|
+
import axios from "axios";
|
|
3
|
+
import { jwtDecode } from "jwt-decode";
|
|
4
|
+
|
|
5
|
+
export async function refreshAccessToken(token: any) {
|
|
6
|
+
try {
|
|
7
|
+
const response = await axios.post(
|
|
8
|
+
`${process.env.NEXT_PUBLIC_BACKEND_API_URL}/api/iam/refresh-tokens`,
|
|
9
|
+
{ refreshToken: token.refreshToken }
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
const { accessToken, refreshToken } = response.data.data;
|
|
13
|
+
const { exp: accessTokenExpires } = jwtDecode<{ exp: number }>(accessToken);
|
|
14
|
+
|
|
15
|
+
return {
|
|
16
|
+
...token,
|
|
17
|
+
accessToken,
|
|
18
|
+
refreshToken,
|
|
19
|
+
accessTokenExpires: accessTokenExpires * 1000, // Convert seconds to milliseconds
|
|
20
|
+
};
|
|
21
|
+
} catch (error: any) {
|
|
22
|
+
console.error(ERROR_MESSAGES.FAILED_REFRESH_TOKEN, error.message || error.response?.data);
|
|
23
|
+
return {
|
|
24
|
+
// ...token,
|
|
25
|
+
error: "RefreshAccessTokenError",
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PayloadAction } from "@reduxjs/toolkit";
|
|
2
|
+
export interface ISettingsState {
|
|
3
|
+
authSettings: Record<string, any>;
|
|
4
|
+
solidSettings: Record<string, any>;
|
|
5
|
+
}
|
|
6
|
+
export declare const settingsSlice: import("@reduxjs/toolkit").Slice<ISettingsState, {
|
|
7
|
+
setSolidSettings: (state: import("immer/dist/internal.js").WritableDraft<ISettingsState>, action: PayloadAction<Record<string, any>>) => void;
|
|
8
|
+
updateSolidSetting: (state: import("immer/dist/internal.js").WritableDraft<ISettingsState>, action: PayloadAction<{
|
|
9
|
+
key: string;
|
|
10
|
+
value: any;
|
|
11
|
+
}>) => void;
|
|
12
|
+
resetSettings: () => ISettingsState;
|
|
13
|
+
}, "settingsSlice">;
|
|
14
|
+
declare const _default: import("@reduxjs/toolkit").Reducer<ISettingsState>;
|
|
15
|
+
export default _default;
|
|
16
|
+
export declare const setSolidSettings: import("@reduxjs/toolkit").ActionCreatorWithPayload<Record<string, any>, "settingsSlice/setSolidSettings">, updateSolidSetting: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
17
|
+
key: string;
|
|
18
|
+
value: any;
|
|
19
|
+
}, "settingsSlice/updateSolidSetting">, resetSettings: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"settingsSlice/resetSettings">;
|
|
20
|
+
//# sourceMappingURL=settingsSlice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settingsSlice.d.ts","sourceRoot":"./","sources":["redux/features/settingsSlice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAe,MAAM,kBAAkB,CAAC;AAE9D,MAAM,WAAW,cAAc;IAC7B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAClC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACpC;AAOD,eAAO,MAAM,aAAa;sGAsBZ,cAAc,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;wGAOlC,cAAc;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,GAAG,CAAA;KAAE,CAAC;;mBAQtD,CAAC;;AAEH,wBAAqC;AAErC,eAAO,MAGL,gBAAgB,8GAChB,kBAAkB;SAhBe,MAAM;WAAS,GAAG;wCAiBnD,aAAa,uFACU,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { createSlice } from "@reduxjs/toolkit";
|
|
2
|
+
const initialState = {
|
|
3
|
+
authSettings: {},
|
|
4
|
+
solidSettings: {},
|
|
5
|
+
};
|
|
6
|
+
export const settingsSlice = createSlice({
|
|
7
|
+
name: "settingsSlice",
|
|
8
|
+
initialState,
|
|
9
|
+
reducers: {
|
|
10
|
+
// // -------- AUTH SETTINGS --------
|
|
11
|
+
// setAuthSettings: (
|
|
12
|
+
// state,
|
|
13
|
+
// action: PayloadAction<Record<string, any>>
|
|
14
|
+
// ) => {
|
|
15
|
+
// state.authSettings = action.payload;
|
|
16
|
+
// },
|
|
17
|
+
// updateAuthSetting: (
|
|
18
|
+
// state,
|
|
19
|
+
// action: PayloadAction<{ key: string; value: any }>
|
|
20
|
+
// ) => {
|
|
21
|
+
// state.authSettings[action.payload.key] = action.payload.value;
|
|
22
|
+
// },
|
|
23
|
+
// -------- SOLID SETTINGS --------
|
|
24
|
+
setSolidSettings: (state, action) => {
|
|
25
|
+
state.solidSettings = action.payload;
|
|
26
|
+
},
|
|
27
|
+
updateSolidSetting: (state, action) => {
|
|
28
|
+
state.solidSettings[action.payload.key] = action.payload.value;
|
|
29
|
+
},
|
|
30
|
+
// -------- RESET --------
|
|
31
|
+
resetSettings: () => initialState,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
export default settingsSlice.reducer;
|
|
35
|
+
export const {
|
|
36
|
+
// setAuthSettings,
|
|
37
|
+
// updateAuthSetting,
|
|
38
|
+
setSolidSettings, updateSolidSetting, resetSettings, } = settingsSlice.actions;
|
|
39
|
+
//# sourceMappingURL=settingsSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settingsSlice.js","sourceRoot":"./","sources":["redux/features/settingsSlice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAO9D,MAAM,YAAY,GAAmB;IACnC,YAAY,EAAE,EAAE;IAChB,aAAa,EAAE,EAAE;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;IACvC,IAAI,EAAE,eAAe;IACrB,YAAY;IACZ,QAAQ,EAAE;QACR,qCAAqC;QACrC,qBAAqB;QACrB,WAAW;QACX,+CAA+C;QAC/C,SAAS;QACT,yCAAyC;QACzC,KAAK;QAEL,uBAAuB;QACvB,WAAW;QACX,uDAAuD;QACvD,SAAS;QACT,mEAAmE;QACnE,KAAK;QAEL,mCAAmC;QACnC,gBAAgB,EAAE,CAChB,KAAK,EACL,MAA0C,EAC1C,EAAE;YACF,KAAK,CAAC,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC;QACvC,CAAC;QAED,kBAAkB,EAAE,CAClB,KAAK,EACL,MAAkD,EAClD,EAAE;YACF,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;QACjE,CAAC;QAED,0BAA0B;QAC1B,aAAa,EAAE,GAAG,EAAE,CAAC,YAAY;KAClC;CACF,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC,OAAO,CAAC;AAErC,MAAM,CAAC,MAAM;AACX,mBAAmB;AACnB,qBAAqB;AACrB,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,GACd,GAAG,aAAa,CAAC,OAAO,CAAC","sourcesContent":["import { PayloadAction, createSlice } from \"@reduxjs/toolkit\";\n\nexport interface ISettingsState {\n authSettings: Record<string, any>;\n solidSettings: Record<string, any>;\n}\n\nconst initialState: ISettingsState = {\n authSettings: {},\n solidSettings: {},\n};\n\nexport const settingsSlice = createSlice({\n name: \"settingsSlice\",\n initialState,\n reducers: {\n // // -------- AUTH SETTINGS --------\n // setAuthSettings: (\n // state,\n // action: PayloadAction<Record<string, any>>\n // ) => {\n // state.authSettings = action.payload;\n // },\n\n // updateAuthSetting: (\n // state,\n // action: PayloadAction<{ key: string; value: any }>\n // ) => {\n // state.authSettings[action.payload.key] = action.payload.value;\n // },\n\n // -------- SOLID SETTINGS --------\n setSolidSettings: (\n state,\n action: PayloadAction<Record<string, any>>\n ) => {\n state.solidSettings = action.payload;\n },\n\n updateSolidSetting: (\n state,\n action: PayloadAction<{ key: string; value: any }>\n ) => {\n state.solidSettings[action.payload.key] = action.payload.value;\n },\n\n // -------- RESET --------\n resetSettings: () => initialState,\n },\n});\n\nexport default settingsSlice.reducer;\n\nexport const {\n // setAuthSettings,\n // updateAuthSetting,\n setSolidSettings,\n updateSolidSetting,\n resetSettings,\n} = settingsSlice.actions;\n"]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { PayloadAction, createSlice } from "@reduxjs/toolkit";
|
|
2
|
+
|
|
3
|
+
export interface ISettingsState {
|
|
4
|
+
authSettings: Record<string, any>;
|
|
5
|
+
solidSettings: Record<string, any>;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const initialState: ISettingsState = {
|
|
9
|
+
authSettings: {},
|
|
10
|
+
solidSettings: {},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const settingsSlice = createSlice({
|
|
14
|
+
name: "settingsSlice",
|
|
15
|
+
initialState,
|
|
16
|
+
reducers: {
|
|
17
|
+
// // -------- AUTH SETTINGS --------
|
|
18
|
+
// setAuthSettings: (
|
|
19
|
+
// state,
|
|
20
|
+
// action: PayloadAction<Record<string, any>>
|
|
21
|
+
// ) => {
|
|
22
|
+
// state.authSettings = action.payload;
|
|
23
|
+
// },
|
|
24
|
+
|
|
25
|
+
// updateAuthSetting: (
|
|
26
|
+
// state,
|
|
27
|
+
// action: PayloadAction<{ key: string; value: any }>
|
|
28
|
+
// ) => {
|
|
29
|
+
// state.authSettings[action.payload.key] = action.payload.value;
|
|
30
|
+
// },
|
|
31
|
+
|
|
32
|
+
// -------- SOLID SETTINGS --------
|
|
33
|
+
setSolidSettings: (
|
|
34
|
+
state,
|
|
35
|
+
action: PayloadAction<Record<string, any>>
|
|
36
|
+
) => {
|
|
37
|
+
state.solidSettings = action.payload;
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
updateSolidSetting: (
|
|
41
|
+
state,
|
|
42
|
+
action: PayloadAction<{ key: string; value: any }>
|
|
43
|
+
) => {
|
|
44
|
+
state.solidSettings[action.payload.key] = action.payload.value;
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
// -------- RESET --------
|
|
48
|
+
resetSettings: () => initialState,
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export default settingsSlice.reducer;
|
|
53
|
+
|
|
54
|
+
export const {
|
|
55
|
+
// setAuthSettings,
|
|
56
|
+
// updateAuthSetting,
|
|
57
|
+
setSolidSettings,
|
|
58
|
+
updateSolidSetting,
|
|
59
|
+
resetSettings,
|
|
60
|
+
} = settingsSlice.actions;
|