grm-shared-library 1.1.117 → 1.1.119
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/auth/dtos/delete-account-request-dto.js +61 -0
- package/dist/cjs/modules/auth/dtos/delete-account-request-dto.js.map +1 -0
- package/dist/cjs/modules/auth/enums/delete-account-reason.enum.js +13 -0
- package/dist/cjs/modules/auth/enums/delete-account-reason.enum.js.map +1 -0
- package/dist/cjs/modules/auth/index.js +4 -2
- package/dist/cjs/modules/auth/index.js.map +1 -1
- package/dist/cjs/modules/auth/interfaces/delete-account-request.js +3 -0
- package/dist/cjs/modules/auth/interfaces/delete-account-request.js.map +1 -0
- package/dist/cjs/modules/dms/dtos/audio-file-upload-options.dto.js +85 -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 +43 -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 +52 -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 +31 -0
- 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 +65 -0
- package/dist/cjs/modules/dms/dtos/video-file-upload-options.dto.js.map +1 -1
- package/dist/esm/modules/auth/dtos/delete-account-request-dto.js +57 -0
- package/dist/esm/modules/auth/dtos/delete-account-request-dto.js.map +1 -0
- package/dist/esm/modules/auth/enums/delete-account-reason.enum.js +10 -0
- package/dist/esm/modules/auth/enums/delete-account-reason.enum.js.map +1 -0
- package/dist/esm/modules/auth/index.js +4 -2
- package/dist/esm/modules/auth/index.js.map +1 -1
- package/dist/esm/modules/auth/interfaces/delete-account-request.js +2 -0
- package/dist/esm/modules/auth/interfaces/delete-account-request.js.map +1 -0
- package/dist/esm/modules/dms/dtos/audio-file-upload-options.dto.js +85 -0
- 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 +43 -0
- 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 +52 -0
- 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 +31 -0
- 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 +65 -0
- package/dist/esm/modules/dms/dtos/video-file-upload-options.dto.js.map +1 -1
- package/dist/types/modules/auth/dtos/delete-account-request-dto.d.ts +7 -0
- package/dist/types/modules/auth/enums/delete-account-reason.enum.d.ts +8 -0
- package/dist/types/modules/auth/index.d.ts +3 -1
- package/dist/types/modules/auth/interfaces/delete-account-request.d.ts +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,61 @@
|
|
|
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.DeleteAccountRequestDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
const delete_account_reason_enum_1 = require("../enums/delete-account-reason.enum");
|
|
16
|
+
class DeleteAccountRequestDto {
|
|
17
|
+
}
|
|
18
|
+
exports.DeleteAccountRequestDto = DeleteAccountRequestDto;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, swagger_1.ApiProperty)({
|
|
21
|
+
description: 'The ID of the user requesting account deletion',
|
|
22
|
+
example: 123,
|
|
23
|
+
type: Number
|
|
24
|
+
}),
|
|
25
|
+
(0, class_validator_1.IsNumber)(),
|
|
26
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], DeleteAccountRequestDto.prototype, "userId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, swagger_1.ApiProperty)({
|
|
31
|
+
description: 'The reason for account deletion',
|
|
32
|
+
example: 'privacy',
|
|
33
|
+
enum: delete_account_reason_enum_1.DeleteAccountReason
|
|
34
|
+
}),
|
|
35
|
+
(0, class_validator_1.IsEnum)(delete_account_reason_enum_1.DeleteAccountReason),
|
|
36
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], DeleteAccountRequestDto.prototype, "reason", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, swagger_1.ApiProperty)({
|
|
41
|
+
description: 'Additional comments or feedback about the deletion request',
|
|
42
|
+
example: 'I found the service difficult to navigate',
|
|
43
|
+
required: false,
|
|
44
|
+
maxLength: 500
|
|
45
|
+
}),
|
|
46
|
+
(0, class_validator_1.IsString)(),
|
|
47
|
+
(0, class_validator_1.IsOptional)(),
|
|
48
|
+
(0, class_validator_1.MaxLength)(500),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], DeleteAccountRequestDto.prototype, "additionalComments", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, swagger_1.ApiProperty)({
|
|
53
|
+
description: 'Email address confirmation for verification',
|
|
54
|
+
example: 'user@example.com',
|
|
55
|
+
format: 'email'
|
|
56
|
+
}),
|
|
57
|
+
(0, class_validator_1.IsEmail)(),
|
|
58
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], DeleteAccountRequestDto.prototype, "confirmEmail", void 0);
|
|
61
|
+
//# sourceMappingURL=delete-account-request-dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-account-request-dto.js","sourceRoot":"","sources":["../../../../../src/modules/auth/dtos/delete-account-request-dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyG;AACzG,6CAA8C;AAC9C,oFAA0E;AAE1E,MAAa,uBAAuB;CAsCnC;AAtCD,0DAsCC;AA9BG;IAPC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,gDAAgD;QAC7D,OAAO,EAAE,GAAG;QACZ,IAAI,EAAE,MAAM;KACf,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;uDACG;AAShB;IAPC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,iCAAiC;QAC9C,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,gDAAmB;KAC5B,CAAC;IACD,IAAA,wBAAM,EAAC,gDAAmB,CAAC;IAC3B,IAAA,4BAAU,GAAE;;uDACgB;AAW7B;IATC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,4DAA4D;QACzE,OAAO,EAAE,2CAA2C;QACpD,QAAQ,EAAE,KAAK;QACf,SAAS,EAAE,GAAG;KACjB,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,GAAG,CAAC;;mEACa;AAS5B;IAPC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,6CAA6C;QAC1D,OAAO,EAAE,kBAAkB;QAC3B,MAAM,EAAE,OAAO;KAClB,CAAC;IACD,IAAA,yBAAO,GAAE;IACT,IAAA,4BAAU,GAAE;;6DACS"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteAccountReason = void 0;
|
|
4
|
+
var DeleteAccountReason;
|
|
5
|
+
(function (DeleteAccountReason) {
|
|
6
|
+
DeleteAccountReason["PRIVACY"] = "Privacy Concerns";
|
|
7
|
+
DeleteAccountReason["NO_LONGER_NEEDED"] = "No Longer Needed";
|
|
8
|
+
DeleteAccountReason["SWITCHING"] = "Switching to Another Service";
|
|
9
|
+
DeleteAccountReason["DIFFICULT_TO_USE"] = "Difficult to Use";
|
|
10
|
+
DeleteAccountReason["SECURITY"] = "Security Issues";
|
|
11
|
+
DeleteAccountReason["OTHER"] = "Other";
|
|
12
|
+
})(DeleteAccountReason || (exports.DeleteAccountReason = DeleteAccountReason = {}));
|
|
13
|
+
//# sourceMappingURL=delete-account-reason.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-account-reason.enum.js","sourceRoot":"","sources":["../../../../../src/modules/auth/enums/delete-account-reason.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,mBAOX;AAPD,WAAY,mBAAmB;IAC3B,mDAA4B,CAAA;IAC5B,4DAAqC,CAAA;IACrC,iEAA0C,CAAA;IAC1C,4DAAqC,CAAA;IACrC,mDAA4B,CAAA;IAC5B,sCAAe,CAAA;AACnB,CAAC,EAPW,mBAAmB,mCAAnB,mBAAmB,QAO9B"}
|
|
@@ -28,8 +28,10 @@ __exportStar(require("./dtos/login-mobile-user.dto"), exports);
|
|
|
28
28
|
__exportStar(require("./dtos/register-mobile-user.dto"), exports);
|
|
29
29
|
__exportStar(require("./dtos/login-response.dto"), exports);
|
|
30
30
|
__exportStar(require("./dtos/register-response.dto"), exports);
|
|
31
|
+
__exportStar(require("./dtos/delete-account-request-dto"), exports);
|
|
31
32
|
// Enums
|
|
33
|
+
__exportStar(require("./enums/delete-account-reason.enum"), exports);
|
|
32
34
|
__exportStar(require("./enums/otp-action"), exports);
|
|
33
|
-
//
|
|
34
|
-
__exportStar(require("./
|
|
35
|
+
// Interfaces
|
|
36
|
+
__exportStar(require("./interfaces/delete-account-request"), exports);
|
|
35
37
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO;AACP,sDAAoC;AACpC,mDAAiC;AACjC,4DAA0C;AAC1C,6DAA2C;AAC3C,6DAA2C;AAC3C,sDAAoC;AACpC,wDAAsC;AACtC,wDAAsC;AACtC,2DAAyC;AACzC,+DAA6C;AAC7C,kEAAgD;AAChD,4DAA0C;AAC1C,+DAA6C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO;AACP,sDAAoC;AACpC,mDAAiC;AACjC,4DAA0C;AAC1C,6DAA2C;AAC3C,6DAA2C;AAC3C,sDAAoC;AACpC,wDAAsC;AACtC,wDAAsC;AACtC,2DAAyC;AACzC,+DAA6C;AAC7C,kEAAgD;AAChD,4DAA0C;AAC1C,+DAA6C;AAC7C,oEAAkD;AAElD,QAAQ;AACR,qEAAmD;AACnD,qDAAmC;AAEnC,aAAa;AACb,sEAAoD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-account-request.js","sourceRoot":"","sources":["../../../../../src/modules/auth/interfaces/delete-account-request.ts"],"names":[],"mappings":""}
|
|
@@ -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,52 +123,90 @@ __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);
|
|
119
196
|
__decorate([
|
|
197
|
+
(0, swagger_1.ApiProperty)({
|
|
198
|
+
description: 'ID of the user uploading the audio file',
|
|
199
|
+
example: 1,
|
|
200
|
+
}),
|
|
120
201
|
(0, class_validator_1.IsNotEmpty)(),
|
|
121
202
|
(0, class_validator_1.IsNumber)(),
|
|
122
203
|
__metadata("design:type", Number)
|
|
123
204
|
], AudioFileUploadOptionsDto.prototype, "userId", void 0);
|
|
124
205
|
__decorate([
|
|
206
|
+
(0, swagger_1.ApiProperty)({
|
|
207
|
+
description: 'ID of the organization the audio file belongs to',
|
|
208
|
+
example: 12,
|
|
209
|
+
}),
|
|
125
210
|
(0, class_validator_1.IsNotEmpty)(),
|
|
126
211
|
(0, class_validator_1.IsNumber)(),
|
|
127
212
|
__metadata("design:type", Number)
|
|
@@ -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,qDAAmH;AACnH,yDAAoD;
|
|
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,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;yDACK;AAahB;IAXC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,mDAAmD;QAChE,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,GAAG;QACZ,OAAO,EAAE,EAAE;KACd,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,qBAAG,EAAC,GAAG,CAAC,CAAC,4BAA4B;;IACrC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;8DACE;AAUrB;IARC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,oCAAoC;QACjD,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,CAAC;QAC/D,IAAI,EAAE,CAAC,MAAM,CAAC;KACjB,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;IACT,IAAA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Z,IAAA,0BAAQ,GAAE;;iEACa"}
|
|
@@ -11,56 +11,99 @@ 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);
|
|
58
93
|
__decorate([
|
|
94
|
+
(0, swagger_1.ApiProperty)({
|
|
95
|
+
description: 'ID of the user uploading the document',
|
|
96
|
+
example: 1,
|
|
97
|
+
}),
|
|
59
98
|
(0, class_validator_1.IsNotEmpty)(),
|
|
60
99
|
(0, class_validator_1.IsNumber)(),
|
|
61
100
|
__metadata("design:type", Number)
|
|
62
101
|
], DocumentFileUploadOptionsDto.prototype, "userId", void 0);
|
|
63
102
|
__decorate([
|
|
103
|
+
(0, swagger_1.ApiProperty)({
|
|
104
|
+
description: 'ID of the organization the document belongs to',
|
|
105
|
+
example: 12,
|
|
106
|
+
}),
|
|
64
107
|
(0, class_validator_1.IsNotEmpty)(),
|
|
65
108
|
(0, class_validator_1.IsNumber)(),
|
|
66
109
|
__metadata("design:type", Number)
|
|
@@ -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,qDAAiG;
|
|
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;IAN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,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"}
|
|
@@ -12,66 +12,118 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ImageFileUploadOptionsDto = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
16
|
class ImageFileUploadOptionsDto {
|
|
16
17
|
}
|
|
17
18
|
exports.ImageFileUploadOptionsDto = ImageFileUploadOptionsDto;
|
|
18
19
|
__decorate([
|
|
20
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
21
|
+
description: 'Destination folder path for the image',
|
|
22
|
+
example: 'images/products/2024',
|
|
23
|
+
}),
|
|
19
24
|
(0, class_validator_1.IsString)(),
|
|
20
25
|
(0, class_validator_1.IsOptional)(),
|
|
21
26
|
__metadata("design:type", String)
|
|
22
27
|
], ImageFileUploadOptionsDto.prototype, "folder", void 0);
|
|
23
28
|
__decorate([
|
|
29
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
30
|
+
description: 'Maximum file size allowed in megabytes',
|
|
31
|
+
example: 5,
|
|
32
|
+
}),
|
|
24
33
|
(0, class_validator_1.IsNumber)(),
|
|
25
34
|
(0, class_validator_1.IsOptional)(),
|
|
26
35
|
__metadata("design:type", Number)
|
|
27
36
|
], ImageFileUploadOptionsDto.prototype, "maxSizeInMB", void 0);
|
|
28
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
|
+
}),
|
|
29
43
|
(0, class_validator_1.IsString)({ each: true }),
|
|
30
44
|
(0, class_validator_1.IsOptional)(),
|
|
31
45
|
__metadata("design:type", Array)
|
|
32
46
|
], ImageFileUploadOptionsDto.prototype, "allowedMimeTypes", void 0);
|
|
33
47
|
__decorate([
|
|
48
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
49
|
+
description: 'Whether to automatically generate a thumbnail',
|
|
50
|
+
example: true,
|
|
51
|
+
}),
|
|
34
52
|
(0, class_validator_1.IsBoolean)(),
|
|
35
53
|
(0, class_validator_1.IsOptional)(),
|
|
36
54
|
__metadata("design:type", Boolean)
|
|
37
55
|
], ImageFileUploadOptionsDto.prototype, "generateThumbnail", void 0);
|
|
38
56
|
__decorate([
|
|
57
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
58
|
+
description: 'Whether to make the image publicly accessible (legacy)',
|
|
59
|
+
example: false,
|
|
60
|
+
deprecated: true,
|
|
61
|
+
}),
|
|
39
62
|
(0, class_validator_1.IsBoolean)(),
|
|
40
63
|
(0, class_validator_1.IsOptional)(),
|
|
41
64
|
__metadata("design:type", Boolean)
|
|
42
65
|
], ImageFileUploadOptionsDto.prototype, "makePublic", void 0);
|
|
43
66
|
__decorate([
|
|
67
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
68
|
+
description: 'Whether the image should be publicly accessible',
|
|
69
|
+
example: false,
|
|
70
|
+
}),
|
|
44
71
|
(0, class_validator_1.IsBoolean)(),
|
|
45
72
|
(0, class_validator_1.IsOptional)(),
|
|
46
73
|
__metadata("design:type", Boolean)
|
|
47
74
|
], ImageFileUploadOptionsDto.prototype, "isPublic", void 0);
|
|
48
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
|
+
}),
|
|
49
81
|
(0, class_validator_1.IsArray)(),
|
|
50
82
|
(0, class_validator_1.IsString)({ each: true }),
|
|
51
83
|
(0, class_validator_1.IsOptional)(),
|
|
52
84
|
__metadata("design:type", Array)
|
|
53
85
|
], ImageFileUploadOptionsDto.prototype, "tags", void 0);
|
|
54
86
|
__decorate([
|
|
87
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
88
|
+
description: 'Alternative text for accessibility (screen readers)',
|
|
89
|
+
example: 'Red laptop on a white desk',
|
|
90
|
+
}),
|
|
55
91
|
(0, class_validator_1.IsString)(),
|
|
56
92
|
(0, class_validator_1.IsOptional)(),
|
|
57
93
|
__metadata("design:type", String)
|
|
58
94
|
], ImageFileUploadOptionsDto.prototype, "alt", void 0);
|
|
59
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
|
+
}),
|
|
60
100
|
(0, class_validator_1.IsString)(),
|
|
61
101
|
(0, class_validator_1.IsOptional)(),
|
|
62
102
|
__metadata("design:type", String)
|
|
63
103
|
], ImageFileUploadOptionsDto.prototype, "caption", void 0);
|
|
64
104
|
__decorate([
|
|
105
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
106
|
+
description: 'Detailed description of the image',
|
|
107
|
+
example: 'Professional product photo of our flagship laptop',
|
|
108
|
+
}),
|
|
65
109
|
(0, common_1.Optional)(),
|
|
66
110
|
(0, class_validator_1.IsString)(),
|
|
67
111
|
__metadata("design:type", String)
|
|
68
112
|
], ImageFileUploadOptionsDto.prototype, "description", void 0);
|
|
69
113
|
__decorate([
|
|
114
|
+
(0, swagger_1.ApiProperty)({
|
|
115
|
+
description: 'ID of the user uploading the image',
|
|
116
|
+
example: 1,
|
|
117
|
+
}),
|
|
70
118
|
(0, class_validator_1.IsNotEmpty)(),
|
|
71
119
|
(0, class_validator_1.IsNumber)(),
|
|
72
120
|
__metadata("design:type", Number)
|
|
73
121
|
], ImageFileUploadOptionsDto.prototype, "userId", void 0);
|
|
74
122
|
__decorate([
|
|
123
|
+
(0, swagger_1.ApiProperty)({
|
|
124
|
+
description: 'ID of the organization the image belongs to',
|
|
125
|
+
example: 12,
|
|
126
|
+
}),
|
|
75
127
|
(0, class_validator_1.IsNotEmpty)(),
|
|
76
128
|
(0, class_validator_1.IsNumber)(),
|
|
77
129
|
__metadata("design:type", Number)
|
|
@@ -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,2CAA0C;AAC1C,qDAAiG;
|
|
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,CAA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,mCAAmC;QAChD,OAAO,EAAE,mDAAmD;KAC/D,CAAC;IACD,IAAA,iBAAQ,GAAE;IACV,IAAA,0BAAQ,GAAE;;8DACU;AAQrB;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,6CAA6C;QAC1D,OAAO,EAAE,EAAE;KACd,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;iEACa"}
|
|
@@ -11,32 +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([
|
|
20
|
+
(0, swagger_1.ApiProperty)({
|
|
21
|
+
description: 'ID of the user uploading the files',
|
|
22
|
+
example: 1,
|
|
23
|
+
}),
|
|
19
24
|
(0, class_validator_1.IsNotEmpty)(),
|
|
20
25
|
(0, class_validator_1.IsNumber)(),
|
|
21
26
|
__metadata("design:type", Number)
|
|
22
27
|
], MultiFileUploadOptionsDto.prototype, "userId", void 0);
|
|
23
28
|
__decorate([
|
|
29
|
+
(0, swagger_1.ApiProperty)({
|
|
30
|
+
description: 'ID of the organization the files belong to',
|
|
31
|
+
example: 12,
|
|
32
|
+
}),
|
|
24
33
|
(0, class_validator_1.IsNotEmpty)(),
|
|
25
34
|
(0, class_validator_1.IsNumber)(),
|
|
26
35
|
__metadata("design:type", Number)
|
|
27
36
|
], MultiFileUploadOptionsDto.prototype, "organizationId", void 0);
|
|
28
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
|
+
}),
|
|
29
43
|
(0, class_validator_1.IsOptional)(),
|
|
30
44
|
(0, class_validator_1.IsArray)(),
|
|
31
45
|
(0, class_validator_1.IsString)({ each: true }),
|
|
32
46
|
__metadata("design:type", Array)
|
|
33
47
|
], MultiFileUploadOptionsDto.prototype, "tags", void 0);
|
|
34
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
|
+
}),
|
|
35
53
|
(0, class_validator_1.IsOptional)(),
|
|
36
54
|
(0, class_validator_1.IsString)(),
|
|
37
55
|
__metadata("design:type", String)
|
|
38
56
|
], MultiFileUploadOptionsDto.prototype, "description", void 0);
|
|
39
57
|
__decorate([
|
|
58
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
59
|
+
description: 'Whether all files should be publicly accessible',
|
|
60
|
+
example: false,
|
|
61
|
+
}),
|
|
40
62
|
(0, class_validator_1.IsOptional)(),
|
|
41
63
|
(0, class_validator_1.IsBoolean)(),
|
|
42
64
|
__metadata("design:type", Boolean)
|
|
@@ -45,10 +67,19 @@ class FileUploadItemDto {
|
|
|
45
67
|
}
|
|
46
68
|
exports.FileUploadItemDto = FileUploadItemDto;
|
|
47
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
|
+
}),
|
|
48
75
|
(0, class_validator_1.IsEnum)(multi_file_upload_1.FileType),
|
|
49
76
|
__metadata("design:type", String)
|
|
50
77
|
], FileUploadItemDto.prototype, "type", void 0);
|
|
51
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
|
+
}),
|
|
52
83
|
(0, class_validator_1.IsOptional)(),
|
|
53
84
|
__metadata("design:type", Object)
|
|
54
85
|
], FileUploadItemDto.prototype, "options", void 0);
|