expo-backend-types 0.30.0-EXPO-308-auth.27 → 0.30.0-EXPO-309-Migrar-Configuracion.5

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.
Files changed (90) hide show
  1. package/dist/src/exports.d.ts +1 -3
  2. package/dist/src/exports.js +1 -3
  3. package/dist/src/i18n/es.d.ts +0 -20
  4. package/dist/src/i18n/es.js +0 -20
  5. package/dist/src/i18n/es.js.map +1 -1
  6. package/dist/src/location/dto/find-all-location.dto.js +2 -2
  7. package/dist/src/{schema/location.schema.js → location/dto/location.dto.js} +2 -2
  8. package/dist/src/location/exports.d.ts +1 -0
  9. package/dist/src/location/exports.js +1 -0
  10. package/dist/src/message/dto/non-read-messages.dto.d.ts +2 -2
  11. package/dist/src/message/dto/non-read-messages.dto.js +2 -2
  12. package/dist/src/message/dto/send-message-to-phone.dto.d.ts +2 -2
  13. package/dist/src/message/dto/send-message-to-phone.dto.js +2 -2
  14. package/dist/src/profile/dto/create-profile.dto.d.ts +14 -48
  15. package/dist/src/profile/dto/create-profile.dto.js +7 -9
  16. package/dist/src/profile/dto/delete-profile.dto.d.ts +6 -30
  17. package/dist/src/profile/dto/delete-profile.dto.js +2 -2
  18. package/dist/src/profile/dto/find-all-profile.dto.d.ts +7 -47
  19. package/dist/src/profile/dto/find-all-profile.dto.js +2 -2
  20. package/dist/src/profile/dto/find-by-date-range-profile.dto.d.ts +11 -75
  21. package/dist/src/profile/dto/find-by-date-range-profile.dto.js +3 -3
  22. package/dist/src/profile/dto/find-by-id-profile.dto.d.ts +13 -32
  23. package/dist/src/profile/dto/find-by-id-profile.dto.js +5 -7
  24. package/dist/src/profile/dto/find-by-phone-number.dto.d.ts +6 -30
  25. package/dist/src/profile/dto/find-by-phone-number.dto.js +2 -2
  26. package/dist/src/profile/dto/find-by-tag-groups-profile.dto.d.ts +7 -47
  27. package/dist/src/profile/dto/find-by-tag-groups-profile.dto.js +2 -2
  28. package/dist/src/profile/dto/find-by-tags-profile.dto.d.ts +7 -47
  29. package/dist/src/profile/dto/find-by-tags-profile.dto.js +2 -2
  30. package/dist/src/profile/dto/find-trash.dto.d.ts +3 -7
  31. package/dist/src/profile/dto/find-trash.dto.js +2 -2
  32. package/dist/src/profile/dto/find-with-active-chat.dto.d.ts +7 -47
  33. package/dist/src/profile/dto/find-with-active-chat.dto.js +2 -2
  34. package/dist/src/profile/dto/profile.dto.d.ts +30 -44
  35. package/dist/src/profile/dto/profile.dto.js +63 -6
  36. package/dist/src/profile/dto/update-profile.dto.d.ts +12 -54
  37. package/dist/src/profile/dto/update-profile.dto.js +6 -9
  38. package/dist/src/shared/dto-modification/zod-without-dates.d.ts +4 -2
  39. package/dist/src/shared/dto-modification/zod-without-dates.js +0 -8
  40. package/dist/src/shared/dto-modification/zod-without-dates.js.map +1 -1
  41. package/dist/src/tag/dto/massive-allocation.dto.d.ts +7 -47
  42. package/dist/src/tag/dto/massive-allocation.dto.js +3 -3
  43. package/dist/src/tag/dto/massive-deallocation.dto.d.ts +7 -47
  44. package/dist/src/tag/dto/massive-deallocation.dto.js +3 -3
  45. package/dist/types/prisma-schema/edge.js +24 -38
  46. package/dist/types/prisma-schema/index-browser.js +9 -18
  47. package/dist/types/prisma-schema/index.d.ts +553 -3904
  48. package/dist/types/prisma-schema/index.js +24 -38
  49. package/dist/types/prisma-schema/libquery_engine-debian-openssl-3.0.x.so.node +0 -0
  50. package/dist/types/prisma-schema/package.json +2 -2
  51. package/dist/types/prisma-schema/runtime/edge-esm.js +18 -18
  52. package/dist/types/prisma-schema/runtime/edge.js +18 -18
  53. package/dist/types/prisma-schema/runtime/index-browser.d.ts +1 -1
  54. package/dist/types/prisma-schema/runtime/library.d.ts +133 -177
  55. package/dist/types/prisma-schema/runtime/library.js +51 -51
  56. package/dist/types/prisma-schema/runtime/react-native.js +26 -26
  57. package/dist/types/prisma-schema/runtime/wasm.js +19 -19
  58. package/dist/types/prisma-schema/schema.prisma +1 -22
  59. package/dist/types/prisma-schema/wasm.js +9 -18
  60. package/dist/types/schema.d.ts +6 -510
  61. package/package.json +17 -23
  62. package/dist/src/image/constants.d.ts +0 -5
  63. package/dist/src/image/constants.js +0 -9
  64. package/dist/src/mi-expo/dto/get-me.dto.d.ts +0 -337
  65. package/dist/src/mi-expo/dto/get-me.dto.js +0 -16
  66. package/dist/src/mi-expo/dto/login-with-phone.dto.d.ts +0 -311
  67. package/dist/src/mi-expo/dto/login-with-phone.dto.js +0 -29
  68. package/dist/src/mi-expo/dto/login.dto.d.ts +0 -327
  69. package/dist/src/mi-expo/dto/login.dto.js +0 -31
  70. package/dist/src/mi-expo/dto/update-me.dto.d.ts +0 -352
  71. package/dist/src/mi-expo/dto/update-me.dto.js +0 -31
  72. package/dist/src/mi-expo/exports.d.ts +0 -4
  73. package/dist/src/mi-expo/exports.js +0 -21
  74. package/dist/src/otp/constants.d.ts +0 -2
  75. package/dist/src/otp/constants.js +0 -6
  76. package/dist/src/otp/dto/send-otp.dto.d.ts +0 -158
  77. package/dist/src/otp/dto/send-otp.dto.js +0 -35
  78. package/dist/src/otp/dto/verify-otp.dto.d.ts +0 -455
  79. package/dist/src/otp/dto/verify-otp.dto.js +0 -46
  80. package/dist/src/otp/exports.d.ts +0 -2
  81. package/dist/src/otp/exports.js +0 -19
  82. package/dist/src/prisma/constants.d.ts +0 -1
  83. package/dist/src/prisma/constants.js +0 -5
  84. package/dist/src/schema/exports.d.ts +0 -2
  85. package/dist/src/schema/exports.js +0 -19
  86. package/dist/src/schema/profile.schema.d.ts +0 -74
  87. package/dist/src/schema/profile.schema.js +0 -133
  88. package/dist/src/webhook/constants.d.ts +0 -1
  89. package/dist/src/webhook/constants.js +0 -5
  90. /package/dist/src/{schema/location.schema.d.ts → location/dto/location.dto.d.ts} +0 -0
