@fctc/interface-logic 4.9.2 → 4.9.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.
@@ -63,6 +63,7 @@ declare enum UriConstants {
63
63
  GRANT_ACCESS = "/grant-access",
64
64
  TOKEN_BY_CODE = "/token",
65
65
  LOGOUT = "/logout",
66
+ LOGIN_PATH = "/login",
66
67
  CREATE_UPDATE = "/create_update",
67
68
  SEARCH_READ = "/search_read",
68
69
  CREATE_PATH = "/create",
@@ -63,6 +63,7 @@ declare enum UriConstants {
63
63
  GRANT_ACCESS = "/grant-access",
64
64
  TOKEN_BY_CODE = "/token",
65
65
  LOGOUT = "/logout",
66
+ LOGIN_PATH = "/login",
66
67
  CREATE_UPDATE = "/create_update",
67
68
  SEARCH_READ = "/search_read",
68
69
  CREATE_PATH = "/create",
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["LOGIN_PATH"] = "/login";
112
113
  UriConstants2["CREATE_UPDATE"] = "/create_update";
113
114
  UriConstants2["SEARCH_READ"] = "/search_read";
114
115
  UriConstants2["CREATE_PATH"] = "/create";
@@ -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["LOGIN_PATH"] = "/login";
71
72
  UriConstants2["CREATE_UPDATE"] = "/create_update";
72
73
  UriConstants2["SEARCH_READ"] = "/search_read";
73
74
  UriConstants2["CREATE_PATH"] = "/create";
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["LOGIN_PATH"] = "/login";
211
212
  UriConstants2["CREATE_UPDATE"] = "/create_update";
212
213
  UriConstants2["SEARCH_READ"] = "/search_read";
213
214
  UriConstants2["CREATE_PATH"] = "/create";
@@ -3375,19 +3376,23 @@ function useAuthService() {
3375
3376
  );
3376
3377
  const loginTenantUser = (0, import_react9.useCallback)(
3377
3378
  async (body) => {
3378
- if (!supabase) {
3379
- return {
3380
- data: null,
3381
- error: { message: "Supabase client is not initialized" }
3382
- };
3383
- }
3384
- const { data, error } = await supabase.auth.signInWithPassword({
3385
- email: body.email,
3386
- password: body.password
3387
- });
3388
- return { data, error };
3379
+ const payload = {
3380
+ username: body.email,
3381
+ password: body.password,
3382
+ tenantId: body.tenantId
3383
+ };
3384
+ return env?.requests?.post(
3385
+ "/login" /* LOGIN_PATH */,
3386
+ payload,
3387
+ {
3388
+ headers: {
3389
+ "Content-Type": "application/json"
3390
+ }
3391
+ },
3392
+ "id"
3393
+ );
3389
3394
  },
3390
- [supabase]
3395
+ [env]
3391
3396
  );
3392
3397
  const forgotPassword = (0, import_react9.useCallback)(
3393
3398
  async (email) => {
@@ -7410,7 +7415,8 @@ var useLoginTenantUser = () => {
7410
7415
  mutationFn: (data) => {
7411
7416
  return loginTenantUser({
7412
7417
  email: data.email,
7413
- password: data.password
7418
+ password: data.password,
7419
+ tenantId: data.tenantId
7414
7420
  });
7415
7421
  }
7416
7422
  });
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["LOGIN_PATH"] = "/login";
38
39
  UriConstants2["CREATE_UPDATE"] = "/create_update";
39
40
  UriConstants2["SEARCH_READ"] = "/search_read";
40
41
  UriConstants2["CREATE_PATH"] = "/create";
@@ -3202,19 +3203,23 @@ function useAuthService() {
3202
3203
  );
3203
3204
  const loginTenantUser = useCallback3(
3204
3205
  async (body) => {
3205
- if (!supabase) {
3206
- return {
3207
- data: null,
3208
- error: { message: "Supabase client is not initialized" }
3209
- };
3210
- }
3211
- const { data, error } = await supabase.auth.signInWithPassword({
3212
- email: body.email,
3213
- password: body.password
3214
- });
3215
- return { data, error };
3206
+ const payload = {
3207
+ username: body.email,
3208
+ password: body.password,
3209
+ tenantId: body.tenantId
3210
+ };
3211
+ return env?.requests?.post(
3212
+ "/login" /* LOGIN_PATH */,
3213
+ payload,
3214
+ {
3215
+ headers: {
3216
+ "Content-Type": "application/json"
3217
+ }
3218
+ },
3219
+ "id"
3220
+ );
3216
3221
  },
3217
- [supabase]
3222
+ [env]
3218
3223
  );
3219
3224
  const forgotPassword = useCallback3(
3220
3225
  async (email) => {
@@ -7237,7 +7242,8 @@ var useLoginTenantUser = () => {
7237
7242
  mutationFn: (data) => {
7238
7243
  return loginTenantUser({
7239
7244
  email: data.email,
7240
- password: data.password
7245
+ password: data.password,
7246
+ tenantId: data.tenantId
7241
7247
  });
7242
7248
  }
7243
7249
  });
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["LOGIN_PATH"] = "/login";
402
403
  UriConstants2["CREATE_UPDATE"] = "/create_update";
403
404
  UriConstants2["SEARCH_READ"] = "/search_read";
404
405
  UriConstants2["CREATE_PATH"] = "/create";
@@ -5434,19 +5435,23 @@ function useAuthService() {
5434
5435
  );
5435
5436
  const loginTenantUser = (0, import_react9.useCallback)(
5436
5437
  async (body) => {
5437
- if (!supabase) {
5438
- return {
5439
- data: null,
5440
- error: { message: "Supabase client is not initialized" }
5441
- };
5442
- }
5443
- const { data, error } = await supabase.auth.signInWithPassword({
5444
- email: body.email,
5445
- password: body.password
5446
- });
5447
- return { data, error };
5438
+ const payload = {
5439
+ username: body.email,
5440
+ password: body.password,
5441
+ tenantId: body.tenantId
5442
+ };
5443
+ return env2?.requests?.post(
5444
+ "/login" /* LOGIN_PATH */,
5445
+ payload,
5446
+ {
5447
+ headers: {
5448
+ "Content-Type": "application/json"
5449
+ }
5450
+ },
5451
+ "id"
5452
+ );
5448
5453
  },
5449
- [supabase]
5454
+ [env2]
5450
5455
  );
5451
5456
  const forgotPassword = (0, import_react9.useCallback)(
5452
5457
  async (email) => {
@@ -9469,7 +9474,8 @@ var useLoginTenantUser = () => {
9469
9474
  mutationFn: (data) => {
9470
9475
  return loginTenantUser({
9471
9476
  email: data.email,
9472
- password: data.password
9477
+ password: data.password,
9478
+ tenantId: data.tenantId
9473
9479
  });
9474
9480
  }
9475
9481
  });
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["LOGIN_PATH"] = "/login";
74
75
  UriConstants2["CREATE_UPDATE"] = "/create_update";
75
76
  UriConstants2["SEARCH_READ"] = "/search_read";
76
77
  UriConstants2["CREATE_PATH"] = "/create";
@@ -5106,19 +5107,23 @@ function useAuthService() {
5106
5107
  );
5107
5108
  const loginTenantUser = useCallback3(
5108
5109
  async (body) => {
5109
- if (!supabase) {
5110
- return {
5111
- data: null,
5112
- error: { message: "Supabase client is not initialized" }
5113
- };
5114
- }
5115
- const { data, error } = await supabase.auth.signInWithPassword({
5116
- email: body.email,
5117
- password: body.password
5118
- });
5119
- return { data, error };
5110
+ const payload = {
5111
+ username: body.email,
5112
+ password: body.password,
5113
+ tenantId: body.tenantId
5114
+ };
5115
+ return env2?.requests?.post(
5116
+ "/login" /* LOGIN_PATH */,
5117
+ payload,
5118
+ {
5119
+ headers: {
5120
+ "Content-Type": "application/json"
5121
+ }
5122
+ },
5123
+ "id"
5124
+ );
5120
5125
  },
5121
- [supabase]
5126
+ [env2]
5122
5127
  );
5123
5128
  const forgotPassword = useCallback3(
5124
5129
  async (email) => {
@@ -9141,7 +9146,8 @@ var useLoginTenantUser = () => {
9141
9146
  mutationFn: (data) => {
9142
9147
  return loginTenantUser({
9143
9148
  email: data.email,
9144
- password: data.password
9149
+ password: data.password,
9150
+ tenantId: data.tenantId
9145
9151
  });
9146
9152
  }
9147
9153
  });
@@ -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
 
@@ -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["LOGIN_PATH"] = "/login";
740
741
  UriConstants2["CREATE_UPDATE"] = "/create_update";
741
742
  UriConstants2["SEARCH_READ"] = "/search_read";
742
743
  UriConstants2["CREATE_PATH"] = "/create";
@@ -3363,19 +3364,23 @@ function useAuthService() {
3363
3364
  );
3364
3365
  const loginTenantUser = (0, import_react5.useCallback)(
3365
3366
  async (body) => {
3366
- if (!supabase) {
3367
- return {
3368
- data: null,
3369
- error: { message: "Supabase client is not initialized" }
3370
- };
3371
- }
3372
- const { data, error } = await supabase.auth.signInWithPassword({
3373
- email: body.email,
3374
- password: body.password
3375
- });
3376
- return { data, error };
3367
+ const payload = {
3368
+ username: body.email,
3369
+ password: body.password,
3370
+ tenantId: body.tenantId
3371
+ };
3372
+ return env?.requests?.post(
3373
+ "/login" /* LOGIN_PATH */,
3374
+ payload,
3375
+ {
3376
+ headers: {
3377
+ "Content-Type": "application/json"
3378
+ }
3379
+ },
3380
+ "id"
3381
+ );
3377
3382
  },
3378
- [supabase]
3383
+ [env]
3379
3384
  );
3380
3385
  const forgotPassword = (0, import_react5.useCallback)(
3381
3386
  async (email) => {
@@ -7895,7 +7900,8 @@ var useLoginTenantUser = () => {
7895
7900
  mutationFn: (data) => {
7896
7901
  return loginTenantUser({
7897
7902
  email: data.email,
7898
- password: data.password
7903
+ password: data.password,
7904
+ tenantId: data.tenantId
7899
7905
  });
7900
7906
  }
7901
7907
  });
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["LOGIN_PATH"] = "/login";
695
696
  UriConstants2["CREATE_UPDATE"] = "/create_update";
696
697
  UriConstants2["SEARCH_READ"] = "/search_read";
697
698
  UriConstants2["CREATE_PATH"] = "/create";
@@ -3318,19 +3319,23 @@ function useAuthService() {
3318
3319
  );
3319
3320
  const loginTenantUser = useCallback2(
3320
3321
  async (body) => {
3321
- if (!supabase) {
3322
- return {
3323
- data: null,
3324
- error: { message: "Supabase client is not initialized" }
3325
- };
3326
- }
3327
- const { data, error } = await supabase.auth.signInWithPassword({
3328
- email: body.email,
3329
- password: body.password
3330
- });
3331
- return { data, error };
3322
+ const payload = {
3323
+ username: body.email,
3324
+ password: body.password,
3325
+ tenantId: body.tenantId
3326
+ };
3327
+ return env?.requests?.post(
3328
+ "/login" /* LOGIN_PATH */,
3329
+ payload,
3330
+ {
3331
+ headers: {
3332
+ "Content-Type": "application/json"
3333
+ }
3334
+ },
3335
+ "id"
3336
+ );
3332
3337
  },
3333
- [supabase]
3338
+ [env]
3334
3339
  );
3335
3340
  const forgotPassword = useCallback2(
3336
3341
  async (email) => {
@@ -7850,7 +7855,8 @@ var useLoginTenantUser = () => {
7850
7855
  mutationFn: (data) => {
7851
7856
  return loginTenantUser({
7852
7857
  email: data.email,
7853
- password: data.password
7858
+ password: data.password,
7859
+ tenantId: data.tenantId
7854
7860
  });
7855
7861
  }
7856
7862
  });
@@ -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
- }) => Promise<{
64
- data: null;
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;
@@ -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
- }) => Promise<{
64
- data: null;
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["LOGIN_PATH"] = "/login";
81
82
  UriConstants2["CREATE_UPDATE"] = "/create_update";
82
83
  UriConstants2["SEARCH_READ"] = "/search_read";
83
84
  UriConstants2["CREATE_PATH"] = "/create";
@@ -5666,19 +5667,23 @@ function useAuthService() {
5666
5667
  );
5667
5668
  const loginTenantUser = (0, import_react63.useCallback)(
5668
5669
  async (body) => {
5669
- if (!supabase) {
5670
- return {
5671
- data: null,
5672
- error: { message: "Supabase client is not initialized" }
5673
- };
5674
- }
5675
- const { data, error } = await supabase.auth.signInWithPassword({
5676
- email: body.email,
5677
- password: body.password
5678
- });
5679
- return { data, error };
5670
+ const payload = {
5671
+ username: body.email,
5672
+ password: body.password,
5673
+ tenantId: body.tenantId
5674
+ };
5675
+ return env?.requests?.post(
5676
+ "/login" /* LOGIN_PATH */,
5677
+ payload,
5678
+ {
5679
+ headers: {
5680
+ "Content-Type": "application/json"
5681
+ }
5682
+ },
5683
+ "id"
5684
+ );
5680
5685
  },
5681
- [supabase]
5686
+ [env]
5682
5687
  );
5683
5688
  const forgotPassword = (0, import_react63.useCallback)(
5684
5689
  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["LOGIN_PATH"] = "/login";
35
36
  UriConstants2["CREATE_UPDATE"] = "/create_update";
36
37
  UriConstants2["SEARCH_READ"] = "/search_read";
37
38
  UriConstants2["CREATE_PATH"] = "/create";
@@ -5620,19 +5621,23 @@ function useAuthService() {
5620
5621
  );
5621
5622
  const loginTenantUser = useCallback57(
5622
5623
  async (body) => {
5623
- if (!supabase) {
5624
- return {
5625
- data: null,
5626
- error: { message: "Supabase client is not initialized" }
5627
- };
5628
- }
5629
- const { data, error } = await supabase.auth.signInWithPassword({
5630
- email: body.email,
5631
- password: body.password
5632
- });
5633
- return { data, error };
5624
+ const payload = {
5625
+ username: body.email,
5626
+ password: body.password,
5627
+ tenantId: body.tenantId
5628
+ };
5629
+ return env?.requests?.post(
5630
+ "/login" /* LOGIN_PATH */,
5631
+ payload,
5632
+ {
5633
+ headers: {
5634
+ "Content-Type": "application/json"
5635
+ }
5636
+ },
5637
+ "id"
5638
+ );
5634
5639
  },
5635
- [supabase]
5640
+ [env]
5636
5641
  );
5637
5642
  const forgotPassword = useCallback57(
5638
5643
  async (email) => {
package/package.json CHANGED
@@ -1,92 +1,92 @@
1
- {
2
- "name": "@fctc/interface-logic",
3
- "version": "4.9.2",
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.3",
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
+ }