@navservice/usuario 1.52.0 → 1.54.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.
@@ -0,0 +1,220 @@
1
+ import { InferInsertModel, InferSelectModel } from 'drizzle-orm';
2
+ export declare const schema_usuario: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
3
+ name: "usuario";
4
+ schema: undefined;
5
+ columns: {
6
+ _id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
7
+ name: "_id";
8
+ tableName: "usuario";
9
+ dataType: "string";
10
+ columnType: "SQLiteText";
11
+ data: string;
12
+ driverParam: string;
13
+ notNull: true;
14
+ hasDefault: true;
15
+ isPrimaryKey: true;
16
+ isAutoincrement: false;
17
+ hasRuntimeDefault: true;
18
+ enumValues: [string, ...string[]];
19
+ baseColumn: never;
20
+ identity: undefined;
21
+ generated: undefined;
22
+ }, {}, {
23
+ length: number | undefined;
24
+ }>;
25
+ data_criacao: import("drizzle-orm/sqlite-core").SQLiteColumn<{
26
+ name: "data_criacao";
27
+ tableName: "usuario";
28
+ dataType: "number";
29
+ columnType: "SQLiteInteger";
30
+ data: number;
31
+ driverParam: number;
32
+ notNull: true;
33
+ hasDefault: false;
34
+ isPrimaryKey: false;
35
+ isAutoincrement: false;
36
+ hasRuntimeDefault: false;
37
+ enumValues: undefined;
38
+ baseColumn: never;
39
+ identity: undefined;
40
+ generated: undefined;
41
+ }, {}, {}>;
42
+ data_atualizacao: import("drizzle-orm/sqlite-core").SQLiteColumn<{
43
+ name: "data_atualizacao";
44
+ tableName: "usuario";
45
+ dataType: "number";
46
+ columnType: "SQLiteInteger";
47
+ data: number;
48
+ driverParam: number;
49
+ notNull: false;
50
+ hasDefault: false;
51
+ isPrimaryKey: false;
52
+ isAutoincrement: false;
53
+ hasRuntimeDefault: false;
54
+ enumValues: undefined;
55
+ baseColumn: never;
56
+ identity: undefined;
57
+ generated: undefined;
58
+ }, {}, {}>;
59
+ data_exclusao: import("drizzle-orm/sqlite-core").SQLiteColumn<{
60
+ name: "data_exclusao";
61
+ tableName: "usuario";
62
+ dataType: "number";
63
+ columnType: "SQLiteInteger";
64
+ data: number;
65
+ driverParam: number;
66
+ notNull: false;
67
+ hasDefault: false;
68
+ isPrimaryKey: false;
69
+ isAutoincrement: false;
70
+ hasRuntimeDefault: false;
71
+ enumValues: undefined;
72
+ baseColumn: never;
73
+ identity: undefined;
74
+ generated: undefined;
75
+ }, {}, {}>;
76
+ nome: import("drizzle-orm/sqlite-core").SQLiteColumn<{
77
+ name: "nome";
78
+ tableName: "usuario";
79
+ dataType: "string";
80
+ columnType: "SQLiteText";
81
+ data: string;
82
+ driverParam: string;
83
+ notNull: true;
84
+ hasDefault: false;
85
+ isPrimaryKey: false;
86
+ isAutoincrement: false;
87
+ hasRuntimeDefault: false;
88
+ enumValues: [string, ...string[]];
89
+ baseColumn: never;
90
+ identity: undefined;
91
+ generated: undefined;
92
+ }, {}, {
93
+ length: number | undefined;
94
+ }>;
95
+ email: import("drizzle-orm/sqlite-core").SQLiteColumn<{
96
+ name: "email";
97
+ tableName: "usuario";
98
+ dataType: "string";
99
+ columnType: "SQLiteText";
100
+ data: string;
101
+ driverParam: string;
102
+ notNull: true;
103
+ hasDefault: false;
104
+ isPrimaryKey: false;
105
+ isAutoincrement: false;
106
+ hasRuntimeDefault: false;
107
+ enumValues: [string, ...string[]];
108
+ baseColumn: never;
109
+ identity: undefined;
110
+ generated: undefined;
111
+ }, {}, {
112
+ length: number | undefined;
113
+ }>;
114
+ senha: import("drizzle-orm/sqlite-core").SQLiteColumn<{
115
+ name: "senha";
116
+ tableName: "usuario";
117
+ dataType: "string";
118
+ columnType: "SQLiteText";
119
+ data: string;
120
+ driverParam: string;
121
+ notNull: false;
122
+ hasDefault: false;
123
+ isPrimaryKey: false;
124
+ isAutoincrement: false;
125
+ hasRuntimeDefault: false;
126
+ enumValues: [string, ...string[]];
127
+ baseColumn: never;
128
+ identity: undefined;
129
+ generated: undefined;
130
+ }, {}, {
131
+ length: number | undefined;
132
+ }>;
133
+ imagem: import("drizzle-orm/sqlite-core").SQLiteColumn<{
134
+ name: "imagem";
135
+ tableName: "usuario";
136
+ dataType: "string";
137
+ columnType: "SQLiteText";
138
+ data: string;
139
+ driverParam: string;
140
+ notNull: false;
141
+ hasDefault: false;
142
+ isPrimaryKey: false;
143
+ isAutoincrement: false;
144
+ hasRuntimeDefault: false;
145
+ enumValues: [string, ...string[]];
146
+ baseColumn: never;
147
+ identity: undefined;
148
+ generated: undefined;
149
+ }, {}, {
150
+ length: number | undefined;
151
+ }>;
152
+ auth_google: import("drizzle-orm/sqlite-core").SQLiteColumn<{
153
+ name: "auth_google";
154
+ tableName: "usuario";
155
+ dataType: "number";
156
+ columnType: "SQLiteInteger";
157
+ data: 0 | 1;
158
+ driverParam: number;
159
+ notNull: true;
160
+ hasDefault: true;
161
+ isPrimaryKey: false;
162
+ isAutoincrement: false;
163
+ hasRuntimeDefault: false;
164
+ enumValues: undefined;
165
+ baseColumn: never;
166
+ identity: undefined;
167
+ generated: undefined;
168
+ }, {}, {
169
+ $type: 0 | 1;
170
+ }>;
171
+ excluido: import("drizzle-orm/sqlite-core").SQLiteColumn<{
172
+ name: "excluido";
173
+ tableName: "usuario";
174
+ dataType: "number";
175
+ columnType: "SQLiteInteger";
176
+ data: 0 | 1;
177
+ driverParam: number;
178
+ notNull: true;
179
+ hasDefault: true;
180
+ isPrimaryKey: false;
181
+ isAutoincrement: false;
182
+ hasRuntimeDefault: false;
183
+ enumValues: undefined;
184
+ baseColumn: never;
185
+ identity: undefined;
186
+ generated: undefined;
187
+ }, {}, {
188
+ $type: 0 | 1;
189
+ }>;
190
+ ativo: import("drizzle-orm/sqlite-core").SQLiteColumn<{
191
+ name: "ativo";
192
+ tableName: "usuario";
193
+ dataType: "number";
194
+ columnType: "SQLiteInteger";
195
+ data: 0 | 1;
196
+ driverParam: number;
197
+ notNull: true;
198
+ hasDefault: true;
199
+ isPrimaryKey: false;
200
+ isAutoincrement: false;
201
+ hasRuntimeDefault: false;
202
+ enumValues: undefined;
203
+ baseColumn: never;
204
+ identity: undefined;
205
+ generated: undefined;
206
+ }, {}, {
207
+ $type: 0 | 1;
208
+ }>;
209
+ };
210
+ dialect: "sqlite";
211
+ }>;
212
+ export type Base = InferSelectModel<typeof schema_usuario>;
213
+ export type Criar = InferInsertModel<typeof schema_usuario>;
214
+ export type BuscarPeloFiltro = Partial<Pick<InferSelectModel<typeof schema_usuario>, "_id" | "nome" | "email" | "ativo" | "excluido">> & {
215
+ pagina: number;
216
+ };
217
+ export type AtualizarPeloId = Pick<InferSelectModel<typeof schema_usuario>, "_id"> & Partial<Pick<InferSelectModel<typeof schema_usuario>, "nome" | "email" | "senha" | "imagem" | "auth_google" | "ativo" | "excluido" | "data_atualizacao">>;
218
+ export type BuscarPeloId = Pick<InferSelectModel<typeof schema_usuario>, "_id">;
219
+ export type DeletarPeloId = Pick<InferSelectModel<typeof schema_usuario>, "_id">;
220
+ export default schema_usuario;
@@ -1,7 +1,7 @@
1
- import type { LucideIcon } from "lucide-react";
1
+ import type { ReactNode } from "react";
2
2
  interface TypesLayoutPublicHeader {
3
3
  title?: string;
4
- icon: LucideIcon;
4
+ icon?: ReactNode;
5
5
  }