@@ -3,12 +3,8 @@ export declare const findWithActiveChatResponseSchema: z.ZodObject<{
3
3
  profiles: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
4
4
  id: z.ZodString;
5
5
  shortId: z.ZodNumber;
6
- firstTimeMiExpo: z.ZodBoolean;
7
- username: z.ZodNullable<z.ZodString>;
8
- password: z.ZodNullable<z.ZodString>;
9
- phoneNumber: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
10
- isPhoneVerified: z.ZodBoolean;
11
- secondaryPhoneNumber: z.ZodNullable<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
6
+ phoneNumber: z.ZodEffects<z.ZodString, string, string>;
7
+ secondaryPhoneNumber: z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>;
12
8
  fullName: z.ZodString;
13
9
  firstName: z.ZodNullable<z.ZodString>;
14
10
  gender: z.ZodNullable<z.ZodString>;
@@ -163,8 +159,6 @@ export declare const findWithActiveChatResponseSchema: z.ZodObject<{
163
159
  }>, "many">;
164
160
  }>, "strip", z.ZodTypeAny, {
165
161
  id: string;
166
- username: string | null;
167
- password: string | null;
168
162
  phoneNumber: string;
169
163
  secondaryPhoneNumber: string | null;
170
164
  fullName: string;
@@ -173,8 +167,6 @@ export declare const findWithActiveChatResponseSchema: z.ZodObject<{
173
167
  created_at: Date;
174
168
  updated_at: Date;
175
169
  shortId: number;
176
- firstTimeMiExpo: boolean;
177
- isPhoneVerified: boolean;
178
170
  firstName: string | null;
179
171
  gender: string | null;
180
172
  birthDate: Date | null;
@@ -217,8 +209,6 @@ export declare const findWithActiveChatResponseSchema: z.ZodObject<{
217
209
  inChat: boolean;
218
210
  }, {
219
211
  id: string;
220
- username: string | null;
221
- password: string | null;
222
212
  phoneNumber: string;
223
213
  secondaryPhoneNumber: string | null;
224
214
  fullName: string;
@@ -227,8 +217,6 @@ export declare const findWithActiveChatResponseSchema: z.ZodObject<{
227
217
  created_at: Date;
228
218
  updated_at: Date;
229
219
  shortId: number;
230
- firstTimeMiExpo: boolean;
231
- isPhoneVerified: boolean;
232
220
  firstName: string | null;
233
221
  gender: string | null;
234
222
  birthDate: string | null;
@@ -273,8 +261,6 @@ export declare const findWithActiveChatResponseSchema: z.ZodObject<{
273
261
  }, "strip", z.ZodTypeAny, {
274
262
  profiles: {
275
263
  id: string;
276
- username: string | null;
277
- password: string | null;
278
264
  phoneNumber: string;
279
265
  secondaryPhoneNumber: string | null;
280
266
  fullName: string;
@@ -283,8 +269,6 @@ export declare const findWithActiveChatResponseSchema: z.ZodObject<{
283
269
  created_at: Date;
284
270
  updated_at: Date;
285
271
  shortId: number;
286
- firstTimeMiExpo: boolean;
287
- isPhoneVerified: boolean;
288
272
  firstName: string | null;
289
273
  gender: string | null;
290
274
  birthDate: Date | null;
@@ -329,8 +313,6 @@ export declare const findWithActiveChatResponseSchema: z.ZodObject<{
329
313
  }, {
330
314
  profiles: {
331
315
  id: string;
332
- username: string | null;
333
- password: string | null;
334
316
  phoneNumber: string;
335
317
  secondaryPhoneNumber: string | null;
336
318
  fullName: string;
@@ -339,8 +321,6 @@ export declare const findWithActiveChatResponseSchema: z.ZodObject<{
339
321
  created_at: Date;
340
322
  updated_at: Date;
341
323
  shortId: number;
342
- firstTimeMiExpo: boolean;
343
- isPhoneVerified: boolean;
344
324
  firstName: string | null;
345
325
  gender: string | null;
346
326
  birthDate: string | null;
@@ -387,16 +367,12 @@ declare const FindWithActiveChatResponseDto_base: import("@anatine/zod-nestjs").
387
367
  profiles: z.ZodArray<z.ZodObject<{
388
368
  id: z.ZodString;
389
369
  shortId: z.ZodNumber;
390
- firstTimeMiExpo: z.ZodBoolean;
391
- username: z.ZodNullable<z.ZodString>;
392
- password: z.ZodNullable<z.ZodString>;
393
- phoneNumber: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
394
- isPhoneVerified: z.ZodBoolean;
395
- secondaryPhoneNumber: z.ZodNullable<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
370
+ phoneNumber: z.ZodEffects<z.ZodString, string, string>;
371
+ secondaryPhoneNumber: z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>;
396
372
  fullName: z.ZodString;
397
373
  firstName: z.ZodNullable<z.ZodString>;
398
374
  gender: z.ZodNullable<z.ZodString>;
399
- birthDate: z.ZodNullable<z.ZodPipeline<z.ZodString, z.ZodString>>;
375
+ birthDate: z.ZodNullable<z.ZodPipeline<z.ZodString, z.ZodDate>>;
400
376
  profilePictureUrl: z.ZodNullable<z.ZodString>;
401
377
  instagram: z.ZodNullable<z.ZodString>;
402
378
  mail: z.ZodNullable<z.ZodString>;
@@ -543,8 +519,6 @@ declare const FindWithActiveChatResponseDto_base: import("@anatine/zod-nestjs").
543
519
  }>, "many">;
544
520
  }, z.UnknownKeysParam, z.ZodTypeAny, {
545
521
  id: string;
546
- username: string | null;
547
- password: string | null;
548
522
  phoneNumber: string;
549
523
  secondaryPhoneNumber: string | null;
550
524
  fullName: string;
@@ -553,11 +527,9 @@ declare const FindWithActiveChatResponseDto_base: import("@anatine/zod-nestjs").
553
527
  created_at: string;
554
528
  updated_at: string;
555
529
  shortId: number;
556
- firstTimeMiExpo: boolean;
557
- isPhoneVerified: boolean;
558
530
  firstName: string | null;
559
531
  gender: string | null;
560
- birthDate: string | null;
532
+ birthDate: Date | null;
561
533
  instagram: string | null;
562
534
  dni: string | null;
563
535
  alternativeNames: string[];
@@ -597,8 +569,6 @@ declare const FindWithActiveChatResponseDto_base: import("@anatine/zod-nestjs").
597
569
  inChat: boolean;
598
570
  }, {
599
571
  id: string;
600
- username: string | null;
601
- password: string | null;
602
572
  phoneNumber: string;
603
573
  secondaryPhoneNumber: string | null;
604
574
  fullName: string;
@@ -607,8 +577,6 @@ declare const FindWithActiveChatResponseDto_base: import("@anatine/zod-nestjs").
607
577
  created_at: string;
608
578
  updated_at: string;
609
579
  shortId: number;
610
- firstTimeMiExpo: boolean;
611
- isPhoneVerified: boolean;
612
580
  firstName: string | null;
613
581
  gender: string | null;
614
582
  birthDate: string | null;
@@ -653,8 +621,6 @@ declare const FindWithActiveChatResponseDto_base: import("@anatine/zod-nestjs").
653
621
  }, z.UnknownKeysParam, z.ZodTypeAny, {
654
622
  profiles: {
655
623
  id: string;
656
- username: string | null;
657
- password: string | null;
658
624
  phoneNumber: string;
659
625
  secondaryPhoneNumber: string | null;
660
626
  fullName: string;
@@ -663,11 +629,9 @@ declare const FindWithActiveChatResponseDto_base: import("@anatine/zod-nestjs").
663
629
  created_at: string;
664
630
  updated_at: string;
665
631
  shortId: number;
666
- firstTimeMiExpo: boolean;
667
- isPhoneVerified: boolean;
668
632
  firstName: string | null;
669
633
  gender: string | null;
670
- birthDate: string | null;
634
+ birthDate: Date | null;
671
635
  instagram: string | null;
672
636
  dni: string | null;
673
637
  alternativeNames: string[];
@@ -709,8 +673,6 @@ declare const FindWithActiveChatResponseDto_base: import("@anatine/zod-nestjs").
709
673
  }, {
710
674
  profiles: {
711
675
  id: string;
712
- username: string | null;
713
- password: string | null;
714
676
  phoneNumber: string;
715
677
  secondaryPhoneNumber: string | null;
716
678
  fullName: string;
@@ -719,8 +681,6 @@ declare const FindWithActiveChatResponseDto_base: import("@anatine/zod-nestjs").
719
681
  created_at: string;
720
682
  updated_at: string;
721
683
  shortId: number;
722
- firstTimeMiExpo: boolean;
723
- isPhoneVerified: boolean;
724
684
  firstName: string | null;
725
685
  gender: string | null;
726
686
  birthDate: string | null;
@@ -5,12 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.FindWithActiveChatResponseDto = exports.findWithActiveChatResponseSchema = void 0;
7
7
  const message_dto_1 = require("../../message/dto/message.dto");
8
- const profile_schema_1 = require("../../schema/profile.schema");
8
+ const profile_dto_1 = require("./profile.dto");
9
9
  const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
10
10
  const tag_dto_1 = require("../../tag/dto/tag.dto");
11
11
  const zod_1 = __importDefault(require("zod"));
12
12
  exports.findWithActiveChatResponseSchema = zod_1.default.object({
13
- profiles: zod_1.default.array(profile_schema_1.profileSchema.merge(zod_1.default.object({
13
+ profiles: zod_1.default.array(profile_dto_1.profileSchema.merge(zod_1.default.object({
14
14
  tags: zod_1.default.array(tag_dto_1.tagSchema),
15
15
  inChat: zod_1.default.boolean(),
16
16
  messages: zod_1.default.array(message_dto_1.messageSchema.pick({
@@ -1,65 +1,54 @@
1
- declare const ProfileDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<import("zod").ZodObject<{
2
- id: import("zod").ZodString;
3
- shortId: import("zod").ZodNumber;
4
- firstTimeMiExpo: import("zod").ZodBoolean;
5
- username: import("zod").ZodNullable<import("zod").ZodString>;
6
- password: import("zod").ZodNullable<import("zod").ZodString>;
7
- phoneNumber: import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, string, string>;
8
- isPhoneVerified: import("zod").ZodBoolean;
9
- secondaryPhoneNumber: import("zod").ZodNullable<import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, string, string>>;
10
- fullName: import("zod").ZodString;
11
- firstName: import("zod").ZodNullable<import("zod").ZodString>;
12
- gender: import("zod").ZodNullable<import("zod").ZodString>;
13
- birthDate: import("zod").ZodNullable<import("zod").ZodPipeline<import("zod").ZodString, import("zod").ZodString>>;
14
- profilePictureUrl: import("zod").ZodNullable<import("zod").ZodString>;
15
- instagram: import("zod").ZodNullable<import("zod").ZodString>;
16
- mail: import("zod").ZodNullable<import("zod").ZodString>;
17
- dni: import("zod").ZodNullable<import("zod").ZodString>;
18
- alternativeNames: import("zod").ZodArray<import("zod").ZodString, "many">;
19
- birthLocationId: import("zod").ZodNullable<import("zod").ZodString>;
20
- residenceLocationId: import("zod").ZodNullable<import("zod").ZodString>;
21
- isInTrash: import("zod").ZodBoolean;
22
- movedToTrashDate: import("zod").ZodNullable<import("zod").ZodString>;
23
- created_at: import("zod").ZodString;
24
- updated_at: import("zod").ZodString;
25
- }, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {
1
+ import z from 'zod';
2
+ export declare const profileSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ shortId: z.ZodNumber;
5
+ phoneNumber: z.ZodEffects<z.ZodString, string, string>;
6
+ secondaryPhoneNumber: z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>;
7
+ fullName: z.ZodString;
8
+ firstName: z.ZodNullable<z.ZodString>;
9
+ gender: z.ZodNullable<z.ZodString>;
10
+ birthDate: z.ZodNullable<z.ZodPipeline<z.ZodString, z.ZodDate>>;
11
+ profilePictureUrl: z.ZodNullable<z.ZodString>;
12
+ instagram: z.ZodNullable<z.ZodString>;
13
+ mail: z.ZodNullable<z.ZodString>;
14
+ dni: z.ZodNullable<z.ZodString>;
15
+ alternativeNames: z.ZodArray<z.ZodString, "many">;
16
+ birthLocationId: z.ZodNullable<z.ZodString>;
17
+ residenceLocationId: z.ZodNullable<z.ZodString>;
18
+ isInTrash: z.ZodBoolean;
19
+ movedToTrashDate: z.ZodNullable<z.ZodDate>;
20
+ created_at: z.ZodDate;
21
+ updated_at: z.ZodDate;
22
+ }, "strip", z.ZodTypeAny, {
26
23
  id: string;
27
- username: string | null;
28
- password: string | null;
29
24
  phoneNumber: string;
30
25
  secondaryPhoneNumber: string | null;
31
26
  fullName: string;
32
27
  profilePictureUrl: string | null;
33
28
  mail: string | null;
34
- created_at: string;
35
- updated_at: string;
29
+ created_at: Date;
30
+ updated_at: Date;
36
31
  shortId: number;
37
- firstTimeMiExpo: boolean;
38
- isPhoneVerified: boolean;
39
32
  firstName: string | null;
40
33
  gender: string | null;
41
- birthDate: string | null;
34
+ birthDate: Date | null;
42
35
  instagram: string | null;
43
36
  dni: string | null;
44
37
  alternativeNames: string[];
45
38
  birthLocationId: string | null;
46
39
  residenceLocationId: string | null;
47
40
  isInTrash: boolean;
48
- movedToTrashDate: string | null;
41
+ movedToTrashDate: Date | null;
49
42
  }, {
50
43
  id: string;
51
- username: string | null;
52
- password: string | null;
53
44
  phoneNumber: string;
54
45
  secondaryPhoneNumber: string | null;
55
46
  fullName: string;
56
47
  profilePictureUrl: string | null;
57
48
  mail: string | null;
58
- created_at: string;
59
- updated_at: string;
49
+ created_at: Date;
50
+ updated_at: Date;
60
51
  shortId: number;
61
- firstTimeMiExpo: boolean;
62
- isPhoneVerified: boolean;
63
52
  firstName: string | null;
64
53
  gender: string | null;
65
54
  birthDate: string | null;
@@ -69,8 +58,5 @@ declare const ProfileDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<import
69
58
  birthLocationId: string | null;
70
59
  residenceLocationId: string | null;
71
60
  isInTrash: boolean;
72
- movedToTrashDate: string | null;
73
- }>>;
74
- export declare class ProfileDto extends ProfileDto_base {
75
- }
76
- export {};
61
+ movedToTrashDate: Date | null;
62
+ }>;
@@ -1,9 +1,66 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProfileDto = void 0;
4
- const profile_schema_1 = require("../../schema/profile.schema");
5
- const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
6
- class ProfileDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(profile_schema_1.profileSchema) {
7
- }
8
- exports.ProfileDto = ProfileDto;
6
+ exports.profileSchema = void 0;
7
+ const translate_1 = require("../../i18n/translate");
8
+ const validator_1 = __importDefault(require("validator"));
9
+ const zod_1 = __importDefault(require("zod"));
10
+ exports.profileSchema = zod_1.default.object({
11
+ id: zod_1.default.string().uuid({
12
+ message: (0, translate_1.translate)('model.profile.id.uuid'),
13
+ }),
14
+ shortId: zod_1.default.number(),
15
+ phoneNumber: zod_1.default
16
+ .string()
17
+ .min(1, {
18
+ message: (0, translate_1.translate)('model.profile.phoneNumber.required'),
19
+ })
20
+ .refine(validator_1.default.isMobilePhone, {
21
+ message: (0, translate_1.translate)('model.profile.phoneNumber.invalid'),
22
+ }),
23
+ secondaryPhoneNumber: zod_1.default
24
+ .string()
25
+ .nullable()
26
+ .refine((value) => {
27
+ if (value === null)
28
+ return true;
29
+ return validator_1.default.isMobilePhone(value);
30
+ }, {
31
+ message: (0, translate_1.translate)('model.profile.secondaryPhoneNumber.invalid'),
32
+ }),
33
+ fullName: zod_1.default.string().min(1, {
34
+ message: (0, translate_1.translate)('model.profile.fullName.required'),
35
+ }),
36
+ firstName: zod_1.default
37
+ .string()
38
+ .min(1, {
39
+ message: (0, translate_1.translate)('model.profile.fullName.required'),
40
+ })
41
+ .nullable(),
42
+ gender: zod_1.default.string().nullable(),
43
+ birthDate: zod_1.default.string().pipe(zod_1.default.coerce.date()).nullable(),
44
+ profilePictureUrl: zod_1.default
45
+ .string()
46
+ .url({
47
+ message: (0, translate_1.translate)('model.profile.profilePictureUrl.invalid'),
48
+ })
49
+ .nullable(),
50
+ instagram: zod_1.default.string().nullable(),
51
+ mail: zod_1.default
52
+ .string()
53
+ .email({
54
+ message: (0, translate_1.translate)('model.profile.mail.invalid'),
55
+ })
56
+ .nullable(),
57
+ dni: zod_1.default.string().nullable(),
58
+ alternativeNames: zod_1.default.array(zod_1.default.string()),
59
+ birthLocationId: zod_1.default.string().uuid().nullable(),
60
+ residenceLocationId: zod_1.default.string().uuid().nullable(),
61
+ isInTrash: zod_1.default.boolean(),
62
+ movedToTrashDate: zod_1.default.coerce.date().nullable(),
63
+ created_at: zod_1.default.date(),
64
+ updated_at: zod_1.default.date(),
65
+ });
9
66
  //# sourceMappingURL=profile.dto.js.map
@@ -1,13 +1,10 @@
1
1
  import z from 'zod';
2
2
  export declare const updateProfileSchema: z.ZodObject<z.objectUtil.extendShape<{
3
- username: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4
- password: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5
- phoneNumber: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
6
- secondaryPhoneNumber: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
3
+ phoneNumber: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4
+ secondaryPhoneNumber: z.ZodOptional<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>>;
7
5
  fullName: z.ZodOptional<z.ZodString>;
8
6
  profilePictureUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
7
  mail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
- firstTimeMiExpo: z.ZodOptional<z.ZodBoolean>;
11
8
  gender: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
9
  birthDate: z.ZodOptional<z.ZodNullable<z.ZodPipeline<z.ZodString, z.ZodDate>>>;
13
10
  instagram: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -62,14 +59,11 @@ export declare const updateProfileSchema: z.ZodObject<z.objectUtil.extendShape<{
62
59
  }>>;
63
60
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
64
61
  }>, "strip", z.ZodTypeAny, {
65
- username?: string | null | undefined;
66
- password?: string | null | undefined;
67
62
  phoneNumber?: string | undefined;
68
63
  secondaryPhoneNumber?: string | null | undefined;
69
64
  fullName?: string | undefined;
70
65
  profilePictureUrl?: string | null | undefined;
71
66
  mail?: string | null | undefined;
72
- firstTimeMiExpo?: boolean | undefined;
73
67
  gender?: string | null | undefined;
74
68
  birthDate?: Date | null | undefined;
75
69
  instagram?: string | null | undefined;
@@ -93,14 +87,11 @@ export declare const updateProfileSchema: z.ZodObject<z.objectUtil.extendShape<{
93
87
  city: string;
94
88
  } | undefined;
95
89
  }, {
96
- username?: string | null | undefined;
97
- password?: string | null | undefined;
98
90
  phoneNumber?: string | undefined;
99
91
  secondaryPhoneNumber?: string | null | undefined;
100
92
  fullName?: string | undefined;
101
93
  profilePictureUrl?: string | null | undefined;
102
94
  mail?: string | null | undefined;
103
- firstTimeMiExpo?: boolean | undefined;
104
95
  gender?: string | null | undefined;
105
96
  birthDate?: string | null | undefined;
106
97
  instagram?: string | null | undefined;
@@ -125,16 +116,13 @@ export declare const updateProfileSchema: z.ZodObject<z.objectUtil.extendShape<{
125
116
  } | undefined;
126
117
  }>;
127
118
  declare const UpdateProfileDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.ZodObject<{
128
- username: z.ZodOptional<z.ZodNullable<z.ZodString>>;
129
- password: z.ZodOptional<z.ZodNullable<z.ZodString>>;
130
- phoneNumber: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
131
- secondaryPhoneNumber: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
119
+ phoneNumber: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
120
+ secondaryPhoneNumber: z.ZodOptional<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>>;
132
121
  fullName: z.ZodOptional<z.ZodString>;
133
122
  profilePictureUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
134
123
  mail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
135
- firstTimeMiExpo: z.ZodOptional<z.ZodBoolean>;
136
124
  gender: z.ZodOptional<z.ZodNullable<z.ZodString>>;
137
- birthDate: z.ZodOptional<z.ZodNullable<z.ZodPipeline<z.ZodString, z.ZodString>>>;
125
+ birthDate: z.ZodOptional<z.ZodNullable<z.ZodPipeline<z.ZodString, z.ZodDate>>>;
138
126
  instagram: z.ZodOptional<z.ZodNullable<z.ZodString>>;
139
127
  dni: z.ZodOptional<z.ZodNullable<z.ZodString>>;
140
128
  alternativeNames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -180,16 +168,13 @@ declare const UpdateProfileDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<
180
168
  }>>;
181
169
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
182
170
  }, z.UnknownKeysParam, z.ZodTypeAny, {
183
- username?: string | null | undefined;
184
- password?: string | null | undefined;
185
171
  phoneNumber?: string | undefined;
186
172
  secondaryPhoneNumber?: string | null | undefined;
187
173
  fullName?: string | undefined;
188
174
  profilePictureUrl?: string | null | undefined;
189
175
  mail?: string | null | undefined;
190
- firstTimeMiExpo?: boolean | undefined;
191
176
  gender?: string | null | undefined;
192
- birthDate?: string | null | undefined;
177
+ birthDate?: Date | null | undefined;
193
178
  instagram?: string | null | undefined;
194
179
  dni?: string | null | undefined;
195
180
  alternativeNames?: string[] | undefined;
@@ -211,14 +196,11 @@ declare const UpdateProfileDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<
211
196
  city: string;
212
197
  } | undefined;
213
198
  }, {
214
- username?: string | null | undefined;
215
- password?: string | null | undefined;
216
199
  phoneNumber?: string | undefined;
217
200
  secondaryPhoneNumber?: string | null | undefined;
218
201
  fullName?: string | undefined;
219
202
  profilePictureUrl?: string | null | undefined;
220
203
  mail?: string | null | undefined;
221
- firstTimeMiExpo?: boolean | undefined;
222
204
  gender?: string | null | undefined;
223
205
  birthDate?: string | null | undefined;
224
206
  instagram?: string | null | undefined;
@@ -247,12 +229,8 @@ export declare class UpdateProfileDto extends UpdateProfileDto_base {
247
229
  export declare const updateProfileResponseSchema: z.ZodObject<{
248
230
  id: z.ZodString;
249
231
  shortId: z.ZodNumber;
250
- firstTimeMiExpo: z.ZodBoolean;
251
- username: z.ZodNullable<z.ZodString>;
252
- password: z.ZodNullable<z.ZodString>;
253
- phoneNumber: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
254
- isPhoneVerified: z.ZodBoolean;
255
- secondaryPhoneNumber: z.ZodNullable<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
232
+ phoneNumber: z.ZodEffects<z.ZodString, string, string>;
233
+ secondaryPhoneNumber: z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>;
256
234
  fullName: z.ZodString;
257
235
  firstName: z.ZodNullable<z.ZodString>;
258
236
  gender: z.ZodNullable<z.ZodString>;
@@ -270,8 +248,6 @@ export declare const updateProfileResponseSchema: z.ZodObject<{
270
248
  updated_at: z.ZodDate;
271
249
  }, "strip", z.ZodTypeAny, {
272
250
  id: string;
273
- username: string | null;
274
- password: string | null;
275
251
  phoneNumber: string;
276
252
  secondaryPhoneNumber: string | null;
277
253
  fullName: string;
@@ -280,8 +256,6 @@ export declare const updateProfileResponseSchema: z.ZodObject<{
280
256
  created_at: Date;
281
257
  updated_at: Date;
282
258
  shortId: number;
283
- firstTimeMiExpo: boolean;
284
- isPhoneVerified: boolean;
285
259
  firstName: string | null;
286
260
  gender: string | null;
287
261
  birthDate: Date | null;
@@ -294,8 +268,6 @@ export declare const updateProfileResponseSchema: z.ZodObject<{
294
268
  movedToTrashDate: Date | null;
295
269
  }, {
296
270
  id: string;
297
- username: string | null;
298
- password: string | null;
299
271
  phoneNumber: string;
300
272
  secondaryPhoneNumber: string | null;
301
273
  fullName: string;
@@ -304,8 +276,6 @@ export declare const updateProfileResponseSchema: z.ZodObject<{
304
276
  created_at: Date;
305
277
  updated_at: Date;
306
278
  shortId: number;
307
- firstTimeMiExpo: boolean;
308
- isPhoneVerified: boolean;
309
279
  firstName: string | null;
310
280
  gender: string | null;
311
281
  birthDate: string | null;
@@ -320,16 +290,12 @@ export declare const updateProfileResponseSchema: z.ZodObject<{
320
290
  declare const UpdateProfileResponseDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.ZodObject<{
321
291
  id: z.ZodString;
322
292
  shortId: z.ZodNumber;
323
- firstTimeMiExpo: z.ZodBoolean;
324
- username: z.ZodNullable<z.ZodString>;
325
- password: z.ZodNullable<z.ZodString>;
326
- phoneNumber: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
327
- isPhoneVerified: z.ZodBoolean;
328
- secondaryPhoneNumber: z.ZodNullable<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
293
+ phoneNumber: z.ZodEffects<z.ZodString, string, string>;
294
+ secondaryPhoneNumber: z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>;
329
295
  fullName: z.ZodString;
330
296
  firstName: z.ZodNullable<z.ZodString>;
331
297
  gender: z.ZodNullable<z.ZodString>;
332
- birthDate: z.ZodNullable<z.ZodPipeline<z.ZodString, z.ZodString>>;
298
+ birthDate: z.ZodNullable<z.ZodPipeline<z.ZodString, z.ZodDate>>;
333
299
  profilePictureUrl: z.ZodNullable<z.ZodString>;
334
300
  instagram: z.ZodNullable<z.ZodString>;
335
301
  mail: z.ZodNullable<z.ZodString>;
@@ -343,8 +309,6 @@ declare const UpdateProfileResponseDto_base: import("@anatine/zod-nestjs").ZodDt
343
309
  updated_at: z.ZodString;
344
310
  }, z.UnknownKeysParam, z.ZodTypeAny, {
345
311
  id: string;
346
- username: string | null;
347
- password: string | null;
348
312
  phoneNumber: string;
349
313
  secondaryPhoneNumber: string | null;
350
314
  fullName: string;
@@ -353,11 +317,9 @@ declare const UpdateProfileResponseDto_base: import("@anatine/zod-nestjs").ZodDt
353
317
  created_at: string;
354
318
  updated_at: string;
355
319
  shortId: number;
356
- firstTimeMiExpo: boolean;
357
- isPhoneVerified: boolean;
358
320
  firstName: string | null;
359
321
  gender: string | null;
360
- birthDate: string | null;
322
+ birthDate: Date | null;
361
323
  instagram: string | null;
362
324
  dni: string | null;
363
325
  alternativeNames: string[];
@@ -367,8 +329,6 @@ declare const UpdateProfileResponseDto_base: import("@anatine/zod-nestjs").ZodDt
367
329
  movedToTrashDate: string | null;
368
330
  }, {
369
331
  id: string;
370
- username: string | null;
371
- password: string | null;
372
332
  phoneNumber: string;
373
333
  secondaryPhoneNumber: string | null;
374
334
  fullName: string;
@@ -377,8 +337,6 @@ declare const UpdateProfileResponseDto_base: import("@anatine/zod-nestjs").ZodDt
377
337
  created_at: string;
378
338
  updated_at: string;
379
339
  shortId: number;
380
- firstTimeMiExpo: boolean;
381
- isPhoneVerified: boolean;
382
340
  firstName: string | null;
383
341
  gender: string | null;
384
342
  birthDate: string | null;
@@ -4,12 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.UpdateProfileResponseDto = exports.updateProfileResponseSchema = exports.UpdateProfileDto = exports.updateProfileSchema = void 0;
7
- const location_schema_1 = require("../../schema/location.schema");
8
- const profile_schema_1 = require("../../schema/profile.schema");
7
+ const location_dto_1 = require("../../location/dto/location.dto");
8
+ const profile_dto_1 = require("./profile.dto");
9
9
  const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
10
10
  const tag_dto_1 = require("../../tag/dto/tag.dto");
11
11
  const zod_1 = __importDefault(require("zod"));
12
- exports.updateProfileSchema = profile_schema_1.profileSchema
12
+ exports.updateProfileSchema = profile_dto_1.profileSchema
13
13
  .pick({
14
14
  alternativeNames: true,
15
15
  birthDate: true,
@@ -23,13 +23,10 @@ exports.updateProfileSchema = profile_schema_1.profileSchema
23
23
  secondaryPhoneNumber: true,
24
24
  isInTrash: true,
25
25
  movedToTrashDate: true,
26
- username: true,
27
- password: true,
28
- firstTimeMiExpo: true,
29
26
  })
30
27
  .partial()
31
28
  .merge(zod_1.default.object({
32
- residence: location_schema_1.locationSchema
29
+ residence: location_dto_1.locationSchema
33
30
  .pick({
34
31
  city: true,
35
32
  country: true,
@@ -38,7 +35,7 @@ exports.updateProfileSchema = profile_schema_1.profileSchema
38
35
  state: true,
39
36
  })
40
37
  .optional(),
41
- birth: location_schema_1.locationSchema
38
+ birth: location_dto_1.locationSchema
42
39
  .pick({
43
40
  city: true,
44
41
  country: true,
@@ -52,7 +49,7 @@ exports.updateProfileSchema = profile_schema_1.profileSchema
52
49
  class UpdateProfileDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.updateProfileSchema) {
53
50
  }
54
51
  exports.UpdateProfileDto = UpdateProfileDto;
55
- exports.updateProfileResponseSchema = profile_schema_1.profileSchema;
52
+ exports.updateProfileResponseSchema = profile_dto_1.profileSchema;
56
53
  class UpdateProfileResponseDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.updateProfileResponseSchema) {
57
54
  }
58
55
  exports.UpdateProfileResponseDto = UpdateProfileResponseDto;
@@ -1,6 +1,8 @@
1
1
  import { type OpenApiZodAny } from '@anatine/zod-openapi';
2
- import { z, ZodArray, ZodDate, ZodIntersection, ZodNullable, ZodObject, ZodOptional, ZodPipeline, ZodTypeAny, ZodUnion } from 'zod';
2
+ import { z, ZodArray, ZodDate, ZodIntersection, ZodNullable, ZodObject, ZodOptional, ZodTypeAny, ZodUnion } from 'zod';
3
3
  export type ReplaceDatesWithStrings<T extends ZodTypeAny> = T extends ZodDate ? ReturnType<typeof z.string> : T extends ZodObject<infer Shape> ? ZodObject<{
4
4
  [k in keyof Shape]: ReplaceDatesWithStrings<Shape[k]>;
5
- }> : T extends ZodArray<infer Item> ? ZodArray<ReplaceDatesWithStrings<Item>> : T extends ZodUnion<infer Options extends [ZodTypeAny, ...ZodTypeAny[]]> ? ZodUnion<Options> : T extends ZodIntersection<infer Left, infer Right> ? ZodIntersection<ReplaceDatesWithStrings<Left>, ReplaceDatesWithStrings<Right>> : T extends ZodNullable<infer Inner> ? ZodNullable<ReplaceDatesWithStrings<Inner>> : T extends ZodOptional<infer Inner> ? ZodOptional<ReplaceDatesWithStrings<Inner>> : T extends ZodPipeline<infer In, infer Out> ? ZodPipeline<ReplaceDatesWithStrings<In>, ReplaceDatesWithStrings<Out>> : T;
5
+ }> : T extends ZodArray<infer Item> ? ZodArray<ReplaceDatesWithStrings<Item>> : T extends ZodUnion<infer Options> ? ZodUnion<{
6
+ [k in keyof Options]: ReplaceDatesWithStrings<Options[k]>;
7
+ }> : T extends ZodIntersection<infer Left, infer Right> ? ZodIntersection<ReplaceDatesWithStrings<Left>, ReplaceDatesWithStrings<Right>> : T extends ZodNullable<infer Inner> ? ZodNullable<ReplaceDatesWithStrings<Inner>> : T extends ZodOptional<infer Inner> ? ZodOptional<ReplaceDatesWithStrings<Inner>> : T;
6
8
  export declare const replaceDatesWithStrings: <T extends OpenApiZodAny>(schema: T) => ReplaceDatesWithStrings<T>;
@@ -6,14 +6,6 @@ const replaceDatesWithStrings = (schema) => {
6
6
  if (schema instanceof zod_1.ZodDate) {
7
7
  return zod_1.z.string().datetime();
8
8
  }
9
- if (schema instanceof zod_1.ZodPipeline) {
10
- if (schema._def.output instanceof zod_1.ZodDate) {
11
- return zod_1.z.string().datetime();
12
- }
13
- else {
14
- return (0, exports.replaceDatesWithStrings)(schema._def.input);
15
- }
16
- }
17
9
  if (schema instanceof zod_1.ZodObject) {
18
10
  const newShape = {};
19
11
  for (const key in schema.shape) {