cloud-ide-model-schema 1.1.107 → 1.1.109
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/schema/index.d.ts +1 -0
- package/lib/schema/index.js +1 -0
- package/lib/schema/notifications/notification_log.js +0 -8
- package/lib/schema/notifications/notification_preference.js +2 -2
- package/lib/schema/system/api_keys.d.ts +26 -0
- package/lib/schema/system/api_keys.js +75 -0
- package/lib/schema/system/backup_jobs.d.ts +39 -0
- package/lib/schema/system/backup_jobs.js +114 -0
- package/lib/schema/system/backup_policies.d.ts +23 -0
- package/lib/schema/system/backup_policies.js +68 -0
- package/lib/schema/system/backup_records.d.ts +29 -0
- package/lib/schema/system/backup_records.js +78 -0
- package/lib/schema/system/index.d.ts +12 -0
- package/lib/schema/system/index.js +28 -0
- package/lib/schema/system/integration_logs.d.ts +21 -0
- package/lib/schema/system/integration_logs.js +62 -0
- package/lib/schema/system/integrations.d.ts +31 -0
- package/lib/schema/system/integrations.js +80 -0
- package/lib/schema/system/recovery_operations.d.ts +23 -0
- package/lib/schema/system/recovery_operations.js +66 -0
- package/lib/schema/system/subscription_features.d.ts +19 -0
- package/lib/schema/system/subscription_features.js +54 -0
- package/lib/schema/system/subscription_payments.d.ts +25 -0
- package/lib/schema/system/subscription_payments.js +83 -0
- package/lib/schema/system/subscription_plans.d.ts +27 -0
- package/lib/schema/system/subscription_plans.js +93 -0
- package/lib/schema/system/subscriptions.d.ts +26 -0
- package/lib/schema/system/subscriptions.js +79 -0
- package/lib/schema/system/webhooks.d.ts +28 -0
- package/lib/schema/system/webhooks.js +87 -0
- package/package.json +1 -1
package/lib/schema/index.d.ts
CHANGED
package/lib/schema/index.js
CHANGED
|
@@ -4,13 +4,6 @@ exports.CNotificationLog = void 0;
|
|
|
4
4
|
var mongoose_1 = require("mongoose");
|
|
5
5
|
/* SCHEMA START */
|
|
6
6
|
var notification_log = new mongoose_1.Schema({
|
|
7
|
-
nlog_notification_id: {
|
|
8
|
-
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
9
|
-
ref: "notification",
|
|
10
|
-
required: true,
|
|
11
|
-
index: true,
|
|
12
|
-
comment: "Reference to notification"
|
|
13
|
-
},
|
|
14
7
|
nlog_id_user: {
|
|
15
8
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
16
9
|
ref: "auth_user_mst",
|
|
@@ -84,7 +77,6 @@ var notification_log = new mongoose_1.Schema({
|
|
|
84
77
|
collection: 'notification_logs'
|
|
85
78
|
});
|
|
86
79
|
// Indexes
|
|
87
|
-
notification_log.index({ nlog_notification_id: 1, nlog_event_type: 1 });
|
|
88
80
|
notification_log.index({ nlog_id_user: 1, nlog_event_timestamp: -1 });
|
|
89
81
|
notification_log.index({ nlog_channel: 1, nlog_channel_status: 1 });
|
|
90
82
|
notification_log.index({ nlog_event_type: 1, nlog_event_timestamp: -1 });
|
|
@@ -4,7 +4,7 @@ exports.CNotificationPreference = void 0;
|
|
|
4
4
|
var mongoose_1 = require("mongoose");
|
|
5
5
|
/* SCHEMA START */
|
|
6
6
|
var notification_preference = new mongoose_1.Schema({
|
|
7
|
-
|
|
7
|
+
npref_id_user: {
|
|
8
8
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
9
9
|
ref: "auth_user_mst",
|
|
10
10
|
required: true,
|
|
@@ -117,6 +117,6 @@ var notification_preference = new mongoose_1.Schema({
|
|
|
117
117
|
collection: 'notification_preferences'
|
|
118
118
|
});
|
|
119
119
|
// Unique index on user_id
|
|
120
|
-
notification_preference.index({
|
|
120
|
+
notification_preference.index({ npref_id_user: 1 }, { unique: true });
|
|
121
121
|
var CNotificationPreference = mongoose_1.default.model("notification_preference", notification_preference);
|
|
122
122
|
exports.CNotificationPreference = CNotificationPreference;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
export interface IApiKey {
|
|
3
|
+
_id?: string;
|
|
4
|
+
akey_name: string;
|
|
5
|
+
akey_api_key: string;
|
|
6
|
+
akey_api_secret?: string;
|
|
7
|
+
akey_permissions: string[];
|
|
8
|
+
akey_rate_limit?: {
|
|
9
|
+
requests_per_minute?: number;
|
|
10
|
+
requests_per_hour?: number;
|
|
11
|
+
requests_per_day?: number;
|
|
12
|
+
};
|
|
13
|
+
akey_expiry_date?: Date;
|
|
14
|
+
akey_last_used?: Date;
|
|
15
|
+
akey_status: 'active' | 'revoked' | 'expired';
|
|
16
|
+
akey_created_by?: string;
|
|
17
|
+
akey_created_at?: Date;
|
|
18
|
+
akey_updated_at?: Date;
|
|
19
|
+
akey_isactive?: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare const CApiKey: mongoose.Model<IApiKey, {}, {}, {}, mongoose.Document<unknown, {}, IApiKey, {}> & IApiKey & Required<{
|
|
22
|
+
_id: string;
|
|
23
|
+
}> & {
|
|
24
|
+
__v: number;
|
|
25
|
+
}, any>;
|
|
26
|
+
export { CApiKey };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CApiKey = void 0;
|
|
4
|
+
var mongoose_1 = require("mongoose");
|
|
5
|
+
var api_keys = new mongoose_1.Schema({
|
|
6
|
+
akey_name: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
maxlength: 100,
|
|
10
|
+
trim: true
|
|
11
|
+
},
|
|
12
|
+
akey_api_key: {
|
|
13
|
+
type: String,
|
|
14
|
+
required: true,
|
|
15
|
+
maxlength: 500,
|
|
16
|
+
unique: true
|
|
17
|
+
},
|
|
18
|
+
akey_api_secret: {
|
|
19
|
+
type: String,
|
|
20
|
+
maxlength: 500
|
|
21
|
+
},
|
|
22
|
+
akey_permissions: {
|
|
23
|
+
type: [String],
|
|
24
|
+
default: []
|
|
25
|
+
},
|
|
26
|
+
akey_rate_limit: {
|
|
27
|
+
requests_per_minute: {
|
|
28
|
+
type: Number,
|
|
29
|
+
min: 0
|
|
30
|
+
},
|
|
31
|
+
requests_per_hour: {
|
|
32
|
+
type: Number,
|
|
33
|
+
min: 0
|
|
34
|
+
},
|
|
35
|
+
requests_per_day: {
|
|
36
|
+
type: Number,
|
|
37
|
+
min: 0
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
akey_expiry_date: {
|
|
41
|
+
type: Date
|
|
42
|
+
},
|
|
43
|
+
akey_last_used: {
|
|
44
|
+
type: Date
|
|
45
|
+
},
|
|
46
|
+
akey_status: {
|
|
47
|
+
type: String,
|
|
48
|
+
required: true,
|
|
49
|
+
enum: ['active', 'revoked', 'expired'],
|
|
50
|
+
default: 'active',
|
|
51
|
+
index: true
|
|
52
|
+
},
|
|
53
|
+
akey_created_by: {
|
|
54
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
55
|
+
ref: "auth_user_mst"
|
|
56
|
+
},
|
|
57
|
+
akey_created_at: {
|
|
58
|
+
type: Date,
|
|
59
|
+
default: Date.now
|
|
60
|
+
},
|
|
61
|
+
akey_updated_at: {
|
|
62
|
+
type: Date,
|
|
63
|
+
default: Date.now
|
|
64
|
+
},
|
|
65
|
+
akey_isactive: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: true
|
|
68
|
+
}
|
|
69
|
+
}, { collection: 'api_keys', timestamps: { createdAt: 'akey_created_at', updatedAt: 'akey_updated_at' } });
|
|
70
|
+
// Indexes
|
|
71
|
+
api_keys.index({ akey_name: 1 });
|
|
72
|
+
api_keys.index({ akey_status: 1 });
|
|
73
|
+
api_keys.index({ akey_api_key: 1 });
|
|
74
|
+
var CApiKey = mongoose_1.default.model("api_keys", api_keys);
|
|
75
|
+
exports.CApiKey = CApiKey;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
export interface IBackupJob {
|
|
3
|
+
_id?: string;
|
|
4
|
+
bjob_name: string;
|
|
5
|
+
bjob_backup_type: 'full' | 'incremental' | 'differential' | 'file';
|
|
6
|
+
bjob_schedule: {
|
|
7
|
+
frequency: 'daily' | 'weekly' | 'monthly' | 'hourly' | 'manual';
|
|
8
|
+
time?: string;
|
|
9
|
+
day_of_week?: number;
|
|
10
|
+
day_of_month?: number;
|
|
11
|
+
};
|
|
12
|
+
bjob_status: 'active' | 'paused' | 'disabled';
|
|
13
|
+
bjob_last_run?: Date;
|
|
14
|
+
bjob_next_run?: Date;
|
|
15
|
+
bjob_retention_days: number;
|
|
16
|
+
bjob_encryption_enabled: boolean;
|
|
17
|
+
bjob_compression_enabled: boolean;
|
|
18
|
+
bjob_storage_location: 'local' | 'cloud' | 'both';
|
|
19
|
+
bjob_cloud_provider?: 'aws' | 'azure' | 'gcp';
|
|
20
|
+
bjob_cloud_config?: {
|
|
21
|
+
bucket_name?: string;
|
|
22
|
+
region?: string;
|
|
23
|
+
access_key?: string;
|
|
24
|
+
};
|
|
25
|
+
bjob_include_collections?: string[];
|
|
26
|
+
bjob_exclude_collections?: string[];
|
|
27
|
+
bjob_include_files?: boolean;
|
|
28
|
+
bjob_file_paths?: string[];
|
|
29
|
+
bjob_created_by?: string;
|
|
30
|
+
bjob_created_at?: Date;
|
|
31
|
+
bjob_updated_at?: Date;
|
|
32
|
+
bjob_isactive?: boolean;
|
|
33
|
+
}
|
|
34
|
+
declare const CBackupJob: mongoose.Model<IBackupJob, {}, {}, {}, mongoose.Document<unknown, {}, IBackupJob, {}> & IBackupJob & Required<{
|
|
35
|
+
_id: string;
|
|
36
|
+
}> & {
|
|
37
|
+
__v: number;
|
|
38
|
+
}, any>;
|
|
39
|
+
export { CBackupJob };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CBackupJob = void 0;
|
|
4
|
+
var mongoose_1 = require("mongoose");
|
|
5
|
+
var backup_jobs = new mongoose_1.Schema({
|
|
6
|
+
bjob_name: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
maxlength: 100,
|
|
10
|
+
trim: true,
|
|
11
|
+
unique: true
|
|
12
|
+
},
|
|
13
|
+
bjob_backup_type: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true,
|
|
16
|
+
enum: ['full', 'incremental', 'differential', 'file'],
|
|
17
|
+
trim: true
|
|
18
|
+
},
|
|
19
|
+
bjob_schedule: {
|
|
20
|
+
frequency: {
|
|
21
|
+
type: String,
|
|
22
|
+
required: true,
|
|
23
|
+
enum: ['daily', 'weekly', 'monthly', 'hourly', 'manual']
|
|
24
|
+
},
|
|
25
|
+
time: {
|
|
26
|
+
type: String,
|
|
27
|
+
maxlength: 5
|
|
28
|
+
},
|
|
29
|
+
day_of_week: {
|
|
30
|
+
type: Number,
|
|
31
|
+
min: 0,
|
|
32
|
+
max: 6
|
|
33
|
+
},
|
|
34
|
+
day_of_month: {
|
|
35
|
+
type: Number,
|
|
36
|
+
min: 1,
|
|
37
|
+
max: 31
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
bjob_status: {
|
|
41
|
+
type: String,
|
|
42
|
+
required: true,
|
|
43
|
+
enum: ['active', 'paused', 'disabled'],
|
|
44
|
+
default: 'active'
|
|
45
|
+
},
|
|
46
|
+
bjob_last_run: {
|
|
47
|
+
type: Date
|
|
48
|
+
},
|
|
49
|
+
bjob_next_run: {
|
|
50
|
+
type: Date
|
|
51
|
+
},
|
|
52
|
+
bjob_retention_days: {
|
|
53
|
+
type: Number,
|
|
54
|
+
required: true,
|
|
55
|
+
default: 30,
|
|
56
|
+
min: 1
|
|
57
|
+
},
|
|
58
|
+
bjob_encryption_enabled: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: false
|
|
61
|
+
},
|
|
62
|
+
bjob_compression_enabled: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: true
|
|
65
|
+
},
|
|
66
|
+
bjob_storage_location: {
|
|
67
|
+
type: String,
|
|
68
|
+
required: true,
|
|
69
|
+
enum: ['local', 'cloud', 'both'],
|
|
70
|
+
default: 'local'
|
|
71
|
+
},
|
|
72
|
+
bjob_cloud_provider: {
|
|
73
|
+
type: String,
|
|
74
|
+
enum: ['aws', 'azure', 'gcp']
|
|
75
|
+
},
|
|
76
|
+
bjob_cloud_config: {
|
|
77
|
+
type: Object
|
|
78
|
+
},
|
|
79
|
+
bjob_include_collections: {
|
|
80
|
+
type: [String]
|
|
81
|
+
},
|
|
82
|
+
bjob_exclude_collections: {
|
|
83
|
+
type: [String]
|
|
84
|
+
},
|
|
85
|
+
bjob_include_files: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: false
|
|
88
|
+
},
|
|
89
|
+
bjob_file_paths: {
|
|
90
|
+
type: [String]
|
|
91
|
+
},
|
|
92
|
+
bjob_created_by: {
|
|
93
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
94
|
+
ref: "auth_user_mst"
|
|
95
|
+
},
|
|
96
|
+
bjob_created_at: {
|
|
97
|
+
type: Date,
|
|
98
|
+
default: Date.now
|
|
99
|
+
},
|
|
100
|
+
bjob_updated_at: {
|
|
101
|
+
type: Date,
|
|
102
|
+
default: Date.now
|
|
103
|
+
},
|
|
104
|
+
bjob_isactive: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
default: true
|
|
107
|
+
}
|
|
108
|
+
}, { collection: 'backup_jobs', timestamps: { createdAt: 'bjob_created_at', updatedAt: 'bjob_updated_at' } });
|
|
109
|
+
// Indexes
|
|
110
|
+
backup_jobs.index({ bjob_name: 1 });
|
|
111
|
+
backup_jobs.index({ bjob_status: 1 });
|
|
112
|
+
backup_jobs.index({ bjob_next_run: 1 });
|
|
113
|
+
var CBackupJob = mongoose_1.default.model("backup_jobs", backup_jobs);
|
|
114
|
+
exports.CBackupJob = CBackupJob;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
export interface IBackupPolicy {
|
|
3
|
+
_id?: string;
|
|
4
|
+
bpol_name: string;
|
|
5
|
+
bpol_retention_days: number;
|
|
6
|
+
bpol_backup_frequency: 'hourly' | 'daily' | 'weekly' | 'monthly';
|
|
7
|
+
bpol_encryption_enabled: boolean;
|
|
8
|
+
bpol_compression_enabled: boolean;
|
|
9
|
+
bpol_auto_cleanup: boolean;
|
|
10
|
+
bpol_notification_enabled: boolean;
|
|
11
|
+
bpol_notification_emails?: string[];
|
|
12
|
+
bpol_description?: string;
|
|
13
|
+
bpol_created_by?: string;
|
|
14
|
+
bpol_created_at?: Date;
|
|
15
|
+
bpol_updated_at?: Date;
|
|
16
|
+
bpol_isactive?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare const CBackupPolicy: mongoose.Model<IBackupPolicy, {}, {}, {}, mongoose.Document<unknown, {}, IBackupPolicy, {}> & IBackupPolicy & Required<{
|
|
19
|
+
_id: string;
|
|
20
|
+
}> & {
|
|
21
|
+
__v: number;
|
|
22
|
+
}, any>;
|
|
23
|
+
export { CBackupPolicy };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CBackupPolicy = void 0;
|
|
4
|
+
var mongoose_1 = require("mongoose");
|
|
5
|
+
var backup_policies = new mongoose_1.Schema({
|
|
6
|
+
bpol_name: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
maxlength: 100,
|
|
10
|
+
trim: true,
|
|
11
|
+
unique: true
|
|
12
|
+
},
|
|
13
|
+
bpol_retention_days: {
|
|
14
|
+
type: Number,
|
|
15
|
+
required: true,
|
|
16
|
+
default: 30,
|
|
17
|
+
min: 1
|
|
18
|
+
},
|
|
19
|
+
bpol_backup_frequency: {
|
|
20
|
+
type: String,
|
|
21
|
+
required: true,
|
|
22
|
+
enum: ['hourly', 'daily', 'weekly', 'monthly']
|
|
23
|
+
},
|
|
24
|
+
bpol_encryption_enabled: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false
|
|
27
|
+
},
|
|
28
|
+
bpol_compression_enabled: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: true
|
|
31
|
+
},
|
|
32
|
+
bpol_auto_cleanup: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: true
|
|
35
|
+
},
|
|
36
|
+
bpol_notification_enabled: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: true
|
|
39
|
+
},
|
|
40
|
+
bpol_notification_emails: {
|
|
41
|
+
type: [String]
|
|
42
|
+
},
|
|
43
|
+
bpol_description: {
|
|
44
|
+
type: String,
|
|
45
|
+
maxlength: 500
|
|
46
|
+
},
|
|
47
|
+
bpol_created_by: {
|
|
48
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
49
|
+
ref: "auth_user_mst"
|
|
50
|
+
},
|
|
51
|
+
bpol_created_at: {
|
|
52
|
+
type: Date,
|
|
53
|
+
default: Date.now
|
|
54
|
+
},
|
|
55
|
+
bpol_updated_at: {
|
|
56
|
+
type: Date,
|
|
57
|
+
default: Date.now
|
|
58
|
+
},
|
|
59
|
+
bpol_isactive: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: true
|
|
62
|
+
}
|
|
63
|
+
}, { collection: 'backup_policies', timestamps: { createdAt: 'bpol_created_at', updatedAt: 'bpol_updated_at' } });
|
|
64
|
+
// Indexes
|
|
65
|
+
backup_policies.index({ bpol_name: 1 });
|
|
66
|
+
backup_policies.index({ bpol_isactive: 1 });
|
|
67
|
+
var CBackupPolicy = mongoose_1.default.model("backup_policies", backup_policies);
|
|
68
|
+
exports.CBackupPolicy = CBackupPolicy;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
export interface IBackupRecord {
|
|
3
|
+
_id?: string;
|
|
4
|
+
brec_backup_job_id: string;
|
|
5
|
+
brec_backup_type: 'full' | 'incremental' | 'differential' | 'file';
|
|
6
|
+
brec_backup_path: string;
|
|
7
|
+
brec_file_name: string;
|
|
8
|
+
brec_size: number;
|
|
9
|
+
brec_status: 'in_progress' | 'completed' | 'failed' | 'cancelled';
|
|
10
|
+
brec_verification_status: 'pending' | 'verified' | 'failed';
|
|
11
|
+
brec_started_at?: Date;
|
|
12
|
+
brec_completed_at?: Date;
|
|
13
|
+
brec_duration?: number;
|
|
14
|
+
brec_error_message?: string;
|
|
15
|
+
brec_metadata?: {
|
|
16
|
+
collections_backed_up?: string[];
|
|
17
|
+
collections_count?: number;
|
|
18
|
+
files_backed_up?: number;
|
|
19
|
+
compression_ratio?: number;
|
|
20
|
+
};
|
|
21
|
+
brec_created_at?: Date;
|
|
22
|
+
brec_isactive?: boolean;
|
|
23
|
+
}
|
|
24
|
+
declare const CBackupRecord: mongoose.Model<IBackupRecord, {}, {}, {}, mongoose.Document<unknown, {}, IBackupRecord, {}> & IBackupRecord & Required<{
|
|
25
|
+
_id: string;
|
|
26
|
+
}> & {
|
|
27
|
+
__v: number;
|
|
28
|
+
}, any>;
|
|
29
|
+
export { CBackupRecord };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CBackupRecord = void 0;
|
|
4
|
+
var mongoose_1 = require("mongoose");
|
|
5
|
+
var backup_records = new mongoose_1.Schema({
|
|
6
|
+
brec_backup_job_id: {
|
|
7
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
8
|
+
ref: "backup_jobs",
|
|
9
|
+
required: true,
|
|
10
|
+
index: true
|
|
11
|
+
},
|
|
12
|
+
brec_backup_type: {
|
|
13
|
+
type: String,
|
|
14
|
+
required: true,
|
|
15
|
+
enum: ['full', 'incremental', 'differential', 'file']
|
|
16
|
+
},
|
|
17
|
+
brec_backup_path: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true,
|
|
20
|
+
maxlength: 500
|
|
21
|
+
},
|
|
22
|
+
brec_file_name: {
|
|
23
|
+
type: String,
|
|
24
|
+
required: true,
|
|
25
|
+
maxlength: 255
|
|
26
|
+
},
|
|
27
|
+
brec_size: {
|
|
28
|
+
type: Number,
|
|
29
|
+
required: true,
|
|
30
|
+
min: 0
|
|
31
|
+
},
|
|
32
|
+
brec_status: {
|
|
33
|
+
type: String,
|
|
34
|
+
required: true,
|
|
35
|
+
enum: ['in_progress', 'completed', 'failed', 'cancelled'],
|
|
36
|
+
default: 'in_progress',
|
|
37
|
+
index: true
|
|
38
|
+
},
|
|
39
|
+
brec_verification_status: {
|
|
40
|
+
type: String,
|
|
41
|
+
required: true,
|
|
42
|
+
enum: ['pending', 'verified', 'failed'],
|
|
43
|
+
default: 'pending'
|
|
44
|
+
},
|
|
45
|
+
brec_started_at: {
|
|
46
|
+
type: Date,
|
|
47
|
+
default: Date.now
|
|
48
|
+
},
|
|
49
|
+
brec_completed_at: {
|
|
50
|
+
type: Date
|
|
51
|
+
},
|
|
52
|
+
brec_duration: {
|
|
53
|
+
type: Number,
|
|
54
|
+
min: 0
|
|
55
|
+
},
|
|
56
|
+
brec_error_message: {
|
|
57
|
+
type: String,
|
|
58
|
+
maxlength: 1000
|
|
59
|
+
},
|
|
60
|
+
brec_metadata: {
|
|
61
|
+
type: Object
|
|
62
|
+
},
|
|
63
|
+
brec_created_at: {
|
|
64
|
+
type: Date,
|
|
65
|
+
default: Date.now,
|
|
66
|
+
index: true
|
|
67
|
+
},
|
|
68
|
+
brec_isactive: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: true
|
|
71
|
+
}
|
|
72
|
+
}, { collection: 'backup_records', timestamps: { createdAt: 'brec_created_at' } });
|
|
73
|
+
// Indexes
|
|
74
|
+
backup_records.index({ brec_backup_job_id: 1, brec_created_at: -1 });
|
|
75
|
+
backup_records.index({ brec_status: 1 });
|
|
76
|
+
backup_records.index({ brec_verification_status: 1 });
|
|
77
|
+
var CBackupRecord = mongoose_1.default.model("backup_records", backup_records);
|
|
78
|
+
exports.CBackupRecord = CBackupRecord;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { CBackupJob, IBackupJob } from './backup_jobs';
|
|
2
|
+
export { CBackupRecord, IBackupRecord } from './backup_records';
|
|
3
|
+
export { CRecoveryOperation, IRecoveryOperation } from './recovery_operations';
|
|
4
|
+
export { CBackupPolicy, IBackupPolicy } from './backup_policies';
|
|
5
|
+
export { CIntegration, IIntegration } from './integrations';
|
|
6
|
+
export { CApiKey, IApiKey } from './api_keys';
|
|
7
|
+
export { CWebhook, IWebhook } from './webhooks';
|
|
8
|
+
export { CIntegrationLog, IIntegrationLog } from './integration_logs';
|
|
9
|
+
export { CSubscriptionPlan, ISubscriptionPlan } from './subscription_plans';
|
|
10
|
+
export { CSubscriptionFeature, ISubscriptionFeature } from './subscription_features';
|
|
11
|
+
export { CSubscription, ISubscription } from './subscriptions';
|
|
12
|
+
export { CSubscriptionPayment, ISubscriptionPayment } from './subscription_payments';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CSubscriptionPayment = exports.CSubscription = exports.CSubscriptionFeature = exports.CSubscriptionPlan = exports.CIntegrationLog = exports.CWebhook = exports.CApiKey = exports.CIntegration = exports.CBackupPolicy = exports.CRecoveryOperation = exports.CBackupRecord = exports.CBackupJob = void 0;
|
|
4
|
+
// System Module Schemas
|
|
5
|
+
var backup_jobs_1 = require("./backup_jobs");
|
|
6
|
+
Object.defineProperty(exports, "CBackupJob", { enumerable: true, get: function () { return backup_jobs_1.CBackupJob; } });
|
|
7
|
+
var backup_records_1 = require("./backup_records");
|
|
8
|
+
Object.defineProperty(exports, "CBackupRecord", { enumerable: true, get: function () { return backup_records_1.CBackupRecord; } });
|
|
9
|
+
var recovery_operations_1 = require("./recovery_operations");
|
|
10
|
+
Object.defineProperty(exports, "CRecoveryOperation", { enumerable: true, get: function () { return recovery_operations_1.CRecoveryOperation; } });
|
|
11
|
+
var backup_policies_1 = require("./backup_policies");
|
|
12
|
+
Object.defineProperty(exports, "CBackupPolicy", { enumerable: true, get: function () { return backup_policies_1.CBackupPolicy; } });
|
|
13
|
+
var integrations_1 = require("./integrations");
|
|
14
|
+
Object.defineProperty(exports, "CIntegration", { enumerable: true, get: function () { return integrations_1.CIntegration; } });
|
|
15
|
+
var api_keys_1 = require("./api_keys");
|
|
16
|
+
Object.defineProperty(exports, "CApiKey", { enumerable: true, get: function () { return api_keys_1.CApiKey; } });
|
|
17
|
+
var webhooks_1 = require("./webhooks");
|
|
18
|
+
Object.defineProperty(exports, "CWebhook", { enumerable: true, get: function () { return webhooks_1.CWebhook; } });
|
|
19
|
+
var integration_logs_1 = require("./integration_logs");
|
|
20
|
+
Object.defineProperty(exports, "CIntegrationLog", { enumerable: true, get: function () { return integration_logs_1.CIntegrationLog; } });
|
|
21
|
+
var subscription_plans_1 = require("./subscription_plans");
|
|
22
|
+
Object.defineProperty(exports, "CSubscriptionPlan", { enumerable: true, get: function () { return subscription_plans_1.CSubscriptionPlan; } });
|
|
23
|
+
var subscription_features_1 = require("./subscription_features");
|
|
24
|
+
Object.defineProperty(exports, "CSubscriptionFeature", { enumerable: true, get: function () { return subscription_features_1.CSubscriptionFeature; } });
|
|
25
|
+
var subscriptions_1 = require("./subscriptions");
|
|
26
|
+
Object.defineProperty(exports, "CSubscription", { enumerable: true, get: function () { return subscriptions_1.CSubscription; } });
|
|
27
|
+
var subscription_payments_1 = require("./subscription_payments");
|
|
28
|
+
Object.defineProperty(exports, "CSubscriptionPayment", { enumerable: true, get: function () { return subscription_payments_1.CSubscriptionPayment; } });
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
export interface IIntegrationLog {
|
|
3
|
+
_id?: string;
|
|
4
|
+
ilog_integration_id?: string;
|
|
5
|
+
ilog_operation: string;
|
|
6
|
+
ilog_status: 'success' | 'failed' | 'pending';
|
|
7
|
+
ilog_request_data?: any;
|
|
8
|
+
ilog_response_data?: any;
|
|
9
|
+
ilog_error_message?: string;
|
|
10
|
+
ilog_error_code?: string;
|
|
11
|
+
ilog_duration?: number;
|
|
12
|
+
ilog_retry_count?: number;
|
|
13
|
+
ilog_created_at?: Date;
|
|
14
|
+
ilog_isactive?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const CIntegrationLog: mongoose.Model<IIntegrationLog, {}, {}, {}, mongoose.Document<unknown, {}, IIntegrationLog, {}> & IIntegrationLog & Required<{
|
|
17
|
+
_id: string;
|
|
18
|
+
}> & {
|
|
19
|
+
__v: number;
|
|
20
|
+
}, any>;
|
|
21
|
+
export { CIntegrationLog };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CIntegrationLog = void 0;
|
|
4
|
+
var mongoose_1 = require("mongoose");
|
|
5
|
+
var integration_logs = new mongoose_1.Schema({
|
|
6
|
+
ilog_integration_id: {
|
|
7
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
8
|
+
ref: "integrations",
|
|
9
|
+
index: true
|
|
10
|
+
},
|
|
11
|
+
ilog_operation: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true,
|
|
14
|
+
maxlength: 100,
|
|
15
|
+
index: true
|
|
16
|
+
},
|
|
17
|
+
ilog_status: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true,
|
|
20
|
+
enum: ['success', 'failed', 'pending'],
|
|
21
|
+
default: 'pending',
|
|
22
|
+
index: true
|
|
23
|
+
},
|
|
24
|
+
ilog_request_data: {
|
|
25
|
+
type: Object
|
|
26
|
+
},
|
|
27
|
+
ilog_response_data: {
|
|
28
|
+
type: Object
|
|
29
|
+
},
|
|
30
|
+
ilog_error_message: {
|
|
31
|
+
type: String,
|
|
32
|
+
maxlength: 1000
|
|
33
|
+
},
|
|
34
|
+
ilog_error_code: {
|
|
35
|
+
type: String,
|
|
36
|
+
maxlength: 50
|
|
37
|
+
},
|
|
38
|
+
ilog_duration: {
|
|
39
|
+
type: Number,
|
|
40
|
+
min: 0
|
|
41
|
+
},
|
|
42
|
+
ilog_retry_count: {
|
|
43
|
+
type: Number,
|
|
44
|
+
default: 0,
|
|
45
|
+
min: 0
|
|
46
|
+
},
|
|
47
|
+
ilog_created_at: {
|
|
48
|
+
type: Date,
|
|
49
|
+
default: Date.now,
|
|
50
|
+
index: true
|
|
51
|
+
},
|
|
52
|
+
ilog_isactive: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: true
|
|
55
|
+
}
|
|
56
|
+
}, { collection: 'integration_logs', timestamps: { createdAt: 'ilog_created_at' } });
|
|
57
|
+
// Indexes
|
|
58
|
+
integration_logs.index({ ilog_integration_id: 1, ilog_created_at: -1 });
|
|
59
|
+
integration_logs.index({ ilog_status: 1 });
|
|
60
|
+
integration_logs.index({ ilog_operation: 1 });
|
|
61
|
+
var CIntegrationLog = mongoose_1.default.model("integration_logs", integration_logs);
|
|
62
|
+
exports.CIntegrationLog = CIntegrationLog;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
export interface IIntegration {
|
|
3
|
+
_id?: string;
|
|
4
|
+
intg_name: string;
|
|
5
|
+
intg_type: 'payment_gateway' | 'shipping_carrier' | 'accounting_software' | 'ecommerce_platform' | 'sms_gateway' | 'email_service' | 'bank' | 'tax_service' | 'custom';
|
|
6
|
+
intg_provider: string;
|
|
7
|
+
intg_api_key?: string;
|
|
8
|
+
intg_api_secret?: string;
|
|
9
|
+
intg_merchant_id?: string;
|
|
10
|
+
intg_status: 'active' | 'inactive' | 'testing';
|
|
11
|
+
intg_configuration?: {
|
|
12
|
+
endpoint?: string;
|
|
13
|
+
webhook_url?: string;
|
|
14
|
+
timeout?: number;
|
|
15
|
+
retry_count?: number;
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
};
|
|
18
|
+
intg_test_mode: boolean;
|
|
19
|
+
intg_last_sync?: Date;
|
|
20
|
+
intg_sync_frequency?: 'realtime' | 'hourly' | 'daily' | 'manual';
|
|
21
|
+
intg_created_by?: string;
|
|
22
|
+
intg_created_at?: Date;
|
|
23
|
+
intg_updated_at?: Date;
|
|
24
|
+
intg_isactive?: boolean;
|
|
25
|
+
}
|
|
26
|
+
declare const CIntegration: mongoose.Model<IIntegration, {}, {}, {}, mongoose.Document<unknown, {}, IIntegration, {}> & IIntegration & Required<{
|
|
27
|
+
_id: string;
|
|
28
|
+
}> & {
|
|
29
|
+
__v: number;
|
|
30
|
+
}, any>;
|
|
31
|
+
export { CIntegration };
|