expo-backend-types 0.0.42 → 0.0.44

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. package/dist/src/auth/dto/login.dto.d.ts +170 -0
  2. package/dist/src/auth/dto/register.dto.d.ts +73 -0
  3. package/dist/src/auth/exports.d.ts +2 -0
  4. package/dist/src/cuenta/dto/cuenta.dto.d.ts +60 -0
  5. package/dist/src/cuenta/exports.d.ts +1 -0
  6. package/dist/src/exports.d.ts +2 -0
  7. package/{types/dto.ts → dist/types/dto.d.ts} +1 -1
  8. package/dist/types/dto.js +18 -0
  9. package/dist/types/dto.js.map +1 -0
  10. package/dist/types/index.d.ts +3 -0
  11. package/dist/types/index.js +20 -0
  12. package/dist/types/index.js.map +1 -0
  13. package/{types → dist/types}/prisma-schema/edge.js +6 -6
  14. package/dist/types/prisma-schema/index.d.ts +14906 -0
  15. package/{types → dist/types}/prisma-schema/index.js +9 -9
  16. package/{types → dist/types}/prisma-schema/package.json +1 -1
  17. package/{types → dist/types}/prisma-schema/schema.prisma +1 -1
  18. package/{types → dist/types}/schema.d.ts +0 -15
  19. package/dist/types/schema.js +3 -0
  20. package/dist/types/schema.js.map +1 -0
  21. package/package.json +115 -115
  22. package/src/auth/dto/login.dto.ts +0 -22
  23. package/src/auth/dto/register.dto.ts +0 -16
  24. package/src/cuenta/dto/cuenta.dto.ts +0 -28
  25. package/types/index.d.ts +0 -2
  26. package/types/prisma-schema/index.d.ts +0 -16638
  27. /package/{types → dist/types}/prisma-schema/default.d.ts +0 -0
  28. /package/{types → dist/types}/prisma-schema/default.js +0 -0
  29. /package/{types → dist/types}/prisma-schema/edge.d.ts +0 -0
  30. /package/{types → dist/types}/prisma-schema/index-browser.js +0 -0
  31. /package/{types → dist/types}/prisma-schema/query_engine-windows.dll.node +0 -0
  32. /package/{types → dist/types}/prisma-schema/runtime/edge-esm.js +0 -0
  33. /package/{types → dist/types}/prisma-schema/runtime/edge.js +0 -0
  34. /package/{types → dist/types}/prisma-schema/runtime/index-browser.d.ts +0 -0
  35. /package/{types → dist/types}/prisma-schema/runtime/index-browser.js +0 -0
  36. /package/{types → dist/types}/prisma-schema/runtime/library.d.ts +0 -0
  37. /package/{types → dist/types}/prisma-schema/runtime/library.js +0 -0
  38. /package/{types → dist/types}/prisma-schema/runtime/react-native.js +0 -0
  39. /package/{types → dist/types}/prisma-schema/runtime/wasm.js +0 -0
  40. /package/{types → dist/types}/prisma-schema/wasm.d.ts +0 -0
  41. /package/{types → dist/types}/prisma-schema/wasm.js +0 -0
@@ -245,7 +245,7 @@ const config = {
245
245
  "value": "prisma-client-js"
246
246
  },
247
247
  "output": {
248
- "value": "D:\\Documents D\\Laburitos\\ExpoArielito\\expo-backend\\types\\prisma-schema",
248
+ "value": "D:\\Documents D\\Laburitos\\ExpoArielito\\expo-backend\\dist\\types\\prisma-schema",
249
249
  "fromEnvVar": null
250
250
  },
251
251
  "config": {
@@ -262,10 +262,10 @@ const config = {
262
262
  "isCustomOutput": true
263
263
  },
264
264
  "relativeEnvPaths": {
265
- "rootEnvPath": "../../.env",
266
- "schemaEnvPath": "../../.env"
265
+ "rootEnvPath": "../../../.env",
266
+ "schemaEnvPath": "../../../.env"
267
267
  },
268
- "relativePath": "../../prisma",
268
+ "relativePath": "../../../prisma",
269
269
  "clientVersion": "5.14.0",
270
270
  "engineVersion": "e9771e62de70f79a5e1c604a2d7c8e2a0a874b48",
271
271
  "datasourceNames": [
@@ -281,8 +281,8 @@ const config = {
281
281
  }
282
282
  }
283
283
  },
