expo-backend-types 0.30.0-EXPO-308-auth.11 → 0.30.0-EXPO-308-auth.12
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.
- package/dist/src/auth/dto/login-mi-expo.dto.js +2 -2
- package/dist/src/exports.d.ts +1 -0
- package/dist/src/exports.js +1 -0
- package/dist/src/message/dto/non-read-messages.dto.js +2 -2
- package/dist/src/message/dto/send-message-to-phone.dto.js +2 -2
- package/dist/src/otp/dto/send-otp.dto.js +2 -2
- package/dist/src/otp/dto/verify-otp.dto.js +3 -3
- package/dist/src/prisma/dtos.dto.d.ts +74 -0
- package/dist/src/prisma/dtos.dto.js +133 -0
- package/dist/src/profile/dto/create-profile.dto.js +4 -4
- package/dist/src/profile/dto/delete-profile.dto.js +2 -2
- package/dist/src/profile/dto/find-all-profile.dto.js +2 -2
- package/dist/src/profile/dto/find-by-date-range-profile.dto.js +3 -3
- package/dist/src/profile/dto/find-by-id-profile.dto.js +2 -2
- package/dist/src/profile/dto/find-by-phone-number.dto.js +2 -2
- package/dist/src/profile/dto/find-by-tag-groups-profile.dto.js +2 -2
- package/dist/src/profile/dto/find-by-tags-profile.dto.js +2 -2
- package/dist/src/profile/dto/find-trash.dto.js +2 -2
- package/dist/src/profile/dto/find-with-active-chat.dto.js +2 -2
- package/dist/src/profile/dto/profile.dto.d.ts +25 -99
- package/dist/src/profile/dto/profile.dto.js +3 -131
- package/dist/src/profile/dto/update-profile.dto.js +3 -3
- package/dist/src/tag/dto/massive-allocation.dto.js +3 -3
- package/dist/src/tag/dto/massive-deallocation.dto.js +3 -3
- package/package.json +23 -21
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.LoginMiExpoResponseDto = exports.loginMiExpoResponseSchema = exports.LoginMiExpoDto = exports.loginMiExpoSchema = void 0;
|
7
7
|
const account_dto_1 = require("../../account/dto/account.dto");
|
8
|
-
const
|
8
|
+
const dtos_dto_1 = require("../../prisma/dtos.dto");
|
9
9
|
const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
|
10
10
|
const zod_1 = __importDefault(require("zod"));
|
11
11
|
exports.loginMiExpoSchema = account_dto_1.accountSchema.pick({
|
@@ -16,7 +16,7 @@ class LoginMiExpoDto extends (0, create_zod_dto_without_date_1.createZodDtoWitho
|
|
16
16
|
}
|
17
17
|
exports.LoginMiExpoDto = LoginMiExpoDto;
|
18
18
|
exports.loginMiExpoResponseSchema = zod_1.default.object({
|
19
|
-
user:
|
19
|
+
user: dtos_dto_1.profileSchema.omit({
|
20
20
|
password: true,
|
21
21
|
}),
|
22
22
|
backendTokens: zod_1.default.object({
|
package/dist/src/exports.d.ts
CHANGED
@@ -7,6 +7,7 @@ export * from './event/exports';
|
|
7
7
|
export * from './location/exports';
|
8
8
|
export * from './message/exports';
|
9
9
|
export * from './otp/exports';
|
10
|
+
export * from './prisma/dtos.dto';
|
10
11
|
export * from './profile/exports';
|
11
12
|
export * from './shared/dto-modification/zod-without-dates';
|
12
13
|
export * from './tag-group/exports';
|
package/dist/src/exports.js
CHANGED
@@ -23,6 +23,7 @@ __exportStar(require("./event/exports"), exports);
|
|
23
23
|
__exportStar(require("./location/exports"), exports);
|
24
24
|
__exportStar(require("./message/exports"), exports);
|
25
25
|
__exportStar(require("./otp/exports"), exports);
|
26
|
+
__exportStar(require("./prisma/dtos.dto"), exports);
|
26
27
|
__exportStar(require("./profile/exports"), exports);
|
27
28
|
__exportStar(require("./shared/dto-modification/zod-without-dates"), exports);
|
28
29
|
__exportStar(require("./tag-group/exports"), exports);
|
@@ -4,12 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.NonReadMessagesDto = exports.nonReadMessagesSchema = void 0;
|
7
|
-
const
|
7
|
+
const dtos_dto_1 = require("../../prisma/dtos.dto");
|
8
8
|
const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
|
9
9
|
const zod_1 = __importDefault(require("zod"));
|
10
10
|
exports.nonReadMessagesSchema = zod_1.default.object({
|
11
11
|
messages: zod_1.default.array(zod_1.default.object({
|
12
|
-
profilePhoneNumber:
|
12
|
+
profilePhoneNumber: dtos_dto_1.profileSchema.shape.phoneNumber,
|
13
13
|
_count: zod_1.default.object({
|
14
14
|
id: zod_1.default.number(),
|
15
15
|
}),
|
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.SendMessageToPhoneResponseDto = exports.sendMessageToPhoneResponseSchema = exports.SendMessageToPhoneDto = exports.sendMessageToPhoneSchema = void 0;
|
7
|
-
const
|
7
|
+
const dtos_dto_1 = require("../../prisma/dtos.dto");
|
8
8
|
const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
|
9
9
|
const zod_1 = __importDefault(require("zod"));
|
10
10
|
exports.sendMessageToPhoneSchema = zod_1.default.object({
|
11
|
-
phone:
|
11
|
+
phone: dtos_dto_1.profileSchema.shape.phoneNumber,
|
12
12
|
message: zod_1.default.string(),
|
13
13
|
});
|
14
14
|
class SendMessageToPhoneDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.sendMessageToPhoneSchema) {
|
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.SendOtpResponseDto = exports.sendOtpResponseSchema = exports.discriminatedResponseSchema = exports.SendOtpDto = exports.sendOtpSchema = void 0;
|
7
|
-
const
|
7
|
+
const dtos_dto_1 = require("../../prisma/dtos.dto");
|
8
8
|
const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
|
9
9
|
const zod_1 = __importDefault(require("zod"));
|
10
10
|
exports.sendOtpSchema = zod_1.default.object({
|
11
|
-
phoneNumber:
|
11
|
+
phoneNumber: dtos_dto_1.profileSchema.shape.phoneNumber,
|
12
12
|
});
|
13
13
|
class SendOtpDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.sendOtpSchema) {
|
14
14
|
}
|
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.VerifyOtpResponseDto = exports.verifyOtpResponseSchema = exports.VerifyOtpDto = exports.verifyOtpSchema = void 0;
|
7
7
|
const translate_1 = require("../../i18n/translate");
|
8
8
|
const constants_1 = require("../constants");
|
9
|
-
const
|
9
|
+
const dtos_dto_1 = require("../../prisma/dtos.dto");
|
10
10
|
const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
|
11
11
|
const zod_1 = __importDefault(require("zod"));
|
12
12
|
exports.verifyOtpSchema = zod_1.default.object({
|
13
|
-
phoneNumber:
|
13
|
+
phoneNumber: dtos_dto_1.profileSchema.shape.phoneNumber,
|
14
14
|
code: zod_1.default.string().length(constants_1.OTP_LENGTH, {
|
15
15
|
message: (0, translate_1.translate)('route.otp.verify.error-format'),
|
16
16
|
}),
|
@@ -20,7 +20,7 @@ class VerifyOtpDto extends (0, create_zod_dto_without_date_1.createZodDtoWithout
|
|
20
20
|
exports.VerifyOtpDto = VerifyOtpDto;
|
21
21
|
exports.verifyOtpResponseSchema = zod_1.default.object({
|
22
22
|
success: zod_1.default.boolean(),
|
23
|
-
profile:
|
23
|
+
profile: dtos_dto_1.profileSchema,
|
24
24
|
});
|
25
25
|
class VerifyOtpResponseDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.verifyOtpResponseSchema) {
|
26
26
|
}
|
@@ -0,0 +1,74 @@
|
|
1
|
+
import z from 'zod';
|
2
|
+
export declare const profileSchema: z.ZodObject<{
|
3
|
+
id: z.ZodString;
|
4
|
+
shortId: z.ZodNumber;
|
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>;
|
9
|
+
isPhoneVerified: z.ZodBoolean;
|
10
|
+
secondaryPhoneNumber: z.ZodEffects<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>, string | null, string | null>;
|
11
|
+
fullName: z.ZodString;
|
12
|
+
firstName: z.ZodNullable<z.ZodString>;
|
13
|
+
gender: z.ZodNullable<z.ZodString>;
|
14
|
+
birthDate: z.ZodNullable<z.ZodPipeline<z.ZodString, z.ZodDate>>;
|
15
|
+
profilePictureUrl: z.ZodNullable<z.ZodString>;
|
16
|
+
instagram: z.ZodNullable<z.ZodString>;
|
17
|
+
mail: z.ZodNullable<z.ZodString>;
|
18
|
+
dni: z.ZodNullable<z.ZodString>;
|
19
|
+
alternativeNames: z.ZodArray<z.ZodString, "many">;
|
20
|
+
birthLocationId: z.ZodNullable<z.ZodString>;
|
21
|
+
residenceLocationId: z.ZodNullable<z.ZodString>;
|
22
|
+
isInTrash: z.ZodBoolean;
|
23
|
+
movedToTrashDate: z.ZodNullable<z.ZodDate>;
|
24
|
+
created_at: z.ZodDate;
|
25
|
+
updated_at: z.ZodDate;
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
27
|
+
id: string;
|
28
|
+
username: string | null;
|
29
|
+
password: string | null;
|
30
|
+
phoneNumber: string;
|
31
|
+
secondaryPhoneNumber: string | null;
|
32
|
+
fullName: string;
|
33
|
+
profilePictureUrl: string | null;
|
34
|
+
mail: string | null;
|
35
|
+
created_at: Date;
|
36
|
+
updated_at: Date;
|
37
|
+
shortId: number;
|
38
|
+
firstTimeMiExpo: boolean;
|
39
|
+
isPhoneVerified: boolean;
|
40
|
+
firstName: string | null;
|
41
|
+
gender: string | null;
|
42
|
+
birthDate: Date | null;
|
43
|
+
instagram: string | null;
|
44
|
+
dni: string | null;
|
45
|
+
alternativeNames: string[];
|
46
|
+
birthLocationId: string | null;
|
47
|
+
residenceLocationId: string | null;
|
48
|
+
isInTrash: boolean;
|
49
|
+
movedToTrashDate: Date | null;
|
50
|
+
}, {
|
51
|
+
id: string;
|
52
|
+
username: string | null;
|
53
|
+
password: string | null;
|
54
|
+
phoneNumber: string;
|
55
|
+
secondaryPhoneNumber: string | null;
|
56
|
+
fullName: string;
|
57
|
+
profilePictureUrl: string | null;
|
58
|
+
mail: string | null;
|
59
|
+
created_at: Date;
|
60
|
+
updated_at: Date;
|
61
|
+
shortId: number;
|
62
|
+
firstTimeMiExpo: boolean;
|
63
|
+
isPhoneVerified: boolean;
|
64
|
+
firstName: string | null;
|
65
|
+
gender: string | null;
|
66
|
+
birthDate: string | null;
|
67
|
+
instagram: string | null;
|
68
|
+
dni: string | null;
|
69
|
+
alternativeNames: string[];
|
70
|
+
birthLocationId: string | null;
|
71
|
+
residenceLocationId: string | null;
|
72
|
+
isInTrash: boolean;
|
73
|
+
movedToTrashDate: Date | null;
|
74
|
+
}>;
|
@@ -0,0 +1,133 @@
|
|
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
|
+
};
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
27
|
+
};
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
+
exports.profileSchema = void 0;
|
30
|
+
const translate_1 = require("../i18n/translate");
|
31
|
+
const libphonenumber_js_1 = __importStar(require("libphonenumber-js"));
|
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
|
+
}
|
43
|
+
exports.profileSchema = zod_1.default.object({
|
44
|
+
id: zod_1.default.string().uuid({
|
45
|
+
message: (0, translate_1.translate)('model.profile.id.uuid'),
|
46
|
+
}),
|
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(),
|
51
|
+
phoneNumber: zod_1.default
|
52
|
+
.string()
|
53
|
+
.min(1, {
|
54
|
+
message: (0, translate_1.translate)('model.profile.phoneNumber.required'),
|
55
|
+
})
|
56
|
+
.refine((value) => (0, libphonenumber_js_1.isValidPhoneNumber)(value, 'AR'), {
|
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);
|
73
|
+
}),
|
74
|
+
isPhoneVerified: zod_1.default.boolean(),
|
75
|
+
secondaryPhoneNumber: zod_1.default
|
76
|
+
.string()
|
77
|
+
.nullable()
|
78
|
+
.refine((value) => {
|
79
|
+
if (value === null)
|
80
|
+
return true;
|
81
|
+
return (0, libphonenumber_js_1.isValidPhoneNumber)(value, 'AR');
|
82
|
+
}, {
|
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);
|
99
|
+
}),
|
100
|
+
fullName: zod_1.default.string().min(1, {
|
101
|
+
message: (0, translate_1.translate)('model.profile.fullName.required'),
|
102
|
+
}),
|
103
|
+
firstName: zod_1.default
|
104
|
+
.string()
|
105
|
+
.min(1, {
|
106
|
+
message: (0, translate_1.translate)('model.profile.fullName.required'),
|
107
|
+
})
|
108
|
+
.nullable(),
|
109
|
+
gender: zod_1.default.string().nullable(),
|
110
|
+
birthDate: zod_1.default.string().pipe(zod_1.default.coerce.date()).nullable(),
|
111
|
+
profilePictureUrl: zod_1.default
|
112
|
+
.string()
|
113
|
+
.url({
|
114
|
+
message: (0, translate_1.translate)('model.profile.profilePictureUrl.invalid'),
|
115
|
+
})
|
116
|
+
.nullable(),
|
117
|
+
instagram: zod_1.default.string().nullable(),
|
118
|
+
mail: zod_1.default
|
119
|
+
.string()
|
120
|
+
.email({
|
121
|
+
message: (0, translate_1.translate)('model.profile.mail.invalid'),
|
122
|
+
})
|
123
|
+
.nullable(),
|
124
|
+
dni: zod_1.default.string().nullable(),
|
125
|
+
alternativeNames: zod_1.default.array(zod_1.default.string()),
|
126
|
+
birthLocationId: zod_1.default.string().uuid().nullable(),
|
127
|
+
residenceLocationId: zod_1.default.string().uuid().nullable(),
|
128
|
+
isInTrash: zod_1.default.boolean(),
|
129
|
+
movedToTrashDate: zod_1.default.coerce.date().nullable(),
|
130
|
+
created_at: zod_1.default.date(),
|
131
|
+
updated_at: zod_1.default.date(),
|
132
|
+
});
|
133
|
+
//# sourceMappingURL=dtos.dto.js.map
|
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CreateProfileResponseDto = exports.createProfileResponseSchema = exports.CreateProfileDto = exports.createProfileSchema = void 0;
|
7
7
|
const comment_dto_1 = require("../../comment/dto/comment.dto");
|
8
8
|
const location_dto_1 = require("../../location/dto/location.dto");
|
9
|
-
const
|
9
|
+
const dtos_dto_1 = require("../../prisma/dtos.dto");
|
10
10
|
const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
|
11
11
|
const tag_dto_1 = require("../../tag/dto/tag.dto");
|
12
12
|
const zod_1 = __importDefault(require("zod"));
|
13
13
|
exports.createProfileSchema = zod_1.default.object({
|
14
|
-
profile:
|
14
|
+
profile: dtos_dto_1.profileSchema
|
15
15
|
.pick({
|
16
16
|
alternativeNames: true,
|
17
17
|
birthDate: true,
|
@@ -57,7 +57,7 @@ class CreateProfileDto extends (0, create_zod_dto_without_date_1.createZodDtoWit
|
|
57
57
|
}
|
58
58
|
exports.CreateProfileDto = CreateProfileDto;
|
59
59
|
const similarProfileSchema = zod_1.default.object({
|
60
|
-
profile:
|
60
|
+
profile: dtos_dto_1.profileSchema.pick({
|
61
61
|
fullName: true,
|
62
62
|
phoneNumber: true,
|
63
63
|
id: true,
|
@@ -69,7 +69,7 @@ const similarityProfileSchema = zod_1.default.object({
|
|
69
69
|
similarProfiles: zod_1.default.array(similarProfileSchema),
|
70
70
|
});
|
71
71
|
const createdProfileSchema = zod_1.default.object({
|
72
|
-
id:
|
72
|
+
id: dtos_dto_1.profileSchema.shape.id,
|
73
73
|
});
|
74
74
|
const createProfileResponseSchemaBase = zod_1.default.discriminatedUnion('type', [
|
75
75
|
similarityProfileSchema.extend({
|
@@ -1,9 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.DeleteProfileResponseDto = exports.deleteProfileResponseSchema = void 0;
|
4
|
-
const
|
4
|
+
const dtos_dto_1 = require("../../prisma/dtos.dto");
|
5
5
|
const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
|
6
|
-
exports.deleteProfileResponseSchema =
|
6
|
+
exports.deleteProfileResponseSchema = dtos_dto_1.profileSchema;
|
7
7
|
class DeleteProfileResponseDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.deleteProfileResponseSchema) {
|
8
8
|
}
|
9
9
|
exports.DeleteProfileResponseDto = DeleteProfileResponseDto;
|
@@ -4,13 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.FindAllProfileResponseDto = exports.findAllProfileResponseSchema = void 0;
|
7
|
-
const
|
7
|
+
const dtos_dto_1 = require("../../prisma/dtos.dto");
|
8
8
|
const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
|
9
9
|
const tag_group_dto_1 = require("../../tag-group/dto/tag-group.dto");
|
10
10
|
const tag_dto_1 = require("../../tag/dto/tag.dto");
|
11
11
|
const zod_1 = __importDefault(require("zod"));
|
12
12
|
exports.findAllProfileResponseSchema = zod_1.default.object({
|
13
|
-
profiles: zod_1.default.array(
|
13
|
+
profiles: zod_1.default.array(dtos_dto_1.profileSchema.merge(zod_1.default.object({
|
14
14
|
tags: zod_1.default.array(tag_dto_1.tagSchema.merge(zod_1.default.object({
|
15
15
|
group: tag_group_dto_1.tagGroupSchema.pick({
|
16
16
|
color: true,
|
@@ -4,13 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.FindByDateRangeResponseDto = exports.findByDateRangeResponseSchema = exports.FindByDateRangeDto = exports.findByDateRangeSchema = void 0;
|
7
|
-
const
|
7
|
+
const dtos_dto_1 = require("../../prisma/dtos.dto");
|
8
8
|
const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
|
9
9
|
const tag_group_dto_1 = require("../../tag-group/dto/tag-group.dto");
|
10
10
|
const tag_dto_1 = require("../../tag/dto/tag.dto");
|
11
11
|
const zod_1 = __importDefault(require("zod"));
|
12
12
|
exports.findByDateRangeSchema = zod_1.default.object({
|
13
|
-
profiles: zod_1.default.array(
|
13
|
+
profiles: zod_1.default.array(dtos_dto_1.profileSchema.merge(zod_1.default.object({
|
14
14
|
tags: zod_1.default.array(tag_dto_1.tagSchema.merge(zod_1.default.object({
|
15
15
|
group: tag_group_dto_1.tagGroupSchema.pick({
|
16
16
|
id: true,
|
@@ -21,7 +21,7 @@ exports.findByDateRangeSchema = zod_1.default.object({
|
|
21
21
|
class FindByDateRangeDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.findByDateRangeSchema) {
|
22
22
|
}
|
23
23
|
exports.FindByDateRangeDto = FindByDateRangeDto;
|
24
|
-
exports.findByDateRangeResponseSchema = zod_1.default.record(zod_1.default.string(), zod_1.default.array(
|
24
|
+
exports.findByDateRangeResponseSchema = zod_1.default.record(zod_1.default.string(), zod_1.default.array(dtos_dto_1.profileSchema.merge(zod_1.default.object({
|
25
25
|
tags: zod_1.default.array(tag_dto_1.tagSchema.merge(zod_1.default.object({
|
26
26
|
group: tag_group_dto_1.tagGroupSchema.pick({
|
27
27
|
id: true,
|
@@ -5,12 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.FindByIdProfileResponseDto = exports.findByIdProfileResponseSchema = void 0;
|
7
7
|
const location_dto_1 = require("../../location/dto/location.dto");
|
8
|
-
const
|
8
|
+
const dtos_dto_1 = require("../../prisma/dtos.dto");
|
9
9
|
const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
|
10
10
|
const tag_group_dto_1 = require("../../tag-group/dto/tag-group.dto");
|
11
11
|
const tag_dto_1 = require("../../tag/dto/tag.dto");
|
12
12
|
const zod_1 = __importDefault(require("zod"));
|
13
|
-
exports.findByIdProfileResponseSchema =
|
13
|
+
exports.findByIdProfileResponseSchema = dtos_dto_1.profileSchema.merge(zod_1.default.object({
|
14
14
|
residenceLocation: location_dto_1.locationSchema.nullable(),
|
15
15
|
birthLocation: location_dto_1.locationSchema.nullable(),
|
16
16
|
tags: zod_1.default.array(tag_dto_1.tagSchema.merge(zod_1.default.object({
|
@@ -1,9 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.FindByPhoneNumberResponseDto = exports.findByPhoneNumberResponseSchema = void 0;
|
4
|
-
const
|
4
|
+
const dtos_dto_1 = require("../../prisma/dtos.dto");
|
5
5
|
const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
|
6
|
-
exports.findByPhoneNumberResponseSchema =
|
6
|
+
exports.findByPhoneNumberResponseSchema = dtos_dto_1.profileSchema;
|
7
7
|
class FindByPhoneNumberResponseDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.findByPhoneNumberResponseSchema) {
|
8
8
|
}
|
9
9
|
exports.FindByPhoneNumberResponseDto = FindByPhoneNumberResponseDto;
|
@@ -4,12 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.FindByTagGroupsProfileResponseDto = exports.findByTagGroupsProfileResponseSchema = void 0;
|
7
|
-
const
|
7
|
+
const dtos_dto_1 = require("../../prisma/dtos.dto");
|
8
8
|
const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
|
9
9
|
const tag_dto_1 = require("../../tag/dto/tag.dto");
|
10
10
|
const zod_1 = __importDefault(require("zod"));
|
11
11
|
exports.findByTagGroupsProfileResponseSchema = zod_1.default.object({
|
12
|
-
profiles: zod_1.default.array(
|
12
|
+
profiles: zod_1.default.array(dtos_dto_1.profileSchema.merge(zod_1.default.object({
|
13
13
|
tags: zod_1.default.array(tag_dto_1.tagSchema),
|
14
14
|
}))),
|
15
15
|
});
|
@@ -4,13 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.FindByTagsProfileResponseDto = exports.findByTagsProfileResponseSchema = void 0;
|
7
|
-
const
|
7
|
+
const dtos_dto_1 = require("../../prisma/dtos.dto");
|
8
8
|
const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
|
9
9
|
const tag_group_dto_1 = require("../../tag-group/dto/tag-group.dto");
|
10
10
|
const tag_dto_1 = require("../../tag/dto/tag.dto");
|
11
11
|
const zod_1 = __importDefault(require("zod"));
|
12
12
|
exports.findByTagsProfileResponseSchema = zod_1.default.object({
|
13
|
-
profiles: zod_1.default.array(
|
13
|
+
profiles: zod_1.default.array(dtos_dto_1.profileSchema.merge(zod_1.default.object({
|
14
14
|
tags: zod_1.default.array(tag_dto_1.tagSchema.merge(zod_1.default.object({
|
15
15
|
group: tag_group_dto_1.tagGroupSchema.pick({
|
16
16
|
isExclusive: true,
|
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.FindTrashResponseDto = exports.findTrashResponseSchema = void 0;
|
7
|
-
const
|
7
|
+
const dtos_dto_1 = require("../../prisma/dtos.dto");
|
8
8
|
const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
|
9
9
|
const zod_1 = __importDefault(require("zod"));
|
10
10
|
exports.findTrashResponseSchema = zod_1.default.object({
|
11
|
-
profiles: zod_1.default.array(
|
11
|
+
profiles: zod_1.default.array(dtos_dto_1.profileSchema.pick({
|
12
12
|
id: true,
|
13
13
|
fullName: true,
|
14
14
|
profilePictureUrl: true,
|
@@ -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
|
8
|
+
const dtos_dto_1 = require("../../prisma/dtos.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(
|
13
|
+
profiles: zod_1.default.array(dtos_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,102 +1,28 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
}, "strip", z.ZodTypeAny, {
|
27
|
-
id: string;
|
28
|
-
username: string | null;
|
29
|
-
password: string | null;
|
30
|
-
phoneNumber: string;
|
31
|
-
secondaryPhoneNumber: string | null;
|
32
|
-
fullName: string;
|
33
|
-
profilePictureUrl: string | null;
|
34
|
-
mail: string | null;
|
35
|
-
created_at: Date;
|
36
|
-
updated_at: Date;
|
37
|
-
shortId: number;
|
38
|
-
firstTimeMiExpo: boolean;
|
39
|
-
isPhoneVerified: boolean;
|
40
|
-
firstName: string | null;
|
41
|
-
gender: string | null;
|
42
|
-
birthDate: Date | null;
|
43
|
-
instagram: string | null;
|
44
|
-
dni: string | null;
|
45
|
-
alternativeNames: string[];
|
46
|
-
birthLocationId: string | null;
|
47
|
-
residenceLocationId: string | null;
|
48
|
-
isInTrash: boolean;
|
49
|
-
movedToTrashDate: Date | null;
|
50
|
-
}, {
|
51
|
-
id: string;
|
52
|
-
username: string | null;
|
53
|
-
password: string | null;
|
54
|
-
phoneNumber: string;
|
55
|
-
secondaryPhoneNumber: string | null;
|
56
|
-
fullName: string;
|
57
|
-
profilePictureUrl: string | null;
|
58
|
-
mail: string | null;
|
59
|
-
created_at: Date;
|
60
|
-
updated_at: Date;
|
61
|
-
shortId: number;
|
62
|
-
firstTimeMiExpo: boolean;
|
63
|
-
isPhoneVerified: boolean;
|
64
|
-
firstName: string | null;
|
65
|
-
gender: string | null;
|
66
|
-
birthDate: string | null;
|
67
|
-
instagram: string | null;
|
68
|
-
dni: string | null;
|
69
|
-
alternativeNames: string[];
|
70
|
-
birthLocationId: string | null;
|
71
|
-
residenceLocationId: string | null;
|
72
|
-
isInTrash: boolean;
|
73
|
-
movedToTrashDate: Date | null;
|
74
|
-
}>;
|
75
|
-
declare const ProfileDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.ZodObject<{
|
76
|
-
id: z.ZodString;
|
77
|
-
shortId: z.ZodNumber;
|
78
|
-
firstTimeMiExpo: z.ZodBoolean;
|
79
|
-
username: z.ZodNullable<z.ZodString>;
|
80
|
-
password: z.ZodNullable<z.ZodString>;
|
81
|
-
phoneNumber: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
82
|
-
isPhoneVerified: z.ZodBoolean;
|
83
|
-
secondaryPhoneNumber: z.ZodEffects<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>, string | null, string | null>;
|
84
|
-
fullName: z.ZodString;
|
85
|
-
firstName: z.ZodNullable<z.ZodString>;
|
86
|
-
gender: z.ZodNullable<z.ZodString>;
|
87
|
-
birthDate: z.ZodNullable<z.ZodPipeline<z.ZodString, z.ZodDate>>;
|
88
|
-
profilePictureUrl: z.ZodNullable<z.ZodString>;
|
89
|
-
instagram: z.ZodNullable<z.ZodString>;
|
90
|
-
mail: z.ZodNullable<z.ZodString>;
|
91
|
-
dni: z.ZodNullable<z.ZodString>;
|
92
|
-
alternativeNames: z.ZodArray<z.ZodString, "many">;
|
93
|
-
birthLocationId: z.ZodNullable<z.ZodString>;
|
94
|
-
residenceLocationId: z.ZodNullable<z.ZodString>;
|
95
|
-
isInTrash: z.ZodBoolean;
|
96
|
-
movedToTrashDate: z.ZodNullable<z.ZodString>;
|
97
|
-
created_at: z.ZodString;
|
98
|
-
updated_at: z.ZodString;
|
99
|
-
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
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").ZodEffects<import("zod").ZodEffects<import("zod").ZodNullable<import("zod").ZodString>, string | null, string | null>, string | null, string | null>;
|
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").ZodDate>>;
|
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, {
|
100
26
|
id: string;
|
101
27
|
username: string | null;
|
102
28
|
password: string | null;
|
@@ -1,137 +1,9 @@
|
|
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
|
-
};
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
27
|
-
};
|
28
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
-
exports.ProfileDto =
|
30
|
-
const
|
3
|
+
exports.ProfileDto = void 0;
|
4
|
+
const dtos_dto_1 = require("../../prisma/dtos.dto");
|
31
5
|
const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
|
32
|
-
|
33
|
-
const zod_1 = __importDefault(require("zod"));
|
34
|
-
function formatArgNumber(phoneNumber, value) {
|
35
|
-
const prefixes9 = ['11', '15'];
|
36
|
-
const prefix = prefixes9.includes(phoneNumber?.nationalNumber?.slice(0, 2) ?? '')
|
37
|
-
? '9'
|
38
|
-
: '';
|
39
|
-
if (phoneNumber?.country === 'AR') {
|
40
|
-
return `${phoneNumber.countryCallingCode}${prefix}${phoneNumber.nationalNumber}`;
|
41
|
-
}
|
42
|
-
return value;
|
43
|
-
}
|
44
|
-
exports.profileSchema = zod_1.default.object({
|
45
|
-
id: zod_1.default.string().uuid({
|
46
|
-
message: (0, translate_1.translate)('model.profile.id.uuid'),
|
47
|
-
}),
|
48
|
-
shortId: zod_1.default.number(),
|
49
|
-
firstTimeMiExpo: zod_1.default.boolean(),
|
50
|
-
username: zod_1.default.string().nullable(),
|
51
|
-
password: zod_1.default.string().nullable(),
|
52
|
-
phoneNumber: zod_1.default
|
53
|
-
.string()
|
54
|
-
.min(1, {
|
55
|
-
message: (0, translate_1.translate)('model.profile.phoneNumber.required'),
|
56
|
-
})
|
57
|
-
.refine((value) => (0, libphonenumber_js_1.isValidPhoneNumber)(value, 'AR'), {
|
58
|
-
message: (0, translate_1.translate)('model.profile.phoneNumber.invalid'),
|
59
|
-
})
|
60
|
-
.transform((value, ctx) => {
|
61
|
-
if (!value)
|
62
|
-
return value;
|
63
|
-
const phoneNumber = (0, libphonenumber_js_1.default)(value, {
|
64
|
-
defaultCountry: 'AR',
|
65
|
-
});
|
66
|
-
if (!phoneNumber) {
|
67
|
-
ctx.addIssue({
|
68
|
-
code: zod_1.default.ZodIssueCode.custom,
|
69
|
-
message: (0, translate_1.translate)('model.profile.phoneNumber.invalid'),
|
70
|
-
});
|
71
|
-
return value;
|
72
|
-
}
|
73
|
-
return formatArgNumber(phoneNumber, value);
|
74
|
-
}),
|
75
|
-
isPhoneVerified: zod_1.default.boolean(),
|
76
|
-
secondaryPhoneNumber: zod_1.default
|
77
|
-
.string()
|
78
|
-
.nullable()
|
79
|
-
.refine((value) => {
|
80
|
-
if (value === null)
|
81
|
-
return true;
|
82
|
-
return (0, libphonenumber_js_1.isValidPhoneNumber)(value, 'AR');
|
83
|
-
}, {
|
84
|
-
message: (0, translate_1.translate)('model.profile.secondaryPhoneNumber.invalid'),
|
85
|
-
})
|
86
|
-
.transform((value, ctx) => {
|
87
|
-
if (!value)
|
88
|
-
return value;
|
89
|
-
const phoneNumber = (0, libphonenumber_js_1.default)(value, {
|
90
|
-
defaultCountry: 'AR',
|
91
|
-
});
|
92
|
-
if (!phoneNumber) {
|
93
|
-
ctx.addIssue({
|
94
|
-
code: zod_1.default.ZodIssueCode.custom,
|
95
|
-
message: (0, translate_1.translate)('model.profile.phoneNumber.invalid'),
|
96
|
-
});
|
97
|
-
return value;
|
98
|
-
}
|
99
|
-
return formatArgNumber(phoneNumber, value);
|
100
|
-
}),
|
101
|
-
fullName: zod_1.default.string().min(1, {
|
102
|
-
message: (0, translate_1.translate)('model.profile.fullName.required'),
|
103
|
-
}),
|
104
|
-
firstName: zod_1.default
|
105
|
-
.string()
|
106
|
-
.min(1, {
|
107
|
-
message: (0, translate_1.translate)('model.profile.fullName.required'),
|
108
|
-
})
|
109
|
-
.nullable(),
|
110
|
-
gender: zod_1.default.string().nullable(),
|
111
|
-
birthDate: zod_1.default.string().pipe(zod_1.default.coerce.date()).nullable(),
|
112
|
-
profilePictureUrl: zod_1.default
|
113
|
-
.string()
|
114
|
-
.url({
|
115
|
-
message: (0, translate_1.translate)('model.profile.profilePictureUrl.invalid'),
|
116
|
-
})
|
117
|
-
.nullable(),
|
118
|
-
instagram: zod_1.default.string().nullable(),
|
119
|
-
mail: zod_1.default
|
120
|
-
.string()
|
121
|
-
.email({
|
122
|
-
message: (0, translate_1.translate)('model.profile.mail.invalid'),
|
123
|
-
})
|
124
|
-
.nullable(),
|
125
|
-
dni: zod_1.default.string().nullable(),
|
126
|
-
alternativeNames: zod_1.default.array(zod_1.default.string()),
|
127
|
-
birthLocationId: zod_1.default.string().uuid().nullable(),
|
128
|
-
residenceLocationId: zod_1.default.string().uuid().nullable(),
|
129
|
-
isInTrash: zod_1.default.boolean(),
|
130
|
-
movedToTrashDate: zod_1.default.coerce.date().nullable(),
|
131
|
-
created_at: zod_1.default.date(),
|
132
|
-
updated_at: zod_1.default.date(),
|
133
|
-
});
|
134
|
-
class ProfileDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.profileSchema) {
|
6
|
+
class ProfileDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(dtos_dto_1.profileSchema) {
|
135
7
|
}
|
136
8
|
exports.ProfileDto = ProfileDto;
|
137
9
|
//# sourceMappingURL=profile.dto.js.map
|
@@ -5,11 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.UpdateProfileResponseDto = exports.updateProfileResponseSchema = exports.UpdateProfileDto = exports.updateProfileSchema = void 0;
|
7
7
|
const location_dto_1 = require("../../location/dto/location.dto");
|
8
|
-
const
|
8
|
+
const dtos_dto_1 = require("../../prisma/dtos.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 =
|
12
|
+
exports.updateProfileSchema = dtos_dto_1.profileSchema
|
13
13
|
.pick({
|
14
14
|
alternativeNames: true,
|
15
15
|
birthDate: true,
|
@@ -49,7 +49,7 @@ exports.updateProfileSchema = profile_dto_1.profileSchema
|
|
49
49
|
class UpdateProfileDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.updateProfileSchema) {
|
50
50
|
}
|
51
51
|
exports.UpdateProfileDto = UpdateProfileDto;
|
52
|
-
exports.updateProfileResponseSchema =
|
52
|
+
exports.updateProfileResponseSchema = dtos_dto_1.profileSchema;
|
53
53
|
class UpdateProfileResponseDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.updateProfileResponseSchema) {
|
54
54
|
}
|
55
55
|
exports.UpdateProfileResponseDto = UpdateProfileResponseDto;
|
@@ -4,19 +4,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.MassiveAllocationResponseDto = exports.massiveAllocationResponseSchema = exports.MassiveAllocationDto = exports.massiveAllocationSchema = void 0;
|
7
|
-
const
|
7
|
+
const dtos_dto_1 = require("../../prisma/dtos.dto");
|
8
8
|
const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
|
9
9
|
const tag_dto_1 = require("./tag.dto");
|
10
10
|
const zod_1 = __importDefault(require("zod"));
|
11
11
|
exports.massiveAllocationSchema = zod_1.default.object({
|
12
12
|
tagIds: zod_1.default.array(tag_dto_1.tagSchema.shape.id),
|
13
|
-
profileIds: zod_1.default.array(
|
13
|
+
profileIds: zod_1.default.array(dtos_dto_1.profileSchema.shape.id),
|
14
14
|
});
|
15
15
|
class MassiveAllocationDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.massiveAllocationSchema) {
|
16
16
|
}
|
17
17
|
exports.MassiveAllocationDto = MassiveAllocationDto;
|
18
18
|
exports.massiveAllocationResponseSchema = zod_1.default.object({
|
19
|
-
profiles: zod_1.default.array(
|
19
|
+
profiles: zod_1.default.array(dtos_dto_1.profileSchema),
|
20
20
|
});
|
21
21
|
class MassiveAllocationResponseDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.massiveAllocationResponseSchema) {
|
22
22
|
}
|
@@ -4,19 +4,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.MassiveDeallocationResponseDto = exports.massiveDeallocationResponseSchema = exports.MassiveDeallocationDto = exports.massiveDeallocationSchema = void 0;
|
7
|
-
const
|
7
|
+
const dtos_dto_1 = require("../../prisma/dtos.dto");
|
8
8
|
const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
|
9
9
|
const tag_dto_1 = require("./tag.dto");
|
10
10
|
const zod_1 = __importDefault(require("zod"));
|
11
11
|
exports.massiveDeallocationSchema = zod_1.default.object({
|
12
12
|
tagIds: zod_1.default.array(tag_dto_1.tagSchema.shape.id),
|
13
|
-
profileIds: zod_1.default.array(
|
13
|
+
profileIds: zod_1.default.array(dtos_dto_1.profileSchema.shape.id),
|
14
14
|
});
|
15
15
|
class MassiveDeallocationDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.massiveDeallocationSchema) {
|
16
16
|
}
|
17
17
|
exports.MassiveDeallocationDto = MassiveDeallocationDto;
|
18
18
|
exports.massiveDeallocationResponseSchema = zod_1.default.object({
|
19
|
-
profiles: zod_1.default.array(
|
19
|
+
profiles: zod_1.default.array(dtos_dto_1.profileSchema),
|
20
20
|
});
|
21
21
|
class MassiveDeallocationResponseDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.massiveDeallocationResponseSchema) {
|
22
22
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "expo-backend-types",
|
3
|
-
"version": "0.30.0-EXPO-308-auth.
|
3
|
+
"version": "0.30.0-EXPO-308-auth.12",
|
4
4
|
"description": "",
|
5
5
|
"author": "Expo",
|
6
6
|
"private": false,
|
@@ -11,6 +11,7 @@
|
|
11
11
|
"dist/src/**/constants.{js,d.ts,ts}",
|
12
12
|
"dist/src/**/exports.{js,d.ts,ts}",
|
13
13
|
"dist/src/shared/dto-modification",
|
14
|
+
"dist/src/shared/errors/dotType.ts",
|
14
15
|
"dist/src/i18n"
|
15
16
|
],
|
16
17
|
"scripts": {
|
@@ -40,37 +41,24 @@
|
|
40
41
|
"@anatine/zod-nestjs": "^2.0.9",
|
41
42
|
"@anatine/zod-openapi": "^2.2.6",
|
42
43
|
"i18n-js": "^4.4.3",
|
44
|
+
"libphonenumber-js": "^1.10.53",
|
43
45
|
"patch-package": "^8.0.0",
|
44
46
|
"zod": "^3.23.8"
|
45
47
|
},
|
46
48
|
"devDependencies": {
|
47
|
-
"
|
48
|
-
"
|
49
|
-
"
|
50
|
-
"jszip": "^3.10.1",
|
51
|
-
"multer": "^1.4.5-lts.1",
|
52
|
-
"openapi3-ts": "^4.4.0",
|
49
|
+
"@arethetypeswrong/cli": "^0.15.4",
|
50
|
+
"@changesets/cli": "^2.27.7",
|
51
|
+
"@nestjs/cli": "^10.0.0",
|
53
52
|
"@nestjs/common": "^10.0.0",
|
54
53
|
"@nestjs/config": "^3.2.3",
|
55
54
|
"@nestjs/core": "^10.0.0",
|
56
55
|
"@nestjs/jwt": "^10.2.0",
|
57
56
|
"@nestjs/platform-express": "^10.0.0",
|
58
|
-
"@nestjs/swagger": "^7.3.1",
|
59
|
-
"@prisma/client": "^6.3.1",
|
60
|
-
"bcrypt": "^5.1.1",
|
61
|
-
"body-parser": "^1.20.3",
|
62
|
-
"class-transformer": "^0.5.1",
|
63
|
-
"class-validator": "^0.14.1",
|
64
|
-
"country-state-city": "^3.2.1",
|
65
|
-
"date-fns": "^4.1.0",
|
66
|
-
"exceljs": "^4.4.0",
|
67
|
-
"fast-csv": "^5.0.2",
|
68
|
-
"@arethetypeswrong/cli": "^0.15.4",
|
69
|
-
"@changesets/cli": "^2.27.7",
|
70
|
-
"@nestjs/cli": "^10.0.0",
|
71
57
|
"@nestjs/schematics": "^10.0.0",
|
58
|
+
"@nestjs/swagger": "^7.3.1",
|
72
59
|
"@nestjs/testing": "^10.0.0",
|
73
60
|
"@openapitools/openapi-generator-cli": "^2.13.4",
|
61
|
+
"@prisma/client": "^6.3.1",
|
74
62
|
"@types/bcrypt": "^5.0.2",
|
75
63
|
"@types/express": "^4.17.17",
|
76
64
|
"@types/jest": "^29.5.2",
|
@@ -81,19 +69,33 @@
|
|
81
69
|
"@types/supertest": "^6.0.0",
|
82
70
|
"@typescript-eslint/eslint-plugin": "^8.8.0",
|
83
71
|
"@typescript-eslint/parser": "^8.8.0",
|
84
|
-
"
|
72
|
+
"bcrypt": "^5.1.1",
|
73
|
+
"body-parser": "^1.20.3",
|
74
|
+
"class-transformer": "^0.5.1",
|
75
|
+
"class-validator": "^0.14.1",
|
76
|
+
"country-state-city": "^3.2.1",
|
77
|
+
"date-fns": "^4.1.0",
|
85
78
|
"eslint-config-prettier": "^9.0.0",
|
86
79
|
"eslint-plugin-prettier": "^5.0.0",
|
87
80
|
"eslint-plugin-unused-imports": "^4.1.4",
|
81
|
+
"eslint": "^9.11.1",
|
82
|
+
"exceljs": "^4.4.0",
|
83
|
+
"fast-csv": "^5.0.2",
|
88
84
|
"globals": "^15.10.0",
|
89
85
|
"husky": "^9.0.11",
|
90
86
|
"jest": "^29.5.0",
|
87
|
+
"json-to-pretty-yaml": "^1.2.2",
|
88
|
+
"jszip": "^3.10.1",
|
91
89
|
"lint-staged": "^15.2.5",
|
92
90
|
"luxon": "^3.5.0",
|
91
|
+
"multer": "^1.4.5-lts.1",
|
93
92
|
"openapi-typescript": "^7.0.0-rc.0",
|
93
|
+
"openapi3-ts": "^4.4.0",
|
94
94
|
"prettier": "^3.0.0",
|
95
95
|
"prisma": "^6.3.1",
|
96
|
+
"reflect-metadata": "^0.2.0",
|
96
97
|
"source-map-support": "^0.5.21",
|
98
|
+
"string-comparison": "^1.3.0",
|
97
99
|
"supertest": "^6.3.3",
|
98
100
|
"ts-jest": "^29.1.0",
|
99
101
|
"ts-loader": "^9.4.3",
|