expo-backend-types 0.3.0-EXPO-245.1 → 0.3.0-EXPO-245.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,58 @@
1
+ import { z } from 'zod';
2
+ export declare const etiquetaSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ name: z.ZodString;
5
+ groupId: z.ZodString;
6
+ type: z.ZodNativeEnum<{
7
+ PERSONAL: "PERSONAL";
8
+ EVENTO: "EVENTO";
9
+ MODELO: "MODELO";
10
+ TENTATIVA: "TENTATIVA";
11
+ }>;
12
+ created_at: z.ZodString;
13
+ updated_at: z.ZodString;
14
+ }, "strip", z.ZodTypeAny, {
15
+ id: string;
16
+ name: string;
17
+ groupId: string;
18
+ type: "PERSONAL" | "EVENTO" | "MODELO" | "TENTATIVA";
19
+ created_at: string;
20
+ updated_at: string;
21
+ }, {
22
+ id: string;
23
+ name: string;
24
+ groupId: string;
25
+ type: "PERSONAL" | "EVENTO" | "MODELO" | "TENTATIVA";
26
+ created_at: string;
27
+ updated_at: string;
28
+ }>;
29
+ declare const EtiquetaDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.ZodObject<{
30
+ id: z.ZodString;
31
+ name: z.ZodString;
32
+ groupId: z.ZodString;
33
+ type: z.ZodNativeEnum<{
34
+ PERSONAL: "PERSONAL";
35
+ EVENTO: "EVENTO";
36
+ MODELO: "MODELO";
37
+ TENTATIVA: "TENTATIVA";
38
+ }>;
39
+ created_at: z.ZodString;
40
+ updated_at: z.ZodString;
41
+ }, "strip", z.ZodTypeAny, {
42
+ id: string;
43
+ name: string;
44
+ groupId: string;
45
+ type: "PERSONAL" | "EVENTO" | "MODELO" | "TENTATIVA";
46
+ created_at: string;
47
+ updated_at: string;
48
+ }, {
49
+ id: string;
50
+ name: string;
51
+ groupId: string;
52
+ type: "PERSONAL" | "EVENTO" | "MODELO" | "TENTATIVA";
53
+ created_at: string;
54
+ updated_at: string;
55
+ }>>;
56
+ export declare class EtiquetaDto extends EtiquetaDto_base {
57
+ }
58
+ export {};
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EtiquetaDto = exports.etiquetaSchema = void 0;
4
+ const zod_nestjs_1 = require("@anatine/zod-nestjs");
5
+ const zod_1 = require("zod");
6
+ const prisma_schema_1 = require("../../../types/prisma-schema/index.js");
7
+ exports.etiquetaSchema = zod_1.z.object({
8
+ id: zod_1.z.string().uuid({
9
+ message: 'El ID debe ser un UUID',
10
+ }),
11
+ name: zod_1.z.string().min(1, {
12
+ message: 'El nombre debe tener al menos 1 caracter',
13
+ }),
14
+ groupId: zod_1.z.string().uuid({
15
+ message: 'Debes seleccionar un grupo de etiquetas',
16
+ }),
17
+ type: zod_1.z.nativeEnum(prisma_schema_1.TipoEtiqueta, {
18
+ message: 'El tipo de etiqueta no es válido',
19
+ }),
20
+ created_at: zod_1.z.string().datetime(),
21
+ updated_at: zod_1.z.string().datetime(),
22
+ });
23
+ class EtiquetaDto extends (0, zod_nestjs_1.createZodDto)(exports.etiquetaSchema) {
24
+ }
25
+ exports.EtiquetaDto = EtiquetaDto;
26
+ //# sourceMappingURL=etiqueta.dto.js.map
@@ -0,0 +1 @@
1
+ export * from './dto/etiqueta.dto';
@@ -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/etiqueta.dto"), exports);
18
+ //# sourceMappingURL=exports.js.map
@@ -0,0 +1,126 @@
1
+ import { z } from 'zod';
2
+ declare const eventoSchemaBase: z.ZodObject<{
3
+ id: z.ZodString;
4
+ name: z.ZodString;
5
+ date: z.ZodString;
6
+ location: z.ZodString;
7
+ etiquetaAsistioId: z.ZodString;
8
+ etiquetaAsistio: z.ZodObject<{
9
+ id: z.ZodString;
10
+ name: z.ZodString;
11
+ groupId: z.ZodString;
12
+ type: z.ZodNativeEnum<{
13
+ PERSONAL: "PERSONAL";
14
+ EVENTO: "EVENTO";
15
+ MODELO: "MODELO";
16
+ TENTATIVA: "TENTATIVA";
17
+ }>;
18
+ created_at: z.ZodString;
19
+ updated_at: z.ZodString;
20
+ }, "strip", z.ZodTypeAny, {
21
+ id: string;
22
+ name: string;
23
+ groupId: string;
24
+ type: "PERSONAL" | "EVENTO" | "MODELO" | "TENTATIVA";
25
+ created_at: string;
26
+ updated_at: string;
27
+ }, {
28
+ id: string;
29
+ name: string;
30
+ groupId: string;
31
+ type: "PERSONAL" | "EVENTO" | "MODELO" | "TENTATIVA";
32
+ created_at: string;
33
+ updated_at: string;
34
+ }>;
35
+ etiquetaConfirmoId: z.ZodString;
36
+ etiquetaConfirmo: z.ZodObject<{
37
+ id: z.ZodString;
38
+ name: z.ZodString;
39
+ groupId: z.ZodString;
40
+ type: z.ZodNativeEnum<{
41
+ PERSONAL: "PERSONAL";
42
+ EVENTO: "EVENTO";
43
+ MODELO: "MODELO";
44
+ TENTATIVA: "TENTATIVA";
45
+ }>;
46
+ created_at: z.ZodString;
47
+ updated_at: z.ZodString;
48
+ }, "strip", z.ZodTypeAny, {
49
+ id: string;
50
+ name: string;
51
+ groupId: string;
52
+ type: "PERSONAL" | "EVENTO" | "MODELO" | "TENTATIVA";
53
+ created_at: string;
54
+ updated_at: string;
55
+ }, {
56
+ id: string;
57
+ name: string;
58
+ groupId: string;
59
+ type: "PERSONAL" | "EVENTO" | "MODELO" | "TENTATIVA";
60
+ created_at: string;
61
+ updated_at: string;
62
+ }>;
63
+ eventoPadreId: z.ZodOptional<z.ZodString>;
64
+ created_at: z.ZodString;
65
+ updated_at: z.ZodString;
66
+ }, "strip", z.ZodTypeAny, {
67
+ id: string;
68
+ name: string;
69
+ date: string;
70
+ created_at: string;
71
+ updated_at: string;
72
+ location: string;
73
+ etiquetaAsistioId: string;
74
+ etiquetaAsistio: {
75
+ id: string;
76
+ name: string;
77
+ groupId: string;
78
+ type: "PERSONAL" | "EVENTO" | "MODELO" | "TENTATIVA";
79
+ created_at: string;
80
+ updated_at: string;
81
+ };
82
+ etiquetaConfirmoId: string;
83
+ etiquetaConfirmo: {
84
+ id: string;
85
+ name: string;
86
+ groupId: string;
87
+ type: "PERSONAL" | "EVENTO" | "MODELO" | "TENTATIVA";
88
+ created_at: string;
89
+ updated_at: string;
90
+ };
91
+ eventoPadreId?: string | undefined;
92
+ }, {
93
+ id: string;
94
+ name: string;
95
+ date: string;
96
+ created_at: string;
97
+ updated_at: string;
98
+ location: string;
99
+ etiquetaAsistioId: string;
100
+ etiquetaAsistio: {
101
+ id: string;
102
+ name: string;
103
+ groupId: string;
104
+ type: "PERSONAL" | "EVENTO" | "MODELO" | "TENTATIVA";
105
+ created_at: string;
106
+ updated_at: string;
107
+ };
108
+ etiquetaConfirmoId: string;
109
+ etiquetaConfirmo: {
110
+ id: string;
111
+ name: string;
112
+ groupId: string;
113
+ type: "PERSONAL" | "EVENTO" | "MODELO" | "TENTATIVA";
114
+ created_at: string;
115
+ updated_at: string;
116
+ };
117
+ eventoPadreId?: string | undefined;
118
+ }>;
119
+ type Evento = z.infer<typeof eventoSchemaBase> & {
120
+ eventoPadre: z.infer<typeof eventoSchemaBase>;
121
+ subEventos: z.infer<typeof eventoSchemaBase>[];
122
+ };
123
+ declare const EventoDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.ZodType<Evento, z.ZodTypeDef, Evento>>;
124
+ export declare class EventoDto extends EventoDto_base {
125
+ }
126
+ export {};
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EventoDto = void 0;
4
+ const etiqueta_dto_1 = require("../../etiqueta/dto/etiqueta.dto");
5
+ const zod_nestjs_1 = require("@anatine/zod-nestjs");
6
+ const zod_1 = require("zod");
7
+ const eventoSchemaBase = zod_1.z.object({
8
+ id: zod_1.z.string().uuid({ message: 'El ID debe ser un UUID' }),
9
+ name: zod_1.z.string().min(1, 'El nombre es requerido'),
10
+ date: zod_1.z.string().min(1, 'La fecha es requerida'),
11
+ location: zod_1.z.string().min(1, 'La ubicación es requerida'),
12
+ etiquetaAsistioId: etiqueta_dto_1.etiquetaSchema.shape.id,
13
+ etiquetaAsistio: etiqueta_dto_1.etiquetaSchema,
14
+ etiquetaConfirmoId: etiqueta_dto_1.etiquetaSchema.shape.id,
15
+ etiquetaConfirmo: etiqueta_dto_1.etiquetaSchema,
16
+ eventoPadreId: zod_1.z.string().uuid().optional(),
17
+ created_at: zod_1.z.string().datetime(),
18
+ updated_at: zod_1.z.string().datetime(),
19
+ });
20
+ const eventoSchema = eventoSchemaBase.extend({
21
+ eventoPadre: zod_1.z.lazy(() => eventoSchema),
22
+ subEventos: zod_1.z.array(zod_1.z.lazy(() => eventoSchemaBase)),
23
+ });
24
+ class EventoDto extends (0, zod_nestjs_1.createZodDto)(eventoSchema) {
25
+ }
26
+ exports.EventoDto = EventoDto;
27
+ //# sourceMappingURL=evento.dto.js.map
@@ -0,0 +1 @@
1
+ export * from './dto/evento.dto';
@@ -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/evento.dto"), exports);
18
+ //# sourceMappingURL=exports.js.map
@@ -1,2 +1,6 @@
1
1
  export * from './auth/exports';
