@sigep/types 1.0.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,35 @@
1
+ declare enum UserStatus {
2
+ ACTIVE = "active",
3
+ INACTIVE = "inactive",
4
+ BLOCKED = "blocked"
5
+ }
6
+
7
+ interface IUser {
8
+ idUsuario: number;
9
+ codigo: string;
10
+ codigoCliente: string;
11
+ nome: string;
12
+ email: string;
13
+ cpf: string;
14
+ ativo: boolean;
15
+ status: UserStatus;
16
+ criadoEm: Date;
17
+ atualizadoEm: Date;
18
+ }
19
+
20
+ interface IAuthPayload {
21
+ sub: number;
22
+ email: string;
23
+ nome: string;
24
+ codigoCliente: string;
25
+ }
26
+ interface IAuthResponse {
27
+ accessToken: string;
28
+ user: {
29
+ id: number;
30
+ nome: string;
31
+ email: string;
32
+ };
33
+ }
34
+
35
+ export { type IAuthPayload, type IAuthResponse, type IUser, UserStatus };
@@ -0,0 +1,35 @@
1
+ declare enum UserStatus {
2
+ ACTIVE = "active",
3
+ INACTIVE = "inactive",
4
+ BLOCKED = "blocked"
5
+ }
6
+
7
+ interface IUser {
8
+ idUsuario: number;
9
+ codigo: string;
10
+ codigoCliente: string;
11
+ nome: string;
12
+ email: string;
13
+ cpf: string;
14
+ ativo: boolean;
15
+ status: UserStatus;
16
+ criadoEm: Date;
17
+ atualizadoEm: Date;
18
+ }
19
+
20
+ interface IAuthPayload {
21
+ sub: number;
22
+ email: string;
23
+ nome: string;
24
+ codigoCliente: string;
25
+ }
26
+ interface IAuthResponse {
27
+ accessToken: string;
28
+ user: {
29
+ id: number;
30
+ nome: string;
31
+ email: string;
32
+ };
33
+ }
34
+
35
+ export { type IAuthPayload, type IAuthResponse, type IUser, UserStatus };
package/dist/index.js ADDED
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ UserStatus: () => UserStatus
24
+ });
25
+ module.exports = __toCommonJS(index_exports);
26
+
27
+ // src/enums/user-status.enum.ts
28
+ var UserStatus = /* @__PURE__ */ ((UserStatus2) => {
29
+ UserStatus2["ACTIVE"] = "active";
30
+ UserStatus2["INACTIVE"] = "inactive";
31
+ UserStatus2["BLOCKED"] = "blocked";
32
+ return UserStatus2;
33
+ })(UserStatus || {});
34
+ // Annotate the CommonJS export names for ESM import in node:
35
+ 0 && (module.exports = {
36
+ UserStatus
37
+ });
package/dist/index.mjs ADDED
@@ -0,0 +1,10 @@
1
+ // src/enums/user-status.enum.ts
2
+ var UserStatus = /* @__PURE__ */ ((UserStatus2) => {
3
+ UserStatus2["ACTIVE"] = "active";
4
+ UserStatus2["INACTIVE"] = "inactive";
5
+ UserStatus2["BLOCKED"] = "blocked";
6
+ return UserStatus2;
7
+ })(UserStatus || {});
8
+ export {
9
+ UserStatus
10
+ };
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@sigep/types",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.mjs",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.js",
12
+ "types": "./dist/index.d.ts"
13
+ }
14
+ },
15
+ "files": ["dist"],
16
+ "scripts": {
17
+ "build": "tsup src/index.ts --format esm,cjs --dts",
18
+ "dev": "tsup src/index.ts --format esm,cjs --dts --watch"
19
+ },
20
+ "devDependencies": {
21
+ "@sigep/ts-config": "*",
22
+ "tsup": "^8",
23
+ "typescript": "^5"
24
+ }
25
+ }