6
6
  export default function Header(props: TypesLayoutPublicHeader): import("react/jsx-runtime").JSX.Element;
7
7
  export {};
@@ -1,7 +1,7 @@
1
- import type { LucideIcon } from "lucide-react";
1
+ import { ReactNode } from "react";
2
2
  interface TypesLayoutPublic {
3
3
  title: string;
4
- icon: LucideIcon;
4
+ icon?: ReactNode;
5
5
  }
6
6
  export declare function LayoutPublic(props: TypesLayoutPublic): import("react/jsx-runtime").JSX.Element;
7
7
  export {};
package/build/es/index.js CHANGED
@@ -2196,13 +2196,15 @@ const lib_axios = axios;
2196
2196
  "FREE",
2197
2197
  "ESSENTIAL",
2198
2198
  "BUSINESS",
2199
- "ULTIMATE"
2199
+ "ENTERPRISE"
2200
2200
  ];
2201
2201
  TypeControllerUsuario.AppEnum = [
2202
2202
  "service-usuario",
2203
2203
  "service-pages",
2204
2204
  "service-assinatura",
2205
- "service-bucket"
2205
+ "service-bucket",
2206
+ "service-galio",
2207
+ "service-oraculo"
2206
2208
  ];
2207
2209
  TypeControllerUsuario.AssinaturaStatusEnum = [
2208
2210
  "active",
@@ -2227,6 +2229,12 @@ const lib_axios = axios;
2227
2229
  "service-pages": [
2228
2230
  "padrao"
2229
2231
  ],
2232
+ "service-galio": [
2233
+ "padrao"
2234
+ ],
2235
+ "service-oraculo": [
2236
+ "padrao"
2237
+ ],
2230
2238
  "service-bucket": [
2231
2239
  "padrao"
2232
2240
  ]
@@ -2271,7 +2279,11 @@ var _usuario_TypeControllerUsuario;
2271
2279
  v4.literal("INVALID_TOKEN"),
2272
2280
  v4.literal("NOT_FOUND"),
2273
2281
  v4.literal("SUCCESS_FILE"),
2274
- v4.literal("DATABASE_ERROR")
2282
+ v4.literal("DATABASE_ERROR"),
2283
+ v4.literal("BUSINESS_RULE_VIOLATION"),
2284
+ v4.literal("PLAN_FORBIDDEN"),
2285
+ v4.literal("INTEGRATION_ERROR"),
2286
+ v4.literal("TOKEN_AUTH_USER")
2275
2287
  ]);
