ingeniuscliq-core 0.4.2 → 0.4.4

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.
@@ -1,5 +1,4 @@
1
- export declare const LOGIN_ROUTE = "/api/login";
2
- export declare const REGISTER_ROUTE = "/api/register";
3
- export declare const LOGOUT_ROUTE = "/api/logout";
4
- export declare const REFRESH_TOKEN_ROUTE = "/api/refresh-token";
5
- export declare const USER_ROUTE = "/api/user";
1
+ export declare const LOGIN_ROUTE = "/login";
2
+ export declare const REGISTER_ROUTE = "/register";
3
+ export declare const LOGOUT_ROUTE = "/logout";
4
+ export declare const USER_ROUTE = "/user";
@@ -7,7 +7,6 @@ export declare function useAuth(): {
7
7
  login: <K extends import('../types').CoreLoginCredentials>(credentials: K) => Promise<import('../../..').BaseApiResponse<import('../types').CoreAuthLoginResponse<import('../types').CoreUser>>>;
8
8
  register: <K extends import('../types').CoreRegisterCredentials>(credentials: K) => Promise<import('../../..').BaseApiResponse<import('../types').CoreAuthRegisterResponse<import('../types').CoreUser>>>;
9
9
  logout: () => void;
10
- refreshUserToken: () => Promise<any>;
11
10
  updateUser: (userId: Pick<import('../types').CoreUser, "id">, updateUserData: Partial<import('../types').CoreUser>, actions?: import('../../..').CoreActions) => void;
12
11
  deleteUser: (userId: Pick<import('../types').CoreUser, "id">, actions?: import('../../..').CoreActions) => void;
13
12
  setUser: (user: import('../types').CoreUser | null) => void;
@@ -1,4 +1,4 @@
1
- import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
1
+ import { AxiosInstance, AxiosRequestConfig } from 'axios';
2
2
  import { CoreGetUserResponse, CoreLoginCredentials, CoreRegisterCredentials, CoreUser } from '../types/CoreAuth';
3
3
  import { BaseApiResponse } from '../../../types';
4
4
  import { BaseService } from '../../../services';
@@ -6,7 +6,6 @@ interface CoreAuthRoutes {
6
6
  login: string;
7
7
  register: string;
8
8
  logout: string;
9
- refreshToken: string;
10
9
  user: string;
11
10
  }
12
11
  /**
@@ -15,12 +14,11 @@ interface CoreAuthRoutes {
15
14
  export declare class CoreAuthBaseService<T extends CoreUser> extends BaseService {
16
15
  private readonly routes;
17
16
  constructor(routes?: CoreAuthRoutes, api?: AxiosInstance);
18
- getUser(): Promise<AxiosResponse<BaseApiResponse<CoreGetUserResponse<T>>, any>>;
19
- login<T extends CoreLoginCredentials>(credentials: T): Promise<AxiosResponse<any, any>>;
20
- register<T extends CoreRegisterCredentials>(credentials: T): Promise<AxiosResponse<any, any>>;
21
- logout(config?: AxiosRequestConfig): Promise<AxiosResponse<any, any>>;
22
- refreshToken(config?: AxiosRequestConfig): Promise<AxiosResponse<any, any>>;
23
- updateUser(userId: Pick<T, "id">, updateUserData: Partial<T>): Promise<AxiosResponse<BaseApiResponse<T>, any>>;
24
- deleteUser: (userId: Pick<T, "id">) => Promise<AxiosResponse<BaseApiResponse<null>, any>>;
17
+ getUser(): Promise<import('axios').AxiosResponse<BaseApiResponse<CoreGetUserResponse<T>>, any>>;
18
+ login<T extends CoreLoginCredentials>(credentials: T): Promise<import('axios').AxiosResponse<any, any>>;
19
+ register<T extends CoreRegisterCredentials>(credentials: T): Promise<import('axios').AxiosResponse<any, any>>;
20
+ logout(config?: AxiosRequestConfig): Promise<import('axios').AxiosResponse<any, any>>;
21
+ updateUser(userId: Pick<T, "id">, updateUserData: Partial<T>): Promise<import('axios').AxiosResponse<BaseApiResponse<T>, any>>;
22
+ deleteUser: (userId: Pick<T, "id">) => Promise<import('axios').AxiosResponse<BaseApiResponse<null>, any>>;
25
23
  }
26
24
  export {};
@@ -22,7 +22,6 @@ export interface CoreAuthStore<T extends CoreUser> extends BaseStore {
22
22
  login: <K extends CoreLoginCredentials>(credentials: K) => Promise<BaseApiResponse<CoreAuthLoginResponse<T>>>;
23
23
  register: <K extends CoreRegisterCredentials>(credentials: K) => Promise<BaseApiResponse<CoreAuthRegisterResponse<T>>>;
24
24
  logout: () => void;
25
- refreshUserToken: () => Promise<any>;
26
25
  setUser: (user: T | null) => void;
27
26
  updateUser: (userId: Pick<T, "id">, updateUserData: Partial<T>, actions?: CoreActions) => void;
28
27
  deleteUser: (userId: Pick<T, "id">, actions?: CoreActions) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ingeniuscliq-core",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "description": "IngeniusCliq Core UI y lógica compartida",
5
5
  "license": "MIT",
6
6
  "type": "module",