cloud-ide-lms-model 1.0.95 → 1.0.96

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.
@@ -1,3 +1,6 @@
1
+ type IPageNotesManagerErrorLogger = {
2
+ [key in keyof ICoreSypn]: string;
3
+ };
1
4
  declare class ICoreSypn {
2
5
  _id?: string;
3
6
  sypn_titile?: string;
@@ -10,5 +13,7 @@ declare class ICoreSypn {
10
13
  sypn_is_user_specific?: string;
11
14
  sypn_is_entity_specific?: string;
12
15
  sypn_is_theme_specific?: string;
16
+ constructor(init: ICoreSypn);
17
+ Validate?(): Partial<IPageNotesManagerErrorLogger>;
13
18
  }
14
19
  export { ICoreSypn };
@@ -1,7 +1,31 @@
1
1
  "use strict";
2
+ /* INTERFASE START */
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
4
  exports.ICoreSypn = void 0;
4
- /* INTERFASE START */
5
+ /* INTERFACE END */
5
6
  class ICoreSypn {
7
+ constructor(init) {
8
+ Object.assign(this, init);
9
+ }
10
+ Validate() {
11
+ let errorLogger = {};
12
+ // Log errors here
13
+ if (!this.sypn_titile) {
14
+ errorLogger.sypn_titile = "Title is Required!";
15
+ }
16
+ if (this.sypn_is_page_specific && !this.sypn_page_id_sypg) {
17
+ errorLogger.sypn_page_id_sypg = "Page Id is Required!";
18
+ }
19
+ if (this.sypn_is_entity_specific && !this.sypn_entity_id_sype) {
20
+ errorLogger.sypn_entity_id_sype = "Entity Id is Required!";
21
+ }
22
+ if (this.sypn_is_user_specific && !this.sypn_user_id_user) {
23
+ errorLogger.sypn_entity_id_sype = "User Id is Required!";
24
+ }
25
+ if (this.sypn_is_theme_specific && !this.sypn_page_them_id_sytm) {
26
+ errorLogger.sypn_entity_id_sype = "Theme Id is Required!";
27
+ }
28
+ return errorLogger;
29
+ }
6
30
  }
7
31
  exports.ICoreSypn = ICoreSypn;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "typescript": "^5.4.2"
6
6
  },
7
7
  "name": "cloud-ide-lms-model",
8
- "version": "1.0.95",
8
+ "version": "1.0.96",
9
9
  "description": "Package for Model management of Cloud IDEsys LMS",
10
10
  "main": "lib/index.js",
11
11
  "types": "lib/index.d.ts",