cloud-ide-lms-model 1.0.278 → 1.0.280

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.
@@ -0,0 +1 @@
1
+ export * from './mongoose-object';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ // Export mongoose object utilities
18
+ __exportStar(require("./mongoose-object"), exports);
@@ -0,0 +1,13 @@
1
+ import { controllerResponse } from '../../utilities';
2
+ interface mongooseObjectIdCreateControllerResponse extends controllerResponse {
3
+ data?: {
4
+ objectId: string;
5
+ };
6
+ }
7
+ interface mongooseObjectIdsCreateControllerResponse extends controllerResponse {
8
+ data?: {
9
+ objectIds: string[];
10
+ count: number;
11
+ };
12
+ }
13
+ export { mongooseObjectIdCreateControllerResponse, mongooseObjectIdsCreateControllerResponse };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,22 @@ interface CoreFileManagerInsertUpdateResponse extends controllerResponse {
34
47
  }[];
35
48
  };
36
49
  }
50
+ interface fileManagerListByGroupIdControllerResponse extends controllerResponse {
51
+ data?: {
52
+ files: ICoreCyfm[];
53
+ pagination: {
54
+ page: number;
55
+ limit: number;
56
+ total: number;
57
+ total_pages: number;
58
+ };
59
+ group_info: {
60
+ cyfm_group_id: string;
61
+ total_files_in_group: number;
62
+ };
63
+ };
64
+ }
37
65
  export { IFileManagerErrorLogger, //interface
38
- MFileManager, // model
39
- fileManagerControllerResponse, // above coresponding to payload abd this corespons to rresponse,
40
- fileManagerResponseData, CoreFileManagerInsertUpdatePayload, CoreFileManagerInsertUpdateResponse };
66
+ IFileManagerListByGroupIdErrorLogger, MFileManager, // model
67
+ MFileManagerListByGroupIdPayload, fileManagerControllerResponse, // above coresponding to payload abd this corespons to rresponse,
68
+ 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;
@@ -2,3 +2,4 @@ export * from "./auth";
2
2
  export * from "./core";
3
3
  export * from "./academics";
4
4
  export * from "./accounts";
5
+ export * from "./common";
@@ -18,3 +18,4 @@ __exportStar(require("./auth"), exports);
18
18
  __exportStar(require("./core"), exports);
19
19
  __exportStar(require("./academics"), exports);
20
20
  __exportStar(require("./accounts"), exports);
21
+ __exportStar(require("./common"), exports);
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Object containing URLs for common utility endpoints.
3
+ * These URLs are used for various common operations such as ObjectId generation, etc.
4
+ */
5
+ declare const commonRoutesUrl: {
6
+ module: string;
7
+ /** Endpoint to generate a single ObjectId */
8
+ generateObjectId: string;
9
+ /** Endpoint to generate multiple ObjectIds */
10
+ generateObjectIds: string;
11
+ };
12
+ export { commonRoutesUrl };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.commonRoutesUrl = void 0;
4
+ /**
5
+ * Object containing URLs for common utility endpoints.
6
+ * These URLs are used for various common operations such as ObjectId generation, etc.
7
+ */
8
+ const commonRoutesUrl = {
9
+ module: 'common',
10
+ /** Endpoint to generate a single ObjectId */
11
+ generateObjectId: "generate-object-id",
12
+ /** Endpoint to generate multiple ObjectIds */
13
+ generateObjectIds: "generate-object-ids"
14
+ };
15
+ exports.commonRoutesUrl = commonRoutesUrl;
16
+ // Freeze the commonRoutesUrl object to prevent modifications
17
+ Object.freeze(commonRoutesUrl);
@@ -5,3 +5,4 @@ export * from './authRoutes';
5
5
  export * from './userRoutes';
6
6
  export * from './academicsRoutes';
7
7
  export * from './accountsRoutes';
8
+ export * from './commonRoutes';
@@ -21,3 +21,4 @@ __exportStar(require("./authRoutes"), exports);
21
21
  __exportStar(require("./userRoutes"), exports);
22
22
  __exportStar(require("./academicsRoutes"), exports);
23
23
  __exportStar(require("./accountsRoutes"), exports);
24
+ __exportStar(require("./commonRoutes"), exports);
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.278",
8
+ "version": "1.0.280",
9
9
  "description": "Package for Model management of Cloud IDEsys LMS",
10
10
  "main": "lib/index.js",
11
11
  "types": "lib/index.d.ts",