expo-backend-types 0.30.0-EXPO-308-auth.5 → 0.30.0-EXPO-308-auth.7

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 (40) hide show
  1. package/dist/src/auth/dto/login-mi-expo.dto.d.ts +327 -0
  2. package/dist/src/auth/dto/login-mi-expo.dto.js +31 -0
  3. package/dist/src/message/dto/non-read-messages.dto.d.ts +2 -2
  4. package/dist/src/message/dto/send-message-to-phone.dto.d.ts +2 -2
  5. package/dist/src/otp/constants.d.ts +1 -0
  6. package/dist/src/otp/constants.js +2 -1
  7. package/dist/src/otp/dto/send-otp.dto.d.ts +2 -2
  8. package/dist/src/otp/dto/verify-otp.dto.d.ts +28 -8
  9. package/dist/src/profile/dto/create-profile.dto.d.ts +22 -14
  10. package/dist/src/profile/dto/delete-profile.dto.d.ts +18 -6
  11. package/dist/src/profile/dto/find-all-profile.dto.d.ts +26 -6
  12. package/dist/src/profile/dto/find-by-date-range-profile.dto.d.ts +44 -12
  13. package/dist/src/profile/dto/find-by-id-profile.dto.d.ts +18 -6
  14. package/dist/src/profile/dto/find-by-phone-number.dto.d.ts +18 -6
  15. package/dist/src/profile/dto/find-by-tag-groups-profile.dto.d.ts +26 -6
  16. package/dist/src/profile/dto/find-by-tags-profile.dto.d.ts +26 -6
  17. package/dist/src/profile/dto/find-trash.dto.d.ts +6 -4
  18. package/dist/src/profile/dto/find-with-active-chat.dto.d.ts +26 -6
  19. package/dist/src/profile/dto/profile.dto.d.ts +9 -3
  20. package/dist/src/profile/dto/profile.dto.js +69 -4
  21. package/dist/src/profile/dto/update-profile.dto.d.ts +22 -10
  22. package/dist/src/tag/dto/massive-allocation.dto.d.ts +26 -6
  23. package/dist/src/tag/dto/massive-deallocation.dto.d.ts +26 -6
  24. package/dist/types/prisma-schema/edge.js +26 -24
  25. package/dist/types/prisma-schema/index-browser.js +6 -9
  26. package/dist/types/prisma-schema/index.d.ts +2126 -415
  27. package/dist/types/prisma-schema/index.js +26 -24
  28. package/dist/types/prisma-schema/libquery_engine-debian-openssl-3.0.x.so.node +0 -0
  29. package/dist/types/prisma-schema/package.json +2 -2
  30. package/dist/types/prisma-schema/runtime/edge-esm.js +18 -18
  31. package/dist/types/prisma-schema/runtime/edge.js +18 -18
  32. package/dist/types/prisma-schema/runtime/index-browser.d.ts +1 -1
  33. package/dist/types/prisma-schema/runtime/library.d.ts +177 -133
  34. package/dist/types/prisma-schema/runtime/library.js +51 -51
  35. package/dist/types/prisma-schema/runtime/react-native.js +26 -26
  36. package/dist/types/prisma-schema/runtime/wasm.js +19 -19
  37. package/dist/types/prisma-schema/schema.prisma +3 -0
  38. package/dist/types/prisma-schema/wasm.js +6 -9
  39. package/dist/types/schema.d.ts +113 -13
  40. package/package.json +4 -4
