@navservice/usuario 1.50.0 → 1.51.0

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.
Files changed (52) hide show
  1. package/build/es/biblioteca/src/componentes/auth/RefreshToken/RefreshToken.d.ts +7 -0
  2. package/build/es/biblioteca/src/componentes/auth/RefreshToken/index.d.ts +1 -0
  3. package/build/es/biblioteca/src/contexto/contexto_usuario.d.ts +1 -0
  4. package/build/es/biblioteca/src/index.d.ts +1 -0
  5. package/build/es/index.js +77 -1
  6. package/package.json +1 -1
  7. package/build/lib/biblioteca/src/componentes/auth/AuthAtivarDesativarAuthenticator/AuthAtivarDesativarAuthenticator.d.ts +0 -2
  8. package/build/lib/biblioteca/src/componentes/auth/AuthAtivarDesativarAuthenticator/index.d.ts +0 -1
  9. package/build/lib/biblioteca/src/componentes/auth/AuthGoogle/AuthGoogle.d.ts +0 -5
  10. package/build/lib/biblioteca/src/componentes/auth/AuthGoogle/index.d.ts +0 -1
  11. package/build/lib/biblioteca/src/componentes/auth/AuthLogin/AuthLogin.d.ts +0 -1
  12. package/build/lib/biblioteca/src/componentes/auth/AuthLogin/index.d.ts +0 -1
  13. package/build/lib/biblioteca/src/componentes/auth/AuthRegister/AuthRegister.d.ts +0 -1
  14. package/build/lib/biblioteca/src/componentes/auth/AuthRegister/index.d.ts +0 -2
  15. package/build/lib/biblioteca/src/componentes/auth/EnviarCodigoOtpParaEmail/EnviarCodigoOtpParaEmail.d.ts +0 -12
  16. package/build/lib/biblioteca/src/componentes/auth/EnviarCodigoOtpParaEmail/index.d.ts +0 -1
  17. package/build/lib/biblioteca/src/componentes/auth/EsqueciMinhaSenha/EsqueciMinhaSenha.d.ts +0 -5
  18. package/build/lib/biblioteca/src/componentes/auth/EsqueciMinhaSenha/index.d.ts +0 -1
  19. package/build/lib/biblioteca/src/componentes/auth/RecuperarSenhaComCodigoOtp/RecuperarSenhaComCodigoOtp.d.ts +0 -1
  20. package/build/lib/biblioteca/src/componentes/auth/RecuperarSenhaComCodigoOtp/index.d.ts +0 -1
  21. package/build/lib/biblioteca/src/componentes/auth/VerificarAuthenticator/VerificarAuthenticator.d.ts +0 -2
  22. package/build/lib/biblioteca/src/componentes/auth/VerificarAuthenticator/index.d.ts +0 -1
  23. package/build/lib/biblioteca/src/componentes/drawer/DraweFullScreen/DraweFullScreen.d.ts +0 -12
  24. package/build/lib/biblioteca/src/componentes/drawer/DraweFullScreen/index.d.ts +0 -1
  25. package/build/lib/biblioteca/src/componentes/drawer/DrawerPadrao/DrawerPadrao.d.ts +0 -12
  26. package/build/lib/biblioteca/src/componentes/drawer/DrawerPadrao/index.d.ts +0 -1
  27. package/build/lib/biblioteca/src/componentes/geral/FormularioZod/index.d.ts +0 -45
  28. package/build/lib/biblioteca/src/componentes/geral/PaginaEmDesenvolvimento/index.d.ts +0 -5
  29. package/build/lib/biblioteca/src/componentes/geral/TopTabs/index.d.ts +0 -10
  30. package/build/lib/biblioteca/src/componentes/layout/Layout.d.ts +0 -1
  31. package/build/lib/biblioteca/src/componentes/layout/NavBar/DarkMode.d.ts +0 -2
  32. package/build/lib/biblioteca/src/componentes/layout/NavBar/Logo.d.ts +0 -2
  33. package/build/lib/biblioteca/src/componentes/layout/NavBar/Profile.d.ts +0 -5
  34. package/build/lib/biblioteca/src/componentes/layout/NavBar/index.d.ts +0 -3
  35. package/build/lib/biblioteca/src/componentes/layout/index.d.ts +0 -1
  36. package/build/lib/biblioteca/src/componentes/layoutPublic/Header.d.ts +0 -7
  37. package/build/lib/biblioteca/src/componentes/layoutPublic/index.d.ts +0 -1
  38. package/build/lib/biblioteca/src/componentes/layoutPublic/layoutPublic.d.ts +0 -7
  39. package/build/lib/biblioteca/src/config_env/index.d.ts +0 -16
  40. package/build/lib/biblioteca/src/contexto/contexto_codigo_otp.d.ts +0 -19
  41. package/build/lib/biblioteca/src/contexto/contexto_layout.d.ts +0 -74
  42. package/build/lib/biblioteca/src/contexto/contexto_usuario.d.ts +0 -32
  43. package/build/lib/biblioteca/src/index.d.ts +0 -15
  44. package/build/lib/index.js +0 -51339
  45. package/build/lib/shared/configuracoes/_sistema.d.ts +0 -49
  46. package/build/lib/shared/configuracoes/_theme.d.ts +0 -91
  47. package/build/lib/shared/configuracoes/index.d.ts +0 -142
  48. package/build/lib/shared/types/controller/type_codigo_verificacao_otp.d.ts +0 -88
  49. package/build/lib/shared/types/controller/type_controller_authenticator.d.ts +0 -88
  50. package/build/lib/shared/types/controller/type_controller_usuario.d.ts +0 -263
  51. package/build/lib/shared/types/geral/type_response.d.ts +0 -54
  52. package/build/lib/shared/types/index.d.ts +0 -50
