cloud-ide-lms-model 1.1.84 → 1.1.86
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/app/deployment-registry.model.d.ts +125 -0
- package/lib/model/app/deployment-registry.model.js +95 -0
- package/lib/model/app/index.d.ts +1 -0
- package/lib/model/app/index.js +1 -0
- package/lib/model/core/core_ai.d.ts +6 -0
- package/lib/model/core/core_ai.js +2 -0
- package/lib/model/core/core_system_pages_theme.js +2 -2
- package/lib/routes/aiRoutes.d.ts +3 -0
- package/lib/routes/aiRoutes.js +4 -1
- package/lib/routes/authRoutes.d.ts +2 -0
- package/lib/routes/authRoutes.js +2 -0
- package/lib/schema/academics/aca_academic_year.d.ts +1 -0
- package/lib/schema/core/core_system_themes.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
export interface ValidatablePayload {
|
|
2
|
+
Validate: () => Record<string, string>;
|
|
3
|
+
}
|
|
4
|
+
export type DeploymentSourceMode = "LOCAL_BUILD" | "SERVER_BUILD" | "PREVIOUS_VERSION";
|
|
5
|
+
export type DeploymentArtifactType = "api" | "ui";
|
|
6
|
+
export type DeploymentEnvironment = "dev" | "test" | "uat" | "prod";
|
|
7
|
+
export type DeploymentAction = "deploy" | "rollback";
|
|
8
|
+
export type DeploymentStatus = "PENDING" | "RUNNING" | "SUCCESS" | "FAILED";
|
|
9
|
+
export type DeploymentBackupStatus = "PENDING" | "SYNCED" | "FAILED";
|
|
10
|
+
export interface DeploymentArtifact {
|
|
11
|
+
id: string;
|
|
12
|
+
appCode: string;
|
|
13
|
+
artifactType: DeploymentArtifactType;
|
|
14
|
+
artifactVersion: string;
|
|
15
|
+
sourceMode: DeploymentSourceMode;
|
|
16
|
+
sourceRef: string;
|
|
17
|
+
checksum: string;
|
|
18
|
+
createdAt: string;
|
|
19
|
+
createdBy: string;
|
|
20
|
+
backupStatus: DeploymentBackupStatus;
|
|
21
|
+
}
|
|
22
|
+
export interface DeploymentJob {
|
|
23
|
+
id: string;
|
|
24
|
+
appCode: string;
|
|
25
|
+
artifactVersion: string;
|
|
26
|
+
environment: DeploymentEnvironment;
|
|
27
|
+
action: DeploymentAction;
|
|
28
|
+
sourceMode: DeploymentSourceMode;
|
|
29
|
+
sourceRef: string;
|
|
30
|
+
status: DeploymentStatus;
|
|
31
|
+
message?: string;
|
|
32
|
+
createdAt: string;
|
|
33
|
+
updatedAt: string;
|
|
34
|
+
}
|
|
35
|
+
export declare class MDeploymentArtifactInsertPayload implements ValidatablePayload {
|
|
36
|
+
appCode: string;
|
|
37
|
+
artifactType: DeploymentArtifactType;
|
|
38
|
+
artifactVersion: string;
|
|
39
|
+
sourceMode: DeploymentSourceMode;
|
|
40
|
+
sourceRef: string;
|
|
41
|
+
checksum: string;
|
|
42
|
+
createdBy: string;
|
|
43
|
+
backupStatus: DeploymentBackupStatus;
|
|
44
|
+
constructor(init: Partial<MDeploymentArtifactInsertPayload>);
|
|
45
|
+
Validate(): Record<string, string>;
|
|
46
|
+
}
|
|
47
|
+
export declare class MDeploymentJobInsertPayload implements ValidatablePayload {
|
|
48
|
+
appCode: string;
|
|
49
|
+
artifactVersion: string;
|
|
50
|
+
environment: DeploymentEnvironment;
|
|
51
|
+
action: DeploymentAction;
|
|
52
|
+
sourceMode: DeploymentSourceMode;
|
|
53
|
+
sourceRef: string;
|
|
54
|
+
reason: string;
|
|
55
|
+
constructor(init: Partial<MDeploymentJobInsertPayload>);
|
|
56
|
+
Validate(): Record<string, string>;
|
|
57
|
+
}
|
|
58
|
+
export interface DeploymentControllerResponse<T> {
|
|
59
|
+
success: boolean;
|
|
60
|
+
code?: number;
|
|
61
|
+
message: string;
|
|
62
|
+
data: T;
|
|
63
|
+
totalDocument?: number;
|
|
64
|
+
}
|
|
65
|
+
export type BackupType = "full" | "incremental";
|
|
66
|
+
export type BackupStatus = "PENDING" | "RUNNING" | "SUCCESS" | "FAILED";
|
|
67
|
+
export interface BackupPolicy {
|
|
68
|
+
id: string;
|
|
69
|
+
environment: DeploymentEnvironment;
|
|
70
|
+
backupType: BackupType;
|
|
71
|
+
scheduleCron: string;
|
|
72
|
+
retentionDays: number;
|
|
73
|
+
enabled: boolean;
|
|
74
|
+
updatedAt: string;
|
|
75
|
+
}
|
|
76
|
+
export interface BackupJob {
|
|
77
|
+
id: string;
|
|
78
|
+
environment: DeploymentEnvironment;
|
|
79
|
+
instance: string;
|
|
80
|
+
database: string;
|
|
81
|
+
backupType: BackupType;
|
|
82
|
+
storagePath: string;
|
|
83
|
+
backupFileName: string;
|
|
84
|
+
checksum?: string;
|
|
85
|
+
sizeBytes?: number;
|
|
86
|
+
status: BackupStatus;
|
|
87
|
+
triggeredBy: string;
|
|
88
|
+
startedAt?: string;
|
|
89
|
+
completedAt?: string;
|
|
90
|
+
message?: string;
|
|
91
|
+
}
|
|
92
|
+
export interface RestoreJob {
|
|
93
|
+
id: string;
|
|
94
|
+
environment: DeploymentEnvironment;
|
|
95
|
+
instance: string;
|
|
96
|
+
database: string;
|
|
97
|
+
backupJobId: string;
|
|
98
|
+
restoreTargetDatabase: string;
|
|
99
|
+
status: BackupStatus;
|
|
100
|
+
triggeredBy: string;
|
|
101
|
+
startedAt?: string;
|
|
102
|
+
completedAt?: string;
|
|
103
|
+
message?: string;
|
|
104
|
+
}
|
|
105
|
+
export declare class MBackupRunPayload implements ValidatablePayload {
|
|
106
|
+
environment: DeploymentEnvironment;
|
|
107
|
+
instance: string;
|
|
108
|
+
database: string;
|
|
109
|
+
backupType: BackupType;
|
|
110
|
+
triggeredBy: string;
|
|
111
|
+
mongoUri: string;
|
|
112
|
+
constructor(init: Partial<MBackupRunPayload>);
|
|
113
|
+
Validate(): Record<string, string>;
|
|
114
|
+
}
|
|
115
|
+
export declare class MRestoreRunPayload implements ValidatablePayload {
|
|
116
|
+
environment: DeploymentEnvironment;
|
|
117
|
+
instance: string;
|
|
118
|
+
database: string;
|
|
119
|
+
backupJobId: string;
|
|
120
|
+
restoreTargetDatabase: string;
|
|
121
|
+
triggeredBy: string;
|
|
122
|
+
mongoUri: string;
|
|
123
|
+
constructor(init: Partial<MRestoreRunPayload>);
|
|
124
|
+
Validate(): Record<string, string>;
|
|
125
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MRestoreRunPayload = exports.MBackupRunPayload = exports.MDeploymentJobInsertPayload = exports.MDeploymentArtifactInsertPayload = void 0;
|
|
4
|
+
class MDeploymentArtifactInsertPayload {
|
|
5
|
+
constructor(init) {
|
|
6
|
+
this.appCode = "";
|
|
7
|
+
this.artifactType = "ui";
|
|
8
|
+
this.artifactVersion = "";
|
|
9
|
+
this.sourceMode = "LOCAL_BUILD";
|
|
10
|
+
this.sourceRef = "";
|
|
11
|
+
this.checksum = "";
|
|
12
|
+
this.createdBy = "";
|
|
13
|
+
this.backupStatus = "PENDING";
|
|
14
|
+
Object.assign(this, init);
|
|
15
|
+
}
|
|
16
|
+
Validate() {
|
|
17
|
+
const errors = {};
|
|
18
|
+
if (!this.appCode)
|
|
19
|
+
errors.appCode = "App code is required.";
|
|
20
|
+
if (!this.artifactVersion)
|
|
21
|
+
errors.artifactVersion = "Artifact version is required.";
|
|
22
|
+
if (!this.sourceRef)
|
|
23
|
+
errors.sourceRef = "Source reference is required.";
|
|
24
|
+
return errors;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.MDeploymentArtifactInsertPayload = MDeploymentArtifactInsertPayload;
|
|
28
|
+
class MDeploymentJobInsertPayload {
|
|
29
|
+
constructor(init) {
|
|
30
|
+
this.appCode = "";
|
|
31
|
+
this.artifactVersion = "";
|
|
32
|
+
this.environment = "dev";
|
|
33
|
+
this.action = "deploy";
|
|
34
|
+
this.sourceMode = "LOCAL_BUILD";
|
|
35
|
+
this.sourceRef = "";
|
|
36
|
+
this.reason = "";
|
|
37
|
+
Object.assign(this, init);
|
|
38
|
+
}
|
|
39
|
+
Validate() {
|
|
40
|
+
const errors = {};
|
|
41
|
+
if (!this.appCode)
|
|
42
|
+
errors.appCode = "App code is required.";
|
|
43
|
+
if (!this.artifactVersion)
|
|
44
|
+
errors.artifactVersion = "Artifact version is required.";
|
|
45
|
+
if (!this.sourceRef)
|
|
46
|
+
errors.sourceRef = "Source reference is required.";
|
|
47
|
+
return errors;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.MDeploymentJobInsertPayload = MDeploymentJobInsertPayload;
|
|
51
|
+
class MBackupRunPayload {
|
|
52
|
+
constructor(init) {
|
|
53
|
+
this.environment = "dev";
|
|
54
|
+
this.instance = "";
|
|
55
|
+
this.database = "";
|
|
56
|
+
this.backupType = "full";
|
|
57
|
+
this.triggeredBy = "ui-user";
|
|
58
|
+
this.mongoUri = "";
|
|
59
|
+
Object.assign(this, init);
|
|
60
|
+
}
|
|
61
|
+
Validate() {
|
|
62
|
+
const errors = {};
|
|
63
|
+
if (!this.instance)
|
|
64
|
+
errors.instance = "Instance is required.";
|
|
65
|
+
if (!this.database)
|
|
66
|
+
errors.database = "Database is required.";
|
|
67
|
+
if (!this.mongoUri)
|
|
68
|
+
errors.mongoUri = "Mongo URI is required.";
|
|
69
|
+
return errors;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.MBackupRunPayload = MBackupRunPayload;
|
|
73
|
+
class MRestoreRunPayload {
|
|
74
|
+
constructor(init) {
|
|
75
|
+
this.environment = "dev";
|
|
76
|
+
this.instance = "";
|
|
77
|
+
this.database = "";
|
|
78
|
+
this.backupJobId = "";
|
|
79
|
+
this.restoreTargetDatabase = "";
|
|
80
|
+
this.triggeredBy = "ui-user";
|
|
81
|
+
this.mongoUri = "";
|
|
82
|
+
Object.assign(this, init);
|
|
83
|
+
}
|
|
84
|
+
Validate() {
|
|
85
|
+
const errors = {};
|
|
86
|
+
if (!this.backupJobId)
|
|
87
|
+
errors.backupJobId = "Backup job ID is required.";
|
|
88
|
+
if (!this.restoreTargetDatabase)
|
|
89
|
+
errors.restoreTargetDatabase = "Restore target database is required.";
|
|
90
|
+
if (!this.mongoUri)
|
|
91
|
+
errors.mongoUri = "Mongo URI is required.";
|
|
92
|
+
return errors;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
exports.MRestoreRunPayload = MRestoreRunPayload;
|
package/lib/model/app/index.d.ts
CHANGED
package/lib/model/app/index.js
CHANGED
|
@@ -26,3 +26,4 @@ __exportStar(require("./app-changelog.model"), exports);
|
|
|
26
26
|
__exportStar(require("./app-user-update-status.model"), exports);
|
|
27
27
|
__exportStar(require("./app-statistics.model"), exports);
|
|
28
28
|
__exportStar(require("./app-rollout-config.model"), exports);
|
|
29
|
+
__exportStar(require("./deployment-registry.model"), exports);
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { MTableQueries } from "../../common-types/common";
|
|
2
2
|
import { CoreAiCapability, CoreAiEmbeddingChunk, CoreAiFeedbackLog, CoreAiKnowledgeSource, CoreAiPromptTemplate, CoreAiRequestAuditLog, CoreAiRoleCapabilityMapping } from "../../schema";
|
|
3
3
|
import { controllerResponse } from "../../utilities";
|
|
4
|
+
export type AiChatMessage = {
|
|
5
|
+
role: "user" | "assistant";
|
|
6
|
+
content: string;
|
|
7
|
+
};
|
|
4
8
|
declare class MAiChatPayload extends MTableQueries {
|
|
5
9
|
query: string;
|
|
6
10
|
capability_code: string;
|
|
@@ -8,6 +12,8 @@ declare class MAiChatPayload extends MTableQueries {
|
|
|
8
12
|
module?: string;
|
|
9
13
|
record_id?: string;
|
|
10
14
|
context?: Record<string, any>;
|
|
15
|
+
/** Conversation history for multi-turn chat. Each turn: { role: "user"|"assistant", content: string }. */
|
|
16
|
+
messages?: AiChatMessage[];
|
|
11
17
|
constructor(init: MAiChatPayload);
|
|
12
18
|
Validate?(): Partial<Record<keyof MAiChatPayload, string>>;
|
|
13
19
|
}
|
|
@@ -11,6 +11,8 @@ class MAiChatPayload extends common_1.MTableQueries {
|
|
|
11
11
|
this.module = "";
|
|
12
12
|
this.record_id = "";
|
|
13
13
|
this.context = {};
|
|
14
|
+
/** Conversation history for multi-turn chat. Each turn: { role: "user"|"assistant", content: string }. */
|
|
15
|
+
this.messages = [];
|
|
14
16
|
Object.assign(this, init);
|
|
15
17
|
}
|
|
16
18
|
Validate() {
|
|
@@ -82,8 +82,8 @@ class MSystemPagesThemeInsertUpdatePayload {
|
|
|
82
82
|
else {
|
|
83
83
|
for (let i = 0; i < layout.sytm_layout_drawer.length; i++) {
|
|
84
84
|
const drawer = layout.sytm_layout_drawer[i];
|
|
85
|
-
if (typeof drawer.
|
|
86
|
-
errorLogger.sytm_layout = `Drawer at index ${i} must have
|
|
85
|
+
if (typeof drawer.syth_status !== 'boolean' || typeof drawer.syth_config_syco_for !== 'string') {
|
|
86
|
+
errorLogger.sytm_layout = `Drawer at index ${i} must have syth_status (boolean) and syth_config_syco_for (string) properties!`;
|
|
87
87
|
break;
|
|
88
88
|
}
|
|
89
89
|
}
|
package/lib/routes/aiRoutes.d.ts
CHANGED
package/lib/routes/aiRoutes.js
CHANGED
|
@@ -12,7 +12,10 @@ const aiRoutesUrl = {
|
|
|
12
12
|
adminPromptTemplateSave: "admin/prompt-template/save",
|
|
13
13
|
adminPromptTemplateList: "admin/prompt-template/list",
|
|
14
14
|
adminKnowledgeSourceSync: "admin/knowledge-source/sync",
|
|
15
|
-
adminUsageReport: "admin/usage-report"
|
|
15
|
+
adminUsageReport: "admin/usage-report",
|
|
16
|
+
agentsLaunch: "agents/launch",
|
|
17
|
+
agentsStatus: "agents/:id/status",
|
|
18
|
+
agentsConversation: "agents/:id/conversation"
|
|
16
19
|
};
|
|
17
20
|
exports.aiRoutesUrl = aiRoutesUrl;
|
|
18
21
|
Object.freeze(aiRoutesUrl);
|
|
@@ -20,5 +20,7 @@ declare const authRoutesUrl: {
|
|
|
20
20
|
generateViewOnlyToken: string;
|
|
21
21
|
/** Endpoint to switch entity for logged-in user */
|
|
22
22
|
switchEntity: string;
|
|
23
|
+
/** Endpoint to get login test credentials for an entity */
|
|
24
|
+
loginTestConfig: string;
|
|
23
25
|
};
|
|
24
26
|
export { authRoutesUrl };
|
package/lib/routes/authRoutes.js
CHANGED
|
@@ -23,6 +23,8 @@ const authRoutesUrl = {
|
|
|
23
23
|
generateViewOnlyToken: 'generate-view-only-token',
|
|
24
24
|
/** Endpoint to switch entity for logged-in user */
|
|
25
25
|
switchEntity: 'switch-entity',
|
|
26
|
+
/** Endpoint to get login test credentials for an entity */
|
|
27
|
+
loginTestConfig: 'login-test-config',
|
|
26
28
|
};
|
|
27
29
|
exports.authRoutesUrl = authRoutesUrl;
|
|
28
30
|
// Freeze the authRoutesUrl object to prevent modifications
|
|
@@ -10,6 +10,8 @@ declare class ICoreSyth {
|
|
|
10
10
|
interface ICoreSythDrawer {
|
|
11
11
|
syth_status: boolean;
|
|
12
12
|
syth_config_syco_for: string;
|
|
13
|
+
/** Optional JSON config per drawer row (e.g. for drawer_docs: array of doc items with title, url, etc.) */
|
|
14
|
+
syth_config_json?: string | Record<string, unknown> | unknown[];
|
|
13
15
|
core_system_config?: ICoreSyco;
|
|
14
16
|
}
|
|
15
17
|
export { ICoreSyth, // interface
|