2276
2288
  v4.object({
2277
2289
  status: StatusSchema,
@@ -2293,6 +2305,7 @@ var _usuario_TypeControllerUsuario;
2293
2305
  v4.object({
2294
2306
  status: StatusSchema,
2295
2307
  message: v4.string().optional(),
2308
+ fn: v4.string(),
2296
2309
  file_buffer: v4.union([
2297
2310
  v4["instanceof"](Blob),
2298
2311
  v4["instanceof"](ArrayBuffer),
@@ -2884,6 +2897,39 @@ class _hooks {
2884
2897
  localStorage.setItem("theme", "light");
2885
2898
  }
2886
2899
  }
2900
+ use_set_show_component() {
2901
+ function aplicarVisibilidadeElemento(el) {
2902
+ const valor = el.getAttribute("set-show-component");
2903
+ if ("ocultar" === valor) el.style.display = "none";
2904
+ else if ("exibir" === valor) el.style.display = "";
2905
+ }
2906
+ function aplicarVisibilidade(node = document) {
2907
+ const elementos = node.querySelectorAll("[set-show-component]");
2908
+ elementos.forEach(aplicarVisibilidadeElemento);
2909
+ }
2910
+ document.addEventListener("DOMContentLoaded", ()=>{
2911
+ aplicarVisibilidade();
2912
+ const observer = new MutationObserver((mutations)=>{
2913
+ mutations.forEach((mutation)=>{
2914
+ mutation.addedNodes.forEach((node)=>{
2915
+ if (node instanceof HTMLElement) {
2916
+ if (node.hasAttribute("set-show-component")) aplicarVisibilidadeElemento(node);
2917
+ aplicarVisibilidade(node);
2918
+ }
2919
+ });
2920
+ if ("attributes" === mutation.type && mutation.target instanceof HTMLElement && "set-show-component" === mutation.attributeName) aplicarVisibilidadeElemento(mutation.target);
2921
+ });
2922
+ });
2923
+ observer.observe(document.body, {
2924
+ childList: true,
2925
+ subtree: true,
2926
+ attributes: true,
2927
+ attributeFilter: [
2928
+ "set-show-component"
2929
+ ]
2930
+ });
2931
+ });
2932
+ }
2887
2933
  }
2888
2934
  const utils_hooks = new _hooks;
2889
2935
  const _environment = class {
@@ -2931,7 +2977,8 @@ const type_controller_usuario_input = (meta)=>JSON.stringify(meta);
2931
2977
  ativo: v4.union([
2932
2978
  v4.literal(0),
2933
2979
  v4.literal(1)
2934
- ])
2980
+ ]),
2981
+ imagem: v4.string()
2935
2982
  });
2936
2983
  (function(Register) {
2937
2984
  Register.route = "/api/usuario/auth/register";
@@ -3154,7 +3201,7 @@ var type_controller_authenticator_TypeControlerAutheticator;
3154
3201
  })
3155
3202
  });
