@navservice/usuario 1.44.0 → 1.47.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/config_env/index.d.ts +5 -5
- package/build/es/index.js +20 -20
- package/build/es/shared/types/controller/type_codigo_verificacao_otp.d.ts +5 -4
- package/build/es/shared/types/controller/type_controller_usuario.d.ts +16 -37
- package/build/lib/biblioteca/src/config_env/index.d.ts +4 -4
- package/build/lib/shared/types/controller/type_codigo_verificacao_otp.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { TypesCore } from "@navservice/core";
|
|
2
2
|
interface TypesConfigEnv {
|
|
3
3
|
SET_PUBLIC_GOOGLE_CLIENT_ID_AUTH0: string;
|
|
4
|
-
SET_APP:
|
|
5
|
-
SET_USUARIO_TIPO:
|
|
4
|
+
SET_APP: TypesCore.Controller.Usuario.TokenPayload["app"];
|
|
5
|
+
SET_USUARIO_TIPO: TypesCore.Controller.Usuario.TokenPayload["usuario_tipo"];
|
|
6
6
|
}
|
|
7
7
|
declare class config_env {
|
|
8
8
|
private static SET_PUBLIC_GOOGLE_CLIENT_ID_AUTH0;
|
|
@@ -10,7 +10,7 @@ declare class config_env {
|
|
|
10
10
|
private static SET_USUARIO_TIPO;
|
|
11
11
|
static init(config: TypesConfigEnv): void;
|
|
12
12
|
static get PUBLIC_GOOGLE_CLIENT_ID_AUTH0(): string;
|
|
13
|
-
static get PUBLIC_APP():
|
|
14
|
-
static get PUBLIC_USUARIO_TIPO():
|
|
13
|
+
static get PUBLIC_APP(): TypesCore.Controller.Usuario.TokenPayload["app"];
|
|
14
|
+
static get PUBLIC_USUARIO_TIPO(): TypesCore.Controller.Usuario.TokenPayload["usuario_tipo"];
|
|
15
15
|
}
|
|
16
16
|
export default config_env;
|
package/build/es/index.js
CHANGED
|
@@ -2194,13 +2194,27 @@ const lib_axios = axios;
|
|
|
2194
2194
|
(function(TypeControllerUsuario) {
|
|
2195
2195
|
TypeControllerUsuario.AppEnum = [
|
|
2196
2196
|
"service-usuario",
|
|
2197
|
-
"service-
|
|
2198
|
-
"service-
|
|
2199
|
-
"service-
|
|
2197
|
+
"service-pages",
|
|
2198
|
+
"service-assinatura",
|
|
2199
|
+
"service-bucket"
|
|
2200
2200
|
];
|
|
2201
2201
|
TypeControllerUsuario.UsuarioTipoEnum = [
|
|
2202
2202
|
"padrao"
|
|
2203
2203
|
];
|
|
2204
|
+
TypeControllerUsuario.apps_permitidos_e_tipos_de_usuarios_de_cada_app = {
|
|
2205
|
+
"service-usuario": [
|
|
2206
|
+
"padrao"
|
|
2207
|
+
],
|
|
2208
|
+
"service-assinatura": [
|
|
2209
|
+
"padrao"
|
|
2210
|
+
],
|
|
2211
|
+
"service-pages": [
|
|
2212
|
+
"padrao"
|
|
2213
|
+
],
|
|
2214
|
+
"service-bucket": [
|
|
2215
|
+
"padrao"
|
|
2216
|
+
]
|
|
2217
|
+
};
|
|
2204
2218
|
v4["enum"](TypeControllerUsuario.AppEnum);
|
|
2205
2219
|
v4["enum"](TypeControllerUsuario.UsuarioTipoEnum);
|
|
2206
2220
|
})(_usuario_TypeControllerUsuario || (_usuario_TypeControllerUsuario = {}));
|
|
@@ -2880,20 +2894,6 @@ const type_controller_usuario_input = (meta)=>JSON.stringify(meta);
|
|
|
2880
2894
|
(function(TypeControllerUsuario) {
|
|
2881
2895
|
const AppEnumZod = v4["enum"](types.Controller.Usuario.AppEnum);
|
|
2882
2896
|
const UsuarioTipoEnumZod = v4["enum"](types.Controller.Usuario.UsuarioTipoEnum);
|
|
2883
|
-
const apps_permitidos_e_tipos_de_usuarios_de_cada_app = {
|
|
2884
|
-
"service-usuario": [
|
|
2885
|
-
"padrao"
|
|
2886
|
-
],
|
|
2887
|
-
"service-financeiro": [
|
|
2888
|
-
"padrao"
|
|
2889
|
-
],
|
|
2890
|
-
"service-pages-ai": [
|
|
2891
|
-
"padrao"
|
|
2892
|
-
],
|
|
2893
|
-
"service-assinatura": [
|
|
2894
|
-
"padrao"
|
|
2895
|
-
]
|
|
2896
|
-
};
|
|
2897
2897
|
TypeControllerUsuario.UsuarioBaseSchema = v4.object({
|
|
2898
2898
|
_id: v4.string(),
|
|
2899
2899
|
data_criacao: v4.number(),
|
|
@@ -2951,7 +2951,7 @@ const type_controller_usuario_input = (meta)=>JSON.stringify(meta);
|
|
|
2951
2951
|
]),
|
|
2952
2952
|
usuario_tipo: UsuarioTipoEnumZod,
|
|
2953
2953
|
app: AppEnumZod
|
|
2954
|
-
}).refine(({ app, usuario_tipo })=>apps_permitidos_e_tipos_de_usuarios_de_cada_app[app].includes(usuario_tipo), {
|
|
2954
|
+
}).refine(({ app, usuario_tipo })=>types.Controller.Usuario.apps_permitidos_e_tipos_de_usuarios_de_cada_app[app].includes(usuario_tipo), {
|
|
2955
2955
|
message: "Tipo de usuário não permitido para este app",
|
|
2956
2956
|
path: [
|
|
2957
2957
|
"usuario_tipo"
|
|
@@ -2969,7 +2969,7 @@ const type_controller_usuario_input = (meta)=>JSON.stringify(meta);
|
|
|
2969
2969
|
usuario_tipo: UsuarioTipoEnumZod,
|
|
2970
2970
|
app: AppEnumZod,
|
|
2971
2971
|
codigo_temporario: v4.string().nullable().optional()
|
|
2972
|
-
}).refine(({ app, usuario_tipo })=>apps_permitidos_e_tipos_de_usuarios_de_cada_app[app].includes(usuario_tipo), {
|
|
2972
|
+
}).refine(({ app, usuario_tipo })=>types.Controller.Usuario.apps_permitidos_e_tipos_de_usuarios_de_cada_app[app].includes(usuario_tipo), {
|
|
2973
2973
|
message: "Tipo de usuário não permitido para este app",
|
|
2974
2974
|
path: [
|
|
2975
2975
|
"usuario_tipo"
|
|
@@ -3004,7 +3004,7 @@ const type_controller_usuario_input = (meta)=>JSON.stringify(meta);
|
|
|
3004
3004
|
codigo_temporario: v4.string().nullable().optional(),
|
|
3005
3005
|
usuario_tipo: UsuarioTipoEnumZod,
|
|
3006
3006
|
app: AppEnumZod
|
|
3007
|
-
}).refine(({ app, usuario_tipo })=>apps_permitidos_e_tipos_de_usuarios_de_cada_app[app].includes(usuario_tipo), {
|
|
3007
|
+
}).refine(({ app, usuario_tipo })=>types.Controller.Usuario.apps_permitidos_e_tipos_de_usuarios_de_cada_app[app].includes(usuario_tipo), {
|
|
3008
3008
|
message: "Tipo de usuário não permitido para este app",
|
|
3009
3009
|
path: [
|
|
3010
3010
|
"usuario_tipo"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import z4 from "zod/v4";
|
|
2
2
|
import { AxiosResponse } from "axios";
|
|
3
3
|
import t from "..";
|
|
4
|
+
import { TypesCore } from "@navservice/core";
|
|
4
5
|
declare namespace TypeControllerCodigoOtp {
|
|
5
6
|
const CodigoOtpBaseSchema: z4.ZodObject<{
|
|
6
7
|
_id: z4.ZodString;
|
|
@@ -45,9 +46,9 @@ declare namespace TypeControllerCodigoOtp {
|
|
|
45
46
|
}>;
|
|
46
47
|
app: z4.ZodEnum<{
|
|
47
48
|
"service-usuario": "service-usuario";
|
|
48
|
-
"service-
|
|
49
|
-
"service-pages-ai": "service-pages-ai";
|
|
49
|
+
"service-pages": "service-pages";
|
|
50
50
|
"service-assinatura": "service-assinatura";
|
|
51
|
+
"service-bucket": "service-bucket";
|
|
51
52
|
}>;
|
|
52
53
|
}, z4.core.$strip>;
|
|
53
54
|
}, z4.core.$strip>;
|
|
@@ -67,7 +68,7 @@ declare namespace TypeControllerCodigoOtp {
|
|
|
67
68
|
}, z4.core.$strip>;
|
|
68
69
|
}, z4.core.$strip>;
|
|
69
70
|
type Input = z4.infer<typeof InputSchema>;
|
|
70
|
-
type Output =
|
|
71
|
+
type Output = TypesCore.Controller.Usuario.TokenPayload;
|
|
71
72
|
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
72
73
|
}
|
|
73
74
|
namespace RecuperarSenhaPeloAppComCodigoOtp {
|
|
@@ -81,7 +82,7 @@ declare namespace TypeControllerCodigoOtp {
|
|
|
81
82
|
}, z4.core.$strip>;
|
|
82
83
|
}, z4.core.$strip>;
|
|
83
84
|
type Input = z4.infer<typeof InputSchema>;
|
|
84
|
-
type Output =
|
|
85
|
+
type Output = TypesCore.Controller.Usuario.TokenPayload;
|
|
85
86
|
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
86
87
|
}
|
|
87
88
|
}
|
|
@@ -3,18 +3,7 @@ import z4 from "zod/v4";
|
|
|
3
3
|
import t from "..";
|
|
4
4
|
export declare const input: (meta: t.Geral.FormularioZod.Describe) => string;
|
|
5
5
|
declare namespace TypeControllerUsuario {
|
|
6
|
-
const
|
|
7
|
-
"service-usuario": "service-usuario";
|
|
8
|
-
"service-financeiro": "service-financeiro";
|
|
9
|
-
"service-pages-ai": "service-pages-ai";
|
|
10
|
-
"service-assinatura": "service-assinatura";
|
|
11
|
-
}>;
|
|
12
|
-
const UsuarioTipoEnumZod: z4.ZodEnum<{
|
|
13
|
-
padrao: "padrao";
|
|
14
|
-
}>;
|
|
15
|
-
type App = z4.infer<typeof AppEnumZod>;
|
|
16
|
-
type UsuarioTipo = z4.infer<typeof UsuarioTipoEnumZod>;
|
|
17
|
-
export const UsuarioBaseSchema: z4.ZodObject<{
|
|
6
|
+
const UsuarioBaseSchema: z4.ZodObject<{
|
|
18
7
|
_id: z4.ZodString;
|
|
19
8
|
data_criacao: z4.ZodNumber;
|
|
20
9
|
data_atualizacao: z4.ZodNullable<z4.ZodNumber>;
|
|
@@ -26,7 +15,7 @@ declare namespace TypeControllerUsuario {
|
|
|
26
15
|
excluido: z4.ZodUnion<readonly [z4.ZodLiteral<0>, z4.ZodLiteral<1>]>;
|
|
27
16
|
ativo: z4.ZodUnion<readonly [z4.ZodLiteral<0>, z4.ZodLiteral<1>]>;
|
|
28
17
|
}, z4.core.$strip>;
|
|
29
|
-
|
|
18
|
+
interface Auth {
|
|
30
19
|
data: {
|
|
31
20
|
usuario: {
|
|
32
21
|
_id: string;
|
|
@@ -39,16 +28,7 @@ declare namespace TypeControllerUsuario {
|
|
|
39
28
|
};
|
|
40
29
|
};
|
|
41
30
|
}
|
|
42
|
-
|
|
43
|
-
_id: string;
|
|
44
|
-
email: string;
|
|
45
|
-
nome: string;
|
|
46
|
-
data_criacao: number;
|
|
47
|
-
ativo: 1 | 0;
|
|
48
|
-
app: App;
|
|
49
|
-
usuario_tipo: UsuarioTipo;
|
|
50
|
-
}
|
|
51
|
-
export namespace Register {
|
|
31
|
+
namespace Register {
|
|
52
32
|
const route: "/api/usuario/auth/register";
|
|
53
33
|
const InputSchema: z4.ZodObject<{
|
|
54
34
|
data: z4.ZodObject<{
|
|
@@ -63,9 +43,9 @@ declare namespace TypeControllerUsuario {
|
|
|
63
43
|
}>;
|
|
64
44
|
app: z4.ZodEnum<{
|
|
65
45
|
"service-usuario": "service-usuario";
|
|
66
|
-
"service-
|
|
67
|
-
"service-pages-ai": "service-pages-ai";
|
|
46
|
+
"service-pages": "service-pages";
|
|
68
47
|
"service-assinatura": "service-assinatura";
|
|
48
|
+
"service-bucket": "service-bucket";
|
|
69
49
|
}>;
|
|
70
50
|
}, z4.core.$strip>;
|
|
71
51
|
}, z4.core.$strip>;
|
|
@@ -74,7 +54,7 @@ declare namespace TypeControllerUsuario {
|
|
|
74
54
|
type Output = Auth;
|
|
75
55
|
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
76
56
|
}
|
|
77
|
-
|
|
57
|
+
namespace RegisterLoginGoogle {
|
|
78
58
|
const route: "/api/usuario/auth/google";
|
|
79
59
|
const InputSchema: z4.ZodObject<{
|
|
80
60
|
data: z4.ZodObject<{
|
|
@@ -85,9 +65,9 @@ declare namespace TypeControllerUsuario {
|
|
|
85
65
|
}>;
|
|
86
66
|
app: z4.ZodEnum<{
|
|
87
67
|
"service-usuario": "service-usuario";
|
|
88
|
-
"service-
|
|
89
|
-
"service-pages-ai": "service-pages-ai";
|
|
68
|
+
"service-pages": "service-pages";
|
|
90
69
|
"service-assinatura": "service-assinatura";
|
|
70
|
+
"service-bucket": "service-bucket";
|
|
91
71
|
}>;
|
|
92
72
|
codigo_temporario: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
|
|
93
73
|
}, z4.core.$strip>;
|
|
@@ -97,7 +77,7 @@ declare namespace TypeControllerUsuario {
|
|
|
97
77
|
type Output = Auth;
|
|
98
78
|
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
99
79
|
}
|
|
100
|
-
|
|
80
|
+
namespace Login {
|
|
101
81
|
const route: "/api/usuario/auth/login";
|
|
102
82
|
const InputSchema: z4.ZodObject<{
|
|
103
83
|
data: z4.ZodObject<{
|
|
@@ -110,9 +90,9 @@ declare namespace TypeControllerUsuario {
|
|
|
110
90
|
}>;
|
|
111
91
|
app: z4.ZodEnum<{
|
|
112
92
|
"service-usuario": "service-usuario";
|
|
113
|
-
"service-
|
|
114
|
-
"service-pages-ai": "service-pages-ai";
|
|
93
|
+
"service-pages": "service-pages";
|
|
115
94
|
"service-assinatura": "service-assinatura";
|
|
95
|
+
"service-bucket": "service-bucket";
|
|
116
96
|
}>;
|
|
117
97
|
}, z4.core.$strip>;
|
|
118
98
|
}, z4.core.$strip>;
|
|
@@ -121,7 +101,7 @@ declare namespace TypeControllerUsuario {
|
|
|
121
101
|
type Output = Auth;
|
|
122
102
|
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
123
103
|
}
|
|
124
|
-
|
|
104
|
+
namespace BuscarPeloFiltro {
|
|
125
105
|
const route: "/api/usuario";
|
|
126
106
|
const InputSchema: z4.ZodObject<{
|
|
127
107
|
filtros: z4.ZodObject<{
|
|
@@ -147,7 +127,7 @@ declare namespace TypeControllerUsuario {
|
|
|
147
127
|
};
|
|
148
128
|
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
149
129
|
}
|
|
150
|
-
|
|
130
|
+
namespace BuscarPeloId {
|
|
151
131
|
const route: "/api/usuario/:id";
|
|
152
132
|
const InputSchema: z4.ZodObject<{
|
|
153
133
|
data: z4.ZodObject<{
|
|
@@ -162,7 +142,7 @@ declare namespace TypeControllerUsuario {
|
|
|
162
142
|
};
|
|
163
143
|
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
164
144
|
}
|
|
165
|
-
|
|
145
|
+
namespace AtualizarPeloId {
|
|
166
146
|
const route: "/api/usuario/:id";
|
|
167
147
|
const InputSchema: z4.ZodObject<{
|
|
168
148
|
data: z4.ZodObject<{
|
|
@@ -185,7 +165,7 @@ declare namespace TypeControllerUsuario {
|
|
|
185
165
|
};
|
|
186
166
|
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
187
167
|
}
|
|
188
|
-
|
|
168
|
+
namespace DeletarPeloId {
|
|
189
169
|
const route: "/api/usuario/:id";
|
|
190
170
|
const InputSchema: z4.ZodObject<{
|
|
191
171
|
data: z4.ZodObject<{
|
|
@@ -200,7 +180,7 @@ declare namespace TypeControllerUsuario {
|
|
|
200
180
|
};
|
|
201
181
|
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
202
182
|
}
|
|
203
|
-
|
|
183
|
+
type TController = {
|
|
204
184
|
Criar: {
|
|
205
185
|
Input: any;
|
|
206
186
|
Output: any;
|
|
@@ -258,6 +238,5 @@ declare namespace TypeControllerUsuario {
|
|
|
258
238
|
};
|
|
259
239
|
};
|
|
260
240
|
};
|
|
261
|
-
export {};
|
|
262
241
|
}
|
|
263
242
|
export default TypeControllerUsuario;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import t from "../../../shared/types";
|
|
2
2
|
interface TypesConfigEnv {
|
|
3
3
|
SET_PUBLIC_GOOGLE_CLIENT_ID_AUTH0: string;
|
|
4
|
-
SET_APP:
|
|
5
|
-
SET_USUARIO_TIPO:
|
|
4
|
+
SET_APP: TypesCore.Controller.Usuario.TokenPayload["app"];
|
|
5
|
+
SET_USUARIO_TIPO: TypesCore.Controller.Usuario.TokenPayload["usuario_tipo"];
|
|
6
6
|
}
|
|
7
7
|
declare class config_env {
|
|
8
8
|
private static SET_PUBLIC_GOOGLE_CLIENT_ID_AUTH0;
|
|
@@ -10,7 +10,7 @@ declare class config_env {
|
|
|
10
10
|
private static SET_USUARIO_TIPO;
|
|
11
11
|
static init(config: TypesConfigEnv): void;
|
|
12
12
|
static get PUBLIC_GOOGLE_CLIENT_ID_AUTH0(): string;
|
|
13
|
-
static get PUBLIC_APP():
|
|
14
|
-
static get PUBLIC_USUARIO_TIPO():
|
|
13
|
+
static get PUBLIC_APP(): TypesCore.Controller.Usuario.TokenPayload["app"];
|
|
14
|
+
static get PUBLIC_USUARIO_TIPO(): TypesCore.Controller.Usuario.TokenPayload["usuario_tipo"];
|
|
15
15
|
}
|
|
16
16
|
export default config_env;
|
|
@@ -67,7 +67,7 @@ declare namespace TypeControllerCodigoOtp {
|
|
|
67
67
|
}, z4.core.$strip>;
|
|
68
68
|
}, z4.core.$strip>;
|
|
69
69
|
type Input = z4.infer<typeof InputSchema>;
|
|
70
|
-
type Output =
|
|
70
|
+
type Output = TypesCore.Controller.Usuario.TokenPayload;
|
|
71
71
|
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
72
72
|
}
|
|
73
73
|
namespace RecuperarSenhaPeloAppComCodigoOtp {
|
|
@@ -81,7 +81,7 @@ declare namespace TypeControllerCodigoOtp {
|
|
|
81
81
|
}, z4.core.$strip>;
|
|
82
82
|
}, z4.core.$strip>;
|
|
83
83
|
type Input = z4.infer<typeof InputSchema>;
|
|
84
|
-
type Output =
|
|
84
|
+
type Output = TypesCore.Controller.Usuario.TokenPayload;
|
|
85
85
|
type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
|
|
86
86
|
}
|
|
87
87
|
}
|