@navservice/usuario 1.49.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.
- package/build/es/biblioteca/src/componentes/auth/RefreshToken/RefreshToken.d.ts +7 -0
- package/build/es/biblioteca/src/componentes/auth/RefreshToken/index.d.ts +1 -0
- package/build/es/biblioteca/src/contexto/contexto_usuario.d.ts +1 -0
- package/build/es/biblioteca/src/index.d.ts +1 -0
- package/build/es/index.js +94 -1
- package/build/es/shared/types/controller/type_controller_usuario.d.ts +36 -12
- package/package.json +1 -1
- package/build/lib/biblioteca/src/componentes/auth/AuthAtivarDesativarAuthenticator/AuthAtivarDesativarAuthenticator.d.ts +0 -2
- package/build/lib/biblioteca/src/componentes/auth/AuthAtivarDesativarAuthenticator/index.d.ts +0 -1
- package/build/lib/biblioteca/src/componentes/auth/AuthGoogle/AuthGoogle.d.ts +0 -5
- package/build/lib/biblioteca/src/componentes/auth/AuthGoogle/index.d.ts +0 -1
- package/build/lib/biblioteca/src/componentes/auth/AuthLogin/AuthLogin.d.ts +0 -1
- package/build/lib/biblioteca/src/componentes/auth/AuthLogin/index.d.ts +0 -1
- package/build/lib/biblioteca/src/componentes/auth/AuthRegister/AuthRegister.d.ts +0 -1
- package/build/lib/biblioteca/src/componentes/auth/AuthRegister/index.d.ts +0 -2
- package/build/lib/biblioteca/src/componentes/auth/EnviarCodigoOtpParaEmail/EnviarCodigoOtpParaEmail.d.ts +0 -12
- package/build/lib/biblioteca/src/componentes/auth/EnviarCodigoOtpParaEmail/index.d.ts +0 -1
- package/build/lib/biblioteca/src/componentes/auth/EsqueciMinhaSenha/EsqueciMinhaSenha.d.ts +0 -5
- package/build/lib/biblioteca/src/componentes/auth/EsqueciMinhaSenha/index.d.ts +0 -1
- package/build/lib/biblioteca/src/componentes/auth/RecuperarSenhaComCodigoOtp/RecuperarSenhaComCodigoOtp.d.ts +0 -1
- package/build/lib/biblioteca/src/componentes/auth/RecuperarSenhaComCodigoOtp/index.d.ts +0 -1
- package/build/lib/biblioteca/src/componentes/auth/VerificarAuthenticator/VerificarAuthenticator.d.ts +0 -2
- package/build/lib/biblioteca/src/componentes/auth/VerificarAuthenticator/index.d.ts +0 -1
- package/build/lib/biblioteca/src/componentes/drawer/DraweFullScreen/DraweFullScreen.d.ts +0 -12
- package/build/lib/biblioteca/src/componentes/drawer/DraweFullScreen/index.d.ts +0 -1
- package/build/lib/biblioteca/src/componentes/drawer/DrawerPadrao/DrawerPadrao.d.ts +0 -12
- package/build/lib/biblioteca/src/componentes/drawer/DrawerPadrao/index.d.ts +0 -1
- package/build/lib/biblioteca/src/componentes/geral/FormularioZod/index.d.ts +0 -45
- package/build/lib/biblioteca/src/componentes/geral/PaginaEmDesenvolvimento/index.d.ts +0 -5
- package/build/lib/biblioteca/src/componentes/geral/TopTabs/index.d.ts +0 -10
- package/build/lib/biblioteca/src/componentes/layout/Layout.d.ts +0 -1
- package/build/lib/biblioteca/src/componentes/layout/NavBar/DarkMode.d.ts +0 -2
- package/build/lib/biblioteca/src/componentes/layout/NavBar/Logo.d.ts +0 -2
- package/build/lib/biblioteca/src/componentes/layout/NavBar/Profile.d.ts +0 -5
- package/build/lib/biblioteca/src/componentes/layout/NavBar/index.d.ts +0 -3
- package/build/lib/biblioteca/src/componentes/layout/index.d.ts +0 -1
- package/build/lib/biblioteca/src/componentes/layoutPublic/Header.d.ts +0 -7
- package/build/lib/biblioteca/src/componentes/layoutPublic/index.d.ts +0 -1
- package/build/lib/biblioteca/src/componentes/layoutPublic/layoutPublic.d.ts +0 -7
- package/build/lib/biblioteca/src/config_env/index.d.ts +0 -16
- package/build/lib/biblioteca/src/contexto/contexto_codigo_otp.d.ts +0 -19
- package/build/lib/biblioteca/src/contexto/contexto_layout.d.ts +0 -74
- package/build/lib/biblioteca/src/contexto/contexto_usuario.d.ts +0 -32
- package/build/lib/biblioteca/src/index.d.ts +0 -15
- package/build/lib/index.js +0 -51339
- package/build/lib/shared/configuracoes/_sistema.d.ts +0 -49
- package/build/lib/shared/configuracoes/_theme.d.ts +0 -91
- package/build/lib/shared/configuracoes/index.d.ts +0 -142
- package/build/lib/shared/types/controller/type_codigo_verificacao_otp.d.ts +0 -88
- package/build/lib/shared/types/controller/type_controller_authenticator.d.ts +0 -88
- package/build/lib/shared/types/controller/type_controller_usuario.d.ts +0 -263
- package/build/lib/shared/types/geral/type_response.d.ts +0 -54
- 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
|
@@ -3031,6 +3031,23 @@ const type_controller_usuario_input = (meta)=>JSON.stringify(meta);
|
|
|
3031
3031
|
})
|
|
3032
3032
|
});
|
|
3033
3033
|
})(TypeControllerUsuario.Login || (TypeControllerUsuario.Login = {}));
|
|
3034
|
+
(function(RefreshToken) {
|
|
3035
|
+
RefreshToken.route = "/api/usuario/auth/refresh_token";
|
|
3036
|
+
RefreshToken.InputSchema = v4.object({
|
|
3037
|
+
data: v4.object({
|
|
3038
|
+
usuario: v4.object({
|
|
3039
|
+
refresh_token: v4.string(),
|
|
3040
|
+
usuario_tipo: UsuarioTipoEnumZod,
|
|
3041
|
+
app: AppEnumZod
|
|
3042
|
+
}).refine(({ app, usuario_tipo })=>types.Controller.Usuario.apps_permitidos_e_tipos_de_usuarios_de_cada_app[app].includes(usuario_tipo), {
|
|
3043
|
+
message: "Tipo de usuário não permitido para este app",
|
|
3044
|
+
path: [
|
|
3045
|
+
"usuario_tipo"
|
|
3046
|
+
]
|
|
3047
|
+
})
|
|
3048
|
+
})
|
|
3049
|
+
});
|
|
3050
|
+
})(TypeControllerUsuario.RefreshToken || (TypeControllerUsuario.RefreshToken = {}));
|
|
3034
3051
|
(function(BuscarPeloFiltro) {
|
|
3035
3052
|
BuscarPeloFiltro.route = "/api/usuario";
|
|
3036
3053
|
BuscarPeloFiltro.InputSchema = v4.object({
|
|
@@ -3373,6 +3390,21 @@ const contexto_usuario_contexto_usuario = class contexto_usuario {
|
|
|
3373
3390
|
contexto_usuario.contexto.state.set_loading(false);
|
|
3374
3391
|
}
|
|
3375
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
|
+
}
|
|
3376
3408
|
};
|
|
3377
3409
|
static contexto = class {
|
|
3378
3410
|
static jsx = class {
|
|
@@ -7267,6 +7299,67 @@ const VerificarAuthenticator = ()=>{
|
|
|
7267
7299
|
})
|
|
7268
7300
|
});
|
|
7269
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
|
+
}
|
|
7270
7363
|
/**
|
|
7271
7364
|
* @license lucide-react v0.544.0 - ISC
|
|
7272
7365
|
*
|
|
@@ -7962,4 +8055,4 @@ function LayoutPublic(props) {
|
|
|
7962
8055
|
}
|
|
7963
8056
|
var __webpack_exports__TypeDrawerFullScreenRef = DraweFullScreen_namespaceObject.TypeDrawerFullScreenRef;
|
|
7964
8057
|
var __webpack_exports__TypeDrawerPadraoRef = DrawerPadrao_namespaceObject.TypeDrawerPadraoRef;
|
|
7965
|
-
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 };
|
|
@@ -4,7 +4,7 @@ import t from "..";
|
|
|
4
4
|
export declare const input: (meta: t.Geral.FormularioZod.Describe) => string;
|
|
5
5
|
import { TypesCore } from "@navservice/core";
|
|
6
6
|
declare namespace TypeControllerUsuario {
|
|
7
|
-
const UsuarioBaseSchema: z4.ZodObject<{
|
|
7
|
+
export const UsuarioBaseSchema: z4.ZodObject<{
|
|
8
8
|
_id: z4.ZodString;
|
|
9
9
|
data_criacao: z4.ZodNumber;
|
|
10
10
|
data_atualizacao: z4.ZodNullable<z4.ZodNumber>;
|
|
@@ -16,7 +16,8 @@ declare namespace TypeControllerUsuario {
|
|
|
16
16
|
excluido: z4.ZodUnion<readonly [z4.ZodLiteral<0>, z4.ZodLiteral<1>]>;
|
|
17
17
|
ativo: z4.ZodUnion<readonly [z4.ZodLiteral<0>, z4.ZodLiteral<1>]>;
|
|
18
18
|
}, z4.core.$strip>;
|
|
19
|
-
|
|
19
|
+
type UsuarioBase = z4.infer<typeof UsuarioBaseSchema>;
|
|
20
|
+
export namespace Register {
|
|
20
21
|
const route: "/api/usuario/auth/register";
|
|
21
22
|
const InputSchema: z4.ZodObject<{
|
|
22
23
|
data: z4.ZodObject<{
|
|
@@ -42,7 +43,7 @@ declare namespace TypeControllerUsuario {
|
|
|
42
43
|
type Output = TypesCore.Controller.Usuario.Auth;
|
|
43
44
|
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
44
45
|
}
|
|
45
|
-
namespace RegisterLoginGoogle {
|
|
46
|
+
export namespace RegisterLoginGoogle {
|
|
46
47
|
const route: "/api/usuario/auth/google";
|
|
47
48
|
const InputSchema: z4.ZodObject<{
|
|
48
49
|
data: z4.ZodObject<{
|
|
@@ -65,7 +66,7 @@ declare namespace TypeControllerUsuario {
|
|
|
65
66
|
type Output = TypesCore.Controller.Usuario.Auth;
|
|
66
67
|
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
67
68
|
}
|
|
68
|
-
namespace Login {
|
|
69
|
+
export namespace Login {
|
|
69
70
|
const route: "/api/usuario/auth/login";
|
|
70
71
|
const InputSchema: z4.ZodObject<{
|
|
71
72
|
data: z4.ZodObject<{
|
|
@@ -89,7 +90,29 @@ declare namespace TypeControllerUsuario {
|
|
|
89
90
|
type Output = TypesCore.Controller.Usuario.Auth;
|
|
90
91
|
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
91
92
|
}
|
|
92
|
-
namespace
|
|
93
|
+
export namespace RefreshToken {
|
|
94
|
+
const route: "/api/usuario/auth/refresh_token";
|
|
95
|
+
const InputSchema: z4.ZodObject<{
|
|
96
|
+
data: z4.ZodObject<{
|
|
97
|
+
usuario: z4.ZodObject<{
|
|
98
|
+
refresh_token: z4.ZodString;
|
|
99
|
+
usuario_tipo: z4.ZodEnum<{
|
|
100
|
+
padrao: "padrao";
|
|
101
|
+
}>;
|
|
102
|
+
app: z4.ZodEnum<{
|
|
103
|
+
"service-usuario": "service-usuario";
|
|
104
|
+
"service-pages": "service-pages";
|
|
105
|
+
"service-assinatura": "service-assinatura";
|
|
106
|
+
"service-bucket": "service-bucket";
|
|
107
|
+
}>;
|
|
108
|
+
}, z4.core.$strip>;
|
|
109
|
+
}, z4.core.$strip>;
|
|
110
|
+
}, z4.core.$strip>;
|
|
111
|
+
type Input = z4.infer<typeof InputSchema>;
|
|
112
|
+
type Output = TypesCore.Controller.Usuario.Auth;
|
|
113
|
+
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
114
|
+
}
|
|
115
|
+
export namespace BuscarPeloFiltro {
|
|
93
116
|
const route: "/api/usuario";
|
|
94
117
|
const InputSchema: z4.ZodObject<{
|
|
95
118
|
filtros: z4.ZodObject<{
|
|
@@ -110,12 +133,12 @@ declare namespace TypeControllerUsuario {
|
|
|
110
133
|
itens_por_pagina: number;
|
|
111
134
|
total_itens_pagina_atual: number;
|
|
112
135
|
};
|
|
113
|
-
usuario:
|
|
136
|
+
usuario: UsuarioBase[];
|
|
114
137
|
};
|
|
115
138
|
};
|
|
116
139
|
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
117
140
|
}
|
|
118
|
-
namespace BuscarPeloId {
|
|
141
|
+
export namespace BuscarPeloId {
|
|
119
142
|
const route: "/api/usuario/:id";
|
|
120
143
|
const InputSchema: z4.ZodObject<{
|
|
121
144
|
data: z4.ZodObject<{
|
|
@@ -125,12 +148,12 @@ declare namespace TypeControllerUsuario {
|
|
|
125
148
|
type Input = z4.infer<typeof InputSchema>;
|
|
126
149
|
type Output = {
|
|
127
150
|
data: {
|
|
128
|
-
usuario:
|
|
151
|
+
usuario: UsuarioBase;
|
|
129
152
|
};
|
|
130
153
|
};
|
|
131
154
|
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
132
155
|
}
|
|
133
|
-
namespace AtualizarPeloId {
|
|
156
|
+
export namespace AtualizarPeloId {
|
|
134
157
|
const route: "/api/usuario/:id";
|
|
135
158
|
const InputSchema: z4.ZodObject<{
|
|
136
159
|
data: z4.ZodObject<{
|
|
@@ -148,12 +171,12 @@ declare namespace TypeControllerUsuario {
|
|
|
148
171
|
type Input = z4.infer<typeof InputSchema>;
|
|
149
172
|
type Output = {
|
|
150
173
|
data: {
|
|
151
|
-
usuario:
|
|
174
|
+
usuario: UsuarioBase;
|
|
152
175
|
};
|
|
153
176
|
};
|
|
154
177
|
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
155
178
|
}
|
|
156
|
-
namespace DeletarPeloId {
|
|
179
|
+
export namespace DeletarPeloId {
|
|
157
180
|
const route: "/api/usuario/:id";
|
|
158
181
|
const InputSchema: z4.ZodObject<{
|
|
159
182
|
data: z4.ZodObject<{
|
|
@@ -168,7 +191,7 @@ declare namespace TypeControllerUsuario {
|
|
|
168
191
|
};
|
|
169
192
|
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
170
193
|
}
|
|
171
|
-
type TController = {
|
|
194
|
+
export type TController = {
|
|
172
195
|
Criar: {
|
|
173
196
|
Input: any;
|
|
174
197
|
Output: any;
|
|
@@ -226,5 +249,6 @@ declare namespace TypeControllerUsuario {
|
|
|
226
249
|
};
|
|
227
250
|
};
|
|
228
251
|
};
|
|
252
|
+
export {};
|
|
229
253
|
}
|
|
230
254
|
export default TypeControllerUsuario;
|
package/package.json
CHANGED
package/build/lib/biblioteca/src/componentes/auth/AuthAtivarDesativarAuthenticator/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { AuthAtivarDesativarAuthenticator, AuthAtivarDesativarAuthenticatorButton } from "./AuthAtivarDesativarAuthenticator";
|
|
@@ -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,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 +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 +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,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 +0,0 @@
|
|
|
1
|
-
export { Layout } from "./Layout";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { LayoutPublic } from "./layoutPublic";
|
|
@@ -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;
|