cloud-ide-lms-model 1.1.1 → 1.1.2
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/lib/model/core/dashboard-cards.d.ts +51 -0
- package/lib/model/core/dashboard-cards.js +47 -0
- package/lib/model/core/index.d.ts +1 -0
- package/lib/model/core/index.js +1 -0
- package/lib/routes/coreRoutes.d.ts +4 -0
- package/lib/routes/coreRoutes.js +4 -0
- package/lib/schema/core/core_dashboard_cards.d.ts +28 -0
- package/lib/schema/core/core_dashboard_cards.js +3 -0
- package/lib/schema/core/index.d.ts +1 -0
- package/lib/schema/core/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { MTableQueries } from "../../common-types/common";
|
|
2
|
+
import { CoreDashboardCards } from "../../schema";
|
|
3
|
+
import { controllerResponse } from "../../utilities";
|
|
4
|
+
type IDashboardCardsErrorLogger = {
|
|
5
|
+
[key in keyof MDashboardCards]: string;
|
|
6
|
+
};
|
|
7
|
+
type DashboardCardsErrorLogger = {
|
|
8
|
+
[key in keyof CoreDashboardCards]: string;
|
|
9
|
+
};
|
|
10
|
+
type IDashboardCardsGetByIdErrorLogger = {
|
|
11
|
+
[key in keyof MDashboardCardsGetByIdPayload]: string;
|
|
12
|
+
};
|
|
13
|
+
declare class DashboardCardsSaveUpdatePayload {
|
|
14
|
+
core_dashboard_cards?: CoreDashboardCards;
|
|
15
|
+
constructor(init: DashboardCardsSaveUpdatePayload);
|
|
16
|
+
Validate?(): Partial<DashboardCardsErrorLogger>;
|
|
17
|
+
}
|
|
18
|
+
declare class MDashboardCards extends MTableQueries {
|
|
19
|
+
cdc_id?: string;
|
|
20
|
+
constructor(init: MDashboardCards);
|
|
21
|
+
Validate?(): Partial<IDashboardCardsErrorLogger>;
|
|
22
|
+
}
|
|
23
|
+
declare class MDashboardCardsGetByIdPayload {
|
|
24
|
+
cdc_id?: string;
|
|
25
|
+
constructor(init: MDashboardCardsGetByIdPayload);
|
|
26
|
+
Validate?(): Partial<IDashboardCardsGetByIdErrorLogger>;
|
|
27
|
+
}
|
|
28
|
+
interface dashboardCardsControllerResponse extends controllerResponse {
|
|
29
|
+
data?: DashboardCardsListResponse[];
|
|
30
|
+
}
|
|
31
|
+
interface dashboardCardsInsertUpdateControllerResponse extends controllerResponse {
|
|
32
|
+
data?: CoreDashboardCards;
|
|
33
|
+
}
|
|
34
|
+
interface dashboardCardsByIdControllerResponse extends controllerResponse {
|
|
35
|
+
data?: CoreDashboardCards;
|
|
36
|
+
}
|
|
37
|
+
interface DashboardCardsListResponse extends Omit<CoreDashboardCards, 'cdc_entity_id_syen' | 'cdc_created_by_user' | 'cdc_modified_by_user'> {
|
|
38
|
+
cdc_entity_id_syen?: {
|
|
39
|
+
_id?: string;
|
|
40
|
+
syen_name?: string;
|
|
41
|
+
};
|
|
42
|
+
cdc_created_by_user?: {
|
|
43
|
+
_id?: string;
|
|
44
|
+
user_fullname?: string;
|
|
45
|
+
};
|
|
46
|
+
cdc_modified_by_user?: {
|
|
47
|
+
_id?: string;
|
|
48
|
+
user_fullname?: string;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export { IDashboardCardsErrorLogger, DashboardCardsErrorLogger, IDashboardCardsGetByIdErrorLogger, DashboardCardsSaveUpdatePayload, MDashboardCards, MDashboardCardsGetByIdPayload, dashboardCardsControllerResponse, dashboardCardsInsertUpdateControllerResponse, dashboardCardsByIdControllerResponse, DashboardCardsListResponse };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MDashboardCardsGetByIdPayload = exports.MDashboardCards = exports.DashboardCardsSaveUpdatePayload = void 0;
|
|
4
|
+
const common_1 = require("../../common-types/common");
|
|
5
|
+
/* INTERFACE END */
|
|
6
|
+
/* MODEL START */
|
|
7
|
+
class DashboardCardsSaveUpdatePayload {
|
|
8
|
+
constructor(init) {
|
|
9
|
+
Object.assign(this, init);
|
|
10
|
+
}
|
|
11
|
+
Validate() {
|
|
12
|
+
var _a, _b;
|
|
13
|
+
let errorLogger = {};
|
|
14
|
+
if (!((_a = this.core_dashboard_cards) === null || _a === void 0 ? void 0 : _a.cdc_title)) {
|
|
15
|
+
errorLogger.cdc_title = "Card title is required!";
|
|
16
|
+
}
|
|
17
|
+
if (!((_b = this.core_dashboard_cards) === null || _b === void 0 ? void 0 : _b.cdc_type)) {
|
|
18
|
+
errorLogger.cdc_type = "Card type is required!";
|
|
19
|
+
}
|
|
20
|
+
return errorLogger;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.DashboardCardsSaveUpdatePayload = DashboardCardsSaveUpdatePayload;
|
|
24
|
+
class MDashboardCards extends common_1.MTableQueries {
|
|
25
|
+
constructor(init) {
|
|
26
|
+
super(init);
|
|
27
|
+
Object.assign(this, init);
|
|
28
|
+
}
|
|
29
|
+
Validate() {
|
|
30
|
+
let errorLogger = {};
|
|
31
|
+
return errorLogger;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.MDashboardCards = MDashboardCards;
|
|
35
|
+
class MDashboardCardsGetByIdPayload {
|
|
36
|
+
constructor(init) {
|
|
37
|
+
Object.assign(this, init);
|
|
38
|
+
}
|
|
39
|
+
Validate() {
|
|
40
|
+
let errorLogger = {};
|
|
41
|
+
if (!this.cdc_id) {
|
|
42
|
+
errorLogger.cdc_id = "Card ID is required!";
|
|
43
|
+
}
|
|
44
|
+
return errorLogger;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.MDashboardCardsGetByIdPayload = MDashboardCardsGetByIdPayload;
|
package/lib/model/core/index.js
CHANGED
|
@@ -37,3 +37,4 @@ __exportStar(require("./core_general_master_type"), exports);
|
|
|
37
37
|
__exportStar(require("./core_user_role"), exports);
|
|
38
38
|
__exportStar(require("./core_entity_access_pass_management"), exports);
|
|
39
39
|
__exportStar(require("./core_system_nationality"), exports);
|
|
40
|
+
__exportStar(require("./dashboard-cards"), exports);
|
|
@@ -113,5 +113,9 @@ declare const coreRoutesUrl: {
|
|
|
113
113
|
* @description Endpoint to get the breadcrumb (breadcrumb)
|
|
114
114
|
*/
|
|
115
115
|
breadcrumb: string;
|
|
116
|
+
/**
|
|
117
|
+
* @description Endpoint to manage dashboard cards (dashboard-cards)
|
|
118
|
+
*/
|
|
119
|
+
dashboardCards: string;
|
|
116
120
|
};
|
|
117
121
|
export { coreRoutesUrl };
|
package/lib/routes/coreRoutes.js
CHANGED
|
@@ -116,6 +116,10 @@ const coreRoutesUrl = {
|
|
|
116
116
|
* @description Endpoint to get the breadcrumb (breadcrumb)
|
|
117
117
|
*/
|
|
118
118
|
breadcrumb: "breadcrumb",
|
|
119
|
+
/**
|
|
120
|
+
* @description Endpoint to manage dashboard cards (dashboard-cards)
|
|
121
|
+
*/
|
|
122
|
+
dashboardCards: "dashboard-cards",
|
|
119
123
|
};
|
|
120
124
|
exports.coreRoutesUrl = coreRoutesUrl;
|
|
121
125
|
Object.freeze(coreRoutesUrl);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface CoreDashboardCards {
|
|
2
|
+
_id?: string;
|
|
3
|
+
cdc_title?: string;
|
|
4
|
+
cdc_description?: string;
|
|
5
|
+
cdc_type?: "stats" | "chart" | "table" | "module-card" | "activity-feed" | "events" | "custom";
|
|
6
|
+
cdc_api_endpoint?: string;
|
|
7
|
+
cdc_api_method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
8
|
+
cdc_api_payload?: any;
|
|
9
|
+
cdc_config?: any;
|
|
10
|
+
cdc_position?: {
|
|
11
|
+
row?: number;
|
|
12
|
+
col?: number;
|
|
13
|
+
colspan?: number;
|
|
14
|
+
rowspan?: number;
|
|
15
|
+
};
|
|
16
|
+
cdc_icon?: string;
|
|
17
|
+
cdc_color?: string;
|
|
18
|
+
cdc_visible?: boolean;
|
|
19
|
+
cdc_draggable?: boolean;
|
|
20
|
+
cdc_refresh_interval?: number;
|
|
21
|
+
cdc_permissions?: string[];
|
|
22
|
+
cdc_entity_id_syen?: string;
|
|
23
|
+
cdc_created_by_user?: string;
|
|
24
|
+
cdc_modified_by_user?: string;
|
|
25
|
+
cdc_created_date?: Date;
|
|
26
|
+
cdc_modified_date?: Date;
|
|
27
|
+
cdc_isactive?: boolean;
|
|
28
|
+
}
|
package/lib/schema/core/index.js
CHANGED
|
@@ -55,3 +55,4 @@ __exportStar(require("./core_board_exam_pattern"), exports);
|
|
|
55
55
|
__exportStar(require("./core_board_grade_system"), exports);
|
|
56
56
|
__exportStar(require("./core_school_board_affiliation"), exports);
|
|
57
57
|
__exportStar(require("./core_user_type_mapping"), exports);
|
|
58
|
+
__exportStar(require("./core_dashboard_cards"), exports);
|