284
- "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../types/prisma-schema\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n relationMode = \"foreignKeys\"\n}\n\nmodel Cuenta {\n id String @id @default(uuid())\n nombreUsuario String @unique @map(\"nombre_usuario\")\n contrasena String\n esAdmin Boolean @default(false) @map(\"es_admin\")\n\n comentarios Comentario[]\n etiquetas Etiqueta[] @relation(\"CUENTA_X_ETIQUETA\")\n\n created_at DateTime @default(now())\n updated_at DateTime @updatedAt\n filtroBase Etiqueta[] @relation(\"FILTRO_BASE_X_ETIQUETA\")\n filtroBaseActivo Boolean @default(false) @map(\"filtro_base_activo\")\n\n fcmToken String[] @map(\"fcm_token\")\n\n @@map(\"CUENTA\")\n}\n\nmodel Perfil {\n id String @id @default(uuid())\n idLegible Int @map(\"id_legible\")\n\n telefono String @unique\n nombreCompleto String @map(\"nombre_completo\")\n nombrePila String? @map(\"nombre_pila\")\n genero String?\n fechaNacimiento DateTime? @map(\"fecha_nacimiento\")\n fotoUrl String? @map(\"foto_url\")\n instagram String?\n mail String?\n dni String?\n nombresAlternativos String[] @map(\"nombres_alternativos\")\n\n comentarios Comentario[]\n mensajes Mensaje[] @relation(\"PERFIL_X_MENSAJE\")\n etiquetas Etiqueta[] @relation(\"PERFIL_X_ETIQUETA\")\n esPapelera Boolean @default(false)\n fechaPapelera DateTime? @map(\"fecha_papelera\")\n\n created_at DateTime @default(now())\n updated_at DateTime @updatedAt\n\n @@map(\"PERFIL\")\n}\n\nmodel Comentario {\n id String @id @default(uuid())\n contenido String\n\n creadoPor String @map(\"creado_por\")\n cuenta Cuenta @relation(fields: [creadoPor], references: [id])\n perfilId String @map(\"perfil_id\")\n perfil Perfil @relation(fields: [perfilId], references: [id], onDelete: Cascade)\n\n created_at DateTime @default(now())\n updated_at DateTime @updatedAt\n\n @@map(\"COMENTARIO\")\n}\n\nmodel Etiqueta {\n id String @id @default(uuid())\n nombre String\n grupoId String @map(\"grupo_id\")\n tipo TipoEtiqueta @default(PERSONAL)\n grupo EtiquetaGrupo @relation(fields: [grupoId], references: [id], onDelete: Cascade)\n\n eventosAsistidos Evento[] @relation(\"EVENTOASISTIDO_X_ETIQUETA\")\n eventosConfirmados Evento[] @relation(\"EVENTOCONFIRMADO_X_ETIQUETA\")\n cuentas Cuenta[] @relation(\"CUENTA_X_ETIQUETA\")\n perfiles Perfil[] @relation(\"PERFIL_X_ETIQUETA\")\n cuentasFiltroBase Cuenta[] @relation(\"FILTRO_BASE_X_ETIQUETA\")\n\n created_at DateTime @default(now())\n updated_at DateTime @updatedAt\n\n @@map(\"ETIQUETA\")\n}\n\nmodel EtiquetaGrupo {\n id String @id @default(uuid())\n nombre String\n color String\n esExclusivo Boolean @map(\"es_exclusivo\")\n etiquetas Etiqueta[]\n\n created_at DateTime @default(now())\n updated_at DateTime @updatedAt\n\n @@map(\"GRUPO_ETIQUETA\")\n}\n\nmodel Evento {\n id String @id @default(uuid())\n nombre String\n fecha DateTime\n ubicacion String\n\n etiquetaAsistioId String @map(\"etiqueta_asistio\")\n etiquetaAsistio Etiqueta @relation(\"EVENTOASISTIDO_X_ETIQUETA\", fields: [etiquetaAsistioId], references: [id], onDelete: Cascade)\n etiquetaConfirmoId String @map(\"etiqueta_confirmo\")\n etiquetaConfirmo Etiqueta @relation(\"EVENTOCONFIRMADO_X_ETIQUETA\", fields: [etiquetaConfirmoId], references: [id], onDelete: Cascade)\n eventoPadreId String? @map(\"evento_padre\")\n eventoPadre Evento? @relation(\"SubEventos\", fields: [eventoPadreId], references: [id], onDelete: Cascade)\n subEventos Evento[] @relation(\"SubEventos\")\n\n created_at DateTime @default(now())\n updated_at DateTime @updatedAt\n\n @@map(\"EVENTO\")\n}\n\nmodel Mensaje {\n id String @id @default(uuid())\n wamId String @unique @map(\"wam_id\")\n message Json\n perfilTelefono String @map(\"perfil_telefono\")\n perfil Perfil @relation(\"PERFIL_X_MENSAJE\", fields: [perfilTelefono], references: [telefono], onDelete: Cascade)\n status MensajeStatus @default(ENVIADO)\n statusAt DateTime? @map(\"status_at\")\n visto Boolean @default(false)\n\n created_at DateTime @default(now())\n updated_at DateTime @updatedAt\n\n @@map(\"MENSAJE\")\n}\n\nmodel Enums {\n id String @id\n EstadoPlantilla EstadoPlantilla\n CategoriaPlantilla CategoriaPlantilla\n}\n\nenum EstadoPlantilla {\n APRROVED\n PENDING\n REJECTED\n}\n\nenum CategoriaPlantilla {\n MARKETING\n UTILITY\n AUTHENTICATION\n}\n\nenum TipoEtiqueta {\n PERSONAL\n EVENTO\n MODELO\n TENTATIVA\n}\n\nenum MensajeStatus {\n ENVIADO\n RECIBIDO\n LEIDO\n}\n",
285
- "inlineSchemaHash": "b5810cc88f96e7425668e1cad00a99accedb7d8814bdb5b1462a8c37c123ce0f",
284
+ "inlineSchema": "generator client {\n output = \"../dist/types/prisma-schema\"\n provider = \"prisma-client-js\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n relationMode = \"foreignKeys\"\n}\n\nmodel Cuenta {\n id String @id @default(uuid())\n nombreUsuario String @unique @map(\"nombre_usuario\")\n contrasena String\n esAdmin Boolean @default(false) @map(\"es_admin\")\n\n comentarios Comentario[]\n etiquetas Etiqueta[] @relation(\"CUENTA_X_ETIQUETA\")\n\n created_at DateTime @default(now())\n updated_at DateTime @updatedAt\n filtroBase Etiqueta[] @relation(\"FILTRO_BASE_X_ETIQUETA\")\n filtroBaseActivo Boolean @default(false) @map(\"filtro_base_activo\")\n\n fcmToken String[] @map(\"fcm_token\")\n\n @@map(\"CUENTA\")\n}\n\nmodel Perfil {\n id String @id @default(uuid())\n idLegible Int @map(\"id_legible\")\n\n telefono String @unique\n nombreCompleto String @map(\"nombre_completo\")\n nombrePila String? @map(\"nombre_pila\")\n genero String?\n fechaNacimiento DateTime? @map(\"fecha_nacimiento\")\n fotoUrl String? @map(\"foto_url\")\n instagram String?\n mail String?\n dni String?\n nombresAlternativos String[] @map(\"nombres_alternativos\")\n\n comentarios Comentario[]\n mensajes Mensaje[] @relation(\"PERFIL_X_MENSAJE\")\n etiquetas Etiqueta[] @relation(\"PERFIL_X_ETIQUETA\")\n esPapelera Boolean @default(false)\n fechaPapelera DateTime? @map(\"fecha_papelera\")\n\n created_at DateTime @default(now())\n updated_at DateTime @updatedAt\n\n @@map(\"PERFIL\")\n}\n\nmodel Comentario {\n id String @id @default(uuid())\n contenido String\n\n creadoPor String @map(\"creado_por\")\n cuenta Cuenta @relation(fields: [creadoPor], references: [id])\n perfilId String @map(\"perfil_id\")\n perfil Perfil @relation(fields: [perfilId], references: [id], onDelete: Cascade)\n\n created_at DateTime @default(now())\n updated_at DateTime @updatedAt\n\n @@map(\"COMENTARIO\")\n}\n\nmodel Etiqueta {\n id String @id @default(uuid())\n nombre String\n grupoId String @map(\"grupo_id\")\n tipo TipoEtiqueta @default(PERSONAL)\n grupo EtiquetaGrupo @relation(fields: [grupoId], references: [id], onDelete: Cascade)\n\n eventosAsistidos Evento[] @relation(\"EVENTOASISTIDO_X_ETIQUETA\")\n eventosConfirmados Evento[] @relation(\"EVENTOCONFIRMADO_X_ETIQUETA\")\n cuentas Cuenta[] @relation(\"CUENTA_X_ETIQUETA\")\n perfiles Perfil[] @relation(\"PERFIL_X_ETIQUETA\")\n cuentasFiltroBase Cuenta[] @relation(\"FILTRO_BASE_X_ETIQUETA\")\n\n created_at DateTime @default(now())\n updated_at DateTime @updatedAt\n\n @@map(\"ETIQUETA\")\n}\n\nmodel EtiquetaGrupo {\n id String @id @default(uuid())\n nombre String\n color String\n esExclusivo Boolean @map(\"es_exclusivo\")\n etiquetas Etiqueta[]\n\n created_at DateTime @default(now())\n updated_at DateTime @updatedAt\n\n @@map(\"GRUPO_ETIQUETA\")\n}\n\nmodel Evento {\n id String @id @default(uuid())\n nombre String\n fecha DateTime\n ubicacion String\n\n etiquetaAsistioId String @map(\"etiqueta_asistio\")\n etiquetaAsistio Etiqueta @relation(\"EVENTOASISTIDO_X_ETIQUETA\", fields: [etiquetaAsistioId], references: [id], onDelete: Cascade)\n etiquetaConfirmoId String @map(\"etiqueta_confirmo\")\n etiquetaConfirmo Etiqueta @relation(\"EVENTOCONFIRMADO_X_ETIQUETA\", fields: [etiquetaConfirmoId], references: [id], onDelete: Cascade)\n eventoPadreId String? @map(\"evento_padre\")\n eventoPadre Evento? @relation(\"SubEventos\", fields: [eventoPadreId], references: [id], onDelete: Cascade)\n subEventos Evento[] @relation(\"SubEventos\")\n\n created_at DateTime @default(now())\n updated_at DateTime @updatedAt\n\n @@map(\"EVENTO\")\n}\n\nmodel Mensaje {\n id String @id @default(uuid())\n wamId String @unique @map(\"wam_id\")\n message Json\n perfilTelefono String @map(\"perfil_telefono\")\n perfil Perfil @relation(\"PERFIL_X_MENSAJE\", fields: [perfilTelefono], references: [telefono], onDelete: Cascade)\n status MensajeStatus @default(ENVIADO)\n statusAt DateTime? @map(\"status_at\")\n visto Boolean @default(false)\n\n created_at DateTime @default(now())\n updated_at DateTime @updatedAt\n\n @@map(\"MENSAJE\")\n}\n\nmodel Enums {\n id String @id\n EstadoPlantilla EstadoPlantilla\n CategoriaPlantilla CategoriaPlantilla\n}\n\nenum EstadoPlantilla {\n APRROVED\n PENDING\n REJECTED\n}\n\nenum CategoriaPlantilla {\n MARKETING\n UTILITY\n AUTHENTICATION\n}\n\nenum TipoEtiqueta {\n PERSONAL\n EVENTO\n MODELO\n TENTATIVA\n}\n\nenum MensajeStatus {\n ENVIADO\n RECIBIDO\n LEIDO\n}\n",
285
+ "inlineSchemaHash": "053155dd56c013d268858a6f9fb1de2f5ce1ae6e6fce364634bd65b9bdff12fb",
286
286
  "copyEngine": true
