@navservice/usuario 1.1.182
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/AuthAtivarDesativarAuthenticator/AuthAtivarDesativarAuthenticator.d.ts +1 -0
- package/build/es/biblioteca/src/componentes/auth/AuthAtivarDesativarAuthenticator/index.d.ts +1 -0
- package/build/es/biblioteca/src/componentes/auth/AuthGoogle/AuthGoogle.d.ts +5 -0
- package/build/es/biblioteca/src/componentes/auth/AuthGoogle/index.d.ts +1 -0
- package/build/es/biblioteca/src/componentes/auth/AuthLogin/AuthLogin.d.ts +1 -0
- package/build/es/biblioteca/src/componentes/auth/AuthLogin/index.d.ts +1 -0
- package/build/es/biblioteca/src/componentes/auth/AuthRegister/AuthRegister.d.ts +1 -0
- package/build/es/biblioteca/src/componentes/auth/AuthRegister/index.d.ts +2 -0
- package/build/es/biblioteca/src/componentes/auth/EsqueciMinhaSenha/EsqueciMinhaSenha.d.ts +5 -0
- package/build/es/biblioteca/src/componentes/auth/EsqueciMinhaSenha/index.d.ts +1 -0
- package/build/es/biblioteca/src/componentes/auth/VerificarAuthenticator/VerificarAuthenticator.d.ts +2 -0
- package/build/es/biblioteca/src/componentes/auth/VerificarAuthenticator/index.d.ts +1 -0
- package/build/es/biblioteca/src/componentes/geral/FormularioZod/index.d.ts +45 -0
- package/build/es/biblioteca/src/componentes/geral/PaginaEmDesenvolvimento/index.d.ts +5 -0
- package/build/es/biblioteca/src/componentes/geral/TopTabs/index.d.ts +10 -0
- package/build/es/biblioteca/src/componentes/layout/Layout.d.ts +1 -0
- package/build/es/biblioteca/src/componentes/layout/NavBar/DarkMode.d.ts +2 -0
- package/build/es/biblioteca/src/componentes/layout/NavBar/Logo.d.ts +2 -0
- package/build/es/biblioteca/src/componentes/layout/NavBar/Profile.d.ts +5 -0
- package/build/es/biblioteca/src/componentes/layout/NavBar/index.d.ts +3 -0
- package/build/es/biblioteca/src/componentes/layout/index.d.ts +1 -0
- package/build/es/biblioteca/src/componentes/layoutPublic/Header.d.ts +1 -0
- package/build/es/biblioteca/src/componentes/layoutPublic/index.d.ts +1 -0
- package/build/es/biblioteca/src/componentes/layoutPublic/layoutPublic.d.ts +1 -0
- package/build/es/biblioteca/src/config_env/index.d.ts +19 -0
- package/build/es/biblioteca/src/contexto/contexto_layout.d.ts +74 -0
- package/build/es/biblioteca/src/contexto/contexto_usuario.d.ts +32 -0
- package/build/es/biblioteca/src/index.d.ts +12 -0
- package/build/es/index.js +19214 -0
- package/build/es/index.js.LICENSE.txt +6 -0
- package/build/es/shared/configuracoes/_sistema.d.ts +49 -0
- package/build/es/shared/configuracoes/_theme.d.ts +78 -0
- package/build/es/shared/configuracoes/index.d.ts +129 -0
- package/build/es/shared/types/controller/type_codigo_verificacao_otp.d.ts +91 -0
- package/build/es/shared/types/controller/type_controller_authenticator.d.ts +82 -0
- package/build/es/shared/types/controller/type_controller_usuario.d.ts +260 -0
- package/build/es/shared/types/geral/type_response.d.ts +54 -0
- package/build/es/shared/types/index.d.ts +45 -0
- package/package.json +41 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Context } from "hono";
|
|
2
|
+
import z4 from "zod/v4";
|
|
3
|
+
declare namespace TypeControllerResponse {
|
|
4
|
+
const BaseResponseSchema: z4.ZodObject<{
|
|
5
|
+
status: z4.ZodUnion<readonly [z4.ZodLiteral<200>, z4.ZodLiteral<201>, z4.ZodLiteral<202>, z4.ZodLiteral<204>, z4.ZodLiteral<400>, z4.ZodLiteral<401>, z4.ZodLiteral<403>, z4.ZodLiteral<404>, z4.ZodLiteral<409>, z4.ZodLiteral<422>, z4.ZodLiteral<500>, z4.ZodLiteral<428>, z4.ZodLiteral<405>]>;
|
|
6
|
+
code: z4.ZodUnion<readonly [z4.ZodLiteral<"SUCCESS">, z4.ZodLiteral<"ACTION_REQUIRED">, z4.ZodLiteral<"CREATED">, z4.ZodLiteral<"WARNING">, z4.ZodLiteral<"AUTHORIZATION_ERROR">, z4.ZodLiteral<"SCHEMA_VALIDATION">, z4.ZodLiteral<"SERVER_ERROR">, z4.ZodLiteral<"UNAUTHORIZED">, z4.ZodLiteral<"INVALID_TOKEN">, z4.ZodLiteral<"NOT_FOUND">, z4.ZodLiteral<"SUCCESS_FILE">, z4.ZodLiteral<"DATABASE_ERROR">]>;
|
|
7
|
+
type: z4.ZodDefault<z4.ZodUnion<readonly [z4.ZodLiteral<"success">, z4.ZodLiteral<"warning">, z4.ZodLiteral<"error">]>>;
|
|
8
|
+
message: z4.ZodString;
|
|
9
|
+
results: z4.ZodOptional<z4.ZodUnknown>;
|
|
10
|
+
error: z4.ZodOptional<z4.ZodUnknown>;
|
|
11
|
+
}, z4.core.$strip>;
|
|
12
|
+
type BaseResponse<T = unknown> = z4.infer<typeof BaseResponseSchema> & {
|
|
13
|
+
results?: T;
|
|
14
|
+
};
|
|
15
|
+
export namespace C {
|
|
16
|
+
export const InputSchema: z4.ZodObject<{
|
|
17
|
+
status: z4.ZodUnion<readonly [z4.ZodLiteral<200>, z4.ZodLiteral<201>, z4.ZodLiteral<202>, z4.ZodLiteral<204>, z4.ZodLiteral<400>, z4.ZodLiteral<401>, z4.ZodLiteral<403>, z4.ZodLiteral<404>, z4.ZodLiteral<409>, z4.ZodLiteral<422>, z4.ZodLiteral<500>, z4.ZodLiteral<428>, z4.ZodLiteral<405>]>;
|
|
18
|
+
code: z4.ZodUnion<readonly [z4.ZodLiteral<"SUCCESS">, z4.ZodLiteral<"ACTION_REQUIRED">, z4.ZodLiteral<"CREATED">, z4.ZodLiteral<"WARNING">, z4.ZodLiteral<"AUTHORIZATION_ERROR">, z4.ZodLiteral<"SCHEMA_VALIDATION">, z4.ZodLiteral<"SERVER_ERROR">, z4.ZodLiteral<"UNAUTHORIZED">, z4.ZodLiteral<"INVALID_TOKEN">, z4.ZodLiteral<"NOT_FOUND">, z4.ZodLiteral<"SUCCESS_FILE">, z4.ZodLiteral<"DATABASE_ERROR">]>;
|
|
19
|
+
type: z4.ZodDefault<z4.ZodOptional<z4.ZodDefault<z4.ZodUnion<readonly [z4.ZodLiteral<"success">, z4.ZodLiteral<"warning">, z4.ZodLiteral<"error">]>>>>;
|
|
20
|
+
message: z4.ZodOptional<z4.ZodString>;
|
|
21
|
+
results: z4.ZodAny;
|
|
22
|
+
c: z4.ZodCustom<Context<any, any, {}>, Context<any, any, {}>>;
|
|
23
|
+
}, z4.core.$strip>;
|
|
24
|
+
export type Input<T = unknown> = z4.infer<typeof InputSchema> & {
|
|
25
|
+
results?: T;
|
|
26
|
+
};
|
|
27
|
+
export type Output<T = unknown> = BaseResponse<T>;
|
|
28
|
+
const FileResponseParamsSchema: z4.ZodObject<{
|
|
29
|
+
status: z4.ZodUnion<readonly [z4.ZodLiteral<200>, z4.ZodLiteral<201>, z4.ZodLiteral<202>, z4.ZodLiteral<204>, z4.ZodLiteral<400>, z4.ZodLiteral<401>, z4.ZodLiteral<403>, z4.ZodLiteral<404>, z4.ZodLiteral<409>, z4.ZodLiteral<422>, z4.ZodLiteral<500>, z4.ZodLiteral<428>, z4.ZodLiteral<405>]>;
|
|
30
|
+
message: z4.ZodOptional<z4.ZodString>;
|
|
31
|
+
file_buffer: z4.ZodUnion<readonly [z4.ZodCustom<Blob, Blob>, z4.ZodCustom<ArrayBuffer, ArrayBuffer>, z4.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>]>;
|
|
32
|
+
content_type: z4.ZodString;
|
|
33
|
+
filename: z4.ZodOptional<z4.ZodString>;
|
|
34
|
+
c: z4.ZodOptional<z4.ZodCustom<Context<any, any, {}>, Context<any, any, {}>>>;
|
|
35
|
+
}, z4.core.$strip>;
|
|
36
|
+
export type FileResponseParams = z4.infer<typeof FileResponseParamsSchema>;
|
|
37
|
+
export {};
|
|
38
|
+
}
|
|
39
|
+
export namespace Error {
|
|
40
|
+
const InputSchema: z4.ZodObject<{
|
|
41
|
+
message: z4.ZodOptional<z4.ZodString>;
|
|
42
|
+
results: z4.ZodOptional<z4.ZodUnion<readonly [z4.ZodArray<z4.ZodUnknown>, z4.ZodUnknown]>>;
|
|
43
|
+
type: z4.ZodDefault<z4.ZodOptional<z4.ZodDefault<z4.ZodUnion<readonly [z4.ZodLiteral<"success">, z4.ZodLiteral<"warning">, z4.ZodLiteral<"error">]>>>>;
|
|
44
|
+
code: z4.ZodUnion<readonly [z4.ZodLiteral<"SUCCESS">, z4.ZodLiteral<"ACTION_REQUIRED">, z4.ZodLiteral<"CREATED">, z4.ZodLiteral<"WARNING">, z4.ZodLiteral<"AUTHORIZATION_ERROR">, z4.ZodLiteral<"SCHEMA_VALIDATION">, z4.ZodLiteral<"SERVER_ERROR">, z4.ZodLiteral<"UNAUTHORIZED">, z4.ZodLiteral<"INVALID_TOKEN">, z4.ZodLiteral<"NOT_FOUND">, z4.ZodLiteral<"SUCCESS_FILE">, z4.ZodLiteral<"DATABASE_ERROR">]>;
|
|
45
|
+
status: z4.ZodDefault<z4.ZodOptional<z4.ZodNumber>>;
|
|
46
|
+
}, z4.core.$strip>;
|
|
47
|
+
type Input<T = unknown> = z4.infer<typeof InputSchema> & {
|
|
48
|
+
results?: T;
|
|
49
|
+
};
|
|
50
|
+
type Output<T = unknown> = BaseResponse<T>;
|
|
51
|
+
}
|
|
52
|
+
export {};
|
|
53
|
+
}
|
|
54
|
+
export default TypeControllerResponse;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Context as HonoContext } from "hono";
|
|
2
|
+
import type { D1Database, R2Bucket } from "@cloudflare/workers-types";
|
|
3
|
+
import TypeControllerUsuario from "./controller/type_controller_usuario";
|
|
4
|
+
import TypeControlerAutheticator from "./controller/type_controller_authenticator";
|
|
5
|
+
import TypeControllerCodigoOtp from "./controller/type_codigo_verificacao_otp";
|
|
6
|
+
import TypeResponse from "./geral/type_response";
|
|
7
|
+
declare namespace t {
|
|
8
|
+
namespace Controller {
|
|
9
|
+
export import Usuario = TypeControllerUsuario;
|
|
10
|
+
export import Autheticator = TypeControlerAutheticator;
|
|
11
|
+
export import CodigoOtp = TypeControllerCodigoOtp;
|
|
12
|
+
}
|
|
13
|
+
namespace Geral {
|
|
14
|
+
export import Response = TypeResponse;
|
|
15
|
+
namespace FormularioZod {
|
|
16
|
+
interface Describe {
|
|
17
|
+
label?: string;
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
type?: "text" | "password" | "number" | "select";
|
|
20
|
+
icon?: string;
|
|
21
|
+
searchable?: boolean;
|
|
22
|
+
helpText?: string;
|
|
23
|
+
options?: Array<{
|
|
24
|
+
label: string;
|
|
25
|
+
value: string;
|
|
26
|
+
}>;
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
type Ambiente = "sandbox" | "producao" | "localhost";
|
|
31
|
+
}
|
|
32
|
+
interface Context extends HonoContext {
|
|
33
|
+
env: {
|
|
34
|
+
AMBIENTE: "PRODUCAO" | "SANDBOX";
|
|
35
|
+
JSON_WEB_TOKEN_AUTH_USER: string;
|
|
36
|
+
GOOGLE_CLIENT_ID_AUTH0: string;
|
|
37
|
+
RESEND_API_KEY: string;
|
|
38
|
+
DB_SERVICE_USUARIO: D1Database;
|
|
39
|
+
BUCKET_BINDING: R2Bucket;
|
|
40
|
+
};
|
|
41
|
+
set(key: "usuario_auth", params: TypeControllerUsuario.UsuarioAuth): TypeControllerUsuario.UsuarioAuth;
|
|
42
|
+
get(key: "usuario_auth"): TypeControllerUsuario.UsuarioAuth;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export default t;
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@navservice/usuario",
|
|
3
|
+
"version": "1.1.182",
|
|
4
|
+
"description": "Service de autenticação de usuários unificado",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./build/lib/index.js",
|
|
7
|
+
"module": "./build/es/index.js",
|
|
8
|
+
"types": "./build/es/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./build/es/index.js",
|
|
12
|
+
"require": "./build/lib/index.js",
|
|
13
|
+
"types": "./build/es/biblioteca/src/index.d.ts"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"build"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "rslib build"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"react": "^19",
|
|
24
|
+
"react-dom": "^19",
|
|
25
|
+
"react-router-dom": "^7",
|
|
26
|
+
"@react-oauth/google": "^0.12",
|
|
27
|
+
"google-auth-library": "^10",
|
|
28
|
+
"qrcode.react": "^4",
|
|
29
|
+
"zod": "^4",
|
|
30
|
+
"zustand": "^5"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"typescript": "^5",
|
|
34
|
+
"react": "^19",
|
|
35
|
+
"react-dom": "^19",
|
|
36
|
+
"react-router-dom": "^7",
|
|
37
|
+
"zod": "^4",
|
|
38
|
+
"zustand": "^5",
|
|
39
|
+
"@react-oauth/google": "^0.12"
|
|
40
|
+
}
|
|
41
|
+
}
|