3156
3203
  (function(EnviarCodigoOtp) {
3157
- EnviarCodigoOtp.route = "/usuario/auth/enviar_codigo_verificacao_otp";
3204
+ EnviarCodigoOtp.route = "/api/usuario/auth/enviar_codigo_verificacao_otp";
3158
3205
  EnviarCodigoOtp.InputSchema = v4.object({
3159
3206
  data: v4.object({
3160
3207
  codigo_verificacao_otp: v4.object({
@@ -3179,7 +3226,7 @@ var type_controller_authenticator_TypeControlerAutheticator;
3179
3226
  });
3180
3227
  })(TypeControllerCodigoOtp.EnviarCodigoOtp || (TypeControllerCodigoOtp.EnviarCodigoOtp = {}));
3181
3228
  (function(EntrarComCodigoOtp) {
3182
- EntrarComCodigoOtp.route = "/usuario/auth/entrar_com_codigo_otp";
3229
+ EntrarComCodigoOtp.route = "/api/usuario/auth/entrar_com_codigo_otp";
3183
3230
  EntrarComCodigoOtp.InputSchema = v4.object({
3184
3231
  data: v4.object({
3185
3232
  codigo_verificacao_otp: v4.object({
@@ -8582,14 +8629,10 @@ function Header(props) {
8582
8629
  children: [
8583
8630
  /*#__PURE__*/ jsx(motion.div, {
8584
8631
  whileHover: {
8585
- rotate: 8,
8586
- scale: 1.05
8632
+ rotate: 6,
8633
+ scale: 1.04
8587
8634
  },
8588
- className: "w-10 h-10 rounded-xl bg-gradient-to-br from-blue-600 to-cyan-600 flex items-center justify-center shadow-lg shadow-blue-500/30 text-white",
8589
- children: /*#__PURE__*/ jsx(props.icon, {
8590
- size: 20,
8591
- strokeWidth: 2.5
8592
- })
8635
+ children: props?.icon
8593
8636
  }),
8594
8637
  /*#__PURE__*/ jsx("h5", {
8595
8638
  className: "text-lg font-semibold tracking-tight bg-gradient-to-r from-white to-slate-300 bg-clip-text text-transparent",
@@ -8613,7 +8656,7 @@ function Header(props) {
8613
8656
  scale: 0.98
8614
8657
  },
8615
8658
  onClick: ()=>navigate("/auth/register"),
8616
- className: " relative group px-5 py-2 rounded-lg text-sm font-medium text-white bg-gradient-to-r from-blue-600 to-cyan-600 transition-all duration-300 /* A Sombra em gradiente usando before */ before:absolute before:inset-0 before:rounded-lg before:bg-gradient-to-r before:from-blue-600 before:to-cyan-600 before:blur-md before:opacity-0 before:transition-opacity before:duration-500 hover:before:opacity-100 before:-z-10 ",
8659
+ className: " relative group px-5 py-2 rounded-lg text-sm font-medium text-white bg-gradient-to-r from-blue-600 to-cyan-600 transition-all duration-300 before:absolute before:inset-0 before:rounded-lg before:bg-gradient-to-r before:from-blue-600 before:to-cyan-600 before:blur-md before:opacity-0 before:transition-opacity before:duration-500 hover:before:opacity-100 before:-z-10 ",
8617
8660
  children: /*#__PURE__*/ jsx("span", {
8618
8661
  className: "relative z-10",
8619
8662
  children: "Registrar"
@@ -8632,7 +8675,7 @@ function LayoutPublic(props) {
8632
8675
  children: [
8633
8676
  /*#__PURE__*/ jsx(Header, {
8634
8677
  title: props?.title,
8635
- icon: props.icon
8678
+ icon: props?.icon
8636
8679
  }),
8637
8680
  /*#__PURE__*/ jsx("main", {
8638
8681
  className: "flex-1 overflow-y-auto",
@@ -10,7 +10,7 @@ declare namespace TypeControllerCodigoOtp {
10
10
  codigo: z4.ZodString;
11
11
  }, z4.core.$strip>;
12
12
  namespace EnviarCodigoOtp {
13
- const route: "/usuario/auth/enviar_codigo_verificacao_otp";
13
+ const route: "/api/usuario/auth/enviar_codigo_verificacao_otp";
14
14
  const InputSchema: z4.ZodObject<{
15
15
  data: z4.ZodObject<{
16
16
  codigo_verificacao_otp: z4.ZodObject<{
@@ -35,7 +35,7 @@ declare namespace TypeControllerCodigoOtp {
35
35
  type Response = AxiosResponse<t.Geral.Response.C.Output<Output>>;
36
36
  }
37
37
  namespace EntrarComCodigoOtp {
38
- const route: "/usuario/auth/entrar_com_codigo_otp";
38
+ const route: "/api/usuario/auth/entrar_com_codigo_otp";
39
39
  const InputSchema: z4.ZodObject<{
40
40
  data: z4.ZodObject<{
41
41
  codigo_verificacao_otp: z4.ZodObject<{
@@ -49,6 +49,8 @@ declare namespace TypeControllerCodigoOtp {
49
49
  "service-pages": "service-pages";
50
50
  "service-assinatura": "service-assinatura";
51
51
  "service-bucket": "service-bucket";
52
+ "service-galio": "service-galio";
53
+ "service-oraculo": "service-oraculo";
52
54
  }>;
53
55
  }, z4.core.$strip>;
54
56
  }, z4.core.$strip>;
@@ -15,6 +15,7 @@ declare namespace TypeControllerUsuario {
15
15
  auth_google: z4.ZodUnion<readonly [z4.ZodLiteral<0>, z4.ZodLiteral<1>]>;
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
+ imagem: z4.ZodString;
18
19
  }, z4.core.$strip>;
19
20
  type UsuarioBase = z4.infer<typeof UsuarioBaseSchema>;
20
21
  export namespace Register {
@@ -35,6 +36,8 @@ declare namespace TypeControllerUsuario {
35
36
  "service-pages": "service-pages";
36
37
  "service-assinatura": "service-assinatura";
37
38
  "service-bucket": "service-bucket";
39
+ "service-galio": "service-galio";
40
+ "service-oraculo": "service-oraculo";
38
41
  }>;
39
42
  }, z4.core.$strip>;
40
43
  }, z4.core.$strip>;
@@ -57,6 +60,8 @@ declare namespace TypeControllerUsuario {
57
60
  "service-pages": "service-pages";
58
61
  "service-assinatura": "service-assinatura";
59
62
  "service-bucket": "service-bucket";
63
+ "service-galio": "service-galio";
64
+ "service-oraculo": "service-oraculo";
60
65
  }>;
61
66
  codigo_temporario: z4.ZodOptional<z4.ZodNullable<z4.ZodString>>;
62
67
  }, z4.core.$strip>;
@@ -82,6 +87,8 @@ declare namespace TypeControllerUsuario {
82
87
  "service-pages": "service-pages";
83
88
  "service-assinatura": "service-assinatura";
84
89
  "service-bucket": "service-bucket";
90
+ "service-galio": "service-galio";
91
+ "service-oraculo": "service-oraculo";
85
92
  }>;
86
93
  }, z4.core.$strip>;
87
94
  }, z4.core.$strip>;
@@ -104,6 +111,8 @@ declare namespace TypeControllerUsuario {
104
111
  "service-pages": "service-pages";
105
112
  "service-assinatura": "service-assinatura";
106
113
  "service-bucket": "service-bucket";
114
+ "service-galio": "service-galio";
115
+ "service-oraculo": "service-oraculo";
107
116
  }>;
108
117
  }, z4.core.$strip>;
109
118
  }, z4.core.$strip>;
@@ -44,6 +44,7 @@ declare namespace t {
44
44
  };
45
45
  Variables: {
46
46
  usuario_auth: TypesCore.Controller.Usuario.TokenPayload;
47
+ token: string;
47
48
  };
48
49
  };
49
50
  type Context = HonoContext<Env>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navservice/usuario",
3
- "version": "1.52.0",
3
+ "version": "1.54.0",
4
4
  "description": "Service de autenticação de usuários unificado",
5
5
  "type": "module",
6
6
  "main": "./build/lib/index.js",