287
287
  }
288
288
 
@@ -291,8 +291,8 @@ const fs = require('fs')
291
291
  config.dirname = __dirname
292
292
  if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) {
293
293
  const alternativePaths = [
294
+ "dist/types/prisma-schema",
294
295
  "types/prisma-schema",
295
- "prisma-schema",
296
296
  ]
297
297
 
298
298
  const alternativePath = alternativePaths.find((altPath) => {
@@ -321,7 +321,7 @@ Object.assign(exports, Prisma)
321
321
 
322
322
  // file annotations for bundling tools to include these files
323
323
  path.join(__dirname, "query_engine-windows.dll.node");
324
- path.join(process.cwd(), "types/prisma-schema/query_engine-windows.dll.node")
324
+ path.join(process.cwd(), "dist/types/prisma-schema/query_engine-windows.dll.node")
325
325
  // file annotations for bundling tools to include these files
326
326
  path.join(__dirname, "schema.prisma");
327
- path.join(process.cwd(), "types/prisma-schema/schema.prisma")
327
+ path.join(process.cwd(), "dist/types/prisma-schema/schema.prisma")
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "prisma-client-edb8a089129c4966c383e73d78502f5d50050b4779d74f7ce427cd3d0da74765",
2
+ "name": "prisma-client-42c94c8b07c74285b34567df0f1cb8ff4d5781d41a98ea0a7b90ab5ba2610c93",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "index-browser.js",
@@ -1,6 +1,6 @@
1
1
  generator client {
2
+ output = "../dist/types/prisma-schema"
2
3
  provider = "prisma-client-js"
3
- output = "../types/prisma-schema"
4
4
  }
5
5
 
6
6
  datasource db {
@@ -1,8 +1,3 @@
1
- /**
2
- * This file was auto-generated by openapi-typescript.
3
- * Do not make direct changes to the file.
4
- */
5
-
6
1
  export interface paths {
7
2
  "/auth/register": {
8
3
  parameters: {
@@ -59,12 +54,10 @@ export interface components {
59
54
  RegisterDto: {
60
55
  username: string;
61
56
  password: string;
62
- /** @default false */
63
57
  isAdmin: boolean;
64
58
  };
65
59
  RegisterResponseDto: {
66
60
  username: string;
67
- /** @default false */
68
61
  isAdmin: boolean;
69
62
  };
70
63
  LoginDto: {
@@ -73,18 +66,12 @@ export interface components {
73
66
  };
74
67
  LoginResponseDto: {
75
68
  user: {
76
- /** Format: uuid */
77
69
  id?: string;
78
70
  username?: string;
79
- /** @default false */
80
71
  isAdmin: boolean;
81
- /** Format: date-time */
82
72
  created_at?: string;
83
- /** Format: date-time */
84
73
  updated_at?: string;
85
- /** @default false */
86
74
  filtroBaseActivo: boolean;
87
- /** @default [] */
88
75
  fcmToken: string[];
89
76
  };
90
77
  backendTokens: {
@@ -114,7 +101,6 @@ export interface operations {
114
101
  };
115
102
  };
116
103
  responses: {
117
- /** @description Cuenta creada */
118
104
  201: {
119
105
  headers: {
120
106
  [name: string]: unknown;
@@ -138,7 +124,6 @@ export interface operations {
138
124
  };
139
125
  };
140
126
  responses: {
141
- /** @description Cuenta creada */
142
127
  200: {
143
128
  headers: {
144
129
  [name: string]: unknown;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../types/schema.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,115 +1,115 @@
1
- {
2
- "name": "expo-backend-types",
3
- "version": "0.0.42",
4
- "description": "",
5
- "author": "Expo",
6
- "private": false,
7
- "license": "UNLICENSED",
8
- "files": [
9
- "types",
10
- "src/**/*.dto.ts",
11
- "src/**/export.ts"
12
- ],
13
- "scripts": {
14
- "ci": "npm run build && npm run generate-ts-schema && npm run format && npm run lint && npm run check-exports",
15
- "build": "nest build",
16
- "format": "prettier --write \"src/**/*.ts\"",
17
- "check-format": "prettier --check \"src/**/*.ts\"",
18
- "check-exports": "attw --pack .",
19
- "local-release": "changeset version && changeset publish",
20
- "commit-schema": "git add ./types/schema.d.ts swagger.yaml && git commit -m \"Update schema\"",
21
- "start": "nest start",
22
- "dev": "nest start --watch",
23
- "start:debug": "nest start --debug --watch",
24
- "start:prod": "node dist/main",
25
- "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
26
- "test": "jest",
27
- "test:watch": "jest --watch",
28
- "test:cov": "jest --coverage",
29
- "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
30
- "test:e2e": "jest --config ./test/jest-e2e.json",
31
- "generate-ts-schema": "node ./dist/src/main.swagger.js && openapi-typescript ./swagger.yaml -o ./types/schema.d.ts",
32
- "prepare": "husky",
33
- "prepublishOnly": "npm run ci"
34
- },
35
- "dependencies": {
36
- "@anatine/zod-nestjs": "^2.0.9",
37
- "@anatine/zod-openapi": "^2.2.6",
38
- "@nestjs/common": "^10.0.0",
39
- "@nestjs/config": "^3.2.3",
40
- "@nestjs/core": "^10.0.0",
41
- "@nestjs/jwt": "^10.2.0",
42
- "@nestjs/platform-express": "^10.0.0",
43
- "@nestjs/swagger": "^7.3.1",
44
- "@prisma/client": "^5.14.0",
45
- "bcrypt": "^5.1.1",
46
- "json-to-pretty-yaml": "^1.2.2",
47
- "openapi3-ts": "^4.4.0",
48
- "reflect-metadata": "^0.2.0",
49
- "rxjs": "^7.8.1",
50
- "zod": "^3.23.8"
51
- },
52
- "devDependencies": {
53
- "@arethetypeswrong/cli": "^0.15.4",
54
- "@changesets/cli": "^2.27.7",
55
- "@nestjs/cli": "^10.0.0",
56
- "@nestjs/schematics": "^10.0.0",
57
- "@nestjs/testing": "^10.0.0",
58
- "@openapitools/openapi-generator-cli": "^2.13.4",
59
- "@types/bcrypt": "^5.0.2",
60
- "@types/express": "^4.17.17",
61
- "@types/jest": "^29.5.2",
62
- "@types/json-to-pretty-yaml": "^1.2.1",
63
- "@types/node": "^20.3.1",
64
- "@types/supertest": "^6.0.0",
65
- "@typescript-eslint/eslint-plugin": "^6.0.0",
66
- "@typescript-eslint/parser": "^6.0.0",
67
- "eslint": "^8.42.0",
68
- "eslint-config-prettier": "^9.0.0",
69
- "eslint-plugin-prettier": "^5.0.0",
70
- "eslint-plugin-unused-imports": "^3.2.0",
71
- "husky": "^9.0.11",
72
- "jest": "^29.5.0",
73
- "lint-staged": "^15.2.5",
74
- "openapi-typescript": "^7.0.0-rc.0",
75
- "prettier": "^3.0.0",
76
- "prisma": "^5.14.0",
77
- "source-map-support": "^0.5.21",
78
- "supertest": "^6.3.3",
79
- "ts-jest": "^29.1.0",
80
- "ts-loader": "^9.4.3",
81
- "ts-node": "^10.9.1",
82
- "tsconfig-paths": "^4.2.0",
83
- "typescript": "^5.4.5"
84
- },
85
- "main": "types/index.d.ts",
86
- "exports": {
87
- ".": {
88
- "import": "./types/index.d.ts",
89
- "require": "./types/index.d.ts",
90
- "default": "./types/index.d.ts",
91
- "types": "./types/index.d.ts"
92
- }
93
- },
94
- "lint-staged": {
95
- "**/*.{js,ts,jsx,tsx}": [
96
- "prettier --write",
97
- "eslint --fix",
98
- "git add"
99
- ],
100
- "swagger.yaml": [
101
- "git add"
102
- ],
103
- "types/schema.d.ts": [
104
- "git add"
105
- ],
106
- "*.json": [
107
- "prettier --write",
108
- "git add"
109
- ],
110
- "packages/prisma/schema.prisma": [
111
- "prisma format",
112
- "git add"
113
- ]
114
- }
115
- }
1
+ {
2
+ "name": "expo-backend-types",
3
+ "version": "0.0.44",
4
+ "description": "",
5
+ "author": "Expo",
6
+ "private": false,
7
+ "license": "UNLICENSED",
8
+ "files": [
9
+ "dist/types",
10
+ "dist/src/**/*.dto.*.{js,ts}",
11
+ "dist/src/**/exports.*.{js,ts}"
12
+ ],
13
+ "scripts": {
14
+ "ci": "npm run generate-ts-schema && npm run build && npx prisma generate && npm run format && npm run lint && npm run check-exports",
15
+ "build": "nest build",
16
+ "format": "prettier --write \"src/**/*.ts\"",
17
+ "check-format": "prettier --check \"src/**/*.ts\"",
18
+ "check-exports": "attw --pack .",
19
+ "local-release": "changeset version && changeset publish",
20
+ "commit-schema": "git add ./types/schema.d.ts swagger.yaml && git commit -m \"Update schema\"",
21
+ "start": "nest start",
22
+ "dev": "nest start --watch",
23
+ "start:debug": "nest start --debug --watch",
24
+ "start:prod": "node dist/main",
25
+ "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
26
+ "test": "jest",
27
+ "test:watch": "jest --watch",
28
+ "test:cov": "jest --coverage",
29
+ "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
30
+ "test:e2e": "jest --config ./test/jest-e2e.json",
31
+ "generate-ts-schema": "node ./dist/src/main.swagger.js && openapi-typescript ./swagger.yaml -o ./types/schema.ts",
32
+ "prepare": "husky",
33
+ "prepublishOnly": "npm run ci"
34
+ },
35
+ "dependencies": {
36
+ "@anatine/zod-nestjs": "^2.0.9",
37
+ "@anatine/zod-openapi": "^2.2.6",
38
+ "@nestjs/common": "^10.0.0",
39
+ "@nestjs/config": "^3.2.3",
40
+ "@nestjs/core": "^10.0.0",
41
+ "@nestjs/jwt": "^10.2.0",
42
+ "@nestjs/platform-express": "^10.0.0",
43
+ "@nestjs/swagger": "^7.3.1",
44
+ "@prisma/client": "^5.14.0",
45
+ "bcrypt": "^5.1.1",
46
+ "json-to-pretty-yaml": "^1.2.2",
47
+ "openapi3-ts": "^4.4.0",
48
+ "reflect-metadata": "^0.2.0",
49
+ "rxjs": "^7.8.1",
50
+ "zod": "^3.23.8"
51
+ },
52
+ "devDependencies": {
53
+ "@arethetypeswrong/cli": "^0.15.4",
54
+ "@changesets/cli": "^2.27.7",
55
+ "@nestjs/cli": "^10.0.0",
56
+ "@nestjs/schematics": "^10.0.0",
57
+ "@nestjs/testing": "^10.0.0",
58
+ "@openapitools/openapi-generator-cli": "^2.13.4",
59
+ "@types/bcrypt": "^5.0.2",
60
+ "@types/express": "^4.17.17",
61
+ "@types/jest": "^29.5.2",
62
+ "@types/json-to-pretty-yaml": "^1.2.1",
63
+ "@types/node": "^20.3.1",
64
+ "@types/supertest": "^6.0.0",
65
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
66
+ "@typescript-eslint/parser": "^6.0.0",
67
+ "eslint": "^8.42.0",
68
+ "eslint-config-prettier": "^9.0.0",
69
+ "eslint-plugin-prettier": "^5.0.0",
70
+ "eslint-plugin-unused-imports": "^3.2.0",
71
+ "husky": "^9.0.11",
72
+ "jest": "^29.5.0",
73
+ "lint-staged": "^15.2.5",
74
+ "openapi-typescript": "^7.0.0-rc.0",
75
+ "prettier": "^3.0.0",
76
+ "prisma": "^5.14.0",
77
+ "source-map-support": "^0.5.21",
78
+ "supertest": "^6.3.3",
79
+ "ts-jest": "^29.1.0",
80
+ "ts-loader": "^9.4.3",
81
+ "ts-node": "^10.9.1",
82
+ "tsconfig-paths": "^4.2.0",
83
+ "typescript": "^5.4.5"
84
+ },
85
+ "main": "./dist/types/index.d.ts",
86
+ "exports": {
87
+ ".": {
88
+ "import": "./dist/types/index.js",
89
+ "require": "./dist/types/index.js",
90
+ "default": "./dist/types/index.js",
91
+ "types": "./dist/types/index.d.ts"
92
+ }
93
+ },
94
+ "lint-staged": {
95
+ "**/*.{js,ts,jsx,tsx}": [
96
+ "prettier --write",
97
+ "eslint --fix",
98
+ "git add"
99
+ ],
100
+ "swagger.yaml": [
101
+ "git add"
102
+ ],
103
+ "types/schema.d.ts": [
104
+ "git add"
105
+ ],
106
+ "*.json": [
107
+ "prettier --write",
108
+ "git add"
109
+ ],
110
+ "packages/prisma/schema.prisma": [
111
+ "prisma format",
112
+ "git add"
113
+ ]
114
+ }
115
+ }
@@ -1,22 +0,0 @@
1
- import { createZodDto } from '@anatine/zod-nestjs';
2
- import { cuentaSchema } from 'src/cuenta/dto/cuenta.dto';
3
- import z from 'zod';
4
-
5
- export const loginSchema = cuentaSchema.pick({
6
- username: true,
7
- password: true,
8
- });
9
-
10
- export class LoginDto extends createZodDto(loginSchema) {}
11
-
12
- export const loginResponseSchema = z.object({
13
- user: cuentaSchema.omit({
14
- password: true,
15
- }),
16
- backendTokens: z.object({
17
- accessToken: z.string(),
18
- refreshToken: z.string(),
19
- }),
20
- });
21
-
22
- export class LoginResponseDto extends createZodDto(loginResponseSchema) {}
@@ -1,16 +0,0 @@
1
- import { createZodDto } from '@anatine/zod-nestjs';
2
- import { cuentaSchema } from 'src/cuenta/dto/cuenta.dto';
3
-
4
- export const registerSchema = cuentaSchema.pick({
5
- username: true,
6
- password: true,
7
- isAdmin: true,
8
- });
9
-
10
- export class RegisterDto extends createZodDto(registerSchema) {}
11
-
12
- export const registerResponseSchema = registerSchema.omit({
13
- password: true,
14
- });
15
-
16
- export class RegisterResponseDto extends createZodDto(registerResponseSchema) {}
@@ -1,28 +0,0 @@
1
- import { createZodDto } from '@anatine/zod-nestjs';
2
- import { z } from 'zod';
3
-
4
- export const cuentaSchema = z.object({
5
- id: z
6
- .string({
7
- required_error: 'El id es requerido',
8
- })
9
- .uuid({
10
- message: 'El id debe ser un UUID',
11
- }),
12
- username: z.string({
13
- required_error: 'El nombre de usuario es requerido',
14
- }),
15
- password: z
16
- .string({
17
- required_error: 'La contraseña es requerida',
18
- })
19
- .min(6, 'La contraseña debe tener al menos 6 caracteres'),
20
- isAdmin: z.boolean().default(false),
21
- created_at: z.string().datetime(),
22
- updated_at: z.string().datetime(),
23
- // filtroBase: z.array(EtiquetaSchema),
24
- filtroBaseActivo: z.boolean().default(false),
25
- fcmToken: z.array(z.string()).default([]),
26
- });
27
-
28
- export class CuentaDto extends createZodDto(cuentaSchema) {}
package/types/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './schema';
2
- export * from './prisma-schema/index.d';