@fctc/interface-logic 4.9.6 → 4.9.7
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/configs.js +2 -1
- package/dist/configs.mjs +2 -1
- package/dist/constants.d.mts +1 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/constants.mjs +1 -0
- package/dist/environment.js +2 -1
- package/dist/environment.mjs +2 -1
- package/dist/hooks.d.mts +2 -18
- package/dist/hooks.d.ts +2 -18
- package/dist/hooks.js +13 -16
- package/dist/hooks.mjs +13 -16
- package/dist/index.d.mts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +15 -17
- package/dist/index.mjs +15 -17
- package/dist/provider.d.mts +0 -1
- package/dist/provider.d.ts +0 -1
- package/dist/provider.js +15 -17
- package/dist/provider.mjs +15 -17
- package/dist/services.d.mts +2 -18
- package/dist/services.d.ts +2 -18
- package/dist/services.js +11 -15
- package/dist/services.mjs +11 -15
- package/package.json +92 -92
package/dist/configs.js
CHANGED
|
@@ -2261,6 +2261,7 @@ var axiosClient = {
|
|
|
2261
2261
|
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils;
|
|
2262
2262
|
const db = config?.db;
|
|
2263
2263
|
const database = config?.config?.database;
|
|
2264
|
+
const isSupabaseMode = config?.isSupaMode;
|
|
2264
2265
|
let isRefreshing = false;
|
|
2265
2266
|
let failedQueue = [];
|
|
2266
2267
|
const processQueue = (error, token = null) => {
|
|
@@ -2522,7 +2523,7 @@ var axiosClient = {
|
|
|
2522
2523
|
return url + (db2 ? "?db=" + db2 : "");
|
|
2523
2524
|
}
|
|
2524
2525
|
const getBaseUrl = (baseUrl, hardService) => {
|
|
2525
|
-
return `${baseUrl.replace(/\/$/, "")}/${hardService || sessionStorage2.getMenuFocus().service || config?.default_service}/api/v2`;
|
|
2526
|
+
return isSupabaseMode ? "" : `${baseUrl.replace(/\/$/, "")}/${hardService || sessionStorage2.getMenuFocus().service || config?.default_service}/api/v2`;
|
|
2526
2527
|
};
|
|
2527
2528
|
const getHeaders = (header) => {
|
|
2528
2529
|
const headers = {
|
package/dist/configs.mjs
CHANGED
|
@@ -2225,6 +2225,7 @@ var axiosClient = {
|
|
|
2225
2225
|
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils;
|
|
2226
2226
|
const db = config?.db;
|
|
2227
2227
|
const database = config?.config?.database;
|
|
2228
|
+
const isSupabaseMode = config?.isSupaMode;
|
|
2228
2229
|
let isRefreshing = false;
|
|
2229
2230
|
let failedQueue = [];
|
|
2230
2231
|
const processQueue = (error, token = null) => {
|
|
@@ -2486,7 +2487,7 @@ var axiosClient = {
|
|
|
2486
2487
|
return url + (db2 ? "?db=" + db2 : "");
|
|
2487
2488
|
}
|
|
2488
2489
|
const getBaseUrl = (baseUrl, hardService) => {
|
|
2489
|
-
return `${baseUrl.replace(/\/$/, "")}/${hardService || sessionStorage2.getMenuFocus().service || config?.default_service}/api/v2`;
|
|
2490
|
+
return isSupabaseMode ? "" : `${baseUrl.replace(/\/$/, "")}/${hardService || sessionStorage2.getMenuFocus().service || config?.default_service}/api/v2`;
|
|
2490
2491
|
};
|
|
2491
2492
|
const getHeaders = (header) => {
|
|
2492
2493
|
const headers = {
|
package/dist/constants.d.mts
CHANGED
package/dist/constants.d.ts
CHANGED
package/dist/constants.js
CHANGED
|
@@ -109,6 +109,7 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
109
109
|
UriConstants2["GRANT_ACCESS"] = "/grant-access";
|
|
110
110
|
UriConstants2["TOKEN_BY_CODE"] = "/token";
|
|
111
111
|
UriConstants2["LOGOUT"] = "/logout";
|
|
112
|
+
UriConstants2["SUPABASE_LOGIN_PATH"] = "/api/v2/auth/login";
|
|
112
113
|
UriConstants2["CREATE_UPDATE"] = "/create_update";
|
|
113
114
|
UriConstants2["SEARCH_READ"] = "/search_read";
|
|
114
115
|
UriConstants2["CREATE_PATH"] = "/create";
|
package/dist/constants.mjs
CHANGED
|
@@ -68,6 +68,7 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
68
68
|
UriConstants2["GRANT_ACCESS"] = "/grant-access";
|
|
69
69
|
UriConstants2["TOKEN_BY_CODE"] = "/token";
|
|
70
70
|
UriConstants2["LOGOUT"] = "/logout";
|
|
71
|
+
UriConstants2["SUPABASE_LOGIN_PATH"] = "/api/v2/auth/login";
|
|
71
72
|
UriConstants2["CREATE_UPDATE"] = "/create_update";
|
|
72
73
|
UriConstants2["SEARCH_READ"] = "/search_read";
|
|
73
74
|
UriConstants2["CREATE_PATH"] = "/create";
|
package/dist/environment.js
CHANGED
|
@@ -2263,6 +2263,7 @@ var axiosClient = {
|
|
|
2263
2263
|
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils;
|
|
2264
2264
|
const db = config?.db;
|
|
2265
2265
|
const database = config?.config?.database;
|
|
2266
|
+
const isSupabaseMode = config?.isSupaMode;
|
|
2266
2267
|
let isRefreshing = false;
|
|
2267
2268
|
let failedQueue = [];
|
|
2268
2269
|
const processQueue = (error, token = null) => {
|
|
@@ -2524,7 +2525,7 @@ var axiosClient = {
|
|
|
2524
2525
|
return url + (db2 ? "?db=" + db2 : "");
|
|
2525
2526
|
}
|
|
2526
2527
|
const getBaseUrl = (baseUrl, hardService) => {
|
|
2527
|
-
return `${baseUrl.replace(/\/$/, "")}/${hardService || sessionStorage2.getMenuFocus().service || config?.default_service}/api/v2`;
|
|
2528
|
+
return isSupabaseMode ? "" : `${baseUrl.replace(/\/$/, "")}/${hardService || sessionStorage2.getMenuFocus().service || config?.default_service}/api/v2`;
|
|
2528
2529
|
};
|
|
2529
2530
|
const getHeaders = (header) => {
|
|
2530
2531
|
const headers = {
|
package/dist/environment.mjs
CHANGED
|
@@ -2225,6 +2225,7 @@ var axiosClient = {
|
|
|
2225
2225
|
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils;
|
|
2226
2226
|
const db = config?.db;
|
|
2227
2227
|
const database = config?.config?.database;
|
|
2228
|
+
const isSupabaseMode = config?.isSupaMode;
|
|
2228
2229
|
let isRefreshing = false;
|
|
2229
2230
|
let failedQueue = [];
|
|
2230
2231
|
const processQueue = (error, token = null) => {
|
|
@@ -2486,7 +2487,7 @@ var axiosClient = {
|
|
|
2486
2487
|
return url + (db2 ? "?db=" + db2 : "");
|
|
2487
2488
|
}
|
|
2488
2489
|
const getBaseUrl = (baseUrl, hardService) => {
|
|
2489
|
-
return `${baseUrl.replace(/\/$/, "")}/${hardService || sessionStorage2.getMenuFocus().service || config?.default_service}/api/v2`;
|
|
2490
|
+
return isSupabaseMode ? "" : `${baseUrl.replace(/\/$/, "")}/${hardService || sessionStorage2.getMenuFocus().service || config?.default_service}/api/v2`;
|
|
2490
2491
|
};
|
|
2491
2492
|
const getHeaders = (header) => {
|
|
2492
2493
|
const headers = {
|
package/dist/hooks.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { L as LoginCredentialBody, d as SocialTokenBody, F as ForgotPasswordBody, u as updatePasswordBody, T as TThreadData, C as ContextApi, V as ViewData, c as GetSelectionType, f as GetViewParams } from './view-type-CfcWWR0w.mjs';
|
|
3
|
-
import * as _supabase_auth_js from '@supabase/auth-js';
|
|
4
3
|
import { B as BaseModelInit } from './base-model-type-DD8uZnDP.mjs';
|
|
5
4
|
import { BaseModel } from './models.mjs';
|
|
6
5
|
|
|
@@ -26,24 +25,9 @@ declare const useLoginSocial: () => _tanstack_react_query.UseMutationResult<any,
|
|
|
26
25
|
type LoginTenantUserBody = {
|
|
27
26
|
email: string;
|
|
28
27
|
password: string;
|
|
28
|
+
tenantId: string;
|
|
29
29
|
};
|
|
30
|
-
declare const useLoginTenantUser: () => _tanstack_react_query.UseMutationResult<
|
|
31
|
-
data: null;
|
|
32
|
-
error: {
|
|
33
|
-
message: string;
|
|
34
|
-
};
|
|
35
|
-
} | {
|
|
36
|
-
data: {
|
|
37
|
-
user: _supabase_auth_js.User;
|
|
38
|
-
session: _supabase_auth_js.Session;
|
|
39
|
-
weakPassword?: _supabase_auth_js.WeakPassword;
|
|
40
|
-
} | {
|
|
41
|
-
user: null;
|
|
42
|
-
session: null;
|
|
43
|
-
weakPassword?: null | undefined;
|
|
44
|
-
};
|
|
45
|
-
error: _supabase_auth_js.AuthError | null;
|
|
46
|
-
}, Error, LoginTenantUserBody, unknown>;
|
|
30
|
+
declare const useLoginTenantUser: () => _tanstack_react_query.UseMutationResult<any, Error, LoginTenantUserBody, unknown>;
|
|
47
31
|
|
|
48
32
|
declare const useResetPassword: () => _tanstack_react_query.UseMutationResult<any, Error, ForgotPasswordBody, unknown>;
|
|
49
33
|
|
package/dist/hooks.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { L as LoginCredentialBody, d as SocialTokenBody, F as ForgotPasswordBody, u as updatePasswordBody, T as TThreadData, C as ContextApi, V as ViewData, c as GetSelectionType, f as GetViewParams } from './view-type-CfcWWR0w.js';
|
|
3
|
-
import * as _supabase_auth_js from '@supabase/auth-js';
|
|
4
3
|
import { B as BaseModelInit } from './base-model-type-DD8uZnDP.js';
|
|
5
4
|
import { BaseModel } from './models.js';
|
|
6
5
|
|
|
@@ -26,24 +25,9 @@ declare const useLoginSocial: () => _tanstack_react_query.UseMutationResult<any,
|
|
|
26
25
|
type LoginTenantUserBody = {
|
|
27
26
|
email: string;
|
|
28
27
|
password: string;
|
|
28
|
+
tenantId: string;
|
|
29
29
|
};
|
|
30
|
-
declare const useLoginTenantUser: () => _tanstack_react_query.UseMutationResult<
|
|
31
|
-
data: null;
|
|
32
|
-
error: {
|
|
33
|
-
message: string;
|
|
34
|
-
};
|
|
35
|
-
} | {
|
|
36
|
-
data: {
|
|
37
|
-
user: _supabase_auth_js.User;
|
|
38
|
-
session: _supabase_auth_js.Session;
|
|
39
|
-
weakPassword?: _supabase_auth_js.WeakPassword;
|
|
40
|
-
} | {
|
|
41
|
-
user: null;
|
|
42
|
-
session: null;
|
|
43
|
-
weakPassword?: null | undefined;
|
|
44
|
-
};
|
|
45
|
-
error: _supabase_auth_js.AuthError | null;
|
|
46
|
-
}, Error, LoginTenantUserBody, unknown>;
|
|
30
|
+
declare const useLoginTenantUser: () => _tanstack_react_query.UseMutationResult<any, Error, LoginTenantUserBody, unknown>;
|
|
47
31
|
|
|
48
32
|
declare const useResetPassword: () => _tanstack_react_query.UseMutationResult<any, Error, ForgotPasswordBody, unknown>;
|
|
49
33
|
|
package/dist/hooks.js
CHANGED
|
@@ -208,6 +208,7 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
208
208
|
UriConstants2["GRANT_ACCESS"] = "/grant-access";
|
|
209
209
|
UriConstants2["TOKEN_BY_CODE"] = "/token";
|
|
210
210
|
UriConstants2["LOGOUT"] = "/logout";
|
|
211
|
+
UriConstants2["SUPABASE_LOGIN_PATH"] = "/api/v2/auth/login";
|
|
211
212
|
UriConstants2["CREATE_UPDATE"] = "/create_update";
|
|
212
213
|
UriConstants2["SEARCH_READ"] = "/search_read";
|
|
213
214
|
UriConstants2["CREATE_PATH"] = "/create";
|
|
@@ -3328,11 +3329,7 @@ function useActionService() {
|
|
|
3328
3329
|
[env]
|
|
3329
3330
|
);
|
|
3330
3331
|
const actionServerHome = (0, import_react8.useCallback)(async () => {
|
|
3331
|
-
return
|
|
3332
|
-
headers: {
|
|
3333
|
-
"Content-Type": "application/json"
|
|
3334
|
-
}
|
|
3335
|
-
});
|
|
3332
|
+
return env?.requests?.get("/action_server_home" /* ACTION_SERVER_HOME */);
|
|
3336
3333
|
}, [env]);
|
|
3337
3334
|
return {
|
|
3338
3335
|
loadAction,
|
|
@@ -3379,19 +3376,18 @@ function useAuthService() {
|
|
|
3379
3376
|
);
|
|
3380
3377
|
const loginTenantUser = (0, import_react9.useCallback)(
|
|
3381
3378
|
async (body) => {
|
|
3382
|
-
|
|
3383
|
-
return {
|
|
3384
|
-
data: null,
|
|
3385
|
-
error: { message: "Supabase client is not initialized" }
|
|
3386
|
-
};
|
|
3387
|
-
}
|
|
3388
|
-
const { data, error } = await supabase.auth.signInWithPassword({
|
|
3379
|
+
const payload = {
|
|
3389
3380
|
email: body.email,
|
|
3390
|
-
password: body.password
|
|
3381
|
+
password: body.password,
|
|
3382
|
+
tenant_id: body.tenantId
|
|
3383
|
+
};
|
|
3384
|
+
return env?.requests?.post("/api/v2/auth/login" /* SUPABASE_LOGIN_PATH */, payload, {
|
|
3385
|
+
headers: {
|
|
3386
|
+
"Content-Type": "application/json"
|
|
3387
|
+
}
|
|
3391
3388
|
});
|
|
3392
|
-
return { data, error };
|
|
3393
3389
|
},
|
|
3394
|
-
[
|
|
3390
|
+
[env]
|
|
3395
3391
|
);
|
|
3396
3392
|
const forgotPassword = (0, import_react9.useCallback)(
|
|
3397
3393
|
async (email) => {
|
|
@@ -7414,7 +7410,8 @@ var useLoginTenantUser = () => {
|
|
|
7414
7410
|
mutationFn: (data) => {
|
|
7415
7411
|
return loginTenantUser({
|
|
7416
7412
|
email: data.email,
|
|
7417
|
-
password: data.password
|
|
7413
|
+
password: data.password,
|
|
7414
|
+
tenantId: data.tenantId
|
|
7418
7415
|
});
|
|
7419
7416
|
}
|
|
7420
7417
|
});
|
package/dist/hooks.mjs
CHANGED
|
@@ -35,6 +35,7 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
35
35
|
UriConstants2["GRANT_ACCESS"] = "/grant-access";
|
|
36
36
|
UriConstants2["TOKEN_BY_CODE"] = "/token";
|
|
37
37
|
UriConstants2["LOGOUT"] = "/logout";
|
|
38
|
+
UriConstants2["SUPABASE_LOGIN_PATH"] = "/api/v2/auth/login";
|
|
38
39
|
UriConstants2["CREATE_UPDATE"] = "/create_update";
|
|
39
40
|
UriConstants2["SEARCH_READ"] = "/search_read";
|
|
40
41
|
UriConstants2["CREATE_PATH"] = "/create";
|
|
@@ -3155,11 +3156,7 @@ function useActionService() {
|
|
|
3155
3156
|
[env]
|
|
3156
3157
|
);
|
|
3157
3158
|
const actionServerHome = useCallback2(async () => {
|
|
3158
|
-
return
|
|
3159
|
-
headers: {
|
|
3160
|
-
"Content-Type": "application/json"
|
|
3161
|
-
}
|
|
3162
|
-
});
|
|
3159
|
+
return env?.requests?.get("/action_server_home" /* ACTION_SERVER_HOME */);
|
|
3163
3160
|
}, [env]);
|
|
3164
3161
|
return {
|
|
3165
3162
|
loadAction,
|
|
@@ -3206,19 +3203,18 @@ function useAuthService() {
|
|
|
3206
3203
|
);
|
|
3207
3204
|
const loginTenantUser = useCallback3(
|
|
3208
3205
|
async (body) => {
|
|
3209
|
-
|
|
3210
|
-
return {
|
|
3211
|
-
data: null,
|
|
3212
|
-
error: { message: "Supabase client is not initialized" }
|
|
3213
|
-
};
|
|
3214
|
-
}
|
|
3215
|
-
const { data, error } = await supabase.auth.signInWithPassword({
|
|
3206
|
+
const payload = {
|
|
3216
3207
|
email: body.email,
|
|
3217
|
-
password: body.password
|
|
3208
|
+
password: body.password,
|
|
3209
|
+
tenant_id: body.tenantId
|
|
3210
|
+
};
|
|
3211
|
+
return env?.requests?.post("/api/v2/auth/login" /* SUPABASE_LOGIN_PATH */, payload, {
|
|
3212
|
+
headers: {
|
|
3213
|
+
"Content-Type": "application/json"
|
|
3214
|
+
}
|
|
3218
3215
|
});
|
|
3219
|
-
return { data, error };
|
|
3220
3216
|
},
|
|
3221
|
-
[
|
|
3217
|
+
[env]
|
|
3222
3218
|
);
|
|
3223
3219
|
const forgotPassword = useCallback3(
|
|
3224
3220
|
async (email) => {
|
|
@@ -7241,7 +7237,8 @@ var useLoginTenantUser = () => {
|
|
|
7241
7237
|
mutationFn: (data) => {
|
|
7242
7238
|
return loginTenantUser({
|
|
7243
7239
|
email: data.email,
|
|
7244
|
-
password: data.password
|
|
7240
|
+
password: data.password,
|
|
7241
|
+
tenantId: data.tenantId
|
|
7245
7242
|
});
|
|
7246
7243
|
}
|
|
7247
7244
|
});
|
package/dist/index.d.mts
CHANGED
|
@@ -12,7 +12,6 @@ export { B as BaseModelInit } from './base-model-type-DD8uZnDP.mjs';
|
|
|
12
12
|
export { BaseModel } from './models.mjs';
|
|
13
13
|
import './local-storage-BPvoMGYJ.mjs';
|
|
14
14
|
import '@tanstack/react-query';
|
|
15
|
-
import '@supabase/auth-js';
|
|
16
15
|
import 'react/jsx-runtime';
|
|
17
16
|
import 'react';
|
|
18
17
|
import '@supabase/supabase-js';
|
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ export { B as BaseModelInit } from './base-model-type-DD8uZnDP.js';
|
|
|
12
12
|
export { BaseModel } from './models.js';
|
|
13
13
|
import './local-storage-BPvoMGYJ.js';
|
|
14
14
|
import '@tanstack/react-query';
|
|
15
|
-
import '@supabase/auth-js';
|
|
16
15
|
import 'react/jsx-runtime';
|
|
17
16
|
import 'react';
|
|
18
17
|
import '@supabase/supabase-js';
|
package/dist/index.js
CHANGED
|
@@ -399,6 +399,7 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
399
399
|
UriConstants2["GRANT_ACCESS"] = "/grant-access";
|
|
400
400
|
UriConstants2["TOKEN_BY_CODE"] = "/token";
|
|
401
401
|
UriConstants2["LOGOUT"] = "/logout";
|
|
402
|
+
UriConstants2["SUPABASE_LOGIN_PATH"] = "/api/v2/auth/login";
|
|
402
403
|
UriConstants2["CREATE_UPDATE"] = "/create_update";
|
|
403
404
|
UriConstants2["SEARCH_READ"] = "/search_read";
|
|
404
405
|
UriConstants2["CREATE_PATH"] = "/create";
|
|
@@ -3654,6 +3655,7 @@ var axiosClient = {
|
|
|
3654
3655
|
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils;
|
|
3655
3656
|
const db = config?.db;
|
|
3656
3657
|
const database = config?.config?.database;
|
|
3658
|
+
const isSupabaseMode = config?.isSupaMode;
|
|
3657
3659
|
let isRefreshing = false;
|
|
3658
3660
|
let failedQueue = [];
|
|
3659
3661
|
const processQueue = (error, token = null) => {
|
|
@@ -3915,7 +3917,7 @@ var axiosClient = {
|
|
|
3915
3917
|
return url + (db2 ? "?db=" + db2 : "");
|
|
3916
3918
|
}
|
|
3917
3919
|
const getBaseUrl = (baseUrl, hardService) => {
|
|
3918
|
-
return `${baseUrl.replace(/\/$/, "")}/${hardService || sessionStorage2.getMenuFocus().service || config?.default_service}/api/v2`;
|
|
3920
|
+
return isSupabaseMode ? "" : `${baseUrl.replace(/\/$/, "")}/${hardService || sessionStorage2.getMenuFocus().service || config?.default_service}/api/v2`;
|
|
3919
3921
|
};
|
|
3920
3922
|
const getHeaders = (header) => {
|
|
3921
3923
|
const headers = {
|
|
@@ -5387,11 +5389,7 @@ function useActionService() {
|
|
|
5387
5389
|
[env2]
|
|
5388
5390
|
);
|
|
5389
5391
|
const actionServerHome = (0, import_react8.useCallback)(async () => {
|
|
5390
|
-
return
|
|
5391
|
-
headers: {
|
|
5392
|
-
"Content-Type": "application/json"
|
|
5393
|
-
}
|
|
5394
|
-
});
|
|
5392
|
+
return env2?.requests?.get("/action_server_home" /* ACTION_SERVER_HOME */);
|
|
5395
5393
|
}, [env2]);
|
|
5396
5394
|
return {
|
|
5397
5395
|
loadAction,
|
|
@@ -5438,19 +5436,18 @@ function useAuthService() {
|
|
|
5438
5436
|
);
|
|
5439
5437
|
const loginTenantUser = (0, import_react9.useCallback)(
|
|
5440
5438
|
async (body) => {
|
|
5441
|
-
|
|
5442
|
-
return {
|
|
5443
|
-
data: null,
|
|
5444
|
-
error: { message: "Supabase client is not initialized" }
|
|
5445
|
-
};
|
|
5446
|
-
}
|
|
5447
|
-
const { data, error } = await supabase.auth.signInWithPassword({
|
|
5439
|
+
const payload = {
|
|
5448
5440
|
email: body.email,
|
|
5449
|
-
password: body.password
|
|
5441
|
+
password: body.password,
|
|
5442
|
+
tenant_id: body.tenantId
|
|
5443
|
+
};
|
|
5444
|
+
return env2?.requests?.post("/api/v2/auth/login" /* SUPABASE_LOGIN_PATH */, payload, {
|
|
5445
|
+
headers: {
|
|
5446
|
+
"Content-Type": "application/json"
|
|
5447
|
+
}
|
|
5450
5448
|
});
|
|
5451
|
-
return { data, error };
|
|
5452
5449
|
},
|
|
5453
|
-
[
|
|
5450
|
+
[env2]
|
|
5454
5451
|
);
|
|
5455
5452
|
const forgotPassword = (0, import_react9.useCallback)(
|
|
5456
5453
|
async (email) => {
|
|
@@ -9473,7 +9470,8 @@ var useLoginTenantUser = () => {
|
|
|
9473
9470
|
mutationFn: (data) => {
|
|
9474
9471
|
return loginTenantUser({
|
|
9475
9472
|
email: data.email,
|
|
9476
|
-
password: data.password
|
|
9473
|
+
password: data.password,
|
|
9474
|
+
tenantId: data.tenantId
|
|
9477
9475
|
});
|
|
9478
9476
|
}
|
|
9479
9477
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -71,6 +71,7 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
71
71
|
UriConstants2["GRANT_ACCESS"] = "/grant-access";
|
|
72
72
|
UriConstants2["TOKEN_BY_CODE"] = "/token";
|
|
73
73
|
UriConstants2["LOGOUT"] = "/logout";
|
|
74
|
+
UriConstants2["SUPABASE_LOGIN_PATH"] = "/api/v2/auth/login";
|
|
74
75
|
UriConstants2["CREATE_UPDATE"] = "/create_update";
|
|
75
76
|
UriConstants2["SEARCH_READ"] = "/search_read";
|
|
76
77
|
UriConstants2["CREATE_PATH"] = "/create";
|
|
@@ -3326,6 +3327,7 @@ var axiosClient = {
|
|
|
3326
3327
|
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils;
|
|
3327
3328
|
const db = config?.db;
|
|
3328
3329
|
const database = config?.config?.database;
|
|
3330
|
+
const isSupabaseMode = config?.isSupaMode;
|
|
3329
3331
|
let isRefreshing = false;
|
|
3330
3332
|
let failedQueue = [];
|
|
3331
3333
|
const processQueue = (error, token = null) => {
|
|
@@ -3587,7 +3589,7 @@ var axiosClient = {
|
|
|
3587
3589
|
return url + (db2 ? "?db=" + db2 : "");
|
|
3588
3590
|
}
|
|
3589
3591
|
const getBaseUrl = (baseUrl, hardService) => {
|
|
3590
|
-
return `${baseUrl.replace(/\/$/, "")}/${hardService || sessionStorage2.getMenuFocus().service || config?.default_service}/api/v2`;
|
|
3592
|
+
return isSupabaseMode ? "" : `${baseUrl.replace(/\/$/, "")}/${hardService || sessionStorage2.getMenuFocus().service || config?.default_service}/api/v2`;
|
|
3591
3593
|
};
|
|
3592
3594
|
const getHeaders = (header) => {
|
|
3593
3595
|
const headers = {
|
|
@@ -5059,11 +5061,7 @@ function useActionService() {
|
|
|
5059
5061
|
[env2]
|
|
5060
5062
|
);
|
|
5061
5063
|
const actionServerHome = useCallback2(async () => {
|
|
5062
|
-
return
|
|
5063
|
-
headers: {
|
|
5064
|
-
"Content-Type": "application/json"
|
|
5065
|
-
}
|
|
5066
|
-
});
|
|
5064
|
+
return env2?.requests?.get("/action_server_home" /* ACTION_SERVER_HOME */);
|
|
5067
5065
|
}, [env2]);
|
|
5068
5066
|
return {
|
|
5069
5067
|
loadAction,
|
|
@@ -5110,19 +5108,18 @@ function useAuthService() {
|
|
|
5110
5108
|
);
|
|
5111
5109
|
const loginTenantUser = useCallback3(
|
|
5112
5110
|
async (body) => {
|
|
5113
|
-
|
|
5114
|
-
return {
|
|
5115
|
-
data: null,
|
|
5116
|
-
error: { message: "Supabase client is not initialized" }
|
|
5117
|
-
};
|
|
5118
|
-
}
|
|
5119
|
-
const { data, error } = await supabase.auth.signInWithPassword({
|
|
5111
|
+
const payload = {
|
|
5120
5112
|
email: body.email,
|
|
5121
|
-
password: body.password
|
|
5113
|
+
password: body.password,
|
|
5114
|
+
tenant_id: body.tenantId
|
|
5115
|
+
};
|
|
5116
|
+
return env2?.requests?.post("/api/v2/auth/login" /* SUPABASE_LOGIN_PATH */, payload, {
|
|
5117
|
+
headers: {
|
|
5118
|
+
"Content-Type": "application/json"
|
|
5119
|
+
}
|
|
5122
5120
|
});
|
|
5123
|
-
return { data, error };
|
|
5124
5121
|
},
|
|
5125
|
-
[
|
|
5122
|
+
[env2]
|
|
5126
5123
|
);
|
|
5127
5124
|
const forgotPassword = useCallback3(
|
|
5128
5125
|
async (email) => {
|
|
@@ -9145,7 +9142,8 @@ var useLoginTenantUser = () => {
|
|
|
9145
9142
|
mutationFn: (data) => {
|
|
9146
9143
|
return loginTenantUser({
|
|
9147
9144
|
email: data.email,
|
|
9148
|
-
password: data.password
|
|
9145
|
+
password: data.password,
|
|
9146
|
+
tenantId: data.tenantId
|
|
9149
9147
|
});
|
|
9150
9148
|
}
|
|
9151
9149
|
});
|
package/dist/provider.d.mts
CHANGED
|
@@ -5,7 +5,6 @@ import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToke
|
|
|
5
5
|
import { SupabaseClient } from '@supabase/supabase-js';
|
|
6
6
|
import '@tanstack/react-query';
|
|
7
7
|
import './view-type-CfcWWR0w.mjs';
|
|
8
|
-
import '@supabase/auth-js';
|
|
9
8
|
import './base-model-type-DD8uZnDP.mjs';
|
|
10
9
|
import './models.mjs';
|
|
11
10
|
|
package/dist/provider.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToke
|
|
|
5
5
|
import { SupabaseClient } from '@supabase/supabase-js';
|
|
6
6
|
import '@tanstack/react-query';
|
|
7
7
|
import './view-type-CfcWWR0w.js';
|
|
8
|
-
import '@supabase/auth-js';
|
|
9
8
|
import './base-model-type-DD8uZnDP.js';
|
|
10
9
|
import './models.js';
|
|
11
10
|
|
package/dist/provider.js
CHANGED
|
@@ -737,6 +737,7 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
737
737
|
UriConstants2["GRANT_ACCESS"] = "/grant-access";
|
|
738
738
|
UriConstants2["TOKEN_BY_CODE"] = "/token";
|
|
739
739
|
UriConstants2["LOGOUT"] = "/logout";
|
|
740
|
+
UriConstants2["SUPABASE_LOGIN_PATH"] = "/api/v2/auth/login";
|
|
740
741
|
UriConstants2["CREATE_UPDATE"] = "/create_update";
|
|
741
742
|
UriConstants2["SEARCH_READ"] = "/search_read";
|
|
742
743
|
UriConstants2["CREATE_PATH"] = "/create";
|
|
@@ -3278,11 +3279,7 @@ function useActionService() {
|
|
|
3278
3279
|
[env]
|
|
3279
3280
|
);
|
|
3280
3281
|
const actionServerHome = (0, import_react3.useCallback)(async () => {
|
|
3281
|
-
return
|
|
3282
|
-
headers: {
|
|
3283
|
-
"Content-Type": "application/json"
|
|
3284
|
-
}
|
|
3285
|
-
});
|
|
3282
|
+
return env?.requests?.get("/action_server_home" /* ACTION_SERVER_HOME */);
|
|
3286
3283
|
}, [env]);
|
|
3287
3284
|
return {
|
|
3288
3285
|
loadAction,
|
|
@@ -3367,19 +3364,18 @@ function useAuthService() {
|
|
|
3367
3364
|
);
|
|
3368
3365
|
const loginTenantUser = (0, import_react5.useCallback)(
|
|
3369
3366
|
async (body) => {
|
|
3370
|
-
|
|
3371
|
-
return {
|
|
3372
|
-
data: null,
|
|
3373
|
-
error: { message: "Supabase client is not initialized" }
|
|
3374
|
-
};
|
|
3375
|
-
}
|
|
3376
|
-
const { data, error } = await supabase.auth.signInWithPassword({
|
|
3367
|
+
const payload = {
|
|
3377
3368
|
email: body.email,
|
|
3378
|
-
password: body.password
|
|
3369
|
+
password: body.password,
|
|
3370
|
+
tenant_id: body.tenantId
|
|
3371
|
+
};
|
|
3372
|
+
return env?.requests?.post("/api/v2/auth/login" /* SUPABASE_LOGIN_PATH */, payload, {
|
|
3373
|
+
headers: {
|
|
3374
|
+
"Content-Type": "application/json"
|
|
3375
|
+
}
|
|
3379
3376
|
});
|
|
3380
|
-
return { data, error };
|
|
3381
3377
|
},
|
|
3382
|
-
[
|
|
3378
|
+
[env]
|
|
3383
3379
|
);
|
|
3384
3380
|
const forgotPassword = (0, import_react5.useCallback)(
|
|
3385
3381
|
async (email) => {
|
|
@@ -7369,6 +7365,7 @@ var axiosClient = {
|
|
|
7369
7365
|
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils;
|
|
7370
7366
|
const db = config?.db;
|
|
7371
7367
|
const database = config?.config?.database;
|
|
7368
|
+
const isSupabaseMode = config?.isSupaMode;
|
|
7372
7369
|
let isRefreshing = false;
|
|
7373
7370
|
let failedQueue = [];
|
|
7374
7371
|
const processQueue = (error, token = null) => {
|
|
@@ -7630,7 +7627,7 @@ var axiosClient = {
|
|
|
7630
7627
|
return url + (db2 ? "?db=" + db2 : "");
|
|
7631
7628
|
}
|
|
7632
7629
|
const getBaseUrl = (baseUrl, hardService) => {
|
|
7633
|
-
return `${baseUrl.replace(/\/$/, "")}/${hardService || sessionStorage2.getMenuFocus().service || config?.default_service}/api/v2`;
|
|
7630
|
+
return isSupabaseMode ? "" : `${baseUrl.replace(/\/$/, "")}/${hardService || sessionStorage2.getMenuFocus().service || config?.default_service}/api/v2`;
|
|
7634
7631
|
};
|
|
7635
7632
|
const getHeaders = (header) => {
|
|
7636
7633
|
const headers = {
|
|
@@ -7899,7 +7896,8 @@ var useLoginTenantUser = () => {
|
|
|
7899
7896
|
mutationFn: (data) => {
|
|
7900
7897
|
return loginTenantUser({
|
|
7901
7898
|
email: data.email,
|
|
7902
|
-
password: data.password
|
|
7899
|
+
password: data.password,
|
|
7900
|
+
tenantId: data.tenantId
|
|
7903
7901
|
});
|
|
7904
7902
|
}
|
|
7905
7903
|
});
|
package/dist/provider.mjs
CHANGED
|
@@ -692,6 +692,7 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
692
692
|
UriConstants2["GRANT_ACCESS"] = "/grant-access";
|
|
693
693
|
UriConstants2["TOKEN_BY_CODE"] = "/token";
|
|
694
694
|
UriConstants2["LOGOUT"] = "/logout";
|
|
695
|
+
UriConstants2["SUPABASE_LOGIN_PATH"] = "/api/v2/auth/login";
|
|
695
696
|
UriConstants2["CREATE_UPDATE"] = "/create_update";
|
|
696
697
|
UriConstants2["SEARCH_READ"] = "/search_read";
|
|
697
698
|
UriConstants2["CREATE_PATH"] = "/create";
|
|
@@ -3233,11 +3234,7 @@ function useActionService() {
|
|
|
3233
3234
|
[env]
|
|
3234
3235
|
);
|
|
3235
3236
|
const actionServerHome = useCallback(async () => {
|
|
3236
|
-
return
|
|
3237
|
-
headers: {
|
|
3238
|
-
"Content-Type": "application/json"
|
|
3239
|
-
}
|
|
3240
|
-
});
|
|
3237
|
+
return env?.requests?.get("/action_server_home" /* ACTION_SERVER_HOME */);
|
|
3241
3238
|
}, [env]);
|
|
3242
3239
|
return {
|
|
3243
3240
|
loadAction,
|
|
@@ -3322,19 +3319,18 @@ function useAuthService() {
|
|
|
3322
3319
|
);
|
|
3323
3320
|
const loginTenantUser = useCallback2(
|
|
3324
3321
|
async (body) => {
|
|
3325
|
-
|
|
3326
|
-
return {
|
|
3327
|
-
data: null,
|
|
3328
|
-
error: { message: "Supabase client is not initialized" }
|
|
3329
|
-
};
|
|
3330
|
-
}
|
|
3331
|
-
const { data, error } = await supabase.auth.signInWithPassword({
|
|
3322
|
+
const payload = {
|
|
3332
3323
|
email: body.email,
|
|
3333
|
-
password: body.password
|
|
3324
|
+
password: body.password,
|
|
3325
|
+
tenant_id: body.tenantId
|
|
3326
|
+
};
|
|
3327
|
+
return env?.requests?.post("/api/v2/auth/login" /* SUPABASE_LOGIN_PATH */, payload, {
|
|
3328
|
+
headers: {
|
|
3329
|
+
"Content-Type": "application/json"
|
|
3330
|
+
}
|
|
3334
3331
|
});
|
|
3335
|
-
return { data, error };
|
|
3336
3332
|
},
|
|
3337
|
-
[
|
|
3333
|
+
[env]
|
|
3338
3334
|
);
|
|
3339
3335
|
const forgotPassword = useCallback2(
|
|
3340
3336
|
async (email) => {
|
|
@@ -7324,6 +7320,7 @@ var axiosClient = {
|
|
|
7324
7320
|
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils;
|
|
7325
7321
|
const db = config?.db;
|
|
7326
7322
|
const database = config?.config?.database;
|
|
7323
|
+
const isSupabaseMode = config?.isSupaMode;
|
|
7327
7324
|
let isRefreshing = false;
|
|
7328
7325
|
let failedQueue = [];
|
|
7329
7326
|
const processQueue = (error, token = null) => {
|
|
@@ -7585,7 +7582,7 @@ var axiosClient = {
|
|
|
7585
7582
|
return url + (db2 ? "?db=" + db2 : "");
|
|
7586
7583
|
}
|
|
7587
7584
|
const getBaseUrl = (baseUrl, hardService) => {
|
|
7588
|
-
return `${baseUrl.replace(/\/$/, "")}/${hardService || sessionStorage2.getMenuFocus().service || config?.default_service}/api/v2`;
|
|
7585
|
+
return isSupabaseMode ? "" : `${baseUrl.replace(/\/$/, "")}/${hardService || sessionStorage2.getMenuFocus().service || config?.default_service}/api/v2`;
|
|
7589
7586
|
};
|
|
7590
7587
|
const getHeaders = (header) => {
|
|
7591
7588
|
const headers = {
|
|
@@ -7854,7 +7851,8 @@ var useLoginTenantUser = () => {
|
|
|
7854
7851
|
mutationFn: (data) => {
|
|
7855
7852
|
return loginTenantUser({
|
|
7856
7853
|
email: data.email,
|
|
7857
|
-
password: data.password
|
|
7854
|
+
password: data.password,
|
|
7855
|
+
tenantId: data.tenantId
|
|
7858
7856
|
});
|
|
7859
7857
|
}
|
|
7860
7858
|
});
|
package/dist/services.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, T as TThreadData, h as GetExternalTab, b as GetListParams, a as GetDetailParams, S as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, f as GetViewParams, c as GetSelectionType } from './view-type-CfcWWR0w.mjs';
|
|
2
|
-
import * as _supabase_auth_js from '@supabase/auth-js';
|
|
3
2
|
|
|
4
3
|
declare function useActionService(): {
|
|
5
4
|
loadAction: ({ idAction, context, service, xNode, searchParams, }: {
|
|
@@ -60,23 +59,8 @@ declare function useAuthService(): {
|
|
|
60
59
|
loginTenantUser: (body: {
|
|
61
60
|
email: string;
|
|
62
61
|
password: string;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
error: {
|
|
66
|
-
message: string;
|
|
67
|
-
};
|
|
68
|
-
} | {
|
|
69
|
-
data: {
|
|
70
|
-
user: _supabase_auth_js.User;
|
|
71
|
-
session: _supabase_auth_js.Session;
|
|
72
|
-
weakPassword?: _supabase_auth_js.WeakPassword;
|
|
73
|
-
} | {
|
|
74
|
-
user: null;
|
|
75
|
-
session: null;
|
|
76
|
-
weakPassword?: null | undefined;
|
|
77
|
-
};
|
|
78
|
-
error: _supabase_auth_js.AuthError | null;
|
|
79
|
-
}>;
|
|
62
|
+
tenantId: string;
|
|
63
|
+
}) => Promise<any>;
|
|
80
64
|
forgotPassword: (email: string) => Promise<any>;
|
|
81
65
|
forgotPasswordSSO: ({ email, with_context, method, }: {
|
|
82
66
|
email: string;
|
package/dist/services.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, T as TThreadData, h as GetExternalTab, b as GetListParams, a as GetDetailParams, S as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, f as GetViewParams, c as GetSelectionType } from './view-type-CfcWWR0w.js';
|
|
2
|
-
import * as _supabase_auth_js from '@supabase/auth-js';
|
|
3
2
|
|
|
4
3
|
declare function useActionService(): {
|
|
5
4
|
loadAction: ({ idAction, context, service, xNode, searchParams, }: {
|
|
@@ -60,23 +59,8 @@ declare function useAuthService(): {
|
|
|
60
59
|
loginTenantUser: (body: {
|
|
61
60
|
email: string;
|
|
62
61
|
password: string;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
error: {
|
|
66
|
-
message: string;
|
|
67
|
-
};
|
|
68
|
-
} | {
|
|
69
|
-
data: {
|
|
70
|
-
user: _supabase_auth_js.User;
|
|
71
|
-
session: _supabase_auth_js.Session;
|
|
72
|
-
weakPassword?: _supabase_auth_js.WeakPassword;
|
|
73
|
-
} | {
|
|
74
|
-
user: null;
|
|
75
|
-
session: null;
|
|
76
|
-
weakPassword?: null | undefined;
|
|
77
|
-
};
|
|
78
|
-
error: _supabase_auth_js.AuthError | null;
|
|
79
|
-
}>;
|
|
62
|
+
tenantId: string;
|
|
63
|
+
}) => Promise<any>;
|
|
80
64
|
forgotPassword: (email: string) => Promise<any>;
|
|
81
65
|
forgotPasswordSSO: ({ email, with_context, method, }: {
|
|
82
66
|
email: string;
|
package/dist/services.js
CHANGED
|
@@ -78,6 +78,7 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
78
78
|
UriConstants2["GRANT_ACCESS"] = "/grant-access";
|
|
79
79
|
UriConstants2["TOKEN_BY_CODE"] = "/token";
|
|
80
80
|
UriConstants2["LOGOUT"] = "/logout";
|
|
81
|
+
UriConstants2["SUPABASE_LOGIN_PATH"] = "/api/v2/auth/login";
|
|
81
82
|
UriConstants2["CREATE_UPDATE"] = "/create_update";
|
|
82
83
|
UriConstants2["SEARCH_READ"] = "/search_read";
|
|
83
84
|
UriConstants2["CREATE_PATH"] = "/create";
|
|
@@ -5619,11 +5620,7 @@ function useActionService() {
|
|
|
5619
5620
|
[env]
|
|
5620
5621
|
);
|
|
5621
5622
|
const actionServerHome = (0, import_react62.useCallback)(async () => {
|
|
5622
|
-
return
|
|
5623
|
-
headers: {
|
|
5624
|
-
"Content-Type": "application/json"
|
|
5625
|
-
}
|
|
5626
|
-
});
|
|
5623
|
+
return env?.requests?.get("/action_server_home" /* ACTION_SERVER_HOME */);
|
|
5627
5624
|
}, [env]);
|
|
5628
5625
|
return {
|
|
5629
5626
|
loadAction,
|
|
@@ -5670,19 +5667,18 @@ function useAuthService() {
|
|
|
5670
5667
|
);
|
|
5671
5668
|
const loginTenantUser = (0, import_react63.useCallback)(
|
|
5672
5669
|
async (body) => {
|
|
5673
|
-
|
|
5674
|
-
return {
|
|
5675
|
-
data: null,
|
|
5676
|
-
error: { message: "Supabase client is not initialized" }
|
|
5677
|
-
};
|
|
5678
|
-
}
|
|
5679
|
-
const { data, error } = await supabase.auth.signInWithPassword({
|
|
5670
|
+
const payload = {
|
|
5680
5671
|
email: body.email,
|
|
5681
|
-
password: body.password
|
|
5672
|
+
password: body.password,
|
|
5673
|
+
tenant_id: body.tenantId
|
|
5674
|
+
};
|
|
5675
|
+
return env?.requests?.post("/api/v2/auth/login" /* SUPABASE_LOGIN_PATH */, payload, {
|
|
5676
|
+
headers: {
|
|
5677
|
+
"Content-Type": "application/json"
|
|
5678
|
+
}
|
|
5682
5679
|
});
|
|
5683
|
-
return { data, error };
|
|
5684
5680
|
},
|
|
5685
|
-
[
|
|
5681
|
+
[env]
|
|
5686
5682
|
);
|
|
5687
5683
|
const forgotPassword = (0, import_react63.useCallback)(
|
|
5688
5684
|
async (email) => {
|
package/dist/services.mjs
CHANGED
|
@@ -32,6 +32,7 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
32
32
|
UriConstants2["GRANT_ACCESS"] = "/grant-access";
|
|
33
33
|
UriConstants2["TOKEN_BY_CODE"] = "/token";
|
|
34
34
|
UriConstants2["LOGOUT"] = "/logout";
|
|
35
|
+
UriConstants2["SUPABASE_LOGIN_PATH"] = "/api/v2/auth/login";
|
|
35
36
|
UriConstants2["CREATE_UPDATE"] = "/create_update";
|
|
36
37
|
UriConstants2["SEARCH_READ"] = "/search_read";
|
|
37
38
|
UriConstants2["CREATE_PATH"] = "/create";
|
|
@@ -5573,11 +5574,7 @@ function useActionService() {
|
|
|
5573
5574
|
[env]
|
|
5574
5575
|
);
|
|
5575
5576
|
const actionServerHome = useCallback56(async () => {
|
|
5576
|
-
return
|
|
5577
|
-
headers: {
|
|
5578
|
-
"Content-Type": "application/json"
|
|
5579
|
-
}
|
|
5580
|
-
});
|
|
5577
|
+
return env?.requests?.get("/action_server_home" /* ACTION_SERVER_HOME */);
|
|
5581
5578
|
}, [env]);
|
|
5582
5579
|
return {
|
|
5583
5580
|
loadAction,
|
|
@@ -5624,19 +5621,18 @@ function useAuthService() {
|
|
|
5624
5621
|
);
|
|
5625
5622
|
const loginTenantUser = useCallback57(
|
|
5626
5623
|
async (body) => {
|
|
5627
|
-
|
|
5628
|
-
return {
|
|
5629
|
-
data: null,
|
|
5630
|
-
error: { message: "Supabase client is not initialized" }
|
|
5631
|
-
};
|
|
5632
|
-
}
|
|
5633
|
-
const { data, error } = await supabase.auth.signInWithPassword({
|
|
5624
|
+
const payload = {
|
|
5634
5625
|
email: body.email,
|
|
5635
|
-
password: body.password
|
|
5626
|
+
password: body.password,
|
|
5627
|
+
tenant_id: body.tenantId
|
|
5628
|
+
};
|
|
5629
|
+
return env?.requests?.post("/api/v2/auth/login" /* SUPABASE_LOGIN_PATH */, payload, {
|
|
5630
|
+
headers: {
|
|
5631
|
+
"Content-Type": "application/json"
|
|
5632
|
+
}
|
|
5636
5633
|
});
|
|
5637
|
-
return { data, error };
|
|
5638
5634
|
},
|
|
5639
|
-
[
|
|
5635
|
+
[env]
|
|
5640
5636
|
);
|
|
5641
5637
|
const forgotPassword = useCallback57(
|
|
5642
5638
|
async (email) => {
|
package/package.json
CHANGED
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@fctc/interface-logic",
|
|
3
|
-
"version": "4.9.
|
|
4
|
-
"types": "dist/index.d.ts",
|
|
5
|
-
"main": "dist/index.cjs",
|
|
6
|
-
"module": "dist/index.mjs",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"types": "./dist/index.d.ts",
|
|
10
|
-
"import": "./dist/index.mjs",
|
|
11
|
-
"require": "./dist/index.cjs"
|
|
12
|
-
},
|
|
13
|
-
"./configs": {
|
|
14
|
-
"types": "./dist/configs.d.ts",
|
|
15
|
-
"import": "./dist/configs.mjs",
|
|
16
|
-
"require": "./dist/configs.cjs"
|
|
17
|
-
},
|
|
18
|
-
"./constants": {
|
|
19
|
-
"types": "./dist/constants.d.ts",
|
|
20
|
-
"import": "./dist/constants.mjs",
|
|
21
|
-
"require": "./dist/constants.cjs"
|
|
22
|
-
},
|
|
23
|
-
"./environment": {
|
|
24
|
-
"types": "./dist/environment.d.ts",
|
|
25
|
-
"import": "./dist/environment.mjs",
|
|
26
|
-
"require": "./dist/environment.cjs"
|
|
27
|
-
},
|
|
28
|
-
"./hooks": {
|
|
29
|
-
"types": "./dist/hooks.d.ts",
|
|
30
|
-
"import": "./dist/hooks.mjs",
|
|
31
|
-
"require": "./dist/hooks.cjs"
|
|
32
|
-
},
|
|
33
|
-
"./provider": {
|
|
34
|
-
"types": "./dist/provider.d.ts",
|
|
35
|
-
"import": "./dist/provider.mjs",
|
|
36
|
-
"require": "./dist/provider.cjs"
|
|
37
|
-
},
|
|
38
|
-
"./services": {
|
|
39
|
-
"types": "./dist/services.d.ts",
|
|
40
|
-
"import": "./dist/services.mjs",
|
|
41
|
-
"require": "./dist/services.cjs"
|
|
42
|
-
},
|
|
43
|
-
"./store": {
|
|
44
|
-
"types": "./dist/store.d.ts",
|
|
45
|
-
"import": "./dist/store.mjs",
|
|
46
|
-
"require": "./dist/store.cjs"
|
|
47
|
-
},
|
|
48
|
-
"./utils": {
|
|
49
|
-
"types": "./dist/utils.d.ts",
|
|
50
|
-
"import": "./dist/utils.mjs",
|
|
51
|
-
"require": "./dist/utils.cjs"
|
|
52
|
-
},
|
|
53
|
-
"./types": {
|
|
54
|
-
"types": "./dist/types.d.ts",
|
|
55
|
-
"import": "./dist/types.mjs",
|
|
56
|
-
"require": "./dist/types.cjs"
|
|
57
|
-
},
|
|
58
|
-
"./models": {
|
|
59
|
-
"types": "./dist/models.d.ts",
|
|
60
|
-
"import": "./dist/models.mjs",
|
|
61
|
-
"require": "./dist/models.cjs"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
"files": [
|
|
65
|
-
"dist"
|
|
66
|
-
],
|
|
67
|
-
"scripts": {
|
|
68
|
-
"build": "tsup",
|
|
69
|
-
"test": "jest"
|
|
70
|
-
},
|
|
71
|
-
"peerDependencies": {
|
|
72
|
-
"@tanstack/react-query": "^5.83.0",
|
|
73
|
-
"@supabase/supabase-js": "^2.90.1",
|
|
74
|
-
"react": "18.0.0"
|
|
75
|
-
},
|
|
76
|
-
"dependencies": {
|
|
77
|
-
"@reduxjs/toolkit": "^2.8.2",
|
|
78
|
-
"@supabase/supabase-js": "^2.90.1",
|
|
79
|
-
"@tanstack/react-query": "^5.83.0",
|
|
80
|
-
"axios": "^1.11.0",
|
|
81
|
-
"moment": "^2.30.1",
|
|
82
|
-
"react-redux": "^9.2.0"
|
|
83
|
-
},
|
|
84
|
-
"devDependencies": {
|
|
85
|
-
"@types/react": "^18.3.1",
|
|
86
|
-
"jest": "^29.7.0",
|
|
87
|
-
"react": "18.0.0",
|
|
88
|
-
"tsup": "^8.0.0",
|
|
89
|
-
"typescript": "^5.8.2"
|
|
90
|
-
},
|
|
91
|
-
"packageManager": "yarn@1.22.0"
|
|
92
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@fctc/interface-logic",
|
|
3
|
+
"version": "4.9.7",
|
|
4
|
+
"types": "dist/index.d.ts",
|
|
5
|
+
"main": "dist/index.cjs",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.mjs",
|
|
11
|
+
"require": "./dist/index.cjs"
|
|
12
|
+
},
|
|
13
|
+
"./configs": {
|
|
14
|
+
"types": "./dist/configs.d.ts",
|
|
15
|
+
"import": "./dist/configs.mjs",
|
|
16
|
+
"require": "./dist/configs.cjs"
|
|
17
|
+
},
|
|
18
|
+
"./constants": {
|
|
19
|
+
"types": "./dist/constants.d.ts",
|
|
20
|
+
"import": "./dist/constants.mjs",
|
|
21
|
+
"require": "./dist/constants.cjs"
|
|
22
|
+
},
|
|
23
|
+
"./environment": {
|
|
24
|
+
"types": "./dist/environment.d.ts",
|
|
25
|
+
"import": "./dist/environment.mjs",
|
|
26
|
+
"require": "./dist/environment.cjs"
|
|
27
|
+
},
|
|
28
|
+
"./hooks": {
|
|
29
|
+
"types": "./dist/hooks.d.ts",
|
|
30
|
+
"import": "./dist/hooks.mjs",
|
|
31
|
+
"require": "./dist/hooks.cjs"
|
|
32
|
+
},
|
|
33
|
+
"./provider": {
|
|
34
|
+
"types": "./dist/provider.d.ts",
|
|
35
|
+
"import": "./dist/provider.mjs",
|
|
36
|
+
"require": "./dist/provider.cjs"
|
|
37
|
+
},
|
|
38
|
+
"./services": {
|
|
39
|
+
"types": "./dist/services.d.ts",
|
|
40
|
+
"import": "./dist/services.mjs",
|
|
41
|
+
"require": "./dist/services.cjs"
|
|
42
|
+
},
|
|
43
|
+
"./store": {
|
|
44
|
+
"types": "./dist/store.d.ts",
|
|
45
|
+
"import": "./dist/store.mjs",
|
|
46
|
+
"require": "./dist/store.cjs"
|
|
47
|
+
},
|
|
48
|
+
"./utils": {
|
|
49
|
+
"types": "./dist/utils.d.ts",
|
|
50
|
+
"import": "./dist/utils.mjs",
|
|
51
|
+
"require": "./dist/utils.cjs"
|
|
52
|
+
},
|
|
53
|
+
"./types": {
|
|
54
|
+
"types": "./dist/types.d.ts",
|
|
55
|
+
"import": "./dist/types.mjs",
|
|
56
|
+
"require": "./dist/types.cjs"
|
|
57
|
+
},
|
|
58
|
+
"./models": {
|
|
59
|
+
"types": "./dist/models.d.ts",
|
|
60
|
+
"import": "./dist/models.mjs",
|
|
61
|
+
"require": "./dist/models.cjs"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"files": [
|
|
65
|
+
"dist"
|
|
66
|
+
],
|
|
67
|
+
"scripts": {
|
|
68
|
+
"build": "tsup",
|
|
69
|
+
"test": "jest"
|
|
70
|
+
},
|
|
71
|
+
"peerDependencies": {
|
|
72
|
+
"@tanstack/react-query": "^5.83.0",
|
|
73
|
+
"@supabase/supabase-js": "^2.90.1",
|
|
74
|
+
"react": "18.0.0"
|
|
75
|
+
},
|
|
76
|
+
"dependencies": {
|
|
77
|
+
"@reduxjs/toolkit": "^2.8.2",
|
|
78
|
+
"@supabase/supabase-js": "^2.90.1",
|
|
79
|
+
"@tanstack/react-query": "^5.83.0",
|
|
80
|
+
"axios": "^1.11.0",
|
|
81
|
+
"moment": "^2.30.1",
|
|
82
|
+
"react-redux": "^9.2.0"
|
|
83
|
+
},
|
|
84
|
+
"devDependencies": {
|
|
85
|
+
"@types/react": "^18.3.1",
|
|
86
|
+
"jest": "^29.7.0",
|
|
87
|
+
"react": "18.0.0",
|
|
88
|
+
"tsup": "^8.0.0",
|
|
89
|
+
"typescript": "^5.8.2"
|
|
90
|
+
},
|
|
91
|
+
"packageManager": "yarn@1.22.0"
|
|
92
|
+
}
|