@feresmeryas/microservices-common 1.5.13 → 1.5.16
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/dto/comments/comment_like_response.dto.d.ts +1 -1
- package/dist/dto/comments/comment_like_response.dto.js +1 -1
- package/dist/dto/comments/comment_like_response.dto.js.map +1 -1
- package/dist/dto/posts/post_like_response.dto.d.ts +1 -1
- package/dist/dto/posts/post_like_response.dto.js +1 -1
- package/dist/dto/posts/post_like_response.dto.js.map +1 -1
- package/dist/index.d.mts +295 -0
- package/dist/index.d.ts +295 -41
- package/dist/index.js +1744 -58
- package/dist/index.mjs +1682 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -2
|
@@ -11,7 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CommentLikeResponseDto = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const reaction_type_enum_1 = require("
|
|
14
|
+
const reaction_type_enum_1 = require("dto/shared/reaction_type.enum");
|
|
15
15
|
class CommentLikeResponseDto {
|
|
16
16
|
}
|
|
17
17
|
exports.CommentLikeResponseDto = CommentLikeResponseDto;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment_like_response.dto.js","sourceRoot":"","sources":["../../../dto/comments/comment_like_response.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,
|
|
1
|
+
{"version":3,"file":"comment_like_response.dto.js","sourceRoot":"","sources":["../../../dto/comments/comment_like_response.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,sEAA6D;AAI7D,MAAa,sBAAsB;CAwBlC;AAxBD,wDAwBC;AAtBC;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sCAAsC,EAAE,CAAC;;kDACtD;AAGX;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sCAAsC,EAAE,CAAC;;yDAC/C;AAGlB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sCAAsC,EAAE,CAAC;;6DAC3C;AAGtB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;;mEACT;AAG5B;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,8BAA8B,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4EAC7B;AAG5C;IADC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,iCAAY,EAAE,OAAO,EAAE,iCAAY,CAAC,KAAK,EAAE,CAAC;;oDAC9C;AAGnB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC;8BACtC,IAAI;yDAAC;AAGhB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC;8BACtC,IAAI;yDAAC"}
|
|
@@ -11,7 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PostLikeResponseDto = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const reaction_type_enum_1 = require("
|
|
14
|
+
const reaction_type_enum_1 = require("dto/shared/reaction_type.enum");
|
|
15
15
|
class PostLikeResponseDto {
|
|
16
16
|
}
|
|
17
17
|
exports.PostLikeResponseDto = PostLikeResponseDto;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post_like_response.dto.js","sourceRoot":"","sources":["../../../dto/posts/post_like_response.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,
|
|
1
|
+
{"version":3,"file":"post_like_response.dto.js","sourceRoot":"","sources":["../../../dto/posts/post_like_response.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,sEAA6D;AAI7D,MAAa,mBAAmB;CAqB/B;AArBD,kDAqBC;AAnBC;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sCAAsC,EAAE,CAAC;;+CACtD;AAGX;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sCAAsC,EAAE,CAAC;;mDAClD;AAGf;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sCAAsC,EAAE,CAAC;;mDAClD;AAGf;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;;yDAChB;AAGrB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,gCAAgC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kEACtC;AAGrC;IADC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,iCAAY,EAAE,OAAO,EAAE,iCAAY,CAAC,IAAI,EAAE,CAAC;;iDAC7C;AAGnB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC;8BACtC,IAAI;sDAAC"}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
declare class CreateUserDto {
|
|
2
|
+
email: string;
|
|
3
|
+
fullName: string;
|
|
4
|
+
password: string;
|
|
5
|
+
confirmPassword: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare class CreateUserFireBaseDto {
|
|
9
|
+
fireBaseUserId: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare class EmailParamDto {
|
|
13
|
+
email: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare class FindAllUsersDto {
|
|
17
|
+
page?: number;
|
|
18
|
+
limit?: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare class FindByRoleDto {
|
|
22
|
+
roleName: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare class ForgotPasswordDto {
|
|
26
|
+
email: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare class LoginLocalDTO {
|
|
30
|
+
email: string;
|
|
31
|
+
password: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare class ResetPasswordDto {
|
|
35
|
+
password: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare class UpdateUserDto {
|
|
39
|
+
fullName?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
declare class UpdatePasswordDto {
|
|
43
|
+
resetPasswordToken: string;
|
|
44
|
+
oldPassword: string;
|
|
45
|
+
newPassword: string;
|
|
46
|
+
confirmNewPassword: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
type roleType = {
|
|
50
|
+
name: string;
|
|
51
|
+
};
|
|
52
|
+
declare class UserResponseDto {
|
|
53
|
+
id: string;
|
|
54
|
+
fullName: string;
|
|
55
|
+
profilePictureUrl: string | null;
|
|
56
|
+
email: string;
|
|
57
|
+
createdAt: Date;
|
|
58
|
+
updatedAt: Date;
|
|
59
|
+
role: roleType;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
declare class SearchUsersByFullNameDTO extends FindAllUsersDto {
|
|
63
|
+
fullName?: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare class DeleteFileDto {
|
|
67
|
+
fileUrl: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
declare class FileResponseDto {
|
|
71
|
+
url: string;
|
|
72
|
+
fileName: string;
|
|
73
|
+
category: string;
|
|
74
|
+
size?: number;
|
|
75
|
+
uploadedAt: Date;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
declare enum FileCategory {
|
|
79
|
+
PROFILE_PICTURES = "profile-pictures",
|
|
80
|
+
POST_IMAGES = "post-images",
|
|
81
|
+
POST_VIDEOS = "post-videos",
|
|
82
|
+
STORY_IMAGES = "story-images",
|
|
83
|
+
STORY_VIDEOS = "story-videos",
|
|
84
|
+
ATTACHMENTS = "attachments"
|
|
85
|
+
}
|
|
86
|
+
declare class UploadFileDto {
|
|
87
|
+
userId: string;
|
|
88
|
+
category: FileCategory;
|
|
89
|
+
fileName: string;
|
|
90
|
+
mimeType?: string;
|
|
91
|
+
fileBuffer: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
interface DeviceInfo {
|
|
95
|
+
ipAddress: string;
|
|
96
|
+
os: string;
|
|
97
|
+
browser: string;
|
|
98
|
+
browserVersion?: string;
|
|
99
|
+
device: string;
|
|
100
|
+
country?: string;
|
|
101
|
+
region?: string;
|
|
102
|
+
city?: string;
|
|
103
|
+
userAgent?: string;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
interface UploadedFile {
|
|
107
|
+
buffer: Buffer;
|
|
108
|
+
originalname: string;
|
|
109
|
+
mimetype?: string;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
interface IStorageProvider {
|
|
113
|
+
uploadFile(file: UploadedFile, userId: string, category: string): Promise<string>;
|
|
114
|
+
deleteFile(fileUrl: string): Promise<void>;
|
|
115
|
+
validateFile(file: UploadedFile, category: string): void;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
declare enum ReactionType {
|
|
119
|
+
LIKE = "like",
|
|
120
|
+
HEART = "heart",
|
|
121
|
+
SMILE = "smile",
|
|
122
|
+
SAD = "sad",
|
|
123
|
+
ANGRY = "angry"
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
declare class CreatePostFileDto {
|
|
127
|
+
fileBuffer: string;
|
|
128
|
+
fileName: string;
|
|
129
|
+
mimeType?: string;
|
|
130
|
+
fileType: string;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
declare class CreatePostDto {
|
|
134
|
+
description: string;
|
|
135
|
+
files?: CreatePostFileDto[];
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
declare class PostFileDto {
|
|
139
|
+
id: string;
|
|
140
|
+
fileUrl: string;
|
|
141
|
+
fileType: string;
|
|
142
|
+
mimeType: string | null;
|
|
143
|
+
orderIndex: number;
|
|
144
|
+
createdAt: Date;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
declare class PostResponseDto {
|
|
148
|
+
id: string;
|
|
149
|
+
publisherId: string;
|
|
150
|
+
description: string;
|
|
151
|
+
publisherFullName: string;
|
|
152
|
+
publisherProfilePictureUrl: string | null;
|
|
153
|
+
files: PostFileDto[];
|
|
154
|
+
commentsCount: number;
|
|
155
|
+
likesCount: number;
|
|
156
|
+
createdAt: Date;
|
|
157
|
+
updatedAt: Date;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
declare class PaginatedPostsDto {
|
|
161
|
+
posts: PostResponseDto[];
|
|
162
|
+
total: number;
|
|
163
|
+
page: number;
|
|
164
|
+
totalPages: number;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
declare class UpdatePostDto {
|
|
168
|
+
description: string;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
declare class PostFields {
|
|
172
|
+
id?: boolean;
|
|
173
|
+
publisherId?: boolean;
|
|
174
|
+
description?: boolean;
|
|
175
|
+
publisherFullName?: boolean;
|
|
176
|
+
publisherProfilePictureUrl?: boolean;
|
|
177
|
+
commentsCount?: boolean;
|
|
178
|
+
likesCount?: boolean;
|
|
179
|
+
files?: boolean;
|
|
180
|
+
createdAt?: boolean;
|
|
181
|
+
updatedAt?: boolean;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
declare class PostResponseSelfDto extends PostResponseDto {
|
|
185
|
+
hidden: boolean;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
declare class PaginatedPostsSelfDto {
|
|
189
|
+
posts: PostResponseSelfDto[];
|
|
190
|
+
total: number;
|
|
191
|
+
page: number;
|
|
192
|
+
totalPages: number;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
declare class ReorderDto {
|
|
196
|
+
newIndex: number;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
declare class PostLikeResponseDto {
|
|
200
|
+
id: string;
|
|
201
|
+
postId: string;
|
|
202
|
+
userId: string;
|
|
203
|
+
userFullName: string;
|
|
204
|
+
userProfilePictureUrl: string | null;
|
|
205
|
+
type: ReactionType;
|
|
206
|
+
createdAt: Date;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
declare class LikePostDto {
|
|
210
|
+
type?: ReactionType;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
declare class PaginatedPostLikesDto {
|
|
214
|
+
likes: PostLikeResponseDto[];
|
|
215
|
+
total: number;
|
|
216
|
+
page: number;
|
|
217
|
+
totalPages: number;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
declare class CreateCommentDto {
|
|
221
|
+
postId: string;
|
|
222
|
+
content: string;
|
|
223
|
+
parentCommentId?: string;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
declare class CommentResponseDto {
|
|
227
|
+
id: string;
|
|
228
|
+
postId: string;
|
|
229
|
+
authorId: string;
|
|
230
|
+
authorFullName: string;
|
|
231
|
+
authorProfilePictureUrl: string | null;
|
|
232
|
+
content: string;
|
|
233
|
+
parentCommentId: string | null;
|
|
234
|
+
depth: number;
|
|
235
|
+
likesCount: number;
|
|
236
|
+
repliesCount: number;
|
|
237
|
+
isEdited: boolean;
|
|
238
|
+
createdAt: Date;
|
|
239
|
+
updatedAt: Date;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
declare class CommentTreeDto extends CommentResponseDto {
|
|
243
|
+
replies: CommentTreeDto[];
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
declare class PaginatedCommentsDto {
|
|
247
|
+
comments: CommentResponseDto[];
|
|
248
|
+
total: number;
|
|
249
|
+
page: number;
|
|
250
|
+
totalPages: number;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
declare class UpdateCommentDto {
|
|
254
|
+
content: string;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
declare class CommentFields {
|
|
258
|
+
id?: boolean;
|
|
259
|
+
postId?: boolean;
|
|
260
|
+
authorId?: boolean;
|
|
261
|
+
authorFullName?: boolean;
|
|
262
|
+
authorProfilePictureUrl?: boolean;
|
|
263
|
+
content?: boolean;
|
|
264
|
+
parentCommentId?: boolean;
|
|
265
|
+
depth?: boolean;
|
|
266
|
+
likesCount?: boolean;
|
|
267
|
+
repliesCount?: boolean;
|
|
268
|
+
isEdited?: boolean;
|
|
269
|
+
createdAt?: boolean;
|
|
270
|
+
updatedAt?: boolean;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
declare class LikeCommentDto {
|
|
274
|
+
type?: ReactionType;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
declare class CommentLikeResponseDto {
|
|
278
|
+
id: string;
|
|
279
|
+
commentId: string;
|
|
280
|
+
commentatorId: string;
|
|
281
|
+
commentatorFullName: string;
|
|
282
|
+
commentatorProfilePictureUrl: string | null;
|
|
283
|
+
type: ReactionType;
|
|
284
|
+
createdAt: Date;
|
|
285
|
+
updatedAt: Date;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
declare class PaginatedCommentLikesDto {
|
|
289
|
+
likes: CommentLikeResponseDto[];
|
|
290
|
+
total: number;
|
|
291
|
+
page: number;
|
|
292
|
+
totalPages: number;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export { CommentFields, CommentLikeResponseDto, CommentResponseDto, CommentTreeDto, CreateCommentDto, CreatePostDto, CreatePostFileDto, CreateUserDto, CreateUserFireBaseDto, DeleteFileDto, type DeviceInfo, EmailParamDto, FileCategory, FileResponseDto, FindAllUsersDto, FindByRoleDto, ForgotPasswordDto, type IStorageProvider, LikeCommentDto, LikePostDto, LoginLocalDTO, PaginatedCommentLikesDto, PaginatedCommentsDto, PaginatedPostLikesDto, PaginatedPostsDto, PaginatedPostsSelfDto, PostFields, PostFileDto, PostLikeResponseDto, PostResponseDto, PostResponseSelfDto, ReactionType, ReorderDto, ResetPasswordDto, SearchUsersByFullNameDTO, UpdateCommentDto, UpdatePasswordDto, UpdatePostDto, UpdateUserDto, UploadFileDto, type UploadedFile, UserResponseDto };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,41 +1,295 @@
|
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
declare class CreateUserDto {
|
|
2
|
+
email: string;
|
|
3
|
+
fullName: string;
|
|
4
|
+
password: string;
|
|
5
|
+
confirmPassword: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare class CreateUserFireBaseDto {
|
|
9
|
+
fireBaseUserId: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare class EmailParamDto {
|
|
13
|
+
email: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare class FindAllUsersDto {
|
|
17
|
+
page?: number;
|
|
18
|
+
limit?: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare class FindByRoleDto {
|
|
22
|
+
roleName: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare class ForgotPasswordDto {
|
|
26
|
+
email: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare class LoginLocalDTO {
|
|
30
|
+
email: string;
|
|
31
|
+
password: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare class ResetPasswordDto {
|
|
35
|
+
password: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare class UpdateUserDto {
|
|
39
|
+
fullName?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
declare class UpdatePasswordDto {
|
|
43
|
+
resetPasswordToken: string;
|
|
44
|
+
oldPassword: string;
|
|
45
|
+
newPassword: string;
|
|
46
|
+
confirmNewPassword: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
type roleType = {
|
|
50
|
+
name: string;
|
|
51
|
+
};
|
|
52
|
+
declare class UserResponseDto {
|
|
53
|
+
id: string;
|
|
54
|
+
fullName: string;
|
|
55
|
+
profilePictureUrl: string | null;
|
|
56
|
+
email: string;
|
|
57
|
+
createdAt: Date;
|
|
58
|
+
updatedAt: Date;
|
|
59
|
+
role: roleType;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
declare class SearchUsersByFullNameDTO extends FindAllUsersDto {
|
|
63
|
+
fullName?: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare class DeleteFileDto {
|
|
67
|
+
fileUrl: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
declare class FileResponseDto {
|
|
71
|
+
url: string;
|
|
72
|
+
fileName: string;
|
|
73
|
+
category: string;
|
|
74
|
+
size?: number;
|
|
75
|
+
uploadedAt: Date;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
declare enum FileCategory {
|
|
79
|
+
PROFILE_PICTURES = "profile-pictures",
|
|
80
|
+
POST_IMAGES = "post-images",
|
|
81
|
+
POST_VIDEOS = "post-videos",
|
|
82
|
+
STORY_IMAGES = "story-images",
|
|
83
|
+
STORY_VIDEOS = "story-videos",
|
|
84
|
+
ATTACHMENTS = "attachments"
|
|
85
|
+
}
|
|
86
|
+
declare class UploadFileDto {
|
|
87
|
+
userId: string;
|
|
88
|
+
category: FileCategory;
|
|
89
|
+
fileName: string;
|
|
90
|
+
mimeType?: string;
|
|
91
|
+
fileBuffer: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
interface DeviceInfo {
|
|
95
|
+
ipAddress: string;
|
|
96
|
+
os: string;
|
|
97
|
+
browser: string;
|
|
98
|
+
browserVersion?: string;
|
|
99
|
+
device: string;
|
|
100
|
+
country?: string;
|
|
101
|
+
region?: string;
|
|
102
|
+
city?: string;
|
|
103
|
+
userAgent?: string;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
interface UploadedFile {
|
|
107
|
+
buffer: Buffer;
|
|
108
|
+
originalname: string;
|
|
109
|
+
mimetype?: string;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
interface IStorageProvider {
|
|
113
|
+
uploadFile(file: UploadedFile, userId: string, category: string): Promise<string>;
|
|
114
|
+
deleteFile(fileUrl: string): Promise<void>;
|
|
115
|
+
validateFile(file: UploadedFile, category: string): void;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
declare enum ReactionType {
|
|
119
|
+
LIKE = "like",
|
|
120
|
+
HEART = "heart",
|
|
121
|
+
SMILE = "smile",
|
|
122
|
+
SAD = "sad",
|
|
123
|
+
ANGRY = "angry"
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
declare class CreatePostFileDto {
|
|
127
|
+
fileBuffer: string;
|
|
128
|
+
fileName: string;
|
|
129
|
+
mimeType?: string;
|
|
130
|
+
fileType: string;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
declare class CreatePostDto {
|
|
134
|
+
description: string;
|
|
135
|
+
files?: CreatePostFileDto[];
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
declare class PostFileDto {
|
|
139
|
+
id: string;
|
|
140
|
+
fileUrl: string;
|
|
141
|
+
fileType: string;
|
|
142
|
+
mimeType: string | null;
|
|
143
|
+
orderIndex: number;
|
|
144
|
+
createdAt: Date;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
declare class PostResponseDto {
|
|
148
|
+
id: string;
|
|
149
|
+
publisherId: string;
|
|
150
|
+
description: string;
|
|
151
|
+
publisherFullName: string;
|
|
152
|
+
publisherProfilePictureUrl: string | null;
|
|
153
|
+
files: PostFileDto[];
|
|
154
|
+
commentsCount: number;
|
|
155
|
+
likesCount: number;
|
|
156
|
+
createdAt: Date;
|
|
157
|
+
updatedAt: Date;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
declare class PaginatedPostsDto {
|
|
161
|
+
posts: PostResponseDto[];
|
|
162
|
+
total: number;
|
|
163
|
+
page: number;
|
|
164
|
+
totalPages: number;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
declare class UpdatePostDto {
|
|
168
|
+
description: string;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
declare class PostFields {
|
|
172
|
+
id?: boolean;
|
|
173
|
+
publisherId?: boolean;
|
|
174
|
+
description?: boolean;
|
|
175
|
+
publisherFullName?: boolean;
|
|
176
|
+
publisherProfilePictureUrl?: boolean;
|
|
177
|
+
commentsCount?: boolean;
|
|
178
|
+
likesCount?: boolean;
|
|
179
|
+
files?: boolean;
|
|
180
|
+
createdAt?: boolean;
|
|
181
|
+
updatedAt?: boolean;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
declare class PostResponseSelfDto extends PostResponseDto {
|
|
185
|
+
hidden: boolean;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
declare class PaginatedPostsSelfDto {
|
|
189
|
+
posts: PostResponseSelfDto[];
|
|
190
|
+
total: number;
|
|
191
|
+
page: number;
|
|
192
|
+
totalPages: number;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
declare class ReorderDto {
|
|
196
|
+
newIndex: number;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
declare class PostLikeResponseDto {
|
|
200
|
+
id: string;
|
|
201
|
+
postId: string;
|
|
202
|
+
userId: string;
|
|
203
|
+
userFullName: string;
|
|
204
|
+
userProfilePictureUrl: string | null;
|
|
205
|
+
type: ReactionType;
|
|
206
|
+
createdAt: Date;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
declare class LikePostDto {
|
|
210
|
+
type?: ReactionType;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
declare class PaginatedPostLikesDto {
|
|
214
|
+
likes: PostLikeResponseDto[];
|
|
215
|
+
total: number;
|
|
216
|
+
page: number;
|
|
217
|
+
totalPages: number;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
declare class CreateCommentDto {
|
|
221
|
+
postId: string;
|
|
222
|
+
content: string;
|
|
223
|
+
parentCommentId?: string;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
declare class CommentResponseDto {
|
|
227
|
+
id: string;
|
|
228
|
+
postId: string;
|
|
229
|
+
authorId: string;
|
|
230
|
+
authorFullName: string;
|
|
231
|
+
authorProfilePictureUrl: string | null;
|
|
232
|
+
content: string;
|
|
233
|
+
parentCommentId: string | null;
|
|
234
|
+
depth: number;
|
|
235
|
+
likesCount: number;
|
|
236
|
+
repliesCount: number;
|
|
237
|
+
isEdited: boolean;
|
|
238
|
+
createdAt: Date;
|
|
239
|
+
updatedAt: Date;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
declare class CommentTreeDto extends CommentResponseDto {
|
|
243
|
+
replies: CommentTreeDto[];
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
declare class PaginatedCommentsDto {
|
|
247
|
+
comments: CommentResponseDto[];
|
|
248
|
+
total: number;
|
|
249
|
+
page: number;
|
|
250
|
+
totalPages: number;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
declare class UpdateCommentDto {
|
|
254
|
+
content: string;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
declare class CommentFields {
|
|
258
|
+
id?: boolean;
|
|
259
|
+
postId?: boolean;
|
|
260
|
+
authorId?: boolean;
|
|
261
|
+
authorFullName?: boolean;
|
|
262
|
+
authorProfilePictureUrl?: boolean;
|
|
263
|
+
content?: boolean;
|
|
264
|
+
parentCommentId?: boolean;
|
|
265
|
+
depth?: boolean;
|
|
266
|
+
likesCount?: boolean;
|
|
267
|
+
repliesCount?: boolean;
|
|
268
|
+
isEdited?: boolean;
|
|
269
|
+
createdAt?: boolean;
|
|
270
|
+
updatedAt?: boolean;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
declare class LikeCommentDto {
|
|
274
|
+
type?: ReactionType;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
declare class CommentLikeResponseDto {
|
|
278
|
+
id: string;
|
|
279
|
+
commentId: string;
|
|
280
|
+
commentatorId: string;
|
|
281
|
+
commentatorFullName: string;
|
|
282
|
+
commentatorProfilePictureUrl: string | null;
|
|
283
|
+
type: ReactionType;
|
|
284
|
+
createdAt: Date;
|
|
285
|
+
updatedAt: Date;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
declare class PaginatedCommentLikesDto {
|
|
289
|
+
likes: CommentLikeResponseDto[];
|
|
290
|
+
total: number;
|
|
291
|
+
page: number;
|
|
292
|
+
totalPages: number;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export { CommentFields, CommentLikeResponseDto, CommentResponseDto, CommentTreeDto, CreateCommentDto, CreatePostDto, CreatePostFileDto, CreateUserDto, CreateUserFireBaseDto, DeleteFileDto, type DeviceInfo, EmailParamDto, FileCategory, FileResponseDto, FindAllUsersDto, FindByRoleDto, ForgotPasswordDto, type IStorageProvider, LikeCommentDto, LikePostDto, LoginLocalDTO, PaginatedCommentLikesDto, PaginatedCommentsDto, PaginatedPostLikesDto, PaginatedPostsDto, PaginatedPostsSelfDto, PostFields, PostFileDto, PostLikeResponseDto, PostResponseDto, PostResponseSelfDto, ReactionType, ReorderDto, ResetPasswordDto, SearchUsersByFullNameDTO, UpdateCommentDto, UpdatePasswordDto, UpdatePostDto, UpdateUserDto, UploadFileDto, type UploadedFile, UserResponseDto };
|