@navservice/usuario 1.49.0 → 1.50.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/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({
|
|
@@ -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;
|