@@ -3,9 +3,12 @@ export declare const findByTagsProfileResponseSchema: z.ZodObject<{
3
3
  profiles: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
4
4
  id: z.ZodString;
5
5
  shortId: z.ZodNumber;
6
- phoneNumber: z.ZodEffects<z.ZodString, string, string>;
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>;
7
10
  isPhoneVerified: z.ZodBoolean;
8
- secondaryPhoneNumber: z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>;
11
+ secondaryPhoneNumber: z.ZodEffects<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>, string | null, string | null>;
9
12
  fullName: z.ZodString;
10
13
  firstName: z.ZodNullable<z.ZodString>;
11
14
  gender: z.ZodNullable<z.ZodString>;
@@ -19,7 +22,6 @@ export declare const findByTagsProfileResponseSchema: z.ZodObject<{
19
22
  residenceLocationId: z.ZodNullable<z.ZodString>;
20
23
  isInTrash: z.ZodBoolean;
21
24
  movedToTrashDate: z.ZodNullable<z.ZodDate>;
22
- firstTimeMiExpo: z.ZodBoolean;
23
25
  created_at: z.ZodDate;
24
26
  updated_at: z.ZodDate;
25
27
  }, {
@@ -71,6 +73,8 @@ export declare const findByTagsProfileResponseSchema: z.ZodObject<{
71
73
  }>, "many">;
72
74
  }>, "strip", z.ZodTypeAny, {
73
75
  id: string;
76
+ username: string | null;
77
+ password: string | null;
74
78
  phoneNumber: string;
75
79
  secondaryPhoneNumber: string | null;
76
80
  fullName: string;
@@ -104,6 +108,8 @@ export declare const findByTagsProfileResponseSchema: z.ZodObject<{
104
108
  }[];
105
109
  }, {
106
110
  id: string;
111
+ username: string | null;
112
+ password: string | null;
107
113
  phoneNumber: string;
108
114
  secondaryPhoneNumber: string | null;
109
115
  fullName: string;
@@ -139,6 +145,8 @@ export declare const findByTagsProfileResponseSchema: z.ZodObject<{
139
145
  }, "strip", z.ZodTypeAny, {
140
146
  profiles: {
141
147
  id: string;
148
+ username: string | null;
149
+ password: string | null;
142
150
  phoneNumber: string;
143
151
  secondaryPhoneNumber: string | null;
144
152
  fullName: string;
@@ -174,6 +182,8 @@ export declare const findByTagsProfileResponseSchema: z.ZodObject<{
174
182
  }, {
175
183
  profiles: {
176
184
  id: string;
185
+ username: string | null;
186
+ password: string | null;
177
187
  phoneNumber: string;
178
188
  secondaryPhoneNumber: string | null;
179
189
  fullName: string;
@@ -211,9 +221,12 @@ declare const FindByTagsProfileResponseDto_base: import("@anatine/zod-nestjs").Z
211
221
  profiles: z.ZodArray<z.ZodObject<{
212
222
  id: z.ZodString;
213
223
  shortId: z.ZodNumber;
214
- phoneNumber: z.ZodEffects<z.ZodString, string, string>;
224
+ firstTimeMiExpo: z.ZodBoolean;
225
+ username: z.ZodNullable<z.ZodString>;
226
+ password: z.ZodNullable<z.ZodString>;
227
+ phoneNumber: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
215
228
  isPhoneVerified: z.ZodBoolean;
216
- secondaryPhoneNumber: z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>;
229
+ secondaryPhoneNumber: z.ZodEffects<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>, string | null, string | null>;
217
230
  fullName: z.ZodString;
218
231
  firstName: z.ZodNullable<z.ZodString>;
219
232
  gender: z.ZodNullable<z.ZodString>;
@@ -227,7 +240,6 @@ declare const FindByTagsProfileResponseDto_base: import("@anatine/zod-nestjs").Z
227
240
  residenceLocationId: z.ZodNullable<z.ZodString>;
228
241
  isInTrash: z.ZodBoolean;
229
242
  movedToTrashDate: z.ZodNullable<z.ZodString>;
230
- firstTimeMiExpo: z.ZodBoolean;
231
243
  created_at: z.ZodString;
232
244
  updated_at: z.ZodString;
233
245
  tags: z.ZodArray<z.ZodObject<{
@@ -272,6 +284,8 @@ declare const FindByTagsProfileResponseDto_base: import("@anatine/zod-nestjs").Z
272
284
  }>, "many">;
273
285
  }, z.UnknownKeysParam, z.ZodTypeAny, {
274
286
  id: string;
287
+ username: string | null;
288
+ password: string | null;
275
289
  phoneNumber: string;
276
290
  secondaryPhoneNumber: string | null;
277
291
  fullName: string;
@@ -305,6 +319,8 @@ declare const FindByTagsProfileResponseDto_base: import("@anatine/zod-nestjs").Z
305
319
  }[];
306
320
  }, {
307
321
  id: string;
322
+ username: string | null;
323
+ password: string | null;
308
324
  phoneNumber: string;
309
325
  secondaryPhoneNumber: string | null;
310
326
  fullName: string;
@@ -340,6 +356,8 @@ declare const FindByTagsProfileResponseDto_base: import("@anatine/zod-nestjs").Z
340
356
  }, z.UnknownKeysParam, z.ZodTypeAny, {
341
357
  profiles: {
342
358
  id: string;
359
+ username: string | null;
360
+ password: string | null;
343
361
  phoneNumber: string;
344
362
  secondaryPhoneNumber: string | null;
345
363
  fullName: string;
@@ -375,6 +393,8 @@ declare const FindByTagsProfileResponseDto_base: import("@anatine/zod-nestjs").Z
375
393
  }, {
376
394
  profiles: {
377
395
  id: string;
396
+ username: string | null;
397
+ password: string | null;
378
398
  phoneNumber: string;
379
399
  secondaryPhoneNumber: string | null;
380
400
  fullName: string;
@@ -3,9 +3,12 @@ export declare const findTrashResponseSchema: z.ZodObject<{
3
3
  profiles: z.ZodArray<z.ZodObject<Pick<{
4
4
  id: z.ZodString;
5
5
  shortId: z.ZodNumber;
6
- phoneNumber: z.ZodEffects<z.ZodString, string, string>;
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>;
7
10
  isPhoneVerified: z.ZodBoolean;
8
- secondaryPhoneNumber: z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>;
11
+ secondaryPhoneNumber: z.ZodEffects<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>, string | null, string | null>;
9
12
  fullName: z.ZodString;
10
13
  firstName: z.ZodNullable<z.ZodString>;
11
14
  gender: z.ZodNullable<z.ZodString>;
@@ -19,7 +22,6 @@ export declare const findTrashResponseSchema: z.ZodObject<{
19
22
  residenceLocationId: z.ZodNullable<z.ZodString>;
20
23
  isInTrash: z.ZodBoolean;
21
24
  movedToTrashDate: z.ZodNullable<z.ZodDate>;
22
- firstTimeMiExpo: z.ZodBoolean;
23
25
  created_at: z.ZodDate;
24
26
  updated_at: z.ZodDate;
25
27
  }, "id" | "phoneNumber" | "fullName" | "profilePictureUrl" | "created_at" | "isInTrash" | "movedToTrashDate">, "strip", z.ZodTypeAny, {
@@ -63,7 +65,7 @@ export declare const findTrashResponseSchema: z.ZodObject<{
63
65
  declare const FindTrashResponseDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.ZodObject<{
64
66
  profiles: z.ZodArray<z.ZodObject<{
65
67
  id: z.ZodString;
66
- phoneNumber: z.ZodEffects<z.ZodString, string, string>;
68
+ phoneNumber: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
67
69
  fullName: z.ZodString;
68
70
  profilePictureUrl: z.ZodNullable<z.ZodString>;
69
71
  created_at: z.ZodString;
@@ -3,9 +3,12 @@ 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
- phoneNumber: z.ZodEffects<z.ZodString, string, string>;
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>;
7
10
  isPhoneVerified: z.ZodBoolean;
8
- secondaryPhoneNumber: z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>;
11
+ secondaryPhoneNumber: z.ZodEffects<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>, string | null, string | null>;
9
12
  fullName: z.ZodString;
10
13
  firstName: z.ZodNullable<z.ZodString>;
11
14
  gender: z.ZodNullable<z.ZodString>;
@@ -19,7 +22,6 @@ export declare const findWithActiveChatResponseSchema: z.ZodObject<{
19
22
  residenceLocationId: z.ZodNullable<z.ZodString>;
20
23
  isInTrash: z.ZodBoolean;
21
24
  movedToTrashDate: z.ZodNullable<z.ZodDate>;
22
- firstTimeMiExpo: z.ZodBoolean;
23
25
  created_at: z.ZodDate;
24
26
  updated_at: z.ZodDate;
25
27
  }, {
@@ -161,6 +163,8 @@ export declare const findWithActiveChatResponseSchema: z.ZodObject<{
161
163
  }>, "many">;
162
164
  }>, "strip", z.ZodTypeAny, {
163
165
  id: string;
166
+ username: string | null;
167
+ password: string | null;
164
168
  phoneNumber: string;
165
169
  secondaryPhoneNumber: string | null;
166
170
  fullName: string;
@@ -213,6 +217,8 @@ export declare const findWithActiveChatResponseSchema: z.ZodObject<{
213
217
  inChat: boolean;
214
218
  }, {
215
219
  id: string;
220
+ username: string | null;
221
+ password: string | null;
216
222
  phoneNumber: string;
217
223
  secondaryPhoneNumber: string | null;
218
224
  fullName: string;
@@ -267,6 +273,8 @@ export declare const findWithActiveChatResponseSchema: z.ZodObject<{
267
273
  }, "strip", z.ZodTypeAny, {
268
274
  profiles: {
269
275
  id: string;
276
+ username: string | null;
277
+ password: string | null;
270
278
  phoneNumber: string;
271
279
  secondaryPhoneNumber: string | null;
272
280
  fullName: string;
@@ -321,6 +329,8 @@ export declare const findWithActiveChatResponseSchema: z.ZodObject<{
321
329
  }, {
322
330
  profiles: {
323
331
  id: string;
332
+ username: string | null;
333
+ password: string | null;
324
334
  phoneNumber: string;
325
335
  secondaryPhoneNumber: string | null;
326
336
  fullName: string;
@@ -377,9 +387,12 @@ declare const FindWithActiveChatResponseDto_base: import("@anatine/zod-nestjs").
377
387
  profiles: z.ZodArray<z.ZodObject<{
378
388
  id: z.ZodString;
379
389
  shortId: z.ZodNumber;
380
- phoneNumber: z.ZodEffects<z.ZodString, string, string>;
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>;
381
394
  isPhoneVerified: z.ZodBoolean;
382
- secondaryPhoneNumber: z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>;
395
+ secondaryPhoneNumber: z.ZodEffects<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>, string | null, string | null>;
383
396
  fullName: z.ZodString;
384
397
  firstName: z.ZodNullable<z.ZodString>;
385
398
  gender: z.ZodNullable<z.ZodString>;
@@ -393,7 +406,6 @@ declare const FindWithActiveChatResponseDto_base: import("@anatine/zod-nestjs").
393
406
  residenceLocationId: z.ZodNullable<z.ZodString>;
394
407
  isInTrash: z.ZodBoolean;
395
408
  movedToTrashDate: z.ZodNullable<z.ZodString>;
396
- firstTimeMiExpo: z.ZodBoolean;
397
409
  created_at: z.ZodString;
398
410
  updated_at: z.ZodString;
399
411
  tags: z.ZodArray<z.ZodObject<{
@@ -531,6 +543,8 @@ declare const FindWithActiveChatResponseDto_base: import("@anatine/zod-nestjs").
531
543
  }>, "many">;
532
544
  }, z.UnknownKeysParam, z.ZodTypeAny, {
533
545
  id: string;
546
+ username: string | null;
547
+ password: string | null;
534
548
  phoneNumber: string;
535
549
  secondaryPhoneNumber: string | null;
536
550
  fullName: string;
@@ -583,6 +597,8 @@ declare const FindWithActiveChatResponseDto_base: import("@anatine/zod-nestjs").
583
597
  inChat: boolean;
584
598
  }, {
585
599
  id: string;
600
+ username: string | null;
601
+ password: string | null;
586
602
  phoneNumber: string;
587
603
  secondaryPhoneNumber: string | null;
588
604
  fullName: string;
@@ -637,6 +653,8 @@ declare const FindWithActiveChatResponseDto_base: import("@anatine/zod-nestjs").
637
653
  }, z.UnknownKeysParam, z.ZodTypeAny, {
638
654
  profiles: {
639
655
  id: string;
656
+ username: string | null;
657
+ password: string | null;
640
658
  phoneNumber: string;
641
659
  secondaryPhoneNumber: string | null;
642
660
  fullName: string;
@@ -691,6 +709,8 @@ declare const FindWithActiveChatResponseDto_base: import("@anatine/zod-nestjs").
691
709
  }, {
692
710
  profiles: {
693
711
  id: string;
712
+ username: string | null;
713
+ password: string | null;
694
714
  phoneNumber: string;
695
715
  secondaryPhoneNumber: string | null;
696
716
  fullName: string;
@@ -2,9 +2,12 @@ import z from 'zod';
2
2
  export declare const profileSchema: z.ZodObject<{
3
3
  id: z.ZodString;
4
4
  shortId: z.ZodNumber;
5
- phoneNumber: z.ZodEffects<z.ZodString, string, string>;
5
+ firstTimeMiExpo: z.ZodBoolean;
6
+ username: z.ZodNullable<z.ZodString>;
7
+ password: z.ZodNullable<z.ZodString>;
8
+ phoneNumber: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
6
9
  isPhoneVerified: z.ZodBoolean;
7
- secondaryPhoneNumber: z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>;
10
+ secondaryPhoneNumber: z.ZodEffects<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>, string | null, string | null>;
8
11
  fullName: z.ZodString;
9
12
  firstName: z.ZodNullable<z.ZodString>;
10
13
  gender: z.ZodNullable<z.ZodString>;
@@ -18,11 +21,12 @@ export declare const profileSchema: z.ZodObject<{
18
21
  residenceLocationId: z.ZodNullable<z.ZodString>;
19
22
  isInTrash: z.ZodBoolean;
20
23
  movedToTrashDate: z.ZodNullable<z.ZodDate>;
21
- firstTimeMiExpo: z.ZodBoolean;
22
24
  created_at: z.ZodDate;
23
25
  updated_at: z.ZodDate;
24
26
  }, "strip", z.ZodTypeAny, {
25
27
  id: string;
28
+ username: string | null;
29
+ password: string | null;
26
30
  phoneNumber: string;
27
31
  secondaryPhoneNumber: string | null;
28
32
  fullName: string;
@@ -45,6 +49,8 @@ export declare const profileSchema: z.ZodObject<{
45
49
  movedToTrashDate: Date | null;
46
50
  }, {
47
51
  id: string;
52
+ username: string | null;
53
+ password: string | null;
48
54
  phoneNumber: string;
49
55
  secondaryPhoneNumber: string | null;
50
56
  fullName: string;
@@ -1,24 +1,75 @@
1
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
27
  };
5
28
  Object.defineProperty(exports, "__esModule", { value: true });
6
29
  exports.profileSchema = void 0;
7
30
  const translate_1 = require("../../i18n/translate");
8
- const validator_1 = __importDefault(require("validator"));
31
+ const libphonenumber_js_1 = __importStar(require("libphonenumber-js"));
9
32
  const zod_1 = __importDefault(require("zod"));
33
+ function formatArgNumber(phoneNumber, value) {
34
+ const prefixes9 = ['11', '15'];
35
+ const prefix = prefixes9.includes(phoneNumber?.nationalNumber?.slice(0, 2) ?? '')
36
+ ? '9'
37
+ : '';
38
+ if (phoneNumber?.country === 'AR') {
39
+ return `${phoneNumber.countryCallingCode}${prefix}${phoneNumber.nationalNumber}`;
40
+ }
41
+ return value;
42
+ }
10
43
  exports.profileSchema = zod_1.default.object({
11
44
  id: zod_1.default.string().uuid({
12
45
  message: (0, translate_1.translate)('model.profile.id.uuid'),
13
46
  }),
14
47
  shortId: zod_1.default.number(),
48
+ firstTimeMiExpo: zod_1.default.boolean(),
49
+ username: zod_1.default.string().nullable(),
50
+ password: zod_1.default.string().nullable(),
15
51
  phoneNumber: zod_1.default
16
52
  .string()
17
53
  .min(1, {
18
54
  message: (0, translate_1.translate)('model.profile.phoneNumber.required'),
19
55
  })
20
- .refine(validator_1.default.isMobilePhone, {
56
+ .refine((value) => (0, libphonenumber_js_1.isValidPhoneNumber)(value, 'AR'), {
21
57
  message: (0, translate_1.translate)('model.profile.phoneNumber.invalid'),
58
+ })
59
+ .transform((value, ctx) => {
60
+ if (!value)
61
+ return value;
62
+ const phoneNumber = (0, libphonenumber_js_1.default)(value, {
63
+ defaultCountry: 'AR',
64
+ });
65
+ if (!phoneNumber) {
66
+ ctx.addIssue({
67
+ code: zod_1.default.ZodIssueCode.custom,
68
+ message: (0, translate_1.translate)('model.profile.phoneNumber.invalid'),
69
+ });
70
+ return value;
71
+ }
72
+ return formatArgNumber(phoneNumber, value);
22
73
  }),
23
74
  isPhoneVerified: zod_1.default.boolean(),
24
75
  secondaryPhoneNumber: zod_1.default
@@ -27,9 +78,24 @@ exports.profileSchema = zod_1.default.object({
27
78
  .refine((value) => {
28
79
  if (value === null)
29
80
  return true;
30
- return validator_1.default.isMobilePhone(value);
81
+ return (0, libphonenumber_js_1.isValidPhoneNumber)(value, 'AR');
31
82
  }, {
32
83
  message: (0, translate_1.translate)('model.profile.secondaryPhoneNumber.invalid'),
84
+ })
85
+ .transform((value, ctx) => {
86
+ if (!value)
87
+ return value;
88
+ const phoneNumber = (0, libphonenumber_js_1.default)(value, {
89
+ defaultCountry: 'AR',
90
+ });
91
+ if (!phoneNumber) {
92
+ ctx.addIssue({
93
+ code: zod_1.default.ZodIssueCode.custom,
94
+ message: (0, translate_1.translate)('model.profile.phoneNumber.invalid'),
95
+ });
96
+ return value;
97
+ }
98
+ return formatArgNumber(phoneNumber, value);
33
99
  }),
34
100
  fullName: zod_1.default.string().min(1, {
35
101
  message: (0, translate_1.translate)('model.profile.fullName.required'),
@@ -61,7 +127,6 @@ exports.profileSchema = zod_1.default.object({
61
127
  residenceLocationId: zod_1.default.string().uuid().nullable(),
62
128
  isInTrash: zod_1.default.boolean(),
63
129
  movedToTrashDate: zod_1.default.coerce.date().nullable(),
64
- firstTimeMiExpo: zod_1.default.boolean(),
65
130
  created_at: zod_1.default.date(),
66
131
  updated_at: zod_1.default.date(),
67
132
  });
@@ -1,7 +1,7 @@
1
1
  import z from 'zod';
2
2
  export declare const updateProfileSchema: z.ZodObject<z.objectUtil.extendShape<{
3
- phoneNumber: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4
- secondaryPhoneNumber: z.ZodOptional<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>>;
3
+ phoneNumber: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
4
+ secondaryPhoneNumber: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>, string | null, string | null>>;
5
5
  fullName: z.ZodOptional<z.ZodString>;
6
6
  profilePictureUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7
7
  mail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -116,8 +116,8 @@ export declare const updateProfileSchema: z.ZodObject<z.objectUtil.extendShape<{
116
116
  } | undefined;
117
117
  }>;
118
118
  declare const UpdateProfileDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.ZodObject<{
119
- phoneNumber: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
120
- secondaryPhoneNumber: z.ZodOptional<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>>;
119
+ phoneNumber: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
120
+ secondaryPhoneNumber: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>, string | null, string | null>>;
121
121
  fullName: z.ZodOptional<z.ZodString>;
122
122
  profilePictureUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
123
123
  mail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -229,9 +229,12 @@ export declare class UpdateProfileDto extends UpdateProfileDto_base {
229
229
  export declare const updateProfileResponseSchema: z.ZodObject<{
230
230
  id: z.ZodString;
231
231
  shortId: z.ZodNumber;
232
- phoneNumber: z.ZodEffects<z.ZodString, string, string>;
232
+ firstTimeMiExpo: z.ZodBoolean;
233
+ username: z.ZodNullable<z.ZodString>;
234
+ password: z.ZodNullable<z.ZodString>;
235
+ phoneNumber: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
233
236
  isPhoneVerified: z.ZodBoolean;
234
- secondaryPhoneNumber: z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>;
237
+ secondaryPhoneNumber: z.ZodEffects<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>, string | null, string | null>;
235
238
  fullName: z.ZodString;
236
239
  firstName: z.ZodNullable<z.ZodString>;
237
240
  gender: z.ZodNullable<z.ZodString>;
@@ -245,11 +248,12 @@ export declare const updateProfileResponseSchema: z.ZodObject<{
245
248
  residenceLocationId: z.ZodNullable<z.ZodString>;
246
249
  isInTrash: z.ZodBoolean;
247
250
  movedToTrashDate: z.ZodNullable<z.ZodDate>;
248
- firstTimeMiExpo: z.ZodBoolean;
249
251
  created_at: z.ZodDate;
250
252
  updated_at: z.ZodDate;
251
253
  }, "strip", z.ZodTypeAny, {
252
254
  id: string;
255
+ username: string | null;
256
+ password: string | null;
253
257
  phoneNumber: string;
254
258
  secondaryPhoneNumber: string | null;
255
259
  fullName: string;
@@ -272,6 +276,8 @@ export declare const updateProfileResponseSchema: z.ZodObject<{
272
276
  movedToTrashDate: Date | null;
273
277
  }, {
274
278
  id: string;
279
+ username: string | null;
280
+ password: string | null;
275
281
  phoneNumber: string;
276
282
  secondaryPhoneNumber: string | null;
277
283
  fullName: string;
@@ -296,9 +302,12 @@ export declare const updateProfileResponseSchema: z.ZodObject<{
296
302
  declare const UpdateProfileResponseDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.ZodObject<{
297
303
  id: z.ZodString;
298
304
  shortId: z.ZodNumber;
299
- phoneNumber: z.ZodEffects<z.ZodString, string, string>;
305
+ firstTimeMiExpo: z.ZodBoolean;
306
+ username: z.ZodNullable<z.ZodString>;
307
+ password: z.ZodNullable<z.ZodString>;
308
+ phoneNumber: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
300
309
  isPhoneVerified: z.ZodBoolean;
301
- secondaryPhoneNumber: z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>;
310
+ secondaryPhoneNumber: z.ZodEffects<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>, string | null, string | null>;
302
311
  fullName: z.ZodString;
303
312
  firstName: z.ZodNullable<z.ZodString>;
304
313
  gender: z.ZodNullable<z.ZodString>;
@@ -312,11 +321,12 @@ declare const UpdateProfileResponseDto_base: import("@anatine/zod-nestjs").ZodDt
312
321
  residenceLocationId: z.ZodNullable<z.ZodString>;
313
322
  isInTrash: z.ZodBoolean;
314
323
  movedToTrashDate: z.ZodNullable<z.ZodString>;
315
- firstTimeMiExpo: z.ZodBoolean;
316
324
  created_at: z.ZodString;
317
325
  updated_at: z.ZodString;
318
326
  }, z.UnknownKeysParam, z.ZodTypeAny, {
319
327
  id: string;
328
+ username: string | null;
329
+ password: string | null;
320
330
  phoneNumber: string;
321
331
  secondaryPhoneNumber: string | null;
322
332
  fullName: string;
@@ -339,6 +349,8 @@ declare const UpdateProfileResponseDto_base: import("@anatine/zod-nestjs").ZodDt
339
349
  movedToTrashDate: string | null;
340
350
  }, {
341
351
  id: string;
352
+ username: string | null;
353
+ password: string | null;
342
354
  phoneNumber: string;
343
355
  secondaryPhoneNumber: string | null;
344
356
  fullName: string;
@@ -25,9 +25,12 @@ export declare const massiveAllocationResponseSchema: z.ZodObject<{
25
25
  profiles: z.ZodArray<z.ZodObject<{
26
26
  id: z.ZodString;
27
27
  shortId: z.ZodNumber;
28
- phoneNumber: z.ZodEffects<z.ZodString, string, string>;
28
+ firstTimeMiExpo: z.ZodBoolean;
29
+ username: z.ZodNullable<z.ZodString>;
30
+ password: z.ZodNullable<z.ZodString>;
31
+ phoneNumber: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
29
32
  isPhoneVerified: z.ZodBoolean;
30
- secondaryPhoneNumber: z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>;
33
+ secondaryPhoneNumber: z.ZodEffects<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>, string | null, string | null>;
31
34
  fullName: z.ZodString;
32
35
  firstName: z.ZodNullable<z.ZodString>;
33
36
  gender: z.ZodNullable<z.ZodString>;
@@ -41,11 +44,12 @@ export declare const massiveAllocationResponseSchema: z.ZodObject<{
41
44
  residenceLocationId: z.ZodNullable<z.ZodString>;
42
45
  isInTrash: z.ZodBoolean;
43
46
  movedToTrashDate: z.ZodNullable<z.ZodDate>;
44
- firstTimeMiExpo: z.ZodBoolean;
45
47
  created_at: z.ZodDate;
46
48
  updated_at: z.ZodDate;
47
49
  }, "strip", z.ZodTypeAny, {
48
50
  id: string;
51
+ username: string | null;
52
+ password: string | null;
49
53
  phoneNumber: string;
50
54
  secondaryPhoneNumber: string | null;
51
55
  fullName: string;
@@ -68,6 +72,8 @@ export declare const massiveAllocationResponseSchema: z.ZodObject<{
68
72
  movedToTrashDate: Date | null;
69
73
  }, {
70
74
  id: string;
75
+ username: string | null;
76
+ password: string | null;
71
77
  phoneNumber: string;
72
78
  secondaryPhoneNumber: string | null;
73
79
  fullName: string;
@@ -92,6 +98,8 @@ export declare const massiveAllocationResponseSchema: z.ZodObject<{
92
98
  }, "strip", z.ZodTypeAny, {
93
99
  profiles: {
94
100
  id: string;
101
+ username: string | null;
102
+ password: string | null;
95
103
  phoneNumber: string;
96
104
  secondaryPhoneNumber: string | null;
97
105
  fullName: string;
@@ -116,6 +124,8 @@ export declare const massiveAllocationResponseSchema: z.ZodObject<{
116
124
  }, {
117
125
  profiles: {
118
126
  id: string;
127
+ username: string | null;
128
+ password: string | null;
119
129
  phoneNumber: string;
120
130
  secondaryPhoneNumber: string | null;
121
131
  fullName: string;
@@ -142,9 +152,12 @@ declare const MassiveAllocationResponseDto_base: import("@anatine/zod-nestjs").Z
142
152
  profiles: z.ZodArray<z.ZodObject<{
143
153
  id: z.ZodString;
144
154
  shortId: z.ZodNumber;
145
- phoneNumber: z.ZodEffects<z.ZodString, string, string>;
155
+ firstTimeMiExpo: z.ZodBoolean;
156
+ username: z.ZodNullable<z.ZodString>;
157
+ password: z.ZodNullable<z.ZodString>;
158
+ phoneNumber: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
146
159
  isPhoneVerified: z.ZodBoolean;
147
- secondaryPhoneNumber: z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>;
160
+ secondaryPhoneNumber: z.ZodEffects<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>, string | null, string | null>;
148
161
  fullName: z.ZodString;
149
162
  firstName: z.ZodNullable<z.ZodString>;
150
163
  gender: z.ZodNullable<z.ZodString>;
@@ -158,11 +171,12 @@ declare const MassiveAllocationResponseDto_base: import("@anatine/zod-nestjs").Z
158
171
  residenceLocationId: z.ZodNullable<z.ZodString>;
159
172
  isInTrash: z.ZodBoolean;
160
173
  movedToTrashDate: z.ZodNullable<z.ZodString>;
161
- firstTimeMiExpo: z.ZodBoolean;
162
174
  created_at: z.ZodString;
163
175
  updated_at: z.ZodString;
164
176
  }, z.UnknownKeysParam, z.ZodTypeAny, {
165
177
  id: string;
178
+ username: string | null;
179
+ password: string | null;
166
180
  phoneNumber: string;
167
181
  secondaryPhoneNumber: string | null;
168
182
  fullName: string;
@@ -185,6 +199,8 @@ declare const MassiveAllocationResponseDto_base: import("@anatine/zod-nestjs").Z
185
199
  movedToTrashDate: string | null;
186
200
  }, {
187
201
  id: string;
202
+ username: string | null;
203
+ password: string | null;
188
204
  phoneNumber: string;
189
205
  secondaryPhoneNumber: string | null;
190
206
  fullName: string;
@@ -209,6 +225,8 @@ declare const MassiveAllocationResponseDto_base: import("@anatine/zod-nestjs").Z
209
225
  }, z.UnknownKeysParam, z.ZodTypeAny, {
210
226
  profiles: {
211
227
  id: string;
228
+ username: string | null;
229
+ password: string | null;
212
230
  phoneNumber: string;
213
231
  secondaryPhoneNumber: string | null;
214
232
  fullName: string;
@@ -233,6 +251,8 @@ declare const MassiveAllocationResponseDto_base: import("@anatine/zod-nestjs").Z
233
251
  }, {
234
252
  profiles: {
235
253
  id: string;
254
+ username: string | null;
255
+ password: string | null;
236
256
  phoneNumber: string;
237
257
  secondaryPhoneNumber: string | null;
238
258
  fullName: string;