listpage-next-nest 0.0.247 → 0.0.248
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/index.d.ts +45 -0
- package/dist/cjs/index.js +358 -2
- package/package.json +1 -1
package/dist/cjs/index.d.ts
CHANGED
|
@@ -165,6 +165,51 @@ declare type MetaRequestionOption = {
|
|
|
165
165
|
[key: string]: any;
|
|
166
166
|
};
|
|
167
167
|
|
|
168
|
+
export declare const MINIO_OPTIONS = "MINIO_OPTIONS";
|
|
169
|
+
|
|
170
|
+
export declare class MinioModule {
|
|
171
|
+
static register(options: MinioModuleOptions): DynamicModule;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export declare interface MinioModuleOptions {
|
|
175
|
+
prefix: string;
|
|
176
|
+
endpoint: string;
|
|
177
|
+
accessKeyId: string;
|
|
178
|
+
secretAccessKey: string;
|
|
179
|
+
bucketName: string;
|
|
180
|
+
region?: string;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export declare class MinioService {
|
|
184
|
+
private readonly options;
|
|
185
|
+
constructor(options: MinioModuleOptions);
|
|
186
|
+
private getClient;
|
|
187
|
+
listAssets(): Promise<{
|
|
188
|
+
assets: any[];
|
|
189
|
+
folders: any[];
|
|
190
|
+
}>;
|
|
191
|
+
createFolder(folderName: string, parentPath: string | null): Promise<{
|
|
192
|
+
id: string;
|
|
193
|
+
name: string;
|
|
194
|
+
parentId: string;
|
|
195
|
+
createdAt: string;
|
|
196
|
+
type: string;
|
|
197
|
+
}>;
|
|
198
|
+
deleteFolder(folderPath: string): Promise<void>;
|
|
199
|
+
uploadMulterFile(file: any, folderId: string | null): Promise<{
|
|
200
|
+
id: string;
|
|
201
|
+
name: string;
|
|
202
|
+
url: string;
|
|
203
|
+
type: string;
|
|
204
|
+
size: string;
|
|
205
|
+
createdAt: string;
|
|
206
|
+
source: string;
|
|
207
|
+
parentId: string;
|
|
208
|
+
}>;
|
|
209
|
+
deleteObject(assetKey: string): Promise<void>;
|
|
210
|
+
private formatBytes;
|
|
211
|
+
}
|
|
212
|
+
|
|
168
213
|
export declare class PaginatedResponse<T> extends ApiResponse<PaginationData<T>> {
|
|
169
214
|
constructor(list: T[], current: number, pageSize: number, total: number, message?: string);
|
|
170
215
|
static create<T>(list: T[], current: number, pageSize: number, total: number, message?: string): PaginatedResponse<T>;
|
package/dist/cjs/index.js
CHANGED
|
@@ -24,12 +24,13 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
|
|
27
|
+
MinioModule: ()=>MinioModule,
|
|
28
28
|
LLMProviderModule: ()=>LLMProviderModule,
|
|
29
|
+
MinioService: ()=>MinioService,
|
|
29
30
|
RequestContextMiddleware: ()=>RequestContextMiddleware,
|
|
30
|
-
setup: ()=>setup,
|
|
31
31
|
AdminAuthGuard: ()=>AdminAuthGuard,
|
|
32
32
|
LLMProvider: ()=>LLMProvider,
|
|
33
|
+
MINIO_OPTIONS: ()=>MINIO_OPTIONS,
|
|
33
34
|
PaginationData: ()=>PaginationData,
|
|
34
35
|
StaticRouteMiddleware: ()=>StaticRouteMiddleware,
|
|
35
36
|
StaticRouteMiddlewareFactory: ()=>StaticRouteMiddlewareFactory,
|
|
@@ -43,9 +44,11 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
43
44
|
HttpExceptionFilter: ()=>HttpExceptionFilter,
|
|
44
45
|
User: ()=>User,
|
|
45
46
|
Public: ()=>Public,
|
|
47
|
+
VolcengineProvider: ()=>VolcengineProvider,
|
|
46
48
|
PaginatedResponse: ()=>PaginatedResponse,
|
|
47
49
|
RequestContextService: ()=>RequestContextService,
|
|
48
50
|
ServerSendEventName: ()=>types_ServerSendEventName,
|
|
51
|
+
setup: ()=>setup,
|
|
49
52
|
LLMProviderService: ()=>LLMProviderService,
|
|
50
53
|
MetaProvider: ()=>MetaProvider
|
|
51
54
|
});
|
|
@@ -877,6 +880,353 @@ var types_ServerSendEventName = /*#__PURE__*/ function(ServerSendEventName) {
|
|
|
877
880
|
ServerSendEventName["Citations"] = "citations";
|
|
878
881
|
return ServerSendEventName;
|
|
879
882
|
}({});
|
|
883
|
+
const MINIO_OPTIONS = 'MINIO_OPTIONS';
|
|
884
|
+
const client_s3_namespaceObject = require("@aws-sdk/client-s3");
|
|
885
|
+
function minio_service_ts_decorate(decorators, target, key, desc) {
|
|
886
|
+
var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
887
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);
|
|
888
|
+
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;
|
|
889
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
890
|
+
}
|
|
891
|
+
function minio_service_ts_metadata(k, v) {
|
|
892
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
893
|
+
}
|
|
894
|
+
function _ts_param(paramIndex, decorator) {
|
|
895
|
+
return function(target, key) {
|
|
896
|
+
decorator(target, key, paramIndex);
|
|
897
|
+
};
|
|
898
|
+
}
|
|
899
|
+
class MinioService {
|
|
900
|
+
constructor(options){
|
|
901
|
+
this.options = options;
|
|
902
|
+
}
|
|
903
|
+
getClient() {
|
|
904
|
+
return new client_s3_namespaceObject.S3Client({
|
|
905
|
+
region: this.options.region || 'us-east-1',
|
|
906
|
+
endpoint: this.options.endpoint,
|
|
907
|
+
credentials: {
|
|
908
|
+
accessKeyId: this.options.accessKeyId,
|
|
909
|
+
secretAccessKey: this.options.secretAccessKey
|
|
910
|
+
},
|
|
911
|
+
forcePathStyle: true
|
|
912
|
+
});
|
|
913
|
+
}
|
|
914
|
+
async listAssets() {
|
|
915
|
+
const s3 = this.getClient();
|
|
916
|
+
const command = new client_s3_namespaceObject.ListObjectsV2Command({
|
|
917
|
+
Bucket: this.options.bucketName
|
|
918
|
+
});
|
|
919
|
+
const response = await s3.send(command);
|
|
920
|
+
const assets = [];
|
|
921
|
+
const foldersMap = new Map();
|
|
922
|
+
const getParentPath = (path)=>{
|
|
923
|
+
const cleanPath = path.endsWith('/') ? path.slice(0, -1) : path;
|
|
924
|
+
const parts = cleanPath.split('/');
|
|
925
|
+
if (parts.length <= 1) return null;
|
|
926
|
+
parts.pop();
|
|
927
|
+
return parts.join('/') + '/';
|
|
928
|
+
};
|
|
929
|
+
const ensureFolderExists = (path, date)=>{
|
|
930
|
+
if (!path || foldersMap.has(path)) return;
|
|
931
|
+
const parentId = getParentPath(path);
|
|
932
|
+
if (parentId) ensureFolderExists(parentId, date);
|
|
933
|
+
const cleanPath = path.slice(0, -1);
|
|
934
|
+
const name = cleanPath.split('/').pop() || 'Unknown';
|
|
935
|
+
foldersMap.set(path, {
|
|
936
|
+
id: path,
|
|
937
|
+
name,
|
|
938
|
+
parentId,
|
|
939
|
+
createdAt: date.toISOString(),
|
|
940
|
+
type: 'folder'
|
|
941
|
+
});
|
|
942
|
+
};
|
|
943
|
+
(response.Contents || []).forEach((item)=>{
|
|
944
|
+
const key = item.Key || '';
|
|
945
|
+
const date = item.LastModified || new Date();
|
|
946
|
+
if (key.endsWith('/')) return void ensureFolderExists(key, date);
|
|
947
|
+
const parts = key.split('/');
|
|
948
|
+
let parentId = null;
|
|
949
|
+
if (parts.length > 1) {
|
|
950
|
+
parts.pop();
|
|
951
|
+
parentId = parts.join('/') + '/';
|
|
952
|
+
ensureFolderExists(parentId, date);
|
|
953
|
+
}
|
|
954
|
+
const ext = key.split('.').pop()?.toLowerCase();
|
|
955
|
+
let type = 'file';
|
|
956
|
+
if ([
|
|
957
|
+
'png',
|
|
958
|
+
'jpg',
|
|
959
|
+
'jpeg',
|
|
960
|
+
'gif',
|
|
961
|
+
'webp',
|
|
962
|
+
'svg'
|
|
963
|
+
].includes(ext || '')) type = 'image';
|
|
964
|
+
else if ([
|
|
965
|
+
'mp4',
|
|
966
|
+
'webm',
|
|
967
|
+
'mov',
|
|
968
|
+
'avi'
|
|
969
|
+
].includes(ext || '')) type = 'video';
|
|
970
|
+
else if ([
|
|
971
|
+
'mp3',
|
|
972
|
+
'wav',
|
|
973
|
+
'ogg'
|
|
974
|
+
].includes(ext || '')) type = 'audio';
|
|
975
|
+
else if ([
|
|
976
|
+
'obj',
|
|
977
|
+
'fbx',
|
|
978
|
+
'glb',
|
|
979
|
+
'gltf'
|
|
980
|
+
].includes(ext || '')) type = 'model';
|
|
981
|
+
const url = `${this.options.endpoint}/${this.options.bucketName}/${key}`;
|
|
982
|
+
const name = key.split('/').pop() || key;
|
|
983
|
+
assets.push({
|
|
984
|
+
id: key,
|
|
985
|
+
name,
|
|
986
|
+
url,
|
|
987
|
+
type,
|
|
988
|
+
width: 0,
|
|
989
|
+
height: 0,
|
|
990
|
+
size: this.formatBytes(item.Size || 0),
|
|
991
|
+
createdAt: date.toISOString(),
|
|
992
|
+
source: 'upload',
|
|
993
|
+
parentId
|
|
994
|
+
});
|
|
995
|
+
});
|
|
996
|
+
return {
|
|
997
|
+
assets,
|
|
998
|
+
folders: Array.from(foldersMap.values())
|
|
999
|
+
};
|
|
1000
|
+
}
|
|
1001
|
+
async createFolder(folderName, parentPath) {
|
|
1002
|
+
const prefix = parentPath ? parentPath : '';
|
|
1003
|
+
const key = `${prefix}${folderName}/`;
|
|
1004
|
+
const s3 = this.getClient();
|
|
1005
|
+
const command = new client_s3_namespaceObject.PutObjectCommand({
|
|
1006
|
+
Bucket: this.options.bucketName,
|
|
1007
|
+
Key: key,
|
|
1008
|
+
Body: new Uint8Array(0)
|
|
1009
|
+
});
|
|
1010
|
+
await s3.send(command);
|
|
1011
|
+
return {
|
|
1012
|
+
id: key,
|
|
1013
|
+
name: folderName,
|
|
1014
|
+
parentId: parentPath,
|
|
1015
|
+
createdAt: new Date().toISOString(),
|
|
1016
|
+
type: 'folder'
|
|
1017
|
+
};
|
|
1018
|
+
}
|
|
1019
|
+
async deleteFolder(folderPath) {
|
|
1020
|
+
const s3 = this.getClient();
|
|
1021
|
+
let continuationToken;
|
|
1022
|
+
do {
|
|
1023
|
+
const listResp = await s3.send(new client_s3_namespaceObject.ListObjectsV2Command({
|
|
1024
|
+
Bucket: this.options.bucketName,
|
|
1025
|
+
Prefix: folderPath,
|
|
1026
|
+
ContinuationToken: continuationToken
|
|
1027
|
+
}));
|
|
1028
|
+
const contents = listResp.Contents || [];
|
|
1029
|
+
for (const item of contents){
|
|
1030
|
+
const key = item.Key;
|
|
1031
|
+
if (key) await s3.send(new client_s3_namespaceObject.DeleteObjectCommand({
|
|
1032
|
+
Bucket: this.options.bucketName,
|
|
1033
|
+
Key: key
|
|
1034
|
+
}));
|
|
1035
|
+
}
|
|
1036
|
+
continuationToken = listResp.IsTruncated ? listResp.NextContinuationToken : void 0;
|
|
1037
|
+
}while (continuationToken);
|
|
1038
|
+
}
|
|
1039
|
+
async uploadMulterFile(file, folderId) {
|
|
1040
|
+
const prefix = folderId || '';
|
|
1041
|
+
const cleanName = file.originalname.replace(/[^a-zA-Z0-9.-]/g, '_');
|
|
1042
|
+
const key = `${prefix}${Date.now()}-${cleanName}`;
|
|
1043
|
+
const s3 = this.getClient();
|
|
1044
|
+
const command = new client_s3_namespaceObject.PutObjectCommand({
|
|
1045
|
+
Bucket: this.options.bucketName,
|
|
1046
|
+
Key: key,
|
|
1047
|
+
Body: file.buffer,
|
|
1048
|
+
ContentType: file.mimetype
|
|
1049
|
+
});
|
|
1050
|
+
await s3.send(command);
|
|
1051
|
+
const publicUrl = `${this.options.endpoint}/${this.options.bucketName}/${key}`;
|
|
1052
|
+
let type = 'file';
|
|
1053
|
+
if (file.mimetype.startsWith('image/')) type = 'image';
|
|
1054
|
+
else if (file.mimetype.startsWith('video/')) type = 'video';
|
|
1055
|
+
else if (file.mimetype.startsWith('audio/')) type = 'audio';
|
|
1056
|
+
else if (cleanName.endsWith('.obj') || cleanName.endsWith('.fbx') || cleanName.endsWith('.glb')) type = 'model';
|
|
1057
|
+
return {
|
|
1058
|
+
id: key,
|
|
1059
|
+
name: key.split('/').pop(),
|
|
1060
|
+
url: publicUrl,
|
|
1061
|
+
type,
|
|
1062
|
+
size: this.formatBytes(file.size),
|
|
1063
|
+
createdAt: new Date().toISOString(),
|
|
1064
|
+
source: 'upload',
|
|
1065
|
+
parentId: folderId
|
|
1066
|
+
};
|
|
1067
|
+
}
|
|
1068
|
+
async deleteObject(assetKey) {
|
|
1069
|
+
const s3 = this.getClient();
|
|
1070
|
+
const command = new client_s3_namespaceObject.DeleteObjectCommand({
|
|
1071
|
+
Bucket: this.options.bucketName,
|
|
1072
|
+
Key: assetKey
|
|
1073
|
+
});
|
|
1074
|
+
await s3.send(command);
|
|
1075
|
+
}
|
|
1076
|
+
formatBytes(bytes, decimals = 2) {
|
|
1077
|
+
if (!+bytes) return '0 Bytes';
|
|
1078
|
+
const k = 1024;
|
|
1079
|
+
const dm = decimals < 0 ? 0 : decimals;
|
|
1080
|
+
const sizes = [
|
|
1081
|
+
'Bytes',
|
|
1082
|
+
'KB',
|
|
1083
|
+
'MB',
|
|
1084
|
+
'GB',
|
|
1085
|
+
'TB'
|
|
1086
|
+
];
|
|
1087
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
1088
|
+
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`;
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
MinioService = minio_service_ts_decorate([
|
|
1092
|
+
(0, common_namespaceObject.Injectable)(),
|
|
1093
|
+
_ts_param(0, (0, common_namespaceObject.Inject)(MINIO_OPTIONS)),
|
|
1094
|
+
minio_service_ts_metadata("design:type", Function),
|
|
1095
|
+
minio_service_ts_metadata("design:paramtypes", [
|
|
1096
|
+
"undefined" == typeof MinioModuleOptions ? Object : MinioModuleOptions
|
|
1097
|
+
])
|
|
1098
|
+
], MinioService);
|
|
1099
|
+
const platform_express_namespaceObject = require("@nestjs/platform-express");
|
|
1100
|
+
function minio_controller_ts_decorate(decorators, target, key, desc) {
|
|
1101
|
+
var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1102
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);
|
|
1103
|
+
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;
|
|
1104
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1105
|
+
}
|
|
1106
|
+
function minio_controller_ts_metadata(k, v) {
|
|
1107
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
1108
|
+
}
|
|
1109
|
+
function minio_controller_ts_param(paramIndex, decorator) {
|
|
1110
|
+
return function(target, key) {
|
|
1111
|
+
decorator(target, key, paramIndex);
|
|
1112
|
+
};
|
|
1113
|
+
}
|
|
1114
|
+
function createMinioController(prefix) {
|
|
1115
|
+
class MinioController {
|
|
1116
|
+
async list(_body) {
|
|
1117
|
+
return this.service.listAssets();
|
|
1118
|
+
}
|
|
1119
|
+
async createFolder(body) {
|
|
1120
|
+
if (!body.name) throw new common_namespaceObject.BadRequestException('Folder name is required');
|
|
1121
|
+
return this.service.createFolder(body.name, body.parentPath ?? null);
|
|
1122
|
+
}
|
|
1123
|
+
async removeFolder(path) {
|
|
1124
|
+
if (!path) throw new common_namespaceObject.BadRequestException('Folder path is required');
|
|
1125
|
+
await this.service.deleteFolder(path);
|
|
1126
|
+
return {
|
|
1127
|
+
ok: true
|
|
1128
|
+
};
|
|
1129
|
+
}
|
|
1130
|
+
async upload(file, folderId) {
|
|
1131
|
+
if (!file) throw new common_namespaceObject.BadRequestException('File is required');
|
|
1132
|
+
const cleanFolderId = 'null' === folderId || 'undefined' === folderId ? null : folderId;
|
|
1133
|
+
return this.service.uploadMulterFile(file, cleanFolderId);
|
|
1134
|
+
}
|
|
1135
|
+
async removeObject(key) {
|
|
1136
|
+
if (!key) throw new common_namespaceObject.BadRequestException('Object key is required');
|
|
1137
|
+
await this.service.deleteObject(key);
|
|
1138
|
+
return {
|
|
1139
|
+
ok: true
|
|
1140
|
+
};
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
minio_controller_ts_decorate([
|
|
1144
|
+
(0, common_namespaceObject.Inject)(MinioService),
|
|
1145
|
+
minio_controller_ts_metadata("design:type", void 0 === MinioService ? Object : MinioService)
|
|
1146
|
+
], MinioController.prototype, "service", void 0);
|
|
1147
|
+
minio_controller_ts_decorate([
|
|
1148
|
+
(0, common_namespaceObject.Post)('assets/list'),
|
|
1149
|
+
minio_controller_ts_param(0, (0, common_namespaceObject.Body)()),
|
|
1150
|
+
minio_controller_ts_metadata("design:type", Function),
|
|
1151
|
+
minio_controller_ts_metadata("design:paramtypes", [
|
|
1152
|
+
Object
|
|
1153
|
+
]),
|
|
1154
|
+
minio_controller_ts_metadata("design:returntype", Promise)
|
|
1155
|
+
], MinioController.prototype, "list", null);
|
|
1156
|
+
minio_controller_ts_decorate([
|
|
1157
|
+
(0, common_namespaceObject.Post)('folders/create'),
|
|
1158
|
+
minio_controller_ts_param(0, (0, common_namespaceObject.Body)()),
|
|
1159
|
+
minio_controller_ts_metadata("design:type", Function),
|
|
1160
|
+
minio_controller_ts_metadata("design:paramtypes", [
|
|
1161
|
+
Object
|
|
1162
|
+
]),
|
|
1163
|
+
minio_controller_ts_metadata("design:returntype", Promise)
|
|
1164
|
+
], MinioController.prototype, "createFolder", null);
|
|
1165
|
+
minio_controller_ts_decorate([
|
|
1166
|
+
(0, common_namespaceObject.Post)('folders/delete'),
|
|
1167
|
+
minio_controller_ts_param(0, (0, common_namespaceObject.Body)('path')),
|
|
1168
|
+
minio_controller_ts_metadata("design:type", Function),
|
|
1169
|
+
minio_controller_ts_metadata("design:paramtypes", [
|
|
1170
|
+
String
|
|
1171
|
+
]),
|
|
1172
|
+
minio_controller_ts_metadata("design:returntype", Promise)
|
|
1173
|
+
], MinioController.prototype, "removeFolder", null);
|
|
1174
|
+
minio_controller_ts_decorate([
|
|
1175
|
+
(0, common_namespaceObject.Post)('upload'),
|
|
1176
|
+
(0, common_namespaceObject.UseInterceptors)((0, platform_express_namespaceObject.FileInterceptor)('file')),
|
|
1177
|
+
minio_controller_ts_param(0, (0, common_namespaceObject.UploadedFile)()),
|
|
1178
|
+
minio_controller_ts_param(1, (0, common_namespaceObject.Body)('folderId')),
|
|
1179
|
+
minio_controller_ts_metadata("design:type", Function),
|
|
1180
|
+
minio_controller_ts_metadata("design:paramtypes", [
|
|
1181
|
+
Object,
|
|
1182
|
+
Object
|
|
1183
|
+
]),
|
|
1184
|
+
minio_controller_ts_metadata("design:returntype", Promise)
|
|
1185
|
+
], MinioController.prototype, "upload", null);
|
|
1186
|
+
minio_controller_ts_decorate([
|
|
1187
|
+
(0, common_namespaceObject.Post)('objects/delete'),
|
|
1188
|
+
minio_controller_ts_param(0, (0, common_namespaceObject.Body)('key')),
|
|
1189
|
+
minio_controller_ts_metadata("design:type", Function),
|
|
1190
|
+
minio_controller_ts_metadata("design:paramtypes", [
|
|
1191
|
+
String
|
|
1192
|
+
]),
|
|
1193
|
+
minio_controller_ts_metadata("design:returntype", Promise)
|
|
1194
|
+
], MinioController.prototype, "removeObject", null);
|
|
1195
|
+
MinioController = minio_controller_ts_decorate([
|
|
1196
|
+
(0, common_namespaceObject.Controller)(prefix)
|
|
1197
|
+
], MinioController);
|
|
1198
|
+
return MinioController;
|
|
1199
|
+
}
|
|
1200
|
+
function minio_module_ts_decorate(decorators, target, key, desc) {
|
|
1201
|
+
var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1202
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);
|
|
1203
|
+
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;
|
|
1204
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1205
|
+
}
|
|
1206
|
+
class MinioModule {
|
|
1207
|
+
static register(options) {
|
|
1208
|
+
const controller = createMinioController(options.prefix);
|
|
1209
|
+
return {
|
|
1210
|
+
module: MinioModule,
|
|
1211
|
+
controllers: [
|
|
1212
|
+
controller
|
|
1213
|
+
],
|
|
1214
|
+
providers: [
|
|
1215
|
+
{
|
|
1216
|
+
provide: MINIO_OPTIONS,
|
|
1217
|
+
useValue: options
|
|
1218
|
+
},
|
|
1219
|
+
MinioService
|
|
1220
|
+
],
|
|
1221
|
+
exports: [
|
|
1222
|
+
MinioService
|
|
1223
|
+
]
|
|
1224
|
+
};
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
MinioModule = minio_module_ts_decorate([
|
|
1228
|
+
(0, common_namespaceObject.Module)({})
|
|
1229
|
+
], MinioModule);
|
|
880
1230
|
exports.AdminAuthGuard = __webpack_exports__.AdminAuthGuard;
|
|
881
1231
|
exports.ApiResponse = __webpack_exports__.ApiResponse;
|
|
882
1232
|
exports.BaseQueryDto = __webpack_exports__.BaseQueryDto;
|
|
@@ -886,7 +1236,10 @@ exports.LLMProvider = __webpack_exports__.LLMProvider;
|
|
|
886
1236
|
exports.LLMProviderModule = __webpack_exports__.LLMProviderModule;
|
|
887
1237
|
exports.LLMProviderService = __webpack_exports__.LLMProviderService;
|
|
888
1238
|
exports.LoggingInterceptor = __webpack_exports__.LoggingInterceptor;
|
|
1239
|
+
exports.MINIO_OPTIONS = __webpack_exports__.MINIO_OPTIONS;
|
|
889
1240
|
exports.MetaProvider = __webpack_exports__.MetaProvider;
|
|
1241
|
+
exports.MinioModule = __webpack_exports__.MinioModule;
|
|
1242
|
+
exports.MinioService = __webpack_exports__.MinioService;
|
|
890
1243
|
exports.PaginatedResponse = __webpack_exports__.PaginatedResponse;
|
|
891
1244
|
exports.PaginationData = __webpack_exports__.PaginationData;
|
|
892
1245
|
exports.Public = __webpack_exports__.Public;
|
|
@@ -911,7 +1264,10 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
|
911
1264
|
"LLMProviderModule",
|
|
912
1265
|
"LLMProviderService",
|
|
913
1266
|
"LoggingInterceptor",
|
|
1267
|
+
"MINIO_OPTIONS",
|
|
914
1268
|
"MetaProvider",
|
|
1269
|
+
"MinioModule",
|
|
1270
|
+
"MinioService",
|
|
915
1271
|
"PaginatedResponse",
|
|
916
1272
|
"PaginationData",
|
|
917
1273
|
"Public",
|