cloud-ide-lms-model 1.0.348 → 1.0.350

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,5 +1,5 @@
1
1
  import { MTableQueries } from "../../common-types/common";
2
- import { FeeStructure, FeeStructureBase } from "../../schema";
2
+ import { FeeStructure, FeeStructureBase, FeeStructureItem } from "../../schema";
3
3
  import { controllerResponse } from "../../utilities";
4
4
  import { AcaAcademicYear } from "../../schema/academics/aca_academic_year";
5
5
  import { CoreSystemEntity } from "../../schema/core/core_system_entity";
@@ -21,6 +21,9 @@ type IFeeStructureDeleteErrorLogger = {
21
21
  type IFeeStructureInsertUpdateErrorLogger = {
22
22
  [key in keyof MFeeStructureInsertUpdatePayload]: string;
23
23
  };
24
+ type IFeeStructureSaveUpdateErrorLogger = {
25
+ [key: string]: string;
26
+ };
24
27
  type IFeeStructureToggleStatusErrorLogger = {
25
28
  [key in keyof MFeeStructureToggleStatusPayload]: string;
26
29
  };
@@ -47,6 +50,16 @@ declare class MFeeStructureInsertUpdatePayload extends FeeStructure {
47
50
  constructor(init: FeeStructure);
48
51
  Validate?(): Partial<IFeeStructureInsertUpdateErrorLogger>;
49
52
  }
53
+ /**
54
+ * Fee Structure Save/Update Payload
55
+ * Similar to CoreSystemEntitySaveUpdatePayload, uses separate keys for structure and items
56
+ */
57
+ declare class FeeStructureSaveUpdatePayload {
58
+ fee_structure?: FeeStructure;
59
+ fee_structure_items?: FeeStructureItem[];
60
+ constructor(init: FeeStructureSaveUpdatePayload);
61
+ Validate?(): Partial<IFeeStructureSaveUpdateErrorLogger>;
62
+ }
50
63
  /**
51
64
  * Populated Fee Structure Response
52
65
  * Contains populated references for all related entities
@@ -64,8 +77,16 @@ interface FeeStructureResponse extends FeeStructureBase {
64
77
  interface feeStructureControllerResponse extends controllerResponse {
65
78
  data?: FeeStructureResponse[];
66
79
  }
80
+ /**
81
+ * Fee Structure By ID Response
82
+ * Includes both structure and items for complete data
83
+ */
84
+ interface FeeStructureByIdResponse {
85
+ fee_structure?: FeeStructureResponse;
86
+ fee_structure_items?: FeeStructureItem[];
87
+ }
67
88
  interface feeStructureByIdControllerResponse extends controllerResponse {
68
- data?: FeeStructureResponse;
89
+ data?: FeeStructureByIdResponse | FeeStructureResponse;
69
90
  }
70
91
  interface feeStructureInsertUpdateControllerResponse extends controllerResponse {
71
92
  data?: FeeStructureResponse;
@@ -76,4 +97,4 @@ interface feeStructureDeleteControllerResponse extends controllerResponse {
76
97
  interface feeStructureToggleStatusControllerResponse extends controllerResponse {
77
98
  data?: boolean;
78
99
  }
79
- export { IFeeStructureErrorLogger, IFeeStructureGetByIdErrorLogger, IFeeStructureDeleteErrorLogger, IFeeStructureInsertUpdateErrorLogger, IFeeStructureToggleStatusErrorLogger, MFeeStructure, MFeeStructureGetByIdPayload, MFeeStructureDeletePayload, MFeeStructureInsertUpdatePayload, MFeeStructureToggleStatusPayload, FeeStructureResponse, feeStructureControllerResponse, feeStructureByIdControllerResponse, feeStructureInsertUpdateControllerResponse, feeStructureDeleteControllerResponse, feeStructureToggleStatusControllerResponse };
100
+ export { IFeeStructureErrorLogger, IFeeStructureGetByIdErrorLogger, IFeeStructureDeleteErrorLogger, IFeeStructureInsertUpdateErrorLogger, IFeeStructureSaveUpdateErrorLogger, IFeeStructureToggleStatusErrorLogger, MFeeStructure, MFeeStructureGetByIdPayload, MFeeStructureDeletePayload, MFeeStructureInsertUpdatePayload, FeeStructureSaveUpdatePayload, MFeeStructureToggleStatusPayload, FeeStructureResponse, FeeStructureByIdResponse, feeStructureControllerResponse, feeStructureByIdControllerResponse, feeStructureInsertUpdateControllerResponse, feeStructureDeleteControllerResponse, feeStructureToggleStatusControllerResponse };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MFeeStructureToggleStatusPayload = exports.MFeeStructureInsertUpdatePayload = exports.MFeeStructureDeletePayload = exports.MFeeStructureGetByIdPayload = exports.MFeeStructure = void 0;
3
+ exports.MFeeStructureToggleStatusPayload = exports.FeeStructureSaveUpdatePayload = exports.MFeeStructureInsertUpdatePayload = exports.MFeeStructureDeletePayload = exports.MFeeStructureGetByIdPayload = exports.MFeeStructure = void 0;
4
4
  const common_1 = require("../../common-types/common");
5
5
  const schema_1 = require("../../schema");
6
6
  /* INTERFACE END */
@@ -76,3 +76,33 @@ class MFeeStructureInsertUpdatePayload extends schema_1.FeeStructure {
76
76
  }
77
77
  }
78
78
  exports.MFeeStructureInsertUpdatePayload = MFeeStructureInsertUpdatePayload;
79
+ /**
80
+ * Fee Structure Save/Update Payload
81
+ * Similar to CoreSystemEntitySaveUpdatePayload, uses separate keys for structure and items
82
+ */
83
+ class FeeStructureSaveUpdatePayload {
84
+ constructor(init) {
85
+ Object.assign(this, init);
86
+ }
87
+ Validate() {
88
+ let errorLogger = {};
89
+ if (!this.fee_structure) {
90
+ errorLogger.fee_structure = "Fee structure is required!";
91
+ }
92
+ else {
93
+ // Validate fee structure fields - use actual field names for errors
94
+ if (!this.fee_structure.fees_structure_name) {
95
+ errorLogger.fees_structure_name = "Fee Structure name is required!";
96
+ }
97
+ if (!this.fee_structure.fees_entity_id_syen) {
98
+ errorLogger.fees_entity_id_syen = "Entity ID is required!";
99
+ }
100
+ if (!this.fee_structure.fees_academic_year_id_acayr) {
101
+ errorLogger.fees_academic_year_id_acayr = "Academic Year is required!";
102
+ }
103
+ }
104
+ // Note: fee_structure_items is optional - can be empty array or undefined
105
+ return errorLogger;
106
+ }
107
+ }
108
+ exports.FeeStructureSaveUpdatePayload = FeeStructureSaveUpdatePayload;
@@ -5,11 +5,14 @@
5
5
  declare class FeeStructureItem {
6
6
  _id?: string;
7
7
  feesi_structure_id_fees?: string;
8
+ feesi_category_id_sygms?: string;
8
9
  feesi_item_code?: string;
9
10
  feesi_item_name?: string;
10
11
  feesi_description?: string;
11
- feesi_category?: 'TUITION' | 'EXAM' | 'LIBRARY' | 'LAB' | 'SPORTS' | 'TRANSPORT' | 'HOSTEL' | 'OTHER';
12
12
  feesi_amount?: number;
13
+ feesi_is_amount_editable?: boolean;
14
+ feesi_min_amount?: number;
15
+ feesi_max_amount?: number;
13
16
  feesi_due_date?: Date;
14
17
  feesi_due_date_offset_days?: number;
15
18
  feesi_collection_start_offset_days?: number;
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.348",
8
+ "version": "1.0.350",
9
9
  "description": "Package for Model management of Cloud IDEsys LMS",
10
10
  "main": "lib/index.js",
11
11
  "types": "lib/index.d.ts",