expo-backend-types 0.0.44 → 0.0.45
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,29 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.LoginResponseDto = exports.loginResponseSchema = exports.LoginDto = exports.loginSchema = void 0;
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
8
|
+
const zod_nestjs_1 = require("@anatine/zod-nestjs");
|
9
|
+
const cuenta_dto_1 = require("../../cuenta/dto/cuenta.dto");
|
10
|
+
exports.loginSchema = cuenta_dto_1.cuentaSchema.pick({
|
11
|
+
username: true,
|
12
|
+
password: true,
|
13
|
+
});
|
14
|
+
class LoginDto extends (0, zod_nestjs_1.createZodDto)(exports.loginSchema) {
|
15
|
+
}
|
16
|
+
exports.LoginDto = LoginDto;
|
17
|
+
exports.loginResponseSchema = zod_1.default.object({
|
18
|
+
user: cuenta_dto_1.cuentaSchema.omit({
|
19
|
+
password: true,
|
20
|
+
}),
|
21
|
+
backendTokens: zod_1.default.object({
|
22
|
+
accessToken: zod_1.default.string(),
|
23
|
+
refreshToken: zod_1.default.string(),
|
24
|
+
}),
|
25
|
+
});
|
26
|
+
class LoginResponseDto extends (0, zod_nestjs_1.createZodDto)(exports.loginResponseSchema) {
|
27
|
+
}
|
28
|
+
exports.LoginResponseDto = LoginResponseDto;
|
29
|
+
//# sourceMappingURL=login.dto.js.map
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.RegisterResponseDto = exports.registerResponseSchema = exports.RegisterDto = exports.registerSchema = void 0;
|
4
|
+
const zod_nestjs_1 = require("@anatine/zod-nestjs");
|
5
|
+
const cuenta_dto_1 = require("../../cuenta/dto/cuenta.dto");
|
6
|
+
exports.registerSchema = cuenta_dto_1.cuentaSchema.pick({
|
7
|
+
username: true,
|
8
|
+
password: true,
|
9
|
+
isAdmin: true,
|
10
|
+
});
|
11
|
+
class RegisterDto extends (0, zod_nestjs_1.createZodDto)(exports.registerSchema) {
|
12
|
+
}
|
13
|
+
exports.RegisterDto = RegisterDto;
|
14
|
+
exports.registerResponseSchema = exports.registerSchema.omit({
|
15
|
+
password: true,
|
16
|
+
});
|
17
|
+
class RegisterResponseDto extends (0, zod_nestjs_1.createZodDto)(exports.registerResponseSchema) {
|
18
|
+
}
|
19
|
+
exports.RegisterResponseDto = RegisterResponseDto;
|
20
|
+
//# sourceMappingURL=register.dto.js.map
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./dto/login.dto"), exports);
|
18
|
+
__exportStar(require("./dto/register.dto"), exports);
|
19
|
+
//# sourceMappingURL=exports.js.map
|
@@ -0,0 +1,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CuentaDto = exports.cuentaSchema = void 0;
|
4
|
+
const zod_nestjs_1 = require("@anatine/zod-nestjs");
|
5
|
+
const zod_1 = require("zod");
|
6
|
+
exports.cuentaSchema = zod_1.z.object({
|
7
|
+
id: zod_1.z
|
8
|
+
.string({
|
9
|
+
required_error: 'El id es requerido',
|
10
|
+
})
|
11
|
+
.uuid({
|
12
|
+
message: 'El id debe ser un UUID',
|
13
|
+
}),
|
14
|
+
username: zod_1.z.string({
|
15
|
+
required_error: 'El nombre de usuario es requerido',
|
16
|
+
}),
|
17
|
+
password: zod_1.z
|
18
|
+
.string({
|
19
|
+
required_error: 'La contraseña es requerida',
|
20
|
+
})
|
21
|
+
.min(6, 'La contraseña debe tener al menos 6 caracteres'),
|
22
|
+
isAdmin: zod_1.z.boolean().default(false),
|
23
|
+
created_at: zod_1.z.string().datetime(),
|
24
|
+
updated_at: zod_1.z.string().datetime(),
|
25
|
+
filtroBaseActivo: zod_1.z.boolean().default(false),
|
26
|
+
fcmToken: zod_1.z.array(zod_1.z.string()).default([]),
|
27
|
+
});
|
28
|
+
class CuentaDto extends (0, zod_nestjs_1.createZodDto)(exports.cuentaSchema) {
|
29
|
+
}
|
30
|
+
exports.CuentaDto = CuentaDto;
|
31
|
+
//# sourceMappingURL=cuenta.dto.js.map
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./dto/cuenta.dto"), exports);
|
18
|
+
//# sourceMappingURL=exports.js.map
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./auth/exports"), exports);
|
18
|
+
__exportStar(require("./cuenta/exports"), exports);
|
19
|
+
//# sourceMappingURL=exports.js.map
|
package/package.json
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"name": "expo-backend-types",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.45",
|
4
4
|
"description": "",
|
5
5
|
"author": "Expo",
|
6
6
|
"private": false,
|
7
7
|
"license": "UNLICENSED",
|
8
8
|
"files": [
|
9
9
|
"dist/types",
|
10
|
-
"dist/src/**/*.dto
|
11
|
-
"dist/src/**/exports
|
10
|
+
"dist/src/**/*.dto.{js,d.ts,ts}",
|
11
|
+
"dist/src/**/exports.{js,d.ts,ts}"
|
12
12
|
],
|
13
13
|
"scripts": {
|
14
14
|
"ci": "npm run generate-ts-schema && npm run build && npx prisma generate && npm run format && npm run lint && npm run check-exports",
|