grm-shared-library 1.1.116 → 1.1.118
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/cjs/modules/dms/dtos/audio-file-upload-options.dto.js +95 -0
- package/dist/cjs/modules/dms/dtos/audio-file-upload-options.dto.js.map +1 -1
- package/dist/cjs/modules/dms/dtos/document-file-upload-options.dto.js +53 -0
- package/dist/cjs/modules/dms/dtos/document-file-upload-options.dto.js.map +1 -1
- package/dist/cjs/modules/dms/dtos/image-file-upload-options.dto.js +68 -0
- package/dist/cjs/modules/dms/dtos/image-file-upload-options.dto.js.map +1 -1
- package/dist/cjs/modules/dms/dtos/multi-file-upload.dto.js +37 -4
- package/dist/cjs/modules/dms/dtos/multi-file-upload.dto.js.map +1 -1
- package/dist/cjs/modules/dms/dtos/video-file-upload-options.dto.js +75 -0
- package/dist/cjs/modules/dms/dtos/video-file-upload-options.dto.js.map +1 -1
- package/dist/esm/modules/dms/dtos/audio-file-upload-options.dto.js +96 -1
- package/dist/esm/modules/dms/dtos/audio-file-upload-options.dto.js.map +1 -1
- package/dist/esm/modules/dms/dtos/document-file-upload-options.dto.js +54 -1
- package/dist/esm/modules/dms/dtos/document-file-upload-options.dto.js.map +1 -1
- package/dist/esm/modules/dms/dtos/image-file-upload-options.dto.js +69 -1
- package/dist/esm/modules/dms/dtos/image-file-upload-options.dto.js.map +1 -1
- package/dist/esm/modules/dms/dtos/multi-file-upload.dto.js +38 -5
- package/dist/esm/modules/dms/dtos/multi-file-upload.dto.js.map +1 -1
- package/dist/esm/modules/dms/dtos/video-file-upload-options.dto.js +76 -1
- package/dist/esm/modules/dms/dtos/video-file-upload-options.dto.js.map +1 -1
- package/dist/types/modules/dms/dtos/audio-file-upload-options.dto.d.ts +2 -0
- package/dist/types/modules/dms/dtos/document-file-upload-options.dto.d.ts +2 -0
- package/dist/types/modules/dms/dtos/image-file-upload-options.dto.d.ts +3 -0
- package/dist/types/modules/dms/dtos/multi-file-upload.dto.d.ts +2 -2
- package/dist/types/modules/dms/dtos/video-file-upload-options.dto.d.ts +2 -0
- package/dist/types/modules/dms/interfaces/audio-file-upload-options.d.ts +2 -0
- package/dist/types/modules/dms/interfaces/audio-file.d.ts +1 -0
- package/dist/types/modules/dms/interfaces/document-file-upload-options.d.ts +2 -0
- package/dist/types/modules/dms/interfaces/document-file.d.ts +1 -0
- package/dist/types/modules/dms/interfaces/image-file-upload-options.d.ts +3 -0
- package/dist/types/modules/dms/interfaces/image-file.d.ts +2 -0
- package/dist/types/modules/dms/interfaces/multi-file-upload.d.ts +2 -2
- package/dist/types/modules/dms/interfaces/video-file-upload-options.d.ts +2 -0
- package/dist/types/modules/dms/interfaces/video-file.d.ts +1 -0
- package/package.json +1 -1
|
@@ -12,15 +12,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.AudioFileUploadOptionsDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
16
|
class AudioFileUploadOptionsDto {
|
|
16
17
|
}
|
|
17
18
|
exports.AudioFileUploadOptionsDto = AudioFileUploadOptionsDto;
|
|
18
19
|
__decorate([
|
|
20
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
21
|
+
description: 'Destination folder path for the audio file',
|
|
22
|
+
example: 'audio/podcasts/2024',
|
|
23
|
+
}),
|
|
19
24
|
(0, class_validator_1.IsOptional)(),
|
|
20
25
|
(0, class_validator_1.IsString)(),
|
|
21
26
|
__metadata("design:type", String)
|
|
22
27
|
], AudioFileUploadOptionsDto.prototype, "folder", void 0);
|
|
23
28
|
__decorate([
|
|
29
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
30
|
+
description: 'Maximum file size allowed in megabytes (1-200 MB)',
|
|
31
|
+
minimum: 1,
|
|
32
|
+
maximum: 200,
|
|
33
|
+
example: 50,
|
|
34
|
+
}),
|
|
24
35
|
(0, class_validator_1.IsOptional)(),
|
|
25
36
|
(0, class_validator_1.IsNumber)(),
|
|
26
37
|
(0, class_validator_1.Min)(1),
|
|
@@ -30,44 +41,80 @@ __decorate([
|
|
|
30
41
|
__metadata("design:type", Number)
|
|
31
42
|
], AudioFileUploadOptionsDto.prototype, "maxSizeInMB", void 0);
|
|
32
43
|
__decorate([
|
|
44
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
45
|
+
description: 'Allowed MIME types for audio files',
|
|
46
|
+
example: ['audio/mpeg', 'audio/wav', 'audio/flac', 'audio/aac'],
|
|
47
|
+
type: [String],
|
|
48
|
+
}),
|
|
33
49
|
(0, class_validator_1.IsOptional)(),
|
|
34
50
|
(0, class_validator_1.IsArray)(),
|
|
35
51
|
(0, class_validator_1.IsString)({ each: true }),
|
|
36
52
|
__metadata("design:type", Array)
|
|
37
53
|
], AudioFileUploadOptionsDto.prototype, "allowedMimeTypes", void 0);
|
|
38
54
|
__decorate([
|
|
55
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
56
|
+
description: 'Whether the audio file should be publicly accessible',
|
|
57
|
+
example: false,
|
|
58
|
+
}),
|
|
39
59
|
(0, class_validator_1.IsOptional)(),
|
|
40
60
|
(0, class_validator_1.IsBoolean)(),
|
|
41
61
|
(0, class_transformer_1.Transform)(({ value }) => value === 'true' || value === true),
|
|
42
62
|
__metadata("design:type", Boolean)
|
|
43
63
|
], AudioFileUploadOptionsDto.prototype, "isPublic", void 0);
|
|
44
64
|
__decorate([
|
|
65
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
66
|
+
description: 'Tags for categorizing and searching the audio file',
|
|
67
|
+
example: ['podcast', 'interview', 'music'],
|
|
68
|
+
type: [String],
|
|
69
|
+
}),
|
|
45
70
|
(0, class_validator_1.IsOptional)(),
|
|
46
71
|
(0, class_validator_1.IsArray)(),
|
|
47
72
|
(0, class_validator_1.IsString)({ each: true }),
|
|
48
73
|
__metadata("design:type", Array)
|
|
49
74
|
], AudioFileUploadOptionsDto.prototype, "tags", void 0);
|
|
50
75
|
__decorate([
|
|
76
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
77
|
+
description: 'Title of the audio file',
|
|
78
|
+
example: 'Tech Trends 2024 - Episode 42',
|
|
79
|
+
}),
|
|
51
80
|
(0, class_validator_1.IsOptional)(),
|
|
52
81
|
(0, class_validator_1.IsString)(),
|
|
53
82
|
__metadata("design:type", String)
|
|
54
83
|
], AudioFileUploadOptionsDto.prototype, "title", void 0);
|
|
55
84
|
__decorate([
|
|
85
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
86
|
+
description: 'Artist or creator of the audio content',
|
|
87
|
+
example: 'John Doe',
|
|
88
|
+
}),
|
|
56
89
|
(0, class_validator_1.IsOptional)(),
|
|
57
90
|
(0, class_validator_1.IsString)(),
|
|
58
91
|
__metadata("design:type", String)
|
|
59
92
|
], AudioFileUploadOptionsDto.prototype, "artist", void 0);
|
|
60
93
|
__decorate([
|
|
94
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
95
|
+
description: 'Album name if the audio is part of an album',
|
|
96
|
+
example: 'Greatest Hits 2024',
|
|
97
|
+
}),
|
|
61
98
|
(0, class_validator_1.IsOptional)(),
|
|
62
99
|
(0, class_validator_1.IsString)(),
|
|
63
100
|
__metadata("design:type", String)
|
|
64
101
|
], AudioFileUploadOptionsDto.prototype, "album", void 0);
|
|
65
102
|
__decorate([
|
|
103
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
104
|
+
description: 'Genre or category of the audio content',
|
|
105
|
+
example: 'Podcast',
|
|
106
|
+
}),
|
|
66
107
|
(0, class_validator_1.IsOptional)(),
|
|
67
108
|
(0, class_validator_1.IsString)(),
|
|
68
109
|
__metadata("design:type", String)
|
|
69
110
|
], AudioFileUploadOptionsDto.prototype, "genre", void 0);
|
|
70
111
|
__decorate([
|
|
112
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
113
|
+
description: 'Year of release or recording (1900-2100)',
|
|
114
|
+
minimum: 1900,
|
|
115
|
+
maximum: 2100,
|
|
116
|
+
example: 2024,
|
|
117
|
+
}),
|
|
71
118
|
(0, class_validator_1.IsOptional)(),
|
|
72
119
|
(0, class_validator_1.IsNumber)(),
|
|
73
120
|
(0, class_validator_1.Min)(1900),
|
|
@@ -76,44 +123,92 @@ __decorate([
|
|
|
76
123
|
__metadata("design:type", Number)
|
|
77
124
|
], AudioFileUploadOptionsDto.prototype, "year", void 0);
|
|
78
125
|
__decorate([
|
|
126
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
127
|
+
description: 'Detailed description of the audio content',
|
|
128
|
+
example: 'An in-depth discussion about emerging technology trends',
|
|
129
|
+
}),
|
|
79
130
|
(0, class_validator_1.IsOptional)(),
|
|
80
131
|
(0, class_validator_1.IsString)(),
|
|
81
132
|
__metadata("design:type", String)
|
|
82
133
|
], AudioFileUploadOptionsDto.prototype, "description", void 0);
|
|
83
134
|
__decorate([
|
|
135
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
136
|
+
description: 'Whether to generate a waveform visualization for the audio',
|
|
137
|
+
example: true,
|
|
138
|
+
}),
|
|
84
139
|
(0, class_validator_1.IsOptional)(),
|
|
85
140
|
(0, class_validator_1.IsBoolean)(),
|
|
86
141
|
(0, class_transformer_1.Transform)(({ value }) => value === 'true' || value === true),
|
|
87
142
|
__metadata("design:type", Boolean)
|
|
88
143
|
], AudioFileUploadOptionsDto.prototype, "generateWaveform", void 0);
|
|
89
144
|
__decorate([
|
|
145
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
146
|
+
description: 'Whether to extract embedded cover art from the audio file',
|
|
147
|
+
example: true,
|
|
148
|
+
}),
|
|
90
149
|
(0, class_validator_1.IsOptional)(),
|
|
91
150
|
(0, class_validator_1.IsBoolean)(),
|
|
92
151
|
(0, class_transformer_1.Transform)(({ value }) => value === 'true' || value === true),
|
|
93
152
|
__metadata("design:type", Boolean)
|
|
94
153
|
], AudioFileUploadOptionsDto.prototype, "extractCoverArt", void 0);
|
|
95
154
|
__decorate([
|
|
155
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
156
|
+
description: 'Whether to enable audio transcoding to multiple formats',
|
|
157
|
+
example: false,
|
|
158
|
+
}),
|
|
96
159
|
(0, class_validator_1.IsOptional)(),
|
|
97
160
|
(0, class_validator_1.IsBoolean)(),
|
|
98
161
|
(0, class_transformer_1.Transform)(({ value }) => value === 'true' || value === true),
|
|
99
162
|
__metadata("design:type", Boolean)
|
|
100
163
|
], AudioFileUploadOptionsDto.prototype, "enableTranscoding", void 0);
|
|
101
164
|
__decorate([
|
|
165
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
166
|
+
description: 'Target quality levels for transcoded audio files',
|
|
167
|
+
example: ['high', 'medium'],
|
|
168
|
+
enum: ['high', 'medium', 'low'],
|
|
169
|
+
isArray: true,
|
|
170
|
+
}),
|
|
102
171
|
(0, class_validator_1.IsOptional)(),
|
|
103
172
|
(0, class_validator_1.IsArray)(),
|
|
104
173
|
(0, class_validator_1.IsEnum)(['high', 'medium', 'low'], { each: true }),
|
|
105
174
|
__metadata("design:type", Array)
|
|
106
175
|
], AudioFileUploadOptionsDto.prototype, "targetQualities", void 0);
|
|
107
176
|
__decorate([
|
|
177
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
178
|
+
description: 'Whether to enable streaming capabilities for the audio file',
|
|
179
|
+
example: true,
|
|
180
|
+
}),
|
|
108
181
|
(0, class_validator_1.IsOptional)(),
|
|
109
182
|
(0, class_validator_1.IsBoolean)(),
|
|
110
183
|
(0, class_transformer_1.Transform)(({ value }) => value === 'true' || value === true),
|
|
111
184
|
__metadata("design:type", Boolean)
|
|
112
185
|
], AudioFileUploadOptionsDto.prototype, "enableStreaming", void 0);
|
|
113
186
|
__decorate([
|
|
187
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
188
|
+
description: 'Whether to preserve the original filename',
|
|
189
|
+
example: false,
|
|
190
|
+
}),
|
|
114
191
|
(0, class_validator_1.IsOptional)(),
|
|
115
192
|
(0, class_validator_1.IsBoolean)(),
|
|
116
193
|
(0, class_transformer_1.Transform)(({ value }) => value === 'true' || value === true),
|
|
117
194
|
__metadata("design:type", Boolean)
|
|
118
195
|
], AudioFileUploadOptionsDto.prototype, "preserveOriginalName", void 0);
|
|
196
|
+
__decorate([
|
|
197
|
+
(0, swagger_1.ApiProperty)({
|
|
198
|
+
description: 'ID of the user uploading the audio file',
|
|
199
|
+
example: 1,
|
|
200
|
+
}),
|
|
201
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
202
|
+
(0, class_validator_1.IsNumber)(),
|
|
203
|
+
__metadata("design:type", Number)
|
|
204
|
+
], AudioFileUploadOptionsDto.prototype, "userId", void 0);
|
|
205
|
+
__decorate([
|
|
206
|
+
(0, swagger_1.ApiProperty)({
|
|
207
|
+
description: 'ID of the organization the audio file belongs to',
|
|
208
|
+
example: 12,
|
|
209
|
+
}),
|
|
210
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
211
|
+
(0, class_validator_1.IsNumber)(),
|
|
212
|
+
__metadata("design:type", Number)
|
|
213
|
+
], AudioFileUploadOptionsDto.prototype, "organizationId", void 0);
|
|
119
214
|
//# sourceMappingURL=audio-file-upload-options.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audio-file-upload-options.dto.js","sourceRoot":"","sources":["../../../../../src/modules/dms/dtos/audio-file-upload-options.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"audio-file-upload-options.dto.js","sourceRoot":"","sources":["../../../../../src/modules/dms/dtos/audio-file-upload-options.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmH;AACnH,yDAAoD;AACpD,6CAAmE;AAEnE,MAAa,yBAAyB;CA+KrC;AA/KD,8DA+KC;AAxKG;IANC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,4CAA4C;QACzD,OAAO,EAAE,qBAAqB;KACjC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S,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,IAAI,CAAC;;kEACnC;AAS1B;IAPC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,2CAA2C;QACxD,OAAO,EAAE,KAAK;KACjB,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,IAAI,CAAC;;uEAC9B;AAQ/B;IANC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,yCAAyC;QACtD,OAAO,EAAE,CAAC;KACb,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;yDACK;AAQhB;IANC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,kDAAkD;QAC/D,OAAO,EAAE,EAAE;KACd,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;iEACa"}
|
|
@@ -11,48 +11,101 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.DocumentFileUploadOptionsDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
15
|
class DocumentFileUploadOptionsDto {
|
|
15
16
|
}
|
|
16
17
|
exports.DocumentFileUploadOptionsDto = DocumentFileUploadOptionsDto;
|
|
17
18
|
__decorate([
|
|
19
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
20
|
+
description: 'Destination folder path for the document',
|
|
21
|
+
example: 'documents/reports/2024',
|
|
22
|
+
}),
|
|
18
23
|
(0, class_validator_1.IsString)(),
|
|
19
24
|
(0, class_validator_1.IsOptional)(),
|
|
20
25
|
__metadata("design:type", String)
|
|
21
26
|
], DocumentFileUploadOptionsDto.prototype, "folder", void 0);
|
|
22
27
|
__decorate([
|
|
28
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
29
|
+
description: 'Maximum file size allowed in megabytes',
|
|
30
|
+
example: 10,
|
|
31
|
+
}),
|
|
23
32
|
(0, class_validator_1.IsNumber)(),
|
|
24
33
|
(0, class_validator_1.IsOptional)(),
|
|
25
34
|
__metadata("design:type", Number)
|
|
26
35
|
], DocumentFileUploadOptionsDto.prototype, "maxSizeInMB", void 0);
|
|
27
36
|
__decorate([
|
|
37
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
38
|
+
description: 'Allowed MIME types for document files',
|
|
39
|
+
example: ['application/pdf', 'application/msword', 'text/plain'],
|
|
40
|
+
type: [String],
|
|
41
|
+
}),
|
|
28
42
|
(0, class_validator_1.IsString)({ each: true }),
|
|
29
43
|
(0, class_validator_1.IsOptional)(),
|
|
30
44
|
__metadata("design:type", Array)
|
|
31
45
|
], DocumentFileUploadOptionsDto.prototype, "allowedMimeTypes", void 0);
|
|
32
46
|
__decorate([
|
|
47
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
48
|
+
description: 'Whether the document should be publicly accessible',
|
|
49
|
+
example: false,
|
|
50
|
+
}),
|
|
33
51
|
(0, class_validator_1.IsBoolean)(),
|
|
34
52
|
(0, class_validator_1.IsOptional)(),
|
|
35
53
|
__metadata("design:type", Boolean)
|
|
36
54
|
], DocumentFileUploadOptionsDto.prototype, "isPublic", void 0);
|
|
37
55
|
__decorate([
|
|
56
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
57
|
+
description: 'Tags for categorizing and searching the document',
|
|
58
|
+
example: ['report', 'quarterly', 'financial'],
|
|
59
|
+
type: [String],
|
|
60
|
+
}),
|
|
38
61
|
(0, class_validator_1.IsArray)(),
|
|
39
62
|
(0, class_validator_1.IsString)({ each: true }),
|
|
40
63
|
(0, class_validator_1.IsOptional)(),
|
|
41
64
|
__metadata("design:type", Array)
|
|
42
65
|
], DocumentFileUploadOptionsDto.prototype, "tags", void 0);
|
|
43
66
|
__decorate([
|
|
67
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
68
|
+
description: 'Description of the document content',
|
|
69
|
+
example: 'Q4 2024 Financial Report',
|
|
70
|
+
}),
|
|
44
71
|
(0, class_validator_1.IsString)(),
|
|
45
72
|
(0, class_validator_1.IsOptional)(),
|
|
46
73
|
__metadata("design:type", String)
|
|
47
74
|
], DocumentFileUploadOptionsDto.prototype, "description", void 0);
|
|
48
75
|
__decorate([
|
|
76
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
77
|
+
description: 'Whether to preserve the original filename',
|
|
78
|
+
example: true,
|
|
79
|
+
}),
|
|
49
80
|
(0, class_validator_1.IsBoolean)(),
|
|
50
81
|
(0, class_validator_1.IsOptional)(),
|
|
51
82
|
__metadata("design:type", Boolean)
|
|
52
83
|
], DocumentFileUploadOptionsDto.prototype, "preserveOriginalName", void 0);
|
|
53
84
|
__decorate([
|
|
85
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
86
|
+
description: 'Whether to enable version control for the document',
|
|
87
|
+
example: true,
|
|
88
|
+
}),
|
|
54
89
|
(0, class_validator_1.IsBoolean)(),
|
|
55
90
|
(0, class_validator_1.IsOptional)(),
|
|
56
91
|
__metadata("design:type", Boolean)
|
|
57
92
|
], DocumentFileUploadOptionsDto.prototype, "enableVersioning", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, swagger_1.ApiProperty)({
|
|
95
|
+
description: 'ID of the user uploading the document',
|
|
96
|
+
example: 1,
|
|
97
|
+
}),
|
|
98
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
99
|
+
(0, class_validator_1.IsNumber)(),
|
|
100
|
+
__metadata("design:type", Number)
|
|
101
|
+
], DocumentFileUploadOptionsDto.prototype, "userId", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, swagger_1.ApiProperty)({
|
|
104
|
+
description: 'ID of the organization the document belongs to',
|
|
105
|
+
example: 12,
|
|
106
|
+
}),
|
|
107
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
108
|
+
(0, class_validator_1.IsNumber)(),
|
|
109
|
+
__metadata("design:type", Number)
|
|
110
|
+
], DocumentFileUploadOptionsDto.prototype, "organizationId", void 0);
|
|
58
111
|
//# sourceMappingURL=document-file-upload-options.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-file-upload-options.dto.js","sourceRoot":"","sources":["../../../../../src/modules/dms/dtos/document-file-upload-options.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"document-file-upload-options.dto.js","sourceRoot":"","sources":["../../../../../src/modules/dms/dtos/document-file-upload-options.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiG;AACjG,6CAAmE;AAEnE,MAAa,4BAA4B;CAmFxC;AAnFD,oEAmFC;AA5EG;IANC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,0CAA0C;QACvD,OAAO,EAAE,wBAAwB;KACpC,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4DACG;AAQhB;IANC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,wCAAwC;QACrD,OAAO,EAAE,EAAE;KACd,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iEACQ;AASrB;IAPC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,uCAAuC;QACpD,OAAO,EAAE,CAAC,iBAAiB,EAAE,oBAAoB,EAAE,YAAY,CAAC;QAChE,IAAI,EAAE,CAAC,MAAM,CAAC;KACjB,CAAC;IACD,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACxB,IAAA,4BAAU,GAAE;;sEACe;AAQ5B;IANC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,oDAAoD;QACjE,OAAO,EAAE,KAAK;KACjB,CAAC;IACD,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;8DACM;AAUnB;IARC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,kDAAkD;QAC/D,OAAO,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,WAAW,CAAC;QAC7C,IAAI,EAAE,CAAC,MAAM,CAAC;KACjB,CAAC;IACD,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACxB,IAAA,4BAAU,GAAE;;0DACG;AAQhB;IANC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,qCAAqC;QAClD,OAAO,EAAE,0BAA0B;KACtC,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iEACQ;AAQrB;IANC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,2CAA2C;QACxD,OAAO,EAAE,IAAI;KAChB,CAAC;IACD,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;0EACkB;AAQ/B;IANC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,oDAAoD;QACjE,OAAO,EAAE,IAAI;KAChB,CAAC;IACD,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;sEACc;AAQ3B;IANC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,uCAAuC;QACpD,OAAO,EAAE,CAAC;KACb,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;4DACK;AAQhB;IANC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,gDAAgD;QAC7D,OAAO,EAAE,EAAE;KACd,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;oEACa"}
|
|
@@ -10,54 +10,122 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ImageFileUploadOptionsDto = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
13
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
16
|
class ImageFileUploadOptionsDto {
|
|
15
17
|
}
|
|
16
18
|
exports.ImageFileUploadOptionsDto = ImageFileUploadOptionsDto;
|
|
17
19
|
__decorate([
|
|
20
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
21
|
+
description: 'Destination folder path for the image',
|
|
22
|
+
example: 'images/products/2024',
|
|
23
|
+
}),
|
|
18
24
|
(0, class_validator_1.IsString)(),
|
|
19
25
|
(0, class_validator_1.IsOptional)(),
|
|
20
26
|
__metadata("design:type", String)
|
|
21
27
|
], ImageFileUploadOptionsDto.prototype, "folder", void 0);
|
|
22
28
|
__decorate([
|
|
29
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
30
|
+
description: 'Maximum file size allowed in megabytes',
|
|
31
|
+
example: 5,
|
|
32
|
+
}),
|
|
23
33
|
(0, class_validator_1.IsNumber)(),
|
|
24
34
|
(0, class_validator_1.IsOptional)(),
|
|
25
35
|
__metadata("design:type", Number)
|
|
26
36
|
], ImageFileUploadOptionsDto.prototype, "maxSizeInMB", void 0);
|
|
27
37
|
__decorate([
|
|
38
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
39
|
+
description: 'Allowed MIME types for image files',
|
|
40
|
+
example: ['image/jpeg', 'image/png', 'image/webp'],
|
|
41
|
+
type: [String],
|
|
42
|
+
}),
|
|
28
43
|
(0, class_validator_1.IsString)({ each: true }),
|
|
29
44
|
(0, class_validator_1.IsOptional)(),
|
|
30
45
|
__metadata("design:type", Array)
|
|
31
46
|
], ImageFileUploadOptionsDto.prototype, "allowedMimeTypes", void 0);
|
|
32
47
|
__decorate([
|
|
48
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
49
|
+
description: 'Whether to automatically generate a thumbnail',
|
|
50
|
+
example: true,
|
|
51
|
+
}),
|
|
33
52
|
(0, class_validator_1.IsBoolean)(),
|
|
34
53
|
(0, class_validator_1.IsOptional)(),
|
|
35
54
|
__metadata("design:type", Boolean)
|
|
36
55
|
], ImageFileUploadOptionsDto.prototype, "generateThumbnail", void 0);
|
|
37
56
|
__decorate([
|
|
57
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
58
|
+
description: 'Whether to make the image publicly accessible (legacy)',
|
|
59
|
+
example: false,
|
|
60
|
+
deprecated: true,
|
|
61
|
+
}),
|
|
38
62
|
(0, class_validator_1.IsBoolean)(),
|
|
39
63
|
(0, class_validator_1.IsOptional)(),
|
|
40
64
|
__metadata("design:type", Boolean)
|
|
41
65
|
], ImageFileUploadOptionsDto.prototype, "makePublic", void 0);
|
|
42
66
|
__decorate([
|
|
67
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
68
|
+
description: 'Whether the image should be publicly accessible',
|
|
69
|
+
example: false,
|
|
70
|
+
}),
|
|
43
71
|
(0, class_validator_1.IsBoolean)(),
|
|
44
72
|
(0, class_validator_1.IsOptional)(),
|
|
45
73
|
__metadata("design:type", Boolean)
|
|
46
74
|
], ImageFileUploadOptionsDto.prototype, "isPublic", void 0);
|
|
47
75
|
__decorate([
|
|
76
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
77
|
+
description: 'Tags for categorizing and searching the image',
|
|
78
|
+
example: ['product', 'electronics', 'featured'],
|
|
79
|
+
type: [String],
|
|
80
|
+
}),
|
|
48
81
|
(0, class_validator_1.IsArray)(),
|
|
49
82
|
(0, class_validator_1.IsString)({ each: true }),
|
|
50
83
|
(0, class_validator_1.IsOptional)(),
|
|
51
84
|
__metadata("design:type", Array)
|
|
52
85
|
], ImageFileUploadOptionsDto.prototype, "tags", void 0);
|
|
53
86
|
__decorate([
|
|
87
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
88
|
+
description: 'Alternative text for accessibility (screen readers)',
|
|
89
|
+
example: 'Red laptop on a white desk',
|
|
90
|
+
}),
|
|
54
91
|
(0, class_validator_1.IsString)(),
|
|
55
92
|
(0, class_validator_1.IsOptional)(),
|
|
56
93
|
__metadata("design:type", String)
|
|
57
94
|
], ImageFileUploadOptionsDto.prototype, "alt", void 0);
|
|
58
95
|
__decorate([
|
|
96
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
97
|
+
description: 'Caption to display with the image',
|
|
98
|
+
example: 'Our latest laptop model in cherry red',
|
|
99
|
+
}),
|
|
59
100
|
(0, class_validator_1.IsString)(),
|
|
60
101
|
(0, class_validator_1.IsOptional)(),
|
|
61
102
|
__metadata("design:type", String)
|
|
62
103
|
], ImageFileUploadOptionsDto.prototype, "caption", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
106
|
+
description: 'Detailed description of the image',
|
|
107
|
+
example: 'Professional product photo of our flagship laptop',
|
|
108
|
+
}),
|
|
109
|
+
(0, common_1.Optional)(),
|
|
110
|
+
(0, class_validator_1.IsString)(),
|
|
111
|
+
__metadata("design:type", String)
|
|
112
|
+
], ImageFileUploadOptionsDto.prototype, "description", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, swagger_1.ApiProperty)({
|
|
115
|
+
description: 'ID of the user uploading the image',
|
|
116
|
+
example: 1,
|
|
117
|
+
}),
|
|
118
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
119
|
+
(0, class_validator_1.IsNumber)(),
|
|
120
|
+
__metadata("design:type", Number)
|
|
121
|
+
], ImageFileUploadOptionsDto.prototype, "userId", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
(0, swagger_1.ApiProperty)({
|
|
124
|
+
description: 'ID of the organization the image belongs to',
|
|
125
|
+
example: 12,
|
|
126
|
+
}),
|
|
127
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
128
|
+
(0, class_validator_1.IsNumber)(),
|
|
129
|
+
__metadata("design:type", Number)
|
|
130
|
+
], ImageFileUploadOptionsDto.prototype, "organizationId", void 0);
|
|
63
131
|
//# sourceMappingURL=image-file-upload-options.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-file-upload-options.dto.js","sourceRoot":"","sources":["../../../../../src/modules/dms/dtos/image-file-upload-options.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"image-file-upload-options.dto.js","sourceRoot":"","sources":["../../../../../src/modules/dms/dtos/image-file-upload-options.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA0C;AAC1C,qDAAiG;AACjG,6CAAmE;AAEnE,MAAa,yBAAyB;CAoGrC;AApGD,8DAoGC;AA7FG;IANC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,uCAAuC;QACpD,OAAO,EAAE,sBAAsB;KAClC,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yDACG;AAQhB;IANC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,wCAAwC;QACrD,OAAO,EAAE,CAAC;KACb,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;8DACQ;AASrB;IAPC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,oCAAoC;QACjD,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,YAAY,CAAC;QAClD,IAAI,EAAE,CAAC,MAAM,CAAC;KACjB,CAAC;IACD,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACxB,IAAA,4BAAU,GAAE;;mEACe;AAQ5B;IANC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,+CAA+C;QAC5D,OAAO,EAAE,IAAI;KAChB,CAAC;IACD,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;oEACe;AAS5B;IAPC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,wDAAwD;QACrE,OAAO,EAAE,KAAK;QACd,UAAU,EAAE,IAAI;KACnB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IACZ,IAAA,0BAAQ,GAAE;;iEACa"}
|
|
@@ -11,30 +11,54 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.FileUploadItemDto = exports.MultiFileUploadOptionsDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
15
|
const multi_file_upload_1 = require("../interfaces/multi-file-upload");
|
|
15
16
|
class MultiFileUploadOptionsDto {
|
|
16
17
|
}
|
|
17
18
|
exports.MultiFileUploadOptionsDto = MultiFileUploadOptionsDto;
|
|
18
19
|
__decorate([
|
|
19
|
-
(0,
|
|
20
|
-
|
|
20
|
+
(0, swagger_1.ApiProperty)({
|
|
21
|
+
description: 'ID of the user uploading the files',
|
|
22
|
+
example: 1,
|
|
23
|
+
}),
|
|
24
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
25
|
+
(0, class_validator_1.IsNumber)(),
|
|
26
|
+
__metadata("design:type", Number)
|
|
21
27
|
], MultiFileUploadOptionsDto.prototype, "userId", void 0);
|
|
22
28
|
__decorate([
|
|
23
|
-
(0,
|
|
24
|
-
|
|
29
|
+
(0, swagger_1.ApiProperty)({
|
|
30
|
+
description: 'ID of the organization the files belong to',
|
|
31
|
+
example: 12,
|
|
32
|
+
}),
|
|
33
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
34
|
+
(0, class_validator_1.IsNumber)(),
|
|
35
|
+
__metadata("design:type", Number)
|
|
25
36
|
], MultiFileUploadOptionsDto.prototype, "organizationId", void 0);
|
|
26
37
|
__decorate([
|
|
38
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
39
|
+
description: 'Tags to apply to all uploaded files',
|
|
40
|
+
example: ['project-alpha', 'marketing', '2024'],
|
|
41
|
+
type: [String],
|
|
42
|
+
}),
|
|
27
43
|
(0, class_validator_1.IsOptional)(),
|
|
28
44
|
(0, class_validator_1.IsArray)(),
|
|
29
45
|
(0, class_validator_1.IsString)({ each: true }),
|
|
30
46
|
__metadata("design:type", Array)
|
|
31
47
|
], MultiFileUploadOptionsDto.prototype, "tags", void 0);
|
|
32
48
|
__decorate([
|
|
49
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
50
|
+
description: 'Description for the batch of uploaded files',
|
|
51
|
+
example: 'Marketing materials for Q4 2024 campaign',
|
|
52
|
+
}),
|
|
33
53
|
(0, class_validator_1.IsOptional)(),
|
|
34
54
|
(0, class_validator_1.IsString)(),
|
|
35
55
|
__metadata("design:type", String)
|
|
36
56
|
], MultiFileUploadOptionsDto.prototype, "description", void 0);
|
|
37
57
|
__decorate([
|
|
58
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
59
|
+
description: 'Whether all files should be publicly accessible',
|
|
60
|
+
example: false,
|
|
61
|
+
}),
|
|
38
62
|
(0, class_validator_1.IsOptional)(),
|
|
39
63
|
(0, class_validator_1.IsBoolean)(),
|
|
40
64
|
__metadata("design:type", Boolean)
|
|
@@ -43,10 +67,19 @@ class FileUploadItemDto {
|
|
|
43
67
|
}
|
|
44
68
|
exports.FileUploadItemDto = FileUploadItemDto;
|
|
45
69
|
__decorate([
|
|
70
|
+
(0, swagger_1.ApiProperty)({
|
|
71
|
+
description: 'Type of file being uploaded',
|
|
72
|
+
enum: multi_file_upload_1.FileType,
|
|
73
|
+
example: multi_file_upload_1.FileType.IMAGE,
|
|
74
|
+
}),
|
|
46
75
|
(0, class_validator_1.IsEnum)(multi_file_upload_1.FileType),
|
|
47
76
|
__metadata("design:type", String)
|
|
48
77
|
], FileUploadItemDto.prototype, "type", void 0);
|
|
49
78
|
__decorate([
|
|
79
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
80
|
+
description: 'Type-specific options for the file upload (ImageFileUploadOptionsDto, DocumentFileUploadOptionsDto, VideoFileUploadOptionsDto, or AudioFileUploadOptionsDto)',
|
|
81
|
+
example: { generateThumbnail: true, alt: 'Product image' },
|
|
82
|
+
}),
|
|
50
83
|
(0, class_validator_1.IsOptional)(),
|
|
51
84
|
__metadata("design:type", Object)
|
|
52
85
|
], FileUploadItemDto.prototype, "options", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi-file-upload.dto.js","sourceRoot":"","sources":["../../../../../src/modules/dms/dtos/multi-file-upload.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"multi-file-upload.dto.js","sourceRoot":"","sources":["../../../../../src/modules/dms/dtos/multi-file-upload.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyG;AACzG,6CAAmE;AACnE,uEAA2D;AAE3D,MAAa,yBAAyB;CA0CrC;AA1CD,8DA0CC;AAnCG;IANC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,oCAAoC;QACjD,OAAO,EAAE,CAAC;KACb,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;yDACK;AAQhB;IANC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,4CAA4C;QACzD,OAAO,EAAE,EAAE;KACd,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;iEACa;AAUxB;IARC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,qCAAqC;QAClD,OAAO,EAAE,CAAC,eAAe,EAAE,WAAW,EAAE,MAAM,CAAC;QAC/C,IAAI,EAAE,CAAC,MAAM,CAAC;KACjB,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;uDACT;AAQhB;IANC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,6CAA6C;QAC1D,OAAO,EAAE,0CAA0C;KACtD,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;8DACU;AAQrB;IANC,IAAA,6BAAm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