@tomei/media 0.4.0 → 0.4.1
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/.commitlintrc.json +22 -22
- package/.eslintrc.js +66 -66
- package/.husky/commit-msg +4 -4
- package/.husky/pre-commit +4 -4
- package/.prettierrc +4 -4
- package/.prettierrc copy +3 -3
- package/README.md +93 -93
- package/dist/base/base.medias.d.ts +38 -38
- package/dist/base/base.medias.js +169 -169
- package/dist/base/base.repository.abstract.d.ts +12 -12
- package/dist/base/base.repository.abstract.js +21 -21
- package/dist/base/base.repository.interface.d.ts +9 -9
- package/dist/base/base.repository.interface.js +2 -2
- package/dist/base/index.d.ts +2 -0
- package/dist/base/index.js +6 -0
- package/dist/base/index.js.map +1 -0
- package/dist/common/common.module.d.ts +2 -2
- package/dist/common/common.module.js +22 -22
- package/dist/common/common.service.d.ts +13 -13
- package/dist/common/common.service.js +107 -107
- package/dist/common/common.service.spec.d.ts +0 -0
- package/dist/common/common.service.spec.js +5 -0
- package/dist/common/common.service.spec.js.map +1 -0
- package/dist/common/dto/add-field-translation.dto.d.ts +7 -7
- package/dist/common/dto/add-field-translation.dto.js +41 -41
- package/dist/common/dto/get-media.dto.d.ts +5 -5
- package/dist/common/dto/get-media.dto.js +28 -28
- package/dist/common/dto/get-media.dto.js.map +1 -1
- package/dist/dto/external-media.dto.d.ts +10 -10
- package/dist/dto/external-media.dto.js +69 -69
- package/dist/dto/internal-medias.dto.d.ts +12 -12
- package/dist/dto/internal-medias.dto.js +86 -86
- package/dist/dto/medias.dto.d.ts +12 -0
- package/dist/dto/medias.dto.js +88 -0
- package/dist/dto/medias.dto.js.map +1 -0
- package/dist/entities/index.d.ts +2 -0
- package/dist/entities/index.js +6 -0
- package/dist/entities/index.js.map +1 -0
- package/dist/entities/media.entity.d.ts +21 -0
- package/dist/entities/media.entity.js +152 -0
- package/dist/entities/media.entity.js.map +1 -0
- package/dist/entities/medias.entity.d.ts +21 -21
- package/dist/entities/medias.entity.js +151 -151
- package/dist/enum/index.d.ts +2 -2
- package/dist/enum/index.js +5 -5
- package/dist/enum/medias.enum.d.ts +5 -5
- package/dist/enum/medias.enum.js +9 -9
- package/dist/helpers/error.d.ts +1 -1
- package/dist/helpers/error.js +13 -13
- package/dist/helpers/index.d.ts +2 -2
- package/dist/helpers/index.js +5 -5
- package/dist/index.d.ts +11 -11
- package/dist/index.js +19 -19
- package/dist/interfaces/base.medias-attr.interface.d.ts +20 -20
- package/dist/interfaces/base.medias-attr.interface.js +2 -2
- package/dist/interfaces/commonService.interface.d.ts +17 -0
- package/dist/interfaces/commonService.interface.js +3 -0
- package/dist/interfaces/commonService.interface.js.map +1 -0
- package/dist/interfaces/index.d.ts +3 -0
- package/dist/interfaces/index.js +3 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/interfaces/media.repository.interface.d.ts +10 -0
- package/dist/interfaces/media.repository.interface.js +3 -0
- package/dist/interfaces/media.repository.interface.js.map +1 -0
- package/dist/interfaces/medias-attr.interface.d.ts +22 -0
- package/dist/interfaces/medias-attr.interface.js +3 -0
- package/dist/interfaces/medias-attr.interface.js.map +1 -0
- package/dist/interfaces/medias.repository.interface.d.ts +3 -3
- package/dist/interfaces/medias.repository.interface.js +2 -2
- package/dist/medias.controller copy.d.ts +25 -0
- package/dist/medias.controller copy.js +225 -0
- package/dist/medias.controller copy.js.map +1 -0
- package/dist/medias.controller.d.ts +29 -25
- package/dist/medias.controller.js +119 -224
- package/dist/medias.controller.js.map +1 -1
- package/dist/medias.controller.old.d.ts +25 -0
- package/dist/medias.controller.old.js +225 -0
- package/dist/medias.controller.old.js.map +1 -0
- package/dist/medias.d.ts +62 -62
- package/dist/medias.js +507 -507
- package/dist/medias.module.d.ts +2 -2
- package/dist/medias.module.js +31 -34
- package/dist/medias.module.js.map +1 -1
- package/dist/medias.repository.d.ts +16 -16
- package/dist/medias.repository.js +46 -46
- package/dist/pipe/append-id.pipe.d.ts +6 -6
- package/dist/pipe/append-id.pipe.js +27 -27
- package/dist/pipe/validate-enum.pipe.d.ts +6 -6
- package/dist/pipe/validate-enum.pipe.js +33 -33
- package/dist/pipe/validate-id.pipe.d.ts +6 -6
- package/dist/pipe/validate-id.pipe.js +30 -30
- package/dist/pipe/validate-search.pipe.d.ts +7 -7
- package/dist/pipe/validate-search.pipe.js +45 -45
- package/dist/responses/deleted.response.d.ts +3 -3
- package/dist/responses/deleted.response.js +20 -20
- package/dist/responses/pagination.response.d.ts +5 -5
- package/dist/responses/pagination.response.js +25 -25
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/migration/media-migration.js +82 -82
- package/package.json +72 -72
- package/src/base/base.medias.ts +209 -209
- package/src/common/common.module.ts +10 -10
- package/src/common/common.service.ts +109 -109
- package/src/common/dto/add-field-translation.dto.ts +23 -23
- package/src/common/dto/get-media.dto.ts +12 -12
- package/src/index.ts +22 -22
- package/src/medias.repository.ts +41 -41
- package/src/medias.ts +688 -688
- package/src/pipe/validate-search.pipe.ts +44 -44
- package/tsconfig.build.json +4 -4
- package/tslint.json +18 -18
|
@@ -1,152 +1,152 @@
|
|
|
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.MediasModel = void 0;
|
|
13
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
15
|
-
const enum_1 = require("../enum");
|
|
16
|
-
let MediasModel = class MediasModel extends sequelize_typescript_1.Model {
|
|
17
|
-
};
|
|
18
|
-
__decorate([
|
|
19
|
-
(0, sequelize_typescript_1.Column)({
|
|
20
|
-
primaryKey: true,
|
|
21
|
-
allowNull: false,
|
|
22
|
-
}),
|
|
23
|
-
(0, swagger_1.ApiProperty)({ type: String, description: 'MediaID' }),
|
|
24
|
-
__metadata("design:type", String)
|
|
25
|
-
], MediasModel.prototype, "MediaId", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, sequelize_typescript_1.Column)({
|
|
28
|
-
allowNull: false,
|
|
29
|
-
}),
|
|
30
|
-
(0, swagger_1.ApiProperty)({ type: String, description: 'ObjectID' }),
|
|
31
|
-
__metadata("design:type", String)
|
|
32
|
-
], MediasModel.prototype, "ObjectId", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, sequelize_typescript_1.Column)({
|
|
35
|
-
allowNull: false,
|
|
36
|
-
}),
|
|
37
|
-
(0, swagger_1.ApiProperty)({ type: String, description: 'ObjectType' }),
|
|
38
|
-
__metadata("design:type", String)
|
|
39
|
-
], MediasModel.prototype, "ObjectType", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, sequelize_typescript_1.Column)({
|
|
42
|
-
allowNull: true,
|
|
43
|
-
}),
|
|
44
|
-
(0, swagger_1.ApiProperty)({ type: String, description: 'title of the media' }),
|
|
45
|
-
__metadata("design:type", String)
|
|
46
|
-
], MediasModel.prototype, "Title", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, sequelize_typescript_1.Column)({
|
|
49
|
-
allowNull: true,
|
|
50
|
-
}),
|
|
51
|
-
(0, swagger_1.ApiProperty)({ type: String, description: 'Description of the media' }),
|
|
52
|
-
__metadata("design:type", String)
|
|
53
|
-
], MediasModel.prototype, "Description", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
(0, sequelize_typescript_1.Column)({
|
|
56
|
-
allowNull: false,
|
|
57
|
-
}),
|
|
58
|
-
(0, swagger_1.ApiProperty)({
|
|
59
|
-
type: String,
|
|
60
|
-
description: 'Enum either Photo, Video, Document',
|
|
61
|
-
}),
|
|
62
|
-
__metadata("design:type", String)
|
|
63
|
-
], MediasModel.prototype, "Type", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
(0, sequelize_typescript_1.Column)({
|
|
66
|
-
allowNull: false,
|
|
67
|
-
}),
|
|
68
|
-
(0, swagger_1.ApiProperty)({ type: String, description: 'isExternal either Y, N' }),
|
|
69
|
-
__metadata("design:type", String)
|
|
70
|
-
], MediasModel.prototype, "IsExternalYN", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
(0, sequelize_typescript_1.Column)({
|
|
73
|
-
allowNull: true,
|
|
74
|
-
}),
|
|
75
|
-
(0, swagger_1.ApiProperty)({ type: String, description: 'External surce for the file' }),
|
|
76
|
-
__metadata("design:type", String)
|
|
77
|
-
], MediasModel.prototype, "ExternalSource", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
(0, sequelize_typescript_1.Column)({
|
|
80
|
-
allowNull: false,
|
|
81
|
-
}),
|
|
82
|
-
(0, swagger_1.ApiProperty)({ type: String, description: 'isExternal either Y, N' }),
|
|
83
|
-
__metadata("design:type", String)
|
|
84
|
-
], MediasModel.prototype, "IsEncryptedYN", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
(0, sequelize_typescript_1.Column)({
|
|
87
|
-
allowNull: true,
|
|
88
|
-
}),
|
|
89
|
-
(0, swagger_1.ApiProperty)({ type: String, description: 'file name without extension' }),
|
|
90
|
-
__metadata("design:type", String)
|
|
91
|
-
], MediasModel.prototype, "FileName", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
(0, sequelize_typescript_1.Column)({
|
|
94
|
-
allowNull: true,
|
|
95
|
-
}),
|
|
96
|
-
(0, swagger_1.ApiProperty)({ type: String, description: 'extention of file in jpg etc' }),
|
|
97
|
-
__metadata("design:type", String)
|
|
98
|
-
], MediasModel.prototype, "FileExtension", void 0);
|
|
99
|
-
__decorate([
|
|
100
|
-
(0, sequelize_typescript_1.Column)({
|
|
101
|
-
allowNull: true,
|
|
102
|
-
}),
|
|
103
|
-
(0, swagger_1.ApiProperty)({
|
|
104
|
-
type: String,
|
|
105
|
-
description: 'location on the media in term of path',
|
|
106
|
-
}),
|
|
107
|
-
__metadata("design:type", String)
|
|
108
|
-
], MediasModel.prototype, "FilePath", void 0);
|
|
109
|
-
__decorate([
|
|
110
|
-
(0, sequelize_typescript_1.Column)({
|
|
111
|
-
allowNull: true,
|
|
112
|
-
}),
|
|
113
|
-
(0, swagger_1.ApiProperty)({ type: String, description: 'URl of the media' }),
|
|
114
|
-
__metadata("design:type", String)
|
|
115
|
-
], MediasModel.prototype, "URL", void 0);
|
|
116
|
-
__decorate([
|
|
117
|
-
(0, swagger_1.ApiProperty)({
|
|
118
|
-
example: new Date(),
|
|
119
|
-
description: 'Timestamp for data creation.',
|
|
120
|
-
}),
|
|
121
|
-
sequelize_typescript_1.CreatedAt,
|
|
122
|
-
__metadata("design:type", Date)
|
|
123
|
-
], MediasModel.prototype, "CreatedAt", void 0);
|
|
124
|
-
__decorate([
|
|
125
|
-
(0, swagger_1.ApiProperty)({
|
|
126
|
-
example: '138140891dd211b288d34bc7b4312a49',
|
|
127
|
-
description: 'The CreatedById for Media.',
|
|
128
|
-
}),
|
|
129
|
-
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
130
|
-
__metadata("design:type", String)
|
|
131
|
-
], MediasModel.prototype, "CreatedById", void 0);
|
|
132
|
-
__decorate([
|
|
133
|
-
(0, swagger_1.ApiProperty)({
|
|
134
|
-
example: new Date(),
|
|
135
|
-
description: 'Timestamp for latest data modification',
|
|
136
|
-
}),
|
|
137
|
-
sequelize_typescript_1.UpdatedAt,
|
|
138
|
-
__metadata("design:type", Date)
|
|
139
|
-
], MediasModel.prototype, "UpdatedAt", void 0);
|
|
140
|
-
__decorate([
|
|
141
|
-
(0, swagger_1.ApiProperty)({
|
|
142
|
-
example: '138140891dd211b288d34bc7b4312a49',
|
|
143
|
-
description: 'The UpdatedById for Media.',
|
|
144
|
-
}),
|
|
145
|
-
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
146
|
-
__metadata("design:type", String)
|
|
147
|
-
], MediasModel.prototype, "UpdatedById", void 0);
|
|
148
|
-
MediasModel = __decorate([
|
|
149
|
-
(0, sequelize_typescript_1.Table)({ tableName: 'common_Media', createdAt: false, updatedAt: false })
|
|
150
|
-
], MediasModel);
|
|
151
|
-
exports.MediasModel = MediasModel;
|
|
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.MediasModel = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
15
|
+
const enum_1 = require("../enum");
|
|
16
|
+
let MediasModel = class MediasModel extends sequelize_typescript_1.Model {
|
|
17
|
+
};
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, sequelize_typescript_1.Column)({
|
|
20
|
+
primaryKey: true,
|
|
21
|
+
allowNull: false,
|
|
22
|
+
}),
|
|
23
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'MediaID' }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], MediasModel.prototype, "MediaId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, sequelize_typescript_1.Column)({
|
|
28
|
+
allowNull: false,
|
|
29
|
+
}),
|
|
30
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'ObjectID' }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], MediasModel.prototype, "ObjectId", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, sequelize_typescript_1.Column)({
|
|
35
|
+
allowNull: false,
|
|
36
|
+
}),
|
|
37
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'ObjectType' }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], MediasModel.prototype, "ObjectType", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, sequelize_typescript_1.Column)({
|
|
42
|
+
allowNull: true,
|
|
43
|
+
}),
|
|
44
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'title of the media' }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], MediasModel.prototype, "Title", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, sequelize_typescript_1.Column)({
|
|
49
|
+
allowNull: true,
|
|
50
|
+
}),
|
|
51
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Description of the media' }),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], MediasModel.prototype, "Description", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, sequelize_typescript_1.Column)({
|
|
56
|
+
allowNull: false,
|
|
57
|
+
}),
|
|
58
|
+
(0, swagger_1.ApiProperty)({
|
|
59
|
+
type: String,
|
|
60
|
+
description: 'Enum either Photo, Video, Document',
|
|
61
|
+
}),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], MediasModel.prototype, "Type", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, sequelize_typescript_1.Column)({
|
|
66
|
+
allowNull: false,
|
|
67
|
+
}),
|
|
68
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'isExternal either Y, N' }),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], MediasModel.prototype, "IsExternalYN", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, sequelize_typescript_1.Column)({
|
|
73
|
+
allowNull: true,
|
|
74
|
+
}),
|
|
75
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'External surce for the file' }),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], MediasModel.prototype, "ExternalSource", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, sequelize_typescript_1.Column)({
|
|
80
|
+
allowNull: false,
|
|
81
|
+
}),
|
|
82
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'isExternal either Y, N' }),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], MediasModel.prototype, "IsEncryptedYN", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, sequelize_typescript_1.Column)({
|
|
87
|
+
allowNull: true,
|
|
88
|
+
}),
|
|
89
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'file name without extension' }),
|
|
90
|
+
__metadata("design:type", String)
|
|
91
|
+
], MediasModel.prototype, "FileName", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, sequelize_typescript_1.Column)({
|
|
94
|
+
allowNull: true,
|
|
95
|
+
}),
|
|
96
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'extention of file in jpg etc' }),
|
|
97
|
+
__metadata("design:type", String)
|
|
98
|
+
], MediasModel.prototype, "FileExtension", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, sequelize_typescript_1.Column)({
|
|
101
|
+
allowNull: true,
|
|
102
|
+
}),
|
|
103
|
+
(0, swagger_1.ApiProperty)({
|
|
104
|
+
type: String,
|
|
105
|
+
description: 'location on the media in term of path',
|
|
106
|
+
}),
|
|
107
|
+
__metadata("design:type", String)
|
|
108
|
+
], MediasModel.prototype, "FilePath", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, sequelize_typescript_1.Column)({
|
|
111
|
+
allowNull: true,
|
|
112
|
+
}),
|
|
113
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'URl of the media' }),
|
|
114
|
+
__metadata("design:type", String)
|
|
115
|
+
], MediasModel.prototype, "URL", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, swagger_1.ApiProperty)({
|
|
118
|
+
example: new Date(),
|
|
119
|
+
description: 'Timestamp for data creation.',
|
|
120
|
+
}),
|
|
121
|
+
sequelize_typescript_1.CreatedAt,
|
|
122
|
+
__metadata("design:type", Date)
|
|
123
|
+
], MediasModel.prototype, "CreatedAt", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, swagger_1.ApiProperty)({
|
|
126
|
+
example: '138140891dd211b288d34bc7b4312a49',
|
|
127
|
+
description: 'The CreatedById for Media.',
|
|
128
|
+
}),
|
|
129
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
130
|
+
__metadata("design:type", String)
|
|
131
|
+
], MediasModel.prototype, "CreatedById", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
(0, swagger_1.ApiProperty)({
|
|
134
|
+
example: new Date(),
|
|
135
|
+
description: 'Timestamp for latest data modification',
|
|
136
|
+
}),
|
|
137
|
+
sequelize_typescript_1.UpdatedAt,
|
|
138
|
+
__metadata("design:type", Date)
|
|
139
|
+
], MediasModel.prototype, "UpdatedAt", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
(0, swagger_1.ApiProperty)({
|
|
142
|
+
example: '138140891dd211b288d34bc7b4312a49',
|
|
143
|
+
description: 'The UpdatedById for Media.',
|
|
144
|
+
}),
|
|
145
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false }),
|
|
146
|
+
__metadata("design:type", String)
|
|
147
|
+
], MediasModel.prototype, "UpdatedById", void 0);
|
|
148
|
+
MediasModel = __decorate([
|
|
149
|
+
(0, sequelize_typescript_1.Table)({ tableName: 'common_Media', createdAt: false, updatedAt: false })
|
|
150
|
+
], MediasModel);
|
|
151
|
+
exports.MediasModel = MediasModel;
|
|
152
152
|
//# sourceMappingURL=medias.entity.js.map
|
package/dist/enum/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { MediaType } from './medias.enum';
|
|
2
|
-
export { MediaType };
|
|
1
|
+
import { MediaType } from './medias.enum';
|
|
2
|
+
export { MediaType };
|
package/dist/enum/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MediaType = void 0;
|
|
4
|
-
const medias_enum_1 = require("./medias.enum");
|
|
5
|
-
Object.defineProperty(exports, "MediaType", { enumerable: true, get: function () { return medias_enum_1.MediaType; } });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MediaType = void 0;
|
|
4
|
+
const medias_enum_1 = require("./medias.enum");
|
|
5
|
+
Object.defineProperty(exports, "MediaType", { enumerable: true, get: function () { return medias_enum_1.MediaType; } });
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare enum MediaType {
|
|
2
|
-
Photo = "Photo",
|
|
3
|
-
Video = "Video",
|
|
4
|
-
Document = "Document"
|
|
5
|
-
}
|
|
1
|
+
export declare enum MediaType {
|
|
2
|
+
Photo = "Photo",
|
|
3
|
+
Video = "Video",
|
|
4
|
+
Document = "Document"
|
|
5
|
+
}
|
package/dist/enum/medias.enum.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MediaType = void 0;
|
|
4
|
-
var MediaType;
|
|
5
|
-
(function (MediaType) {
|
|
6
|
-
MediaType["Photo"] = "Photo";
|
|
7
|
-
MediaType["Video"] = "Video";
|
|
8
|
-
MediaType["Document"] = "Document";
|
|
9
|
-
})(MediaType = exports.MediaType || (exports.MediaType = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MediaType = void 0;
|
|
4
|
+
var MediaType;
|
|
5
|
+
(function (MediaType) {
|
|
6
|
+
MediaType["Photo"] = "Photo";
|
|
7
|
+
MediaType["Video"] = "Video";
|
|
8
|
+
MediaType["Document"] = "Document";
|
|
9
|
+
})(MediaType = exports.MediaType || (exports.MediaType = {}));
|
|
10
10
|
//# sourceMappingURL=medias.enum.js.map
|
package/dist/helpers/error.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function throwException(err: any): void;
|
|
1
|
+
export declare function throwException(err: any): void;
|
package/dist/helpers/error.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.throwException = void 0;
|
|
4
|
-
const common_1 = require("@nestjs/common");
|
|
5
|
-
function throwException(err) {
|
|
6
|
-
if (err.response) {
|
|
7
|
-
throw err;
|
|
8
|
-
}
|
|
9
|
-
else {
|
|
10
|
-
throw new common_1.HttpException('Something went wrong. Please see application log.', err.statusCode);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.throwException = throwException;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.throwException = void 0;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
function throwException(err) {
|
|
6
|
+
if (err.response) {
|
|
7
|
+
throw err;
|
|
8
|
+
}
|
|
9
|
+
else {
|
|
10
|
+
throw new common_1.HttpException('Something went wrong. Please see application log.', err.statusCode);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.throwException = throwException;
|
|
14
14
|
//# sourceMappingURL=error.js.map
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { throwException } from './error';
|
|
2
|
-
export { throwException };
|
|
1
|
+
import { throwException } from './error';
|
|
2
|
+
export { throwException };
|
package/dist/helpers/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.throwException = void 0;
|
|
4
|
-
const error_1 = require("./error");
|
|
5
|
-
Object.defineProperty(exports, "throwException", { enumerable: true, get: function () { return error_1.throwException; } });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.throwException = void 0;
|
|
4
|
+
const error_1 = require("./error");
|
|
5
|
+
Object.defineProperty(exports, "throwException", { enumerable: true, get: function () { return error_1.throwException; } });
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { MediasRepository } from "./medias.repository";
|
|
2
|
-
import { MediasModel } from "./entities/medias.entity";
|
|
3
|
-
import { Medias } from "./medias";
|
|
4
|
-
import { CommonModule } from "./common/common.module";
|
|
5
|
-
import { CommonService } from "./common/common.service";
|
|
6
|
-
import { ExternalMediaDto } from "./dto/external-media.dto";
|
|
7
|
-
import { InternalMediaDto } from "./dto/internal-medias.dto";
|
|
8
|
-
import { MediaType } from "./enum";
|
|
9
|
-
import { IBaseMediasAttr } from "./interfaces/base.medias-attr.interface";
|
|
10
|
-
import { IMediasRepository } from "./interfaces/medias.repository.interface";
|
|
11
|
-
export { MediasRepository, MediasModel, Medias, CommonModule, CommonService, ExternalMediaDto, InternalMediaDto, MediaType, IBaseMediasAttr, IMediasRepository, };
|
|
1
|
+
import { MediasRepository } from "./medias.repository";
|
|
2
|
+
import { MediasModel } from "./entities/medias.entity";
|
|
3
|
+
import { Medias } from "./medias";
|
|
4
|
+
import { CommonModule } from "./common/common.module";
|
|
5
|
+
import { CommonService } from "./common/common.service";
|
|
6
|
+
import { ExternalMediaDto } from "./dto/external-media.dto";
|
|
7
|
+
import { InternalMediaDto } from "./dto/internal-medias.dto";
|
|
8
|
+
import { MediaType } from "./enum";
|
|
9
|
+
import { IBaseMediasAttr } from "./interfaces/base.medias-attr.interface";
|
|
10
|
+
import { IMediasRepository } from "./interfaces/medias.repository.interface";
|
|
11
|
+
export { MediasRepository, MediasModel, Medias, CommonModule, CommonService, ExternalMediaDto, InternalMediaDto, MediaType, IBaseMediasAttr, IMediasRepository, };
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MediaType = exports.InternalMediaDto = exports.ExternalMediaDto = exports.CommonService = exports.CommonModule = exports.Medias = exports.MediasModel = exports.MediasRepository = void 0;
|
|
4
|
-
const medias_repository_1 = require("./medias.repository");
|
|
5
|
-
Object.defineProperty(exports, "MediasRepository", { enumerable: true, get: function () { return medias_repository_1.MediasRepository; } });
|
|
6
|
-
const medias_entity_1 = require("./entities/medias.entity");
|
|
7
|
-
Object.defineProperty(exports, "MediasModel", { enumerable: true, get: function () { return medias_entity_1.MediasModel; } });
|
|
8
|
-
const medias_1 = require("./medias");
|
|
9
|
-
Object.defineProperty(exports, "Medias", { enumerable: true, get: function () { return medias_1.Medias; } });
|
|
10
|
-
const common_module_1 = require("./common/common.module");
|
|
11
|
-
Object.defineProperty(exports, "CommonModule", { enumerable: true, get: function () { return common_module_1.CommonModule; } });
|
|
12
|
-
const common_service_1 = require("./common/common.service");
|
|
13
|
-
Object.defineProperty(exports, "CommonService", { enumerable: true, get: function () { return common_service_1.CommonService; } });
|
|
14
|
-
const external_media_dto_1 = require("./dto/external-media.dto");
|
|
15
|
-
Object.defineProperty(exports, "ExternalMediaDto", { enumerable: true, get: function () { return external_media_dto_1.ExternalMediaDto; } });
|
|
16
|
-
const internal_medias_dto_1 = require("./dto/internal-medias.dto");
|
|
17
|
-
Object.defineProperty(exports, "InternalMediaDto", { enumerable: true, get: function () { return internal_medias_dto_1.InternalMediaDto; } });
|
|
18
|
-
const enum_1 = require("./enum");
|
|
19
|
-
Object.defineProperty(exports, "MediaType", { enumerable: true, get: function () { return enum_1.MediaType; } });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MediaType = exports.InternalMediaDto = exports.ExternalMediaDto = exports.CommonService = exports.CommonModule = exports.Medias = exports.MediasModel = exports.MediasRepository = void 0;
|
|
4
|
+
const medias_repository_1 = require("./medias.repository");
|
|
5
|
+
Object.defineProperty(exports, "MediasRepository", { enumerable: true, get: function () { return medias_repository_1.MediasRepository; } });
|
|
6
|
+
const medias_entity_1 = require("./entities/medias.entity");
|
|
7
|
+
Object.defineProperty(exports, "MediasModel", { enumerable: true, get: function () { return medias_entity_1.MediasModel; } });
|
|
8
|
+
const medias_1 = require("./medias");
|
|
9
|
+
Object.defineProperty(exports, "Medias", { enumerable: true, get: function () { return medias_1.Medias; } });
|
|
10
|
+
const common_module_1 = require("./common/common.module");
|
|
11
|
+
Object.defineProperty(exports, "CommonModule", { enumerable: true, get: function () { return common_module_1.CommonModule; } });
|
|
12
|
+
const common_service_1 = require("./common/common.service");
|
|
13
|
+
Object.defineProperty(exports, "CommonService", { enumerable: true, get: function () { return common_service_1.CommonService; } });
|
|
14
|
+
const external_media_dto_1 = require("./dto/external-media.dto");
|
|
15
|
+
Object.defineProperty(exports, "ExternalMediaDto", { enumerable: true, get: function () { return external_media_dto_1.ExternalMediaDto; } });
|
|
16
|
+
const internal_medias_dto_1 = require("./dto/internal-medias.dto");
|
|
17
|
+
Object.defineProperty(exports, "InternalMediaDto", { enumerable: true, get: function () { return internal_medias_dto_1.InternalMediaDto; } });
|
|
18
|
+
const enum_1 = require("./enum");
|
|
19
|
+
Object.defineProperty(exports, "MediaType", { enumerable: true, get: function () { return enum_1.MediaType; } });
|
|
20
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { MediaType } from '../enum/medias.enum';
|
|
2
|
-
export interface IBaseMediasAttr {
|
|
3
|
-
MediaId: string;
|
|
4
|
-
ObjectId: string;
|
|
5
|
-
ObjectType: string;
|
|
6
|
-
Title: string;
|
|
7
|
-
Description: string;
|
|
8
|
-
Type: MediaType;
|
|
9
|
-
IsExternalYN: string;
|
|
10
|
-
ExternalSource: string;
|
|
11
|
-
IsEncryptedYN: string;
|
|
12
|
-
FileName: string;
|
|
13
|
-
FileExtension: string;
|
|
14
|
-
FilePath: string;
|
|
15
|
-
URL: string;
|
|
16
|
-
CreatedAt: Date;
|
|
17
|
-
UpdatedAt: Date;
|
|
18
|
-
CreatedById: string;
|
|
19
|
-
UpdatedById: string;
|
|
20
|
-
}
|
|
1
|
+
import { MediaType } from '../enum/medias.enum';
|
|
2
|
+
export interface IBaseMediasAttr {
|
|
3
|
+
MediaId: string;
|
|
4
|
+
ObjectId: string;
|
|
5
|
+
ObjectType: string;
|
|
6
|
+
Title: string;
|
|
7
|
+
Description: string;
|
|
8
|
+
Type: MediaType;
|
|
9
|
+
IsExternalYN: string;
|
|
10
|
+
ExternalSource: string;
|
|
11
|
+
IsEncryptedYN: string;
|
|
12
|
+
FileName: string;
|
|
13
|
+
FileExtension: string;
|
|
14
|
+
FilePath: string;
|
|
15
|
+
URL: string;
|
|
16
|
+
CreatedAt: Date;
|
|
17
|
+
UpdatedAt: Date;
|
|
18
|
+
CreatedById: string;
|
|
19
|
+
UpdatedById: string;
|
|
20
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=base.medias-attr.interface.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { HttpException, InternalServerErrorException } from "@nestjs/common";
|
|
2
|
+
declare type Record = {
|
|
3
|
+
Action: 'Add' | 'Update' | 'Delete';
|
|
4
|
+
Activity: string;
|
|
5
|
+
Description: string;
|
|
6
|
+
EntityId: string;
|
|
7
|
+
EntityValueBefore: string;
|
|
8
|
+
EntityValueAfter: string;
|
|
9
|
+
PerformedById: string;
|
|
10
|
+
PerformedAt: Date;
|
|
11
|
+
};
|
|
12
|
+
export interface ICommonservices {
|
|
13
|
+
commonApiUrl: string;
|
|
14
|
+
handleAxiosError(err: any): HttpException | InternalServerErrorException;
|
|
15
|
+
addActivityHistory(record: Record, entity: string, method: 'create' | 'update' | 'delete'): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commonService.interface.js","sourceRoot":"","sources":["../../src/interfaces/commonService.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MediaModel } from '../entities';
|
|
2
|
+
export interface IMediaRepository {
|
|
3
|
+
create(data: MediaModel | any, options?: any): Promise<MediaModel>;
|
|
4
|
+
findAll(options: any): Promise<MediaModel[]>;
|
|
5
|
+
findAllWithPagination(options: any): Promise<{
|
|
6
|
+
count: number;
|
|
7
|
+
rows: MediaModel[];
|
|
8
|
+
}>;
|
|
9
|
+
findOne(options: any): Promise<MediaModel>;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.repository.interface.js","sourceRoot":"","sources":["../../src/interfaces/media.repository.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { MediasStatus } from 'src/enum/appointment.enum';
|
|
2
|
+
export interface IAppointmentSlotGroupAttr {
|
|
3
|
+
SlotGroupId: string;
|
|
4
|
+
Name: string;
|
|
5
|
+
Description: string;
|
|
6
|
+
RelatedObjectType: string;
|
|
7
|
+
RelatedObjectId: string;
|
|
8
|
+
Status: MediasStatus;
|
|
9
|
+
CreatedById: string;
|
|
10
|
+
CreatedAt: Date;
|
|
11
|
+
UpdatedById: string;
|
|
12
|
+
UpdatedAt: Date;
|
|
13
|
+
}
|
|
14
|
+
export interface IAppointmentSlotGroupUpdateAttr {
|
|
15
|
+
Name: string;
|
|
16
|
+
Description: string;
|
|
17
|
+
RelatedObjectType: string;
|
|
18
|
+
RelatedObjectId: string;
|
|
19
|
+
Status: MediasStatus;
|
|
20
|
+
UpdatedById: string;
|
|
21
|
+
UpdatedAt: Date;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"medias-attr.interface.js","sourceRoot":"","sources":["../../src/interfaces/medias-attr.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IBaseRepository } from '../base/base.repository.interface';
|
|
2
|
-
import { MediasModel } from '../entities/medias.entity';
|
|
3
|
-
export declare type IMediasRepository = IBaseRepository<MediasModel>;
|
|
1
|
+
import { IBaseRepository } from '../base/base.repository.interface';
|
|
2
|
+
import { MediasModel } from '../entities/medias.entity';
|
|
3
|
+
export declare type IMediasRepository = IBaseRepository<MediasModel>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=medias.repository.interface.js.map
|