cloud-ide-model-schema 1.1.18 → 1.1.20

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/README.md ADDED
@@ -0,0 +1,125 @@
1
+ # Cloud IDE Model Schema
2
+
3
+ A package for MongoDB schema management for the Cloud IDE LMS (Learning Management System).
4
+
5
+ ## Overview
6
+
7
+ The `cloud-ide-model-schema` package provides Mongoose schema definitions for the Cloud IDE LMS system. It includes schema models for authentication, core functionality, email management, and more.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npm install cloud-ide-model-schema
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```javascript
18
+ const { CUser, CCoreSytm, CEmailTemplete } = require('cloud-ide-model-schema');
19
+
20
+ // Use the models to interact with MongoDB
21
+ const user = await CUser.findOne({ user_username: 'username' });
22
+ ```
23
+
24
+ ## Project Structure
25
+
26
+ The project is organized into the following main directories:
27
+
28
+ ### Source Code (`/src/`)
29
+
30
+ - **Schema Components** (`/src/schema/`)
31
+ - **Authentication Schemas** (`/src/schema/auth/`)
32
+ - User management
33
+ - Login sessions
34
+ - Mobile PIN authentication
35
+ - **Core Schemas** (`/src/schema/core/`)
36
+ - System pages and themes
37
+ - Menu management
38
+ - Entity management
39
+ - General master data
40
+ - File management
41
+ - **Email Schemas** (`/src/schema/email/`)
42
+ - Email lists
43
+ - Templates
44
+ - Logging
45
+ - Vendor management
46
+
47
+ - **Configuration** (`/src/config/`)
48
+ - Database connection utilities
49
+ - Environment configuration
50
+
51
+ ### Compiled Output (`/lib/`)
52
+
53
+ - **Schema Files** (`/lib/schema/`)
54
+ - Compiled JavaScript files of all schema definitions
55
+ - TypeScript declaration files (`.d.ts`)
56
+
57
+ - **Common Types** (`/lib/common-types/`)
58
+ - Type definitions for API responses
59
+ - JWT payload interfaces
60
+ - General utility types
61
+
62
+ - **Configuration** (`/lib/config/`)
63
+ - Compiled database utilities
64
+
65
+ - **Model Interfaces** (`/lib/model/`)
66
+ - Type definitions for authentication
67
+ - Core system model types
68
+ - Email service interfaces
69
+
70
+ ## Dependencies
71
+
72
+ - `cloud-ide-lms-model` - Data model type definitions
73
+ - `mongoose` - MongoDB ORM
74
+ - `dotenv` - Environment variable management
75
+
76
+ ## Development
77
+
78
+ ### Scripts
79
+
80
+ - `npm run build` - Build TypeScript code
81
+ - `npm run prepare` - Run build automatically before publishing
82
+
83
+ ### Contributing
84
+
85
+ 1. Clone the repository
86
+ 2. Install dependencies: `npm install`
87
+ 3. Make your changes
88
+ 4. Build the project: `npm run build`
89
+ 5. Test your changes
90
+ 6. Submit a pull request
91
+
92
+ ## Documentation
93
+
94
+ Detailed documentation is available within the codebase:
95
+
96
+ - [Main README](./README.md): Overview of the entire package
97
+ - [Source Code Documentation](./src/README.md): Documentation for source code structure
98
+ - [Configuration Utilities](./src/config/README.md): Configuration utilities
99
+ - [Schema Structure Overview](./src/schema/README.md): Schema structure overview
100
+ - [Authentication Schemas](./src/schema/auth/README.md): Authentication schemas
101
+ - [Core System Schemas](./src/schema/core/README.md): Core system schemas
102
+ - [Email Service Schemas](./src/schema/email/README.md): Email service schemas
103
+ - [Compiled Output Documentation](./lib/README.md): Documentation for compiled output
104
+ - [Common Type Definitions](./lib/common-types/README.md): Common type definitions
105
+ - [Model Interface Definitions](./lib/model/README.md): Model interface definitions
106
+
107
+ ## Table of Contents
108
+
109
+ - [Overview](#overview)
110
+ - [Installation](#installation)
111
+ - [Usage](#usage)
112
+ - [Project Structure](#project-structure)
113
+ - [Dependencies](#dependencies)
114
+ - [Development](#development)
115
+ - [Documentation](#documentation)
116
+ - [License](#license)
117
+ - [Author](#author)
118
+
119
+ ## License
120
+
121
+ ISC
122
+
123
+ ## Author
124
+
125
+ Ankush Bhure
package/lib/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # Compiled Output
2
+
3
+ This directory contains the compiled JavaScript files and TypeScript declaration files (`.d.ts`) generated from the source code in the `/src` directory.
4
+
5
+ ## Navigation
6
+
7
+ - [Back to Main README](../README.md)
8
+ - [Source Documentation](../src/README.md)
9
+ - [Common Types Documentation](./common-types/README.md)
10
+ - [Model Interfaces Documentation](./model/README.md)
11
+
12
+ ## Directory Structure
13
+
14
+ ### Schema (`/schema`)
15
+
16
+ Contains the compiled Mongoose schema definitions for:
17
+ - Authentication (`/schema/auth/`)
18
+ - Core system functionality (`/schema/core/`)
19
+ - Email services (`/schema/email/`)
20
+
21
+ ### Common Types (`/common-types`)
22
+
23
+ Contains shared type definitions used throughout the application:
24
+ - Controller responses
25
+ - Service configurations
26
+ - Authentication payloads
27
+ - User permissions
28
+
29
+ ### Configuration (`/config`)
30
+
31
+ Contains compiled database connection and configuration utilities.
32
+
33
+ ### Model Interfaces (`/model`)
34
+
35
+ Contains types and interfaces for various domain models:
36
+ - Authentication models
37
+ - Core system models
38
+ - Email service models
39
+
40
+ ## Usage
41
+
42
+ These files are the distributable part of the package that gets published to npm. When you install this package as a dependency, these are the files that are included and used in your project.
43
+
44
+ The main entry point is `index.js` which exports all the components for consumption.
@@ -0,0 +1,27 @@
1
+ # Common Types
2
+
3
+ This directory contains TypeScript interfaces and type definitions that are used throughout the Cloud IDE LMS system.
4
+
5
+ ## Navigation
6
+
7
+ - [Back to Compiled Output](../README.md)
8
+ - [Back to Main README](../../README.md)
9
+ - [Model Interfaces Documentation](../model/README.md)
10
+
11
+ ## Files
12
+
13
+ - `common.d.ts` - General purpose shared types
14
+ - `coreControllerResponse.d.ts` - Response types for core controllers
15
+ - `designConfigControllerResponse.d.ts` - Response types for design configuration
16
+ - `emailServiceConfig.d.ts` - Configuration types for email services
17
+ - `entityControllerResponse.d.ts` - Response types for entity controllers
18
+ - `forgotPasswordControllerResponse.d.ts` - Response types for forgot password flow
19
+ - `jwtPayload.d.ts` - JWT token payload structure
20
+ - `loginControllerResponse.d.ts` - Response types for login process
21
+ - `menuControllerResponse.d.ts` - Response types for menu controllers
22
+ - `resetPasswordControllerResponse.d.ts` - Response types for password reset
23
+ - `userPermissions.d.ts` - User permission types and interfaces
24
+
25
+ ## Usage
26
+
27
+ These types are primarily used internally by the package but can also be imported by consumers of the package for type safety in TypeScript projects.
@@ -1,3 +1,4 @@
1
1
  import 'dotenv/config';
2
2
  declare function connectDB(): Promise<void>;
3
- export { connectDB };
3
+ declare const customUUID: () => string;
4
+ export { connectDB, customUUID };
@@ -36,9 +36,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  }
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.customUUID = void 0;
39
40
  exports.connectDB = connectDB;
40
41
  var mongoose = require("mongoose");
41
42
  require("dotenv/config");
43
+ var bson_1 = require("bson");
42
44
  function connectDB() {
43
45
  return __awaiter(this, void 0, void 0, function () {
44
46
  var options;
@@ -63,3 +65,6 @@ function connectDB() {
63
65
  });
64
66
  });
65
67
  }
68
+ // Event listner for success and error // pending
69
+ var customUUID = function () { return "".concat(process.env.UUID_PREFIX, "-").concat(new bson_1.UUID().toString()); };
70
+ exports.customUUID = customUUID;
@@ -0,0 +1,30 @@
1
+ # Model Interfaces
2
+
3
+ This directory contains TypeScript interfaces and type definitions for the domain models used in the Cloud IDE LMS system.
4
+
5
+ ## Navigation
6
+
7
+ - [Back to Compiled Output](../README.md)
8
+ - [Back to Main README](../../README.md)
9
+ - [Common Types Documentation](../common-types/README.md)
10
+
11
+ ## Directory Structure
12
+
13
+ ### Authentication Models (`/auth`)
14
+
15
+ Contains interfaces related to authentication processes:
16
+ - `forgot-password.d.ts` - Types for password recovery
17
+ - `login.d.ts` - Login request and response types
18
+ - `register.d.ts` - User registration types
19
+ - `reset-password.d.ts` - Password reset types
20
+
21
+ ### Core System Models (`/core`)
22
+
23
+ Contains interfaces for core system functionality:
24
+ - `design-config.d.ts` - UI/UX design configuration types
25
+ - `entity.d.ts` - Entity management types
26
+ - `general-master.d.ts` - General master data types
27
+
28
+ ## Usage
29
+
30
+ These type definitions provide the structure for data objects that flow through the system and are stored in MongoDB. They ensure type safety when working with data in TypeScript projects.
@@ -4,6 +4,10 @@ exports.CCoreSylog = void 0;
4
4
  var mongoose_1 = require("mongoose");
5
5
  /* SCHEMA START */
6
6
  var core_system_logs = new mongoose_1.Schema({
7
+ _id: {
8
+ type: mongoose_1.default.Schema.Types.ObjectId,
9
+ default: function () { return 'ankush' + new mongoose_1.default.Types.ObjectId(); }
10
+ },
7
11
  sylog_id_user: {
8
12
  type: mongoose_1.default.Schema.Types.ObjectId,
9
13
  required: false
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "typescript": "^5.8.3"
10
10
  },
11
11
  "name": "cloud-ide-model-schema",
12
- "version": "1.1.18",
12
+ "version": "1.1.20",
13
13
  "description": "Pachage for schema management of Cloud IDEsys LMS",
14
14
  "main": "lib/index.js",
15
15
  "types": "lib/index.d.ts",