@serene-dev/la-nest-library 0.0.1 → 0.0.3
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/libs/la-library/src/controllers/file.controller.d.ts +50 -0
- package/dist/libs/la-library/src/controllers/file.controller.js +238 -0
- package/dist/libs/la-library/src/controllers/file.controller.js.map +1 -0
- package/dist/libs/la-library/src/dtos/base.dto.d.ts +8 -0
- package/dist/libs/la-library/src/dtos/base.dto.js +46 -0
- package/dist/libs/la-library/src/dtos/base.dto.js.map +1 -0
- package/dist/libs/la-library/src/dtos/file.dto.d.ts +20 -0
- package/dist/libs/la-library/src/dtos/file.dto.js +88 -0
- package/dist/libs/la-library/src/dtos/file.dto.js.map +1 -0
- package/dist/libs/la-library/src/dtos/search.dto.d.ts +13 -0
- package/dist/libs/la-library/src/dtos/search.dto.js +69 -0
- package/dist/libs/la-library/src/dtos/search.dto.js.map +1 -0
- package/dist/libs/la-library/src/entities/base.entity.d.ts +9 -0
- package/dist/libs/la-library/src/entities/base.entity.js +43 -0
- package/dist/libs/la-library/src/entities/base.entity.js.map +1 -0
- package/dist/libs/la-library/src/entities/file-bin.entity.d.ts +3 -0
- package/dist/libs/la-library/src/{la-library.service.js → entities/file-bin.entity.js} +10 -8
- package/dist/libs/la-library/src/entities/file-bin.entity.js.map +1 -0
- package/dist/libs/la-library/src/entities/file.entity.d.ts +17 -0
- package/dist/libs/la-library/src/entities/file.entity.js +74 -0
- package/dist/libs/la-library/src/entities/file.entity.js.map +1 -0
- package/dist/libs/la-library/src/entities/index.entity.d.ts +3 -0
- package/dist/libs/la-library/src/entities/index.entity.js +8 -0
- package/dist/libs/la-library/src/entities/index.entity.js.map +1 -0
- package/dist/libs/la-library/src/entities/likes.entity.d.ts +9 -0
- package/dist/libs/la-library/src/entities/likes.entity.js +34 -0
- package/dist/libs/la-library/src/entities/likes.entity.js.map +1 -0
- package/dist/libs/la-library/src/enums/base.enum.d.ts +11 -0
- package/dist/libs/la-library/src/enums/base.enum.js +18 -0
- package/dist/libs/la-library/src/enums/base.enum.js.map +1 -0
- package/dist/libs/la-library/src/enums/search.enum.d.ts +14 -0
- package/dist/libs/la-library/src/enums/search.enum.js +20 -0
- package/dist/libs/la-library/src/enums/search.enum.js.map +1 -0
- package/dist/libs/la-library/src/index.d.ts +0 -1
- package/dist/libs/la-library/src/index.js +0 -1
- package/dist/libs/la-library/src/index.js.map +1 -1
- package/dist/libs/la-library/src/interfaces/base.interface.d.ts +14 -0
- package/dist/libs/la-library/src/interfaces/base.interface.js +3 -0
- package/dist/libs/la-library/src/interfaces/base.interface.js.map +1 -0
- package/dist/libs/la-library/src/interfaces/file.interface.d.ts +3 -0
- package/dist/libs/la-library/src/interfaces/file.interface.js +3 -0
- package/dist/libs/la-library/src/interfaces/file.interface.js.map +1 -0
- package/dist/libs/la-library/src/interfaces/search.interface.d.ts +13 -0
- package/dist/libs/la-library/src/interfaces/search.interface.js +3 -0
- package/dist/libs/la-library/src/interfaces/search.interface.js.map +1 -0
- package/dist/libs/la-library/src/la-library.module.js +16 -3
- package/dist/libs/la-library/src/la-library.module.js.map +1 -1
- package/dist/libs/la-library/src/samples/base.sample.d.ts +5 -0
- package/dist/libs/la-library/src/samples/base.sample.js +10 -0
- package/dist/libs/la-library/src/samples/base.sample.js.map +1 -0
- package/dist/libs/la-library/src/services/environment.service.d.ts +27 -0
- package/dist/libs/la-library/src/services/environment.service.js +73 -0
- package/dist/libs/la-library/src/services/environment.service.js.map +1 -0
- package/dist/libs/la-library/src/services/file.service.d.ts +61 -0
- package/dist/libs/la-library/src/services/file.service.js +256 -0
- package/dist/libs/la-library/src/services/file.service.js.map +1 -0
- package/dist/libs/la-library/src/services/likes.service.d.ts +30 -0
- package/dist/libs/la-library/src/services/likes.service.js +75 -0
- package/dist/libs/la-library/src/services/likes.service.js.map +1 -0
- package/dist/libs/la-library/src/services/logger.service.d.ts +9 -0
- package/dist/libs/la-library/src/services/logger.service.js +53 -0
- package/dist/libs/la-library/src/services/logger.service.js.map +1 -0
- package/dist/libs/la-library/src/services/search.service.d.ts +11 -0
- package/dist/libs/la-library/src/services/search.service.js +79 -0
- package/dist/libs/la-library/src/services/search.service.js.map +1 -0
- package/dist/libs/la-library/src/services/token.service.d.ts +7 -0
- package/dist/libs/la-library/src/services/token.service.js +42 -0
- package/dist/libs/la-library/src/services/token.service.js.map +1 -0
- package/dist/libs/la-library/src/services/utility.service.d.ts +24 -0
- package/dist/libs/la-library/src/services/utility.service.js +52 -0
- package/dist/libs/la-library/src/services/utility.service.js.map +1 -0
- package/package.json +39 -8
- package/dist/libs/la-library/src/la-library.service.d.ts +0 -2
- package/dist/libs/la-library/src/la-library.service.js.map +0 -1
- package/dist/libs/la-library/src/la-library.service.spec.d.ts +0 -1
- package/dist/libs/la-library/src/la-library.service.spec.js +0 -17
- package/dist/libs/la-library/src/la-library.service.spec.js.map +0 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/// <reference types="multer" />
|
|
2
|
+
import { FileService as fileService } from '../services/file.service';
|
|
3
|
+
import { FileActionDto, FileSearchDto, FileUpdateDto, FileUploadDto } from '../dtos/file.dto';
|
|
4
|
+
import { IFileID } from '../interfaces/file.interface';
|
|
5
|
+
import { BatchDeleteDto } from '../dtos/base.dto';
|
|
6
|
+
import { Response } from 'express';
|
|
7
|
+
import { IToken } from '../interfaces/base.interface';
|
|
8
|
+
export declare class FileController {
|
|
9
|
+
private readonly fileService;
|
|
10
|
+
constructor(fileService: fileService);
|
|
11
|
+
upload(file: Express.Multer.File, meta: FileUploadDto): Promise<{
|
|
12
|
+
data: import("../entities/file.entity").FileEntity & FileUploadDto;
|
|
13
|
+
message: string;
|
|
14
|
+
}>;
|
|
15
|
+
like(params: FileActionDto): Promise<{
|
|
16
|
+
data: import("../entities/file.entity").FileEntity;
|
|
17
|
+
message: string;
|
|
18
|
+
}>;
|
|
19
|
+
dislike(params: FileActionDto): Promise<{
|
|
20
|
+
data: import("../entities/file.entity").FileEntity;
|
|
21
|
+
message: string;
|
|
22
|
+
}>;
|
|
23
|
+
search(query: FileSearchDto): Promise<import("../interfaces/search.interface").ISearchResponse<import("../entities/file.entity").FileEntity>>;
|
|
24
|
+
unlike(params: FileActionDto): Promise<{
|
|
25
|
+
data: import("../entities/file.entity").FileEntity;
|
|
26
|
+
message: string;
|
|
27
|
+
}>;
|
|
28
|
+
deleteBatch(params: BatchDeleteDto): Promise<{
|
|
29
|
+
data: unknown;
|
|
30
|
+
message: string;
|
|
31
|
+
}>;
|
|
32
|
+
delete(params: IFileID): Promise<{
|
|
33
|
+
data: unknown;
|
|
34
|
+
message: string;
|
|
35
|
+
}>;
|
|
36
|
+
restoreBatch(params: BatchDeleteDto): Promise<{
|
|
37
|
+
data: unknown;
|
|
38
|
+
message: string;
|
|
39
|
+
}>;
|
|
40
|
+
restore(params: IFileID): Promise<{
|
|
41
|
+
data: unknown;
|
|
42
|
+
message: string;
|
|
43
|
+
}>;
|
|
44
|
+
update(body: FileUpdateDto, params: IFileID): Promise<{
|
|
45
|
+
data: void;
|
|
46
|
+
message: string;
|
|
47
|
+
}>;
|
|
48
|
+
getFile(params: IFileID, response: Response): Promise<void>;
|
|
49
|
+
getFileWithToken(params: IToken, response: Response): Promise<void>;
|
|
50
|
+
}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.FileController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const file_service_1 = require("../services/file.service");
|
|
18
|
+
const file_dto_1 = require("../dtos/file.dto");
|
|
19
|
+
const platform_express_1 = require("@nestjs/platform-express");
|
|
20
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
21
|
+
const utility_service_1 = require("../services/utility.service");
|
|
22
|
+
const base_dto_1 = require("../dtos/base.dto");
|
|
23
|
+
const path = require("path");
|
|
24
|
+
const subject = `File`;
|
|
25
|
+
const idParam = `fileID`;
|
|
26
|
+
let FileController = class FileController {
|
|
27
|
+
constructor(fileService) {
|
|
28
|
+
this.fileService = fileService;
|
|
29
|
+
}
|
|
30
|
+
async upload(file, meta) {
|
|
31
|
+
try {
|
|
32
|
+
const res = await this.fileService.upload(file, meta);
|
|
33
|
+
return utility_service_1.UtilityClass.handleSuccess({
|
|
34
|
+
data: res,
|
|
35
|
+
message: `${subject} uploaded successfully`,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
utility_service_1.UtilityClass.handleError(error);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
async like(params) {
|
|
43
|
+
return utility_service_1.UtilityClass.handleSuccess({
|
|
44
|
+
data: await this.fileService.likeFile(params),
|
|
45
|
+
message: `${subject} like successfully`,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
async dislike(params) {
|
|
49
|
+
return utility_service_1.UtilityClass.handleSuccess({
|
|
50
|
+
data: await this.fileService.dislikeFile(params),
|
|
51
|
+
message: `${subject} disliked successfully`,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
async search(query) {
|
|
55
|
+
return this.fileService.search(query);
|
|
56
|
+
}
|
|
57
|
+
async unlike(params) {
|
|
58
|
+
return utility_service_1.UtilityClass.handleSuccess({
|
|
59
|
+
data: await this.fileService.unlikeFile(params),
|
|
60
|
+
message: `${subject} unliked successfully`,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
async deleteBatch(params) {
|
|
64
|
+
try {
|
|
65
|
+
await this.fileService.deleteFileBatch(params);
|
|
66
|
+
return utility_service_1.UtilityClass.handleSuccess({
|
|
67
|
+
message: `${subject} deleted successfully`,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
debugger;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
async delete(params) {
|
|
75
|
+
await this.fileService.deleteSingleFile(params);
|
|
76
|
+
return utility_service_1.UtilityClass.handleSuccess({
|
|
77
|
+
message: `${subject} deleted successfully`,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
async restoreBatch(params) {
|
|
81
|
+
await this.fileService.restoreFileBatch(params);
|
|
82
|
+
return utility_service_1.UtilityClass.handleSuccess({
|
|
83
|
+
message: `${subject} restored successfully`,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
async restore(params) {
|
|
87
|
+
await this.fileService.restoreFileSingle(params);
|
|
88
|
+
return utility_service_1.UtilityClass.handleSuccess({
|
|
89
|
+
message: `${subject} restored successfully`,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
async update(body, params) {
|
|
93
|
+
return utility_service_1.UtilityClass.handleSuccess({
|
|
94
|
+
data: await this.fileService.updateFile({ ...body, ...params }),
|
|
95
|
+
message: `${subject} updated successfully`,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
async getFile(params, response) {
|
|
99
|
+
try {
|
|
100
|
+
const res = await this.fileService.getFilePath(params);
|
|
101
|
+
response.download(path.resolve(res.path), res.file.fileName);
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
utility_service_1.UtilityClass.handleError(error);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
async getFileWithToken(params, response) {
|
|
108
|
+
try {
|
|
109
|
+
const res = await this.fileService.getFilePathWithToken(params);
|
|
110
|
+
response.download(path.resolve(res.path), res.file.fileName);
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
utility_service_1.UtilityClass.handleError(error);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
exports.FileController = FileController;
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, common_1.UseInterceptors)((0, platform_express_1.FileInterceptor)('file')),
|
|
120
|
+
(0, swagger_1.ApiConsumes)('multipart/form-data'),
|
|
121
|
+
(0, common_1.Post)('upload'),
|
|
122
|
+
(0, swagger_1.ApiBody)({
|
|
123
|
+
description: `${subject} upload`,
|
|
124
|
+
type: file_dto_1.FileUploadDto,
|
|
125
|
+
required: true,
|
|
126
|
+
}),
|
|
127
|
+
__param(0, (0, common_1.UploadedFile)()),
|
|
128
|
+
__param(1, (0, common_1.Body)()),
|
|
129
|
+
__metadata("design:type", Function),
|
|
130
|
+
__metadata("design:paramtypes", [Object, file_dto_1.FileUploadDto]),
|
|
131
|
+
__metadata("design:returntype", Promise)
|
|
132
|
+
], FileController.prototype, "upload", null);
|
|
133
|
+
__decorate([
|
|
134
|
+
(0, common_1.Put)('like'),
|
|
135
|
+
__param(0, (0, common_1.Body)()),
|
|
136
|
+
__metadata("design:type", Function),
|
|
137
|
+
__metadata("design:paramtypes", [file_dto_1.FileActionDto]),
|
|
138
|
+
__metadata("design:returntype", Promise)
|
|
139
|
+
], FileController.prototype, "like", null);
|
|
140
|
+
__decorate([
|
|
141
|
+
(0, common_1.Put)('dislike'),
|
|
142
|
+
__param(0, (0, common_1.Body)()),
|
|
143
|
+
__metadata("design:type", Function),
|
|
144
|
+
__metadata("design:paramtypes", [file_dto_1.FileActionDto]),
|
|
145
|
+
__metadata("design:returntype", Promise)
|
|
146
|
+
], FileController.prototype, "dislike", null);
|
|
147
|
+
__decorate([
|
|
148
|
+
(0, common_1.Get)('search'),
|
|
149
|
+
__param(0, (0, common_1.Query)()),
|
|
150
|
+
__metadata("design:type", Function),
|
|
151
|
+
__metadata("design:paramtypes", [file_dto_1.FileSearchDto]),
|
|
152
|
+
__metadata("design:returntype", Promise)
|
|
153
|
+
], FileController.prototype, "search", null);
|
|
154
|
+
__decorate([
|
|
155
|
+
(0, common_1.Put)('unlike'),
|
|
156
|
+
__param(0, (0, common_1.Body)()),
|
|
157
|
+
__metadata("design:type", Function),
|
|
158
|
+
__metadata("design:paramtypes", [file_dto_1.FileActionDto]),
|
|
159
|
+
__metadata("design:returntype", Promise)
|
|
160
|
+
], FileController.prototype, "unlike", null);
|
|
161
|
+
__decorate([
|
|
162
|
+
(0, common_1.Delete)('delete/batch'),
|
|
163
|
+
__param(0, (0, common_1.Body)()),
|
|
164
|
+
__metadata("design:type", Function),
|
|
165
|
+
__metadata("design:paramtypes", [base_dto_1.BatchDeleteDto]),
|
|
166
|
+
__metadata("design:returntype", Promise)
|
|
167
|
+
], FileController.prototype, "deleteBatch", null);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, common_1.Delete)(`delete/:${idParam}`),
|
|
170
|
+
(0, swagger_1.ApiParam)({
|
|
171
|
+
name: `${idParam}`,
|
|
172
|
+
required: true,
|
|
173
|
+
}),
|
|
174
|
+
__param(0, (0, common_1.Param)()),
|
|
175
|
+
__metadata("design:type", Function),
|
|
176
|
+
__metadata("design:paramtypes", [Object]),
|
|
177
|
+
__metadata("design:returntype", Promise)
|
|
178
|
+
], FileController.prototype, "delete", null);
|
|
179
|
+
__decorate([
|
|
180
|
+
(0, common_1.Put)('restore/batch'),
|
|
181
|
+
__param(0, (0, common_1.Body)()),
|
|
182
|
+
__metadata("design:type", Function),
|
|
183
|
+
__metadata("design:paramtypes", [base_dto_1.BatchDeleteDto]),
|
|
184
|
+
__metadata("design:returntype", Promise)
|
|
185
|
+
], FileController.prototype, "restoreBatch", null);
|
|
186
|
+
__decorate([
|
|
187
|
+
(0, common_1.Put)(`restore/:${idParam}`),
|
|
188
|
+
(0, swagger_1.ApiParam)({
|
|
189
|
+
name: idParam,
|
|
190
|
+
required: true,
|
|
191
|
+
}),
|
|
192
|
+
__param(0, (0, common_1.Param)()),
|
|
193
|
+
__metadata("design:type", Function),
|
|
194
|
+
__metadata("design:paramtypes", [Object]),
|
|
195
|
+
__metadata("design:returntype", Promise)
|
|
196
|
+
], FileController.prototype, "restore", null);
|
|
197
|
+
__decorate([
|
|
198
|
+
(0, common_1.Put)(`update/:${idParam}`),
|
|
199
|
+
(0, swagger_1.ApiParam)({
|
|
200
|
+
name: idParam,
|
|
201
|
+
required: true,
|
|
202
|
+
}),
|
|
203
|
+
__param(0, (0, common_1.Body)()),
|
|
204
|
+
__param(1, (0, common_1.Param)()),
|
|
205
|
+
__metadata("design:type", Function),
|
|
206
|
+
__metadata("design:paramtypes", [file_dto_1.FileUpdateDto, Object]),
|
|
207
|
+
__metadata("design:returntype", Promise)
|
|
208
|
+
], FileController.prototype, "update", null);
|
|
209
|
+
__decorate([
|
|
210
|
+
(0, common_1.Get)(file_service_1.FileService.downloadPathGenerator(`:${idParam}`)),
|
|
211
|
+
(0, swagger_1.ApiParam)({
|
|
212
|
+
name: idParam,
|
|
213
|
+
required: true,
|
|
214
|
+
}),
|
|
215
|
+
__param(0, (0, common_1.Param)()),
|
|
216
|
+
__param(1, (0, common_1.Res)()),
|
|
217
|
+
__metadata("design:type", Function),
|
|
218
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
219
|
+
__metadata("design:returntype", Promise)
|
|
220
|
+
], FileController.prototype, "getFile", null);
|
|
221
|
+
__decorate([
|
|
222
|
+
(0, common_1.Get)(file_service_1.FileService.downloadPathGeneratorWithToken(':token')),
|
|
223
|
+
(0, swagger_1.ApiParam)({
|
|
224
|
+
name: 'token',
|
|
225
|
+
required: true,
|
|
226
|
+
}),
|
|
227
|
+
__param(0, (0, common_1.Param)()),
|
|
228
|
+
__param(1, (0, common_1.Res)()),
|
|
229
|
+
__metadata("design:type", Function),
|
|
230
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
231
|
+
__metadata("design:returntype", Promise)
|
|
232
|
+
], FileController.prototype, "getFileWithToken", null);
|
|
233
|
+
exports.FileController = FileController = __decorate([
|
|
234
|
+
(0, swagger_1.ApiTags)('file'),
|
|
235
|
+
(0, common_1.Controller)(file_service_1.FileService.filesRoute),
|
|
236
|
+
__metadata("design:paramtypes", [file_service_1.FileService])
|
|
237
|
+
], FileController);
|
|
238
|
+
//# sourceMappingURL=file.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.controller.js","sourceRoot":"","sources":["../../../../../libs/la-library/src/controllers/file.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAYwB;AACxB,2DAAsE;AACtE,+CAK0B;AAC1B,+DAA2D;AAC3D,6CAA0E;AAC1E,iEAA2D;AAE3D,+CAAkD;AAElD,6BAA6B;AAG7B,MAAM,OAAO,GAAG,MAAM,CAAC;AACvB,MAAM,OAAO,GAAG,QAAQ,CAAC;AAIlB,IAAM,cAAc,GAApB,MAAM,cAAc;IACzB,YAA6B,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;IAAG,CAAC;IAUnD,AAAN,KAAK,CAAC,MAAM,CACM,IAAyB,EACjC,IAAmB;QAE3B,IAAI,CAAC;YAEH,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACtD,OAAO,8BAAY,CAAC,aAAa,CAAC;gBAChC,IAAI,EAAE,GAAG;gBACT,OAAO,EAAE,GAAG,OAAO,wBAAwB;aAC5C,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC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;KACf,CAAC;IACsB,WAAA,IAAA,cAAK,GAAE,CAAA;IAAkB,WAAA,IAAA,YAAG,GAAE,CAAA;;;;sDAQrD;yBArJU,cAAc;IAF1B,IAAA,iBAAO,EAAC,MAAM,CAAC;IACf,IAAA,mBAAU,EAAC,0BAAW,CAAC,UAAU,CAAC;qCAES,0BAAW;GAD1C,cAAc,CAsJ1B"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.BatchDeleteDto = exports.BaseDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const base_sample_1 = require("../samples/base.sample");
|
|
16
|
+
const utility_service_1 = require("../services/utility.service");
|
|
17
|
+
class BaseDto {
|
|
18
|
+
}
|
|
19
|
+
exports.BaseDto = BaseDto;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
|
+
(0, class_validator_1.IsOptional)(),
|
|
23
|
+
(0, swagger_1.ApiProperty)({ default: base_sample_1.Sample.createdBy, required: false }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], BaseDto.prototype, "createdBy", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
(0, class_validator_1.IsOptional)(),
|
|
29
|
+
(0, swagger_1.ApiProperty)({
|
|
30
|
+
default: base_sample_1.Sample.orgID,
|
|
31
|
+
required: false,
|
|
32
|
+
description: `This is the unique id for the organisation using the resource. For example, LMBC's unique ID will be set as the orgID`,
|
|
33
|
+
}),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], BaseDto.prototype, "orgID", void 0);
|
|
36
|
+
class BatchDeleteDto {
|
|
37
|
+
}
|
|
38
|
+
exports.BatchDeleteDto = BatchDeleteDto;
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.IsArray)({}),
|
|
41
|
+
(0, swagger_1.ApiProperty)({
|
|
42
|
+
default: new Array(5).fill(1).map(() => utility_service_1.UtilityClass.generateUUID()),
|
|
43
|
+
}),
|
|
44
|
+
__metadata("design:type", Array)
|
|
45
|
+
], BatchDeleteDto.prototype, "ids", void 0);
|
|
46
|
+
//# sourceMappingURL=base.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.dto.js","sourceRoot":"","sources":["../../../../../libs/la-library/src/dtos/base.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qDAAgE;AAEhE,wDAAgD;AAChD,iEAA2D;AAE3D,MAAa,OAAO;CAcnB;AAdD,0BAcC;AAVC;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,oBAAM,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;0CACzC;AASnB;IAPC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC;QACX,OAAO,EAAE,oBAAM,CAAC,KAAK;QACrB,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,uHAAuH;KACrI,CAAC;;sCACa;AAGjB,MAAa,cAAc;CAM1B;AAND,wCAMC;AADC;IAJC,IAAA,yBAAO,EAAC,EAAE,CAAC;IACX,IAAA,qBAAW,EAAC;QACX,OAAO,EAAE,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,8BAAY,CAAC,YAAY,EAAE,CAAC;KACrE,CAAC;;2CACa"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseDto } from './base.dto';
|
|
2
|
+
import { SearchQueryDto } from './search.dto';
|
|
3
|
+
export declare class FileUpdateDto extends BaseDto {
|
|
4
|
+
refCat?: string;
|
|
5
|
+
refNo?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
title: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class FileUploadDto extends FileUpdateDto {
|
|
10
|
+
file: File;
|
|
11
|
+
}
|
|
12
|
+
export declare class FileActionDto extends BaseDto {
|
|
13
|
+
fileID: string;
|
|
14
|
+
}
|
|
15
|
+
export declare class FileSearchDto extends SearchQueryDto {
|
|
16
|
+
refCat?: string;
|
|
17
|
+
refNo?: string;
|
|
18
|
+
description: string;
|
|
19
|
+
title: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.FileSearchDto = exports.FileActionDto = exports.FileUploadDto = exports.FileUpdateDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const base_dto_1 = require("./base.dto");
|
|
16
|
+
const utility_service_1 = require("../services/utility.service");
|
|
17
|
+
const search_dto_1 = require("./search.dto");
|
|
18
|
+
class FileUpdateDto extends base_dto_1.BaseDto {
|
|
19
|
+
}
|
|
20
|
+
exports.FileUpdateDto = FileUpdateDto;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsString)(),
|
|
23
|
+
(0, class_validator_1.IsOptional)(),
|
|
24
|
+
(0, swagger_1.ApiProperty)({ type: 'string', required: false }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], FileUpdateDto.prototype, "refCat", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
(0, class_validator_1.IsOptional)(),
|
|
30
|
+
(0, swagger_1.ApiProperty)({ type: 'string', required: false }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], FileUpdateDto.prototype, "refNo", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsString)(),
|
|
35
|
+
(0, class_validator_1.IsOptional)(),
|
|
36
|
+
(0, swagger_1.ApiProperty)({ type: 'string', required: false }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], FileUpdateDto.prototype, "description", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.IsString)(),
|
|
41
|
+
(0, class_validator_1.IsOptional)(),
|
|
42
|
+
(0, swagger_1.ApiProperty)({ type: 'string' }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], FileUpdateDto.prototype, "title", void 0);
|
|
45
|
+
class FileUploadDto extends FileUpdateDto {
|
|
46
|
+
}
|
|
47
|
+
exports.FileUploadDto = FileUploadDto;
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_validator_1.Allow)(),
|
|
50
|
+
(0, swagger_1.ApiProperty)({ type: 'string', format: 'binary' }),
|
|
51
|
+
__metadata("design:type", File)
|
|
52
|
+
], FileUploadDto.prototype, "file", void 0);
|
|
53
|
+
class FileActionDto extends base_dto_1.BaseDto {
|
|
54
|
+
}
|
|
55
|
+
exports.FileActionDto = FileActionDto;
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_validator_1.IsUUID)(),
|
|
58
|
+
(0, swagger_1.ApiProperty)({ type: 'string', example: utility_service_1.UtilityClass.generateUUID() }),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], FileActionDto.prototype, "fileID", void 0);
|
|
61
|
+
class FileSearchDto extends search_dto_1.SearchQueryDto {
|
|
62
|
+
}
|
|
63
|
+
exports.FileSearchDto = FileSearchDto;
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, class_validator_1.IsString)(),
|
|
66
|
+
(0, class_validator_1.IsOptional)(),
|
|
67
|
+
(0, swagger_1.ApiProperty)({ type: 'string', required: false }),
|
|
68
|
+
__metadata("design:type", String)
|
|
69
|
+
], FileSearchDto.prototype, "refCat", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, class_validator_1.IsString)(),
|
|
72
|
+
(0, class_validator_1.IsOptional)(),
|
|
73
|
+
(0, swagger_1.ApiProperty)({ type: 'string', required: false }),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], FileSearchDto.prototype, "refNo", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, class_validator_1.IsString)(),
|
|
78
|
+
(0, class_validator_1.IsOptional)(),
|
|
79
|
+
(0, swagger_1.ApiProperty)({ type: 'string', required: false }),
|
|
80
|
+
__metadata("design:type", String)
|
|
81
|
+
], FileSearchDto.prototype, "description", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, class_validator_1.IsString)(),
|
|
84
|
+
(0, class_validator_1.IsOptional)(),
|
|
85
|
+
(0, swagger_1.ApiProperty)({ type: 'string', required: false }),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], FileSearchDto.prototype, "title", void 0);
|
|
88
|
+
//# sourceMappingURL=file.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.dto.js","sourceRoot":"","sources":["../../../../../libs/la-library/src/dtos/file.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qDAAsE;AACtE,yCAAqC;AACrC,iEAA2D;AAC3D,6CAA8C;AAE9C,MAAa,aAAc,SAAQ,kBAAO;CAoBzC;AApBD,sCAoBC;AAhBC;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;6CACjC;AAKhB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;4CAClC;AAKf;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;kDAC5B;AAKrB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;;4CAClB;AAGhB,MAAa,aAAc,SAAQ,aAAa;CAI/C;AAJD,sCAIC;AADC;IAFC,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;8BAC5C,IAAI;2CAAC;AAGb,MAAa,aAAc,SAAQ,kBAAO;CAIzC;AAJD,sCAIC;AADC;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,8BAAY,CAAC,YAAY,EAAE,EAAE,CAAC;;6CACvD;AAGjB,MAAa,aAAc,SAAQ,2BAAc;CAoBhD;AApBD,sCAoBC;AAhBC;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;6CACjC;AAKhB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;4CAClC;AAKf;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;kDAC7B;AAKpB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;4CACnC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseDto } from './base.dto';
|
|
2
|
+
import { ESortOrder } from '../enums/search.enum';
|
|
3
|
+
export declare class SearchQueryDto extends BaseDto {
|
|
4
|
+
createdAt?: string;
|
|
5
|
+
createdBy?: string;
|
|
6
|
+
createdFrom?: string;
|
|
7
|
+
createdTo?: string;
|
|
8
|
+
orgID?: string;
|
|
9
|
+
pageNumber?: number;
|
|
10
|
+
pageSize?: number;
|
|
11
|
+
sortField?: string;
|
|
12
|
+
sortDirection?: ESortOrder;
|
|
13
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SearchQueryDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const base_dto_1 = require("./base.dto");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
16
|
+
const search_enum_1 = require("../enums/search.enum");
|
|
17
|
+
class SearchQueryDto extends base_dto_1.BaseDto {
|
|
18
|
+
}
|
|
19
|
+
exports.SearchQueryDto = SearchQueryDto;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsDateString)(),
|
|
22
|
+
(0, class_validator_1.IsOptional)(),
|
|
23
|
+
(0, swagger_1.ApiProperty)({ required: false }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], SearchQueryDto.prototype, "createdAt", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsOptional)(),
|
|
28
|
+
(0, swagger_1.ApiProperty)({ required: false }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], SearchQueryDto.prototype, "createdBy", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsDateString)(),
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
34
|
+
(0, swagger_1.ApiProperty)({ required: false }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], SearchQueryDto.prototype, "createdFrom", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsDateString)(),
|
|
39
|
+
(0, class_validator_1.IsOptional)(),
|
|
40
|
+
(0, swagger_1.ApiProperty)({ required: false }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], SearchQueryDto.prototype, "createdTo", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_validator_1.IsOptional)(),
|
|
45
|
+
(0, swagger_1.ApiProperty)({ required: false }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], SearchQueryDto.prototype, "orgID", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_validator_1.IsOptional)(),
|
|
50
|
+
(0, swagger_1.ApiProperty)({ required: false, description: `Starts from 1` }),
|
|
51
|
+
__metadata("design:type", Number)
|
|
52
|
+
], SearchQueryDto.prototype, "pageNumber", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, class_validator_1.IsOptional)(),
|
|
55
|
+
(0, swagger_1.ApiProperty)({ required: false }),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], SearchQueryDto.prototype, "pageSize", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_validator_1.IsOptional)(),
|
|
60
|
+
(0, swagger_1.ApiProperty)({ required: false }),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], SearchQueryDto.prototype, "sortField", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, class_validator_1.IsOptional)(),
|
|
65
|
+
(0, class_validator_1.IsEnum)(search_enum_1.ESortOrder),
|
|
66
|
+
(0, swagger_1.ApiProperty)({ required: false, enum: search_enum_1.ESortOrder }),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], SearchQueryDto.prototype, "sortDirection", void 0);
|
|
69
|
+
//# sourceMappingURL=search.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.dto.js","sourceRoot":"","sources":["../../../../../libs/la-library/src/dtos/search.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,yCAAqC;AACrC,qDAAmE;AACnE,sDAAkD;AAElD,MAAa,cAAe,SAAQ,kBAAO;CAwC1C;AAxCD,wCAwCC;AApCC;IAHC,IAAA,8BAAY,GAAE;IACd,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;iDACd;AAInB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;iDACd;AAKnB;IAHC,IAAA,8BAAY,GAAE;IACd,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;mDACZ;AAKrB;IAHC,IAAA,8BAAY,GAAE;IACd,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;iDACd;AAInB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;6CAClB;AAIf;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC;;kDAC3C;AAIpB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;gDACf;AAIlB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;iDACd;AAKnB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,wBAAU,CAAC;IAClB,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,wBAAU,EAAE,CAAC;;qDACxB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.BaseEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
class BaseEntity {
|
|
15
|
+
}
|
|
16
|
+
exports.BaseEntity = BaseEntity;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], BaseEntity.prototype, "id", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.Column)({ nullable: true, type: 'json' }),
|
|
23
|
+
__metadata("design:type", Object)
|
|
24
|
+
], BaseEntity.prototype, "meta", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ type: 'timestamp' }),
|
|
27
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], BaseEntity.prototype, "createdAt", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: 'timestamp' }),
|
|
32
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], BaseEntity.prototype, "updatedAt", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ nullable: true, type: 'uuid' }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], BaseEntity.prototype, "createdBy", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ nullable: true, type: 'uuid' }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], BaseEntity.prototype, "orgID", void 0);
|
|
43
|
+
//# sourceMappingURL=base.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.entity.js","sourceRoot":"","sources":["../../../../../libs/la-library/src/entities/base.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qCAKiB;AAEjB,MAAa,UAAU;CAoBtB;AApBD,gCAoBC;AAlBC;IADC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;sCACpB;AAGX;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;wCAC3B;AAId;IAFC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;IAC7B,IAAA,0BAAgB,GAAE;;6CACD;AAIlB;IAFC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;IAC7B,IAAA,0BAAgB,GAAE;;6CACD;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6CACvB;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yCAC1B"}
|
|
@@ -6,12 +6,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.
|
|
10
|
-
const
|
|
11
|
-
|
|
9
|
+
exports.FileBinEntity = void 0;
|
|
10
|
+
const typeorm_1 = require("typeorm");
|
|
11
|
+
const file_entity_1 = require("./file.entity");
|
|
12
|
+
const base_enum_1 = require("../enums/base.enum");
|
|
13
|
+
let FileBinEntity = class FileBinEntity extends file_entity_1.FileEntity {
|
|
12
14
|
};
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
(0,
|
|
16
|
-
],
|
|
17
|
-
//# sourceMappingURL=
|
|
15
|
+
exports.FileBinEntity = FileBinEntity;
|
|
16
|
+
exports.FileBinEntity = FileBinEntity = __decorate([
|
|
17
|
+
(0, typeorm_1.Entity)(base_enum_1.ETableName.fileBin)
|
|
18
|
+
], FileBinEntity);
|
|
19
|
+
//# sourceMappingURL=file-bin.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-bin.entity.js","sourceRoot":"","sources":["../../../../../libs/la-library/src/entities/file-bin.entity.ts"],"names":[],"mappings":";;;;;;;;;AAAA,qCAAiC;AACjC,+CAA2C;AAC3C,kDAAgD;AAGzC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,wBAAU;CAAG,CAAA;AAAnC,sCAAa;wBAAb,aAAa;IADzB,IAAA,gBAAM,EAAC,sBAAU,CAAC,OAAO,CAAC;GACd,aAAa,CAAsB"}
|