2
2
  export * from './cuenta/exports';
3
+ export * from './etiqueta/exports';
4
+ export * from './comentario/exports';
5
+ export * from './grupo-etiqueta/exports';
6
+ export * from './evento/exports';
@@ -16,4 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./auth/exports"), exports);
18
18
  __exportStar(require("./cuenta/exports"), exports);
19
+ __exportStar(require("./etiqueta/exports"), exports);
20
+ __exportStar(require("./comentario/exports"), exports);
21
+ __exportStar(require("./grupo-etiqueta/exports"), exports);
22
+ __exportStar(require("./evento/exports"), exports);
19
23
  //# sourceMappingURL=exports.js.map
@@ -0,0 +1,48 @@
1
+ import { z } from 'zod';
2
+ export declare const grupoEtiquetaSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ name: z.ZodString;
5
+ color: z.ZodString;
6
+ isExclusive: z.ZodBoolean;
7
+ created_at: z.ZodString;
8
+ updated_at: z.ZodString;
9
+ }, "strip", z.ZodTypeAny, {
10
+ id: string;
11
+ name: string;
12
+ created_at: string;
13
+ updated_at: string;
14
+ color: string;
15
+ isExclusive: boolean;
16
+ }, {
17
+ id: string;
18
+ name: string;
19
+ created_at: string;
20
+ updated_at: string;
21
+ color: string;
22
+ isExclusive: boolean;
23
+ }>;
24
+ declare const GrupoEtiquetaDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.ZodObject<{
25
+ id: z.ZodString;
26
+ name: z.ZodString;
27
+ color: z.ZodString;
28
+ isExclusive: z.ZodBoolean;
29
+ created_at: z.ZodString;
30
+ updated_at: z.ZodString;
31
+ }, "strip", z.ZodTypeAny, {
32
+ id: string;
33
+ name: string;
34
+ created_at: string;
35
+ updated_at: string;
36
+ color: string;
37
+ isExclusive: boolean;
38
+ }, {
39
+ id: string;
40
+ name: string;
41
+ created_at: string;
42
+ updated_at: string;
43
+ color: string;
44
+ isExclusive: boolean;
45
+ }>>;
46
+ export declare class GrupoEtiquetaDto extends GrupoEtiquetaDto_base {
47
+ }
48
+ export {};
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GrupoEtiquetaDto = exports.grupoEtiquetaSchema = void 0;
4
+ const zod_nestjs_1 = require("@anatine/zod-nestjs");
5
+ const zod_1 = require("zod");
6
+ exports.grupoEtiquetaSchema = zod_1.z.object({
7
+ id: zod_1.z.string().uuid({
8
+ message: 'El ID debe ser un UUID',
9
+ }),
10
+ name: zod_1.z.string().min(1, {
11
+ message: 'El nombre debe tener al menos 1 caracter',
12
+ }),
13
+ color: zod_1.z
14
+ .string()
15
+ .length(7)
16
+ .startsWith('#', {
17
+ message: 'El color debe tener el formato #ABCDEF',
18
+ })
19
+ .toLowerCase(),
20
+ isExclusive: zod_1.z.boolean(),
21
+ created_at: zod_1.z.string().datetime(),
22
+ updated_at: zod_1.z.string().datetime(),
23
+ });
24
+ class GrupoEtiquetaDto extends (0, zod_nestjs_1.createZodDto)(exports.grupoEtiquetaSchema) {
25
+ }
26
+ exports.GrupoEtiquetaDto = GrupoEtiquetaDto;
27
+ //# sourceMappingURL=grupo-etiqueta.dto.js.map
@@ -0,0 +1 @@
1
+ export * from './dto/grupo-etiqueta.dto';
@@ -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/grupo-etiqueta.dto"), exports);
18
+ //# sourceMappingURL=exports.js.map
@@ -1,3 +1,3 @@
1
1
  export * from './schema';