@@ -0,0 +1,7 @@
1
+ import { TypesCore } from "@navservice/core";
2
+ interface TypeRefreshToken {
3
+ app: TypesCore.Controller.Usuario.TokenPayload["app"];
4
+ usuario_tipo: TypesCore.Controller.Usuario.TokenPayload["usuario_tipo"];
5
+ }
6
+ export declare function RefreshToken(props: TypeRefreshToken): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1 @@
1
+ export { RefreshToken } from "./RefreshToken";
@@ -8,6 +8,7 @@ declare const contexto_usuario: {
8
8
  login(props: t.Controller.Usuario.Login.Input): Promise<AxiosResponse>;
9
9
  entrar_com_codigo_otp(props: t.Controller.CodigoOtp.EntrarComCodigoOtp.Input): Promise<t.Controller.CodigoOtp.EntrarComCodigoOtp.Response>;
10
10
  login_register_google(props: t.Controller.Usuario.RegisterLoginGoogle.Input): Promise<AxiosResponse<any, any, {}>>;
11
+ refresh_token(props: t.Controller.Usuario.RefreshToken.Input): Promise<void | import("../../../shared/types/controller/type_controller_usuario").default.RefreshToken.Response>;
11
12
  };
12
13
  contexto: {
13
14
  new (): {};
@@ -8,6 +8,7 @@ export { AuthGoogle } from "./componentes/auth/AuthGoogle";
8
8
  export { AuthLogin } from "./componentes/auth/AuthLogin";
9
9
  export { AuthRegister } from "./componentes/auth/AuthRegister";
10
10
  export { VerificarAuthenticator } from "./componentes/auth/VerificarAuthenticator";
11
+ export { RefreshToken } from "./componentes/auth/RefreshToken";
11
12
  export { DrawerFullScreen, TypeDrawerFullScreenRef } from "./componentes/drawer/DraweFullScreen";
12
13
  export { DrawerPadrao, TypeDrawerPadraoRef } from "./componentes/drawer/DrawerPadrao";
13
14
  export { Layout } from "./componentes/layout";
package/build/es/index.js CHANGED
@@ -3390,6 +3390,21 @@ const contexto_usuario_contexto_usuario = class contexto_usuario {
3390
3390
  contexto_usuario.contexto.state.set_loading(false);
3391
3391
  }
3392
3392
  }
3393
+ static async refresh_token(props) {
3394
+ try {
3395
+ const response = await src_utils.api.servidor_pricipal.post({
3396
+ baseURLKey: "PUBLIC_BASE_URL_SERVICE_USUARIO",
3397
+ url: shared_types.Controller.Usuario.RefreshToken.route,
3398
+ data: props,
3399
+ setToken: false
3400
+ });
3401
+ if (response?.data?.status == 200) contexto_usuario.contexto.state.set_user(response?.data?.results || null);
3402
+ if (response?.data?.status !== 200) return contexto_usuario.contexto.state.set_signout();
3403
+ return response;
3404
+ } catch (error) {
3405
+ return contexto_usuario.contexto.state.set_signout();
3406
+ }
3407
+ }
3393
3408
  };
