cloud-ide-lms-model 1.0.279 → 1.0.281
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.
|
@@ -3,6 +3,9 @@ import { controllerResponse } from "../../utilities";
|
|
|
3
3
|
type IFileManagerErrorLogger = {
|
|
4
4
|
[key in keyof MFileManager]: string;
|
|
5
5
|
};
|
|
6
|
+
type IFileManagerListByGroupIdErrorLogger = {
|
|
7
|
+
[key in keyof MFileManagerListByGroupIdPayload]: string;
|
|
8
|
+
};
|
|
6
9
|
declare class MFileManager {
|
|
7
10
|
cyfm_id: string;
|
|
8
11
|
constructor(init: MFileManager);
|
|
@@ -20,6 +23,16 @@ declare class CoreFileManagerInsertUpdatePayload {
|
|
|
20
23
|
constructor(init: MFileManager);
|
|
21
24
|
Validate?(): Partial<IFileManagerErrorLogger>;
|
|
22
25
|
}
|
|
26
|
+
declare class MFileManagerListByGroupIdPayload {
|
|
27
|
+
cyfm_group_id?: string;
|
|
28
|
+
cyfm_isactive?: boolean;
|
|
29
|
+
page?: number;
|
|
30
|
+
limit?: number;
|
|
31
|
+
sort_by?: string;
|
|
32
|
+
sort_order?: 'asc' | 'desc';
|
|
33
|
+
constructor(init: MFileManagerListByGroupIdPayload);
|
|
34
|
+
Validate?(): Partial<IFileManagerListByGroupIdErrorLogger>;
|
|
35
|
+
}
|
|
23
36
|
interface fileManagerResponseData extends ICoreCyfm {
|
|
24
37
|
cyfm_file_base64: string;
|
|
25
38
|
}
|
|
@@ -34,7 +47,16 @@ interface CoreFileManagerInsertUpdateResponse extends controllerResponse {
|
|
|
34
47
|
}[];
|
|
35
48
|
};
|
|
36
49
|
}
|
|
50
|
+
interface fileManagerListByGroupIdControllerResponse extends controllerResponse {
|
|
51
|
+
data?: {
|
|
52
|
+
files: ICoreCyfm[];
|
|
53
|
+
group_info: {
|
|
54
|
+
cyfm_group_id: string;
|
|
55
|
+
total_files_in_group: number;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
}
|
|
37
59
|
export { IFileManagerErrorLogger, //interface
|
|
38
|
-
MFileManager, // model
|
|
39
|
-
fileManagerControllerResponse, // above coresponding to payload abd this corespons to rresponse,
|
|
40
|
-
fileManagerResponseData, CoreFileManagerInsertUpdatePayload, CoreFileManagerInsertUpdateResponse };
|
|
60
|
+
IFileManagerListByGroupIdErrorLogger, MFileManager, // model
|
|
61
|
+
MFileManagerListByGroupIdPayload, fileManagerControllerResponse, // above coresponding to payload abd this corespons to rresponse,
|
|
62
|
+
fileManagerListByGroupIdControllerResponse, fileManagerResponseData, CoreFileManagerInsertUpdatePayload, CoreFileManagerInsertUpdateResponse };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CoreFileManagerInsertUpdatePayload = exports.MFileManager = void 0;
|
|
3
|
+
exports.CoreFileManagerInsertUpdatePayload = exports.MFileManagerListByGroupIdPayload = exports.MFileManager = void 0;
|
|
4
4
|
const schema_1 = require("../../schema");
|
|
5
5
|
/* INTERFACE END */
|
|
6
6
|
/* MODEL START */
|
|
@@ -41,3 +41,25 @@ class CoreFileManagerInsertUpdatePayload {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
exports.CoreFileManagerInsertUpdatePayload = CoreFileManagerInsertUpdatePayload;
|
|
44
|
+
class MFileManagerListByGroupIdPayload {
|
|
45
|
+
constructor(init) {
|
|
46
|
+
Object.assign(this, init);
|
|
47
|
+
}
|
|
48
|
+
Validate() {
|
|
49
|
+
let errorLogger = {};
|
|
50
|
+
if (!this.cyfm_group_id) {
|
|
51
|
+
errorLogger.cyfm_group_id = "Group ID is required!";
|
|
52
|
+
}
|
|
53
|
+
if (this.page !== undefined && this.page < 1) {
|
|
54
|
+
errorLogger.page = "Page number must be greater than 0!";
|
|
55
|
+
}
|
|
56
|
+
if (this.limit !== undefined && this.limit < 1) {
|
|
57
|
+
errorLogger.limit = "Limit must be greater than 0!";
|
|
58
|
+
}
|
|
59
|
+
if (this.sort_order && !['asc', 'desc'].includes(this.sort_order)) {
|
|
60
|
+
errorLogger.sort_order = "Sort order must be 'asc' or 'desc'!";
|
|
61
|
+
}
|
|
62
|
+
return errorLogger;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.MFileManagerListByGroupIdPayload = MFileManagerListByGroupIdPayload;
|