2
- export * from './prisma-schema';
2
+ export * from './prisma-schema/index';
3
3
  export * from './dto';
@@ -15,6 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./schema"), exports);
18
- __exportStar(require("./prisma-schema"), exports);
18
+ __exportStar(require("./prisma-schema/index"), exports);
19
19
  __exportStar(require("./dto"), exports);
20
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,kDAAgC;AAChC,wCAAsB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,wDAAsC;AACtC,wCAAsB"}
@@ -71,6 +71,18 @@ export interface components {
71
71
  isAdmin: boolean;
72
72
  created_at?: string;
73
73
  updated_at?: string;
74
+ filtroBase?: {
75
+ etiquetas: {
76
+ id: string;
77
+ name: string;
78
+ grupo: {
79
+ id: string;
80
+ color: string;
81
+ isExclusive: boolean;
82
+ };
83
+ };
84
+ active: boolean;
85
+ };
74
86
  filtroBaseActivo: boolean;
75
87
  fcmToken: string[];
76
88
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-backend-types",
3
- "version": "0.3.0-EXPO-245.1",
3
+ "version": "0.3.0-EXPO-245.3",
4
4
  "description": "",
5
5
  "author": "Expo",
6
6
  "private": false,
@@ -12,23 +12,24 @@
12
12
  ],