3394
3409
  static contexto = class {
3395
3410
  static jsx = class {
@@ -7284,6 +7299,67 @@ const VerificarAuthenticator = ()=>{
7284
7299
  })
7285
7300
  });
7286
7301
  };
7302
+ const REFRESH_INTERVAL = 3300000;
7303
+ const REFRESH_STORAGE_KEY = "last_refresh_token_at";
7304
+ const REFRESH_LOCK_KEY = "refresh_token_lock";
7305
+ const LOCK_DURATION = 10000;
7306
+ function RefreshToken_RefreshToken(props) {
7307
+ const isRefreshingRef = useRef(false);
7308
+ const intervalRef = useRef(null);
7309
+ function getSafeTimestamp(key) {
7310
+ const value1 = src_utils.session_sorage.get_item_session_storage(key);
7311
+ return value1 && !isNaN(Number(value1)) ? Number(value1) : 0;
7312
+ }
7313
+ function setSafeTimestamp(key, value1) {
7314
+ src_utils.session_sorage.set_session_storage_sem_incremento({
7315
+ chave: key,
7316
+ novoItem: value1.toString()
7317
+ });
7318
+ }
7319
+ function checkAuthentication() {
7320
+ const usuario = src_utils.session_sorage.usuario_auth;
7321
+ if (!usuario?.data?.usuario?._id || !usuario?.data?.usuario?.refresh_token) {
7322
+ contexto_contexto_usuario.contexto.state.set_signout();
7323
+ return false;
7324
+ }
7325
+ return true;
7326
+ }
7327
+ async function handleRefreshToken() {
7328
+ if (!checkAuthentication() || isRefreshingRef.current) return;
7329
+ try {
7330
+ const usuario = src_utils.session_sorage.usuario_auth?.data?.usuario;
7331
+ const now = Date.now();
7332
+ const lastRefresh = getSafeTimestamp(REFRESH_STORAGE_KEY);
7333
+ const lock = getSafeTimestamp(REFRESH_LOCK_KEY);
7334
+ if (lastRefresh && now - lastRefresh < REFRESH_INTERVAL) return;
7335
+ if (lock && now - lock < LOCK_DURATION) return;
7336
+ setSafeTimestamp(REFRESH_LOCK_KEY, now);
7337
+ isRefreshingRef.current = true;
7338
+ const response = await contexto_contexto_usuario.api.refresh_token({
7339
+ data: {
7340
+ usuario: {
7341
+ app: props.app,
7342
+ usuario_tipo: props.usuario_tipo,
7343
+ refresh_token: usuario.refresh_token
7344
+ }
7345
+ }
7346
+ });
7347
+ if (response?.data?.status === 200) setSafeTimestamp(REFRESH_STORAGE_KEY, now);
7348
+ } finally{
7349
+ isRefreshingRef.current = false;
7350
+ setSafeTimestamp(REFRESH_LOCK_KEY, 0);
7351
+ }
7352
+ }
7353
+ useEffect(()=>{
7354
+ if (!checkAuthentication()) return;
7355
+ handleRefreshToken();
7356
+ intervalRef.current = setInterval(handleRefreshToken, REFRESH_INTERVAL);
7357
+ return ()=>{
7358
+ if (intervalRef.current) clearInterval(intervalRef.current);
7359
+ };
7360
+ }, []);
7361
+ return /*#__PURE__*/ jsx(Fragment, {});
7362
+ }
7287
7363
  /**
7288
7364
  * @license lucide-react v0.544.0 - ISC
7289
7365
  *
@@ -7979,4 +8055,4 @@ function LayoutPublic(props) {
7979
8055
  }
7980
8056
  var __webpack_exports__TypeDrawerFullScreenRef = DraweFullScreen_namespaceObject.TypeDrawerFullScreenRef;
7981
8057
  var __webpack_exports__TypeDrawerPadraoRef = DrawerPadrao_namespaceObject.TypeDrawerPadraoRef;
7982
- export { AuthAtivarDesativarAuthenticatorButton, AuthGoogle, AuthLogin, AuthRegister, DrawerFullScreen, DrawerPadrao, EsqueciMinhaSenha, Layout, LayoutPublic, RecuperarSenhaComCodigoOtpButton, shared_types as TypesUsuario, VerificarAuthenticator, src_config_env as config_env_usuario, contexto_contexto_layout as contexto_layout, contexto_contexto_usuario as contexto_usuario, __webpack_exports__TypeDrawerFullScreenRef as TypeDrawerFullScreenRef, __webpack_exports__TypeDrawerPadraoRef as TypeDrawerPadraoRef };
8058
+ export { AuthAtivarDesativarAuthenticatorButton, AuthGoogle, AuthLogin, AuthRegister, DrawerFullScreen, DrawerPadrao, EsqueciMinhaSenha, Layout, LayoutPublic, RecuperarSenhaComCodigoOtpButton, RefreshToken_RefreshToken as RefreshToken, shared_types as TypesUsuario, VerificarAuthenticator, src_config_env as config_env_usuario, contexto_contexto_layout as contexto_layout, contexto_contexto_usuario as contexto_usuario, __webpack_exports__TypeDrawerFullScreenRef as TypeDrawerFullScreenRef, __webpack_exports__TypeDrawerPadraoRef as TypeDrawerPadraoRef };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navservice/usuario",
3
- "version": "1.50.0",
3
+ "version": "1.51.0",
4
4
  "description": "Service de autenticação de usuários unificado",
5
5
  "type": "module",
6
6
  "main": "./build/lib/index.js",
@@ -1,2 +0,0 @@
1
- export declare const AuthAtivarDesativarAuthenticator: () => import("react/jsx-runtime").JSX.Element;
2
- export declare function AuthAtivarDesativarAuthenticatorButton(): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export { AuthAtivarDesativarAuthenticator, AuthAtivarDesativarAuthenticatorButton } from "./AuthAtivarDesativarAuthenticator";
@@ -1,5 +0,0 @@
1
- type AuthGoogleProps = {
2
- mode: "signup_with" | "signin_with";
3
- };
4
- export declare function AuthGoogle({ mode }: AuthGoogleProps): import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1 +0,0 @@
1
- export { AuthGoogle } from "./AuthGoogle";
@@ -1 +0,0 @@
1
- export declare function AuthLogin(): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export { AuthLogin } from "./AuthLogin";
@@ -1 +0,0 @@
1
- export declare function AuthRegister(): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- export { AuthRegister } from "./AuthRegister";
2
- export * from "./AuthRegister";
@@ -1,12 +0,0 @@
1
- type Props = {
2
- email: string;
3
- erroExterno?: string | null;
4
- onConfirmarCodigo?: (codigo: string) => void;
5
- title?: string;
6
- color?: "error" | "primary";
7
- };
8
- export type EnviarCodigoOtpEmailRef = {
9
- reset: () => void;
10
- };
11
- export declare const EnviarCodigoOtpEmail: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<EnviarCodigoOtpEmailRef>>;
12
- export {};
@@ -1 +0,0 @@
1
- export { EnviarCodigoOtpEmail, EnviarCodigoOtpEmailRef } from "./EnviarCodigoOtpParaEmail";
@@ -1,5 +0,0 @@
1
- type Props = {
2
- email?: string;
3
- };
4
- export declare function EsqueciMinhaSenha({ email: emailProp }: Props): import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1 +0,0 @@
1
- export { EsqueciMinhaSenha } from "./EsqueciMinhaSenha";
@@ -1 +0,0 @@
1
- export declare function RecuperarSenhaComCodigoOtpButton(): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export { RecuperarSenhaComCodigoOtpButton } from "./RecuperarSenhaComCodigoOtp";
@@ -1,2 +0,0 @@
1
- import React from "react";
2
- export declare const VerificarAuthenticator: React.FC;
@@ -1 +0,0 @@
1
- export { VerificarAuthenticator } from "./VerificarAuthenticator";
@@ -1,12 +0,0 @@
1
- import { ReactNode } from "react";
2
- type DrawerFullScreenProps = {
3
- title?: ReactNode;
4
- children?: ReactNode;
5
- onClose?: () => void;
6
- };
7
- export type TypeDrawerFullScreenRef = {
8
- abrir: () => void;
9
- fechar: () => void;
10
- };
11
- export declare const DrawerFullScreen: import("react").ForwardRefExoticComponent<DrawerFullScreenProps & import("react").RefAttributes<TypeDrawerFullScreenRef>>;
12
- export {};
@@ -1 +0,0 @@
1
- export { DrawerFullScreen, TypeDrawerFullScreenRef } from "./DraweFullScreen";
@@ -1,12 +0,0 @@
1
- import { ReactNode } from "react";
2
- type DrawerPadraoProps = {
3
- title?: ReactNode;
4
- children?: ReactNode;
5
- onClose?: () => void;
6
- };
7
- export type TypeDrawerPadraoRef = {
8
- abrir: () => void;
9
- fechar: () => void;
10
- };
11
- export declare const DrawerPadrao: import("react").ForwardRefExoticComponent<DrawerPadraoProps & import("react").RefAttributes<TypeDrawerPadraoRef>>;
12
- export {};
@@ -1 +0,0 @@
1
- export { TypeDrawerPadraoRef, DrawerPadrao } from "./DrawerPadrao";
@@ -1,45 +0,0 @@
1
- import React from "react";
2
- import { z, ZodObject } from "zod/v4";
3
- /**
4
- * =============================================================
5
- * Utils de TIPAGEM – dot paths e valores inferidos do schema
6
- * =============================================================
7
- */
8
- type Primitive = string | number | boolean | bigint | symbol | null | undefined | Date | File;
9
- type Join<K, P> = K extends string | number ? (P extends string | number ? `${K}.${P}` : never) : never;
10
- type Prev = [never, 0, 1, 2, 3, 4, 5, 6, 7, 8];
11
- export type DotPath<T, D extends number = 6> = [D] extends [never] ? never : T extends Primitive ? never : T extends readonly (infer A)[] ? DotPath<A, Prev[D]> : {
12
- [K in keyof T & (string | number)]: T[K] extends Primitive | readonly any[] ? `${K}` : `${K}` | Join<K, DotPath<T[K], Prev[D]>>;
13
- }[keyof T & (string | number)];
14
- export type PathValue<T, P extends string> = P extends `${infer K}.${infer R}` ? (K extends keyof T ? PathValue<T[K], R> : never) : P extends keyof T ? T[P] : never;
15
- export type FlatPaths<T> = {
16
- [P in DotPath<T>]: PathValue<T, P>;
17
- };
18
- type InferSchema<TSchema extends z.ZodTypeAny> = z.infer<TSchema>;
19
- export type DotPathOfSchema<TSchema extends z.ZodTypeAny> = DotPath<InferSchema<TSchema>>;
20
- export type FlatPathsOfSchema<TSchema extends z.ZodTypeAny> = FlatPaths<InferSchema<TSchema>>;
21
- /**
22
- * =============================================================
23
- * TIPAGEM do Ref exposto pelo componente
24
- * =============================================================
25
- */
26
- export interface FormularioZodRef<TSchema extends z.ZodTypeAny> {
27
- enviarFormulario: () => InferSchema<TSchema> | null;
28
- limparFormulario: () => void;
29
- getValues: () => Partial<FlatPathsOfSchema<TSchema>>;
30
- setValue: <P extends DotPathOfSchema<TSchema>>(path: P, value: PathValue<InferSchema<TSchema>, P>) => void;
31
- getValue: <P extends DotPathOfSchema<TSchema>>(path: P) => PathValue<InferSchema<TSchema>, P> | undefined;
32
- }
33
- interface FormularioZodProps<TSchema extends ZodObject<any>> {
34
- schema: TSchema;
35
- devMode?: boolean;
36
- }
37
- /**
38
- * =============================================================
39
- * forwardRef preservando genéricos
40
- * =============================================================
41
- */
42
- declare const FormularioZod: <TSchema extends ZodObject<any>>(props: FormularioZodProps<TSchema> & {
43
- ref?: React.Ref<FormularioZodRef<TSchema>>;
44
- }) => React.ReactElement;
45
- export default FormularioZod;
@@ -1,5 +0,0 @@
1
- interface PaginaEmDesenvolvimento {
2
- title: string;
3
- }
4
- export default function PaginaEmDesenvolvimento({ title }: PaginaEmDesenvolvimento): import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1,10 +0,0 @@
1
- import React, { ReactNode } from "react";
2
- type TabItem = {
3
- title: string;
4
- content: ReactNode;
5
- };
6
- type TopTabNavigationProps = {
7
- tabs: TabItem[];
8
- };
9
- declare const TopTabNavigation: React.FC<TopTabNavigationProps>;
10
- export default TopTabNavigation;
@@ -1 +0,0 @@
1
- export declare function Layout(): React.JSX.Element;
@@ -1,2 +0,0 @@
1
- export declare function hookUseDarkMode(): void;
2
- export default function DarkMode(): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- declare const Breadcrumb: () => import("react/jsx-runtime").JSX.Element | null;
2
- export default Breadcrumb;
@@ -1,5 +0,0 @@
1
- interface ProfileProps {
2
- isCollapsed?: boolean;
3
- }
4
- export default function Profile({ isCollapsed }: ProfileProps): import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const NavBar: React.FC;
3
- export default NavBar;
@@ -1 +0,0 @@
1
- export { Layout } from "./Layout";
@@ -1,7 +0,0 @@
1
- import type { LucideIcon } from "lucide-react";
2
- interface TypesLayoutPublicHeader {
3
- title?: string;
4
- icon: LucideIcon;
5
- }
6
- export default function Header(props: TypesLayoutPublicHeader): import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1 +0,0 @@
1
- export { LayoutPublic } from "./layoutPublic";
@@ -1,7 +0,0 @@
1
- import type { LucideIcon } from "lucide-react";
2
- interface TypesLayoutPublic {
3
- title: string;
4
- icon: LucideIcon;
5
- }
6
- export declare function LayoutPublic(props: TypesLayoutPublic): import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,16 +0,0 @@
1
- import t from "../../../shared/types";
2
- interface TypesConfigEnv {
3
- SET_PUBLIC_GOOGLE_CLIENT_ID_AUTH0: string;
4
- SET_APP: TypesCore.Controller.Usuario.TokenPayload["app"];
5
- SET_USUARIO_TIPO: TypesCore.Controller.Usuario.TokenPayload["usuario_tipo"];
6
- }
7
- declare class config_env {
8
- private static SET_PUBLIC_GOOGLE_CLIENT_ID_AUTH0;
9
- private static SET_APP;
10
- private static SET_USUARIO_TIPO;
11
- static init(config: TypesConfigEnv): void;
12
- static get PUBLIC_GOOGLE_CLIENT_ID_AUTH0(): string;
13
- static get PUBLIC_APP(): TypesCore.Controller.Usuario.TokenPayload["app"];
14
- static get PUBLIC_USUARIO_TIPO(): TypesCore.Controller.Usuario.TokenPayload["usuario_tipo"];
15
- }
16
- export default config_env;
@@ -1,19 +0,0 @@
1
- import { AxiosResponse } from "axios";
2
- import t from "../../../shared/types";
3
- interface ZustandStore {
4
- states: {
5
- recuperar_senha_pelo_app_com_codigo_otp: {
6
- loading: boolean;
7
- };
8
- };
9
- }
10
- declare class contexto_codigo_otp {
11
- api: {
12
- recuperar_senha_pelo_app_com_codigo_otp: (props: t.Controller.CodigoOtp.RecuperarSenhaPeloAppComCodigoOtp.Input) => Promise<AxiosResponse<any, any, {}>>;
13
- };
14
- get get_jsx(): ZustandStore['states'];
15
- get get_state(): ZustandStore['states'];
16
- set_state: (updater: (state: ZustandStore["states"]) => void) => void;
17
- }
18
- declare const _default: contexto_codigo_otp;
19
- export default _default;
@@ -1,74 +0,0 @@
1
- interface NotificacaoNovoRecurso {
2
- idItem: number;
3
- contador: number;
4
- expiraEmDias?: number;
5
- dataCriacao: Date;
6
- lido: boolean;
7
- }
8
- interface NavbarItem {
9
- id: number;
10
- title: string;
11
- icon?: any;
12
- href?: string;
13
- collapsible?: boolean;
14
- children?: NavbarItem[];
15
- subheader?: string;
16
- disabled?: boolean;
17
- badge?: {
18
- color: string;
19
- value: string | number;
20
- };
21
- }
22
- declare class contexto_layout {
23
- static contexto: {
24
- new (): {};
25
- jsx: {
26
- new (): {};
27
- get_navbar(): {
28
- data: NavbarItem[];
29
- loading: boolean;
30
- _ids: any[];
31
- };
32
- get_expanded_item(): {
33
- data: number | null;
34
- loading: boolean;
35
- };
36
- get_mobile_open(): {
37
- data: boolean;
38
- loading: boolean;
39
- };
40
- get_novos_recursos(): {
41
- data: NotificacaoNovoRecurso[];
42
- loading: boolean;
43
- };
44
- get_recurso_novo_item(idItem: number): NotificacaoNovoRecurso | undefined;
45
- };
46
- state: {
47
- new (): {};
48
- set_navbar(values: {
49
- data: NavbarItem[];
50
- loading: boolean;
51
- }): void;
52
- get_navbar(): {
53
- data: NavbarItem[];
54
- loading: boolean;
55
- _ids: any[];
56
- };
57
- set_expanded_item(id: number | null): void;
58
- get_expanded_item(): {
59
- data: number | null;
60
- loading: boolean;
61
- };
62
- toggle_mobile_open(): void;
63
- set_mobile_open(isOpen: boolean): void;
64
- marcar_recurso_como_lido(idItem: number): void;
65
- limpar_todos_recursos(): void;
66
- limpar_recursos_expirados(): void;
67
- adicionar_novos_recursos(recursos: NotificacaoNovoRecurso[]): void;
68
- };
69
- };
70
- static websocket: {
71
- new (): {};
72
- };
73
- }
74
- export default contexto_layout;
@@ -1,32 +0,0 @@
1
- import { AxiosResponse } from "axios";
2
- import t from "../../../shared/types";
3
- declare const contexto_usuario: {
4
- new (): {};
5
- api: {
6
- new (): {};
7
- register(props: t.Controller.Usuario.Register.Input): Promise<t.Controller.Usuario.Register.Response>;
8
- login(props: t.Controller.Usuario.Login.Input): Promise<AxiosResponse>;
9
- entrar_com_codigo_otp(props: t.Controller.CodigoOtp.EntrarComCodigoOtp.Input): Promise<t.Controller.CodigoOtp.EntrarComCodigoOtp.Response>;
10
- login_register_google(props: t.Controller.Usuario.RegisterLoginGoogle.Input): Promise<AxiosResponse<any, any, {}>>;
11
- };
12
- contexto: {
13
- new (): {};
14
- jsx: {
15
- new (): {};
16
- get_user(): t.Controller.Usuario.Login.Output;
17
- get_signed(): boolean;
18
- get_loading(): boolean;
19
- };
20
- state: {
21
- new (): {};
22
- set_signed(): void;
23
- set_user(userData: t.Controller.Usuario.Login.Output | null): void;
24
- set_loading(value: boolean): void;
25
- set_signout(): void;
26
- };
27
- };
28
- websocket: {
29
- new (): {};
30
- };
31
- };
32
- export default contexto_usuario;
@@ -1,15 +0,0 @@
1
- export { default as config_env_usuario } from "./config_env";
2
- export { default as contexto_usuario } from "./contexto/contexto_usuario";
3
- export { default as contexto_layout } from "./contexto/contexto_layout";
4
- export { AuthAtivarDesativarAuthenticatorButton } from "./componentes/auth/AuthAtivarDesativarAuthenticator";
5
- export { RecuperarSenhaComCodigoOtpButton } from "./componentes/auth/RecuperarSenhaComCodigoOtp";
6
- export { EsqueciMinhaSenha } from "./componentes/auth/EsqueciMinhaSenha";
7
- export { AuthGoogle } from "./componentes/auth/AuthGoogle";
8
- export { AuthLogin } from "./componentes/auth/AuthLogin";
9
- export { AuthRegister } from "./componentes/auth/AuthRegister";
10
- export { VerificarAuthenticator } from "./componentes/auth/VerificarAuthenticator";
11
- export { DrawerFullScreen, TypeDrawerFullScreenRef } from "./componentes/drawer/DraweFullScreen";
12
- export { DrawerPadrao, TypeDrawerPadraoRef } from "./componentes/drawer/DrawerPadrao";
13
- export { Layout } from "./componentes/layout";
14
- export { LayoutPublic } from "./componentes/layoutPublic";
15
- export { default as TypesUsuario } from "../../shared/types";