13
13
  "scripts": {
14
14
  "ci": "npm install && npx prisma generate && npm run generate-ts-schema && npm run build && npx prisma generate && npm run format && npm run lint && npm run check-exports",
15
+ "postinstall": "patch-package",
15
16
  "build": "nest build",
16
17
  "format": "prettier --write \"src/**/*.ts\"",
17
18
  "check-format": "prettier --check \"src/**/*.ts\"",
18
19
  "check-exports": "attw --pack .",
19
20
  "local-release": "changeset version && changeset publish",
20
21
  "commit-schema": "git add ./types/schema.d.ts swagger.yaml && git commit -m \"Update schema\"",
21
- "start": "nest start",
22
- "dev": "nest start --watch",
22
+ "start": "npx prisma generate && nest start",
23
+ "dev": "npx prisma generate && nest start --watch",
23
24
  "start:debug": "nest start --debug --watch",
24
- "start:prod": "node dist/main",
25
+ "start:prod": "node dist/src/main",
25
26
  "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
26
27
  "test": "jest",
27
28
  "test:watch": "jest --watch",
28
29
  "test:cov": "jest --coverage",
29
30
  "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
30
31
  "test:e2e": "jest --config ./test/jest-e2e.json",
31
- "generate-ts-schema": "npx ts-node -r tsconfig-paths/register src/main.swagger.ts && openapi-typescript ./swagger.yaml -o ./types/schema.ts",
32
+ "generate-ts-schema": "npx ts-node -r tsconfig-paths/register src/main.swagger.ts && npx openapi-typescript ./swagger.yaml -o ./types/schema.ts",
32
33
  "prepare": "husky",
33
34
  "prepublishOnly": "npm run ci"
34
35
  },
@@ -45,6 +46,7 @@
45
46
  "bcrypt": "^5.1.1",
46
47
  "json-to-pretty-yaml": "^1.2.2",
47
48
  "openapi3-ts": "^4.4.0",
49
+ "patch-package": "^8.0.0",
48
50
  "reflect-metadata": "^0.2.0",
49
51
  "zod": "^3.23.8"
50
52
  },