@brimble/models 3.8.55 → 3.8.57
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/dist/alert-event.d.ts +9 -0
- package/dist/alert-event.js +78 -0
- package/dist/alert-rule-state.d.ts +9 -0
- package/dist/alert-rule-state.js +49 -0
- package/dist/alert-rule.d.ts +9 -0
- package/dist/alert-rule.js +77 -0
- package/dist/domain/dns-changelog.d.ts +9 -0
- package/dist/domain/dns-changelog.js +82 -0
- package/dist/enum/index.d.ts +34 -0
- package/dist/enum/index.js +43 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +19 -3
- package/dist/project/index.js +4 -0
- package/dist/types/alert-event.d.ts +23 -0
- package/dist/types/alert-event.js +2 -0
- package/dist/types/alert-rule-state.d.ts +13 -0
- package/dist/types/alert-rule-state.js +2 -0
- package/dist/types/alert-rule.d.ts +21 -0
- package/dist/types/alert-rule.js +2 -0
- package/dist/types/domain/dns-changelog.d.ts +20 -0
- package/dist/types/domain/dns-changelog.js +2 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/project/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IAlertEvent } from "./types";
|
|
2
|
+
declare const _default: import("mongoose").Model<IAlertEvent, {}, {}, {}, import("mongoose").Document<unknown, {}, IAlertEvent, {}, import("mongoose").DefaultSchemaOptions> & IAlertEvent & Required<{
|
|
3
|
+
_id: import("mongoose").Types.ObjectId;
|
|
4
|
+
}> & {
|
|
5
|
+
__v: number;
|
|
6
|
+
} & {
|
|
7
|
+
id: string;
|
|
8
|
+
}, any, IAlertEvent>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const enum_1 = require("./enum");
|
|
5
|
+
const alertNotificationResultSchema = new mongoose_1.Schema({
|
|
6
|
+
channel_id: {
|
|
7
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
8
|
+
required: true,
|
|
9
|
+
},
|
|
10
|
+
channel_type: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
delivered: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
error: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: null,
|
|
21
|
+
},
|
|
22
|
+
}, { _id: false });
|
|
23
|
+
const alertEventSchema = new mongoose_1.Schema({
|
|
24
|
+
rule_id: {
|
|
25
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
26
|
+
ref: "AlertRule",
|
|
27
|
+
required: true,
|
|
28
|
+
index: true,
|
|
29
|
+
},
|
|
30
|
+
user_id: {
|
|
31
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
32
|
+
ref: "User",
|
|
33
|
+
required: true,
|
|
34
|
+
index: true,
|
|
35
|
+
},
|
|
36
|
+
project_id: {
|
|
37
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
38
|
+
ref: "Project",
|
|
39
|
+
required: true,
|
|
40
|
+
index: true,
|
|
41
|
+
},
|
|
42
|
+
status: {
|
|
43
|
+
type: String,
|
|
44
|
+
enum: Object.values(enum_1.AlertEventStatus),
|
|
45
|
+
required: true,
|
|
46
|
+
},
|
|
47
|
+
value: {
|
|
48
|
+
type: Number,
|
|
49
|
+
required: true,
|
|
50
|
+
},
|
|
51
|
+
threshold: {
|
|
52
|
+
type: Number,
|
|
53
|
+
required: true,
|
|
54
|
+
},
|
|
55
|
+
metric: {
|
|
56
|
+
type: String,
|
|
57
|
+
enum: Object.values(enum_1.AlertMetric),
|
|
58
|
+
required: true,
|
|
59
|
+
},
|
|
60
|
+
fired_at: {
|
|
61
|
+
type: Date,
|
|
62
|
+
required: true,
|
|
63
|
+
},
|
|
64
|
+
resolved_at: {
|
|
65
|
+
type: Date,
|
|
66
|
+
default: null,
|
|
67
|
+
},
|
|
68
|
+
notification_results: {
|
|
69
|
+
type: [alertNotificationResultSchema],
|
|
70
|
+
default: [],
|
|
71
|
+
},
|
|
72
|
+
}, {
|
|
73
|
+
collection: "alert_events",
|
|
74
|
+
});
|
|
75
|
+
alertEventSchema.index({ project_id: 1, fired_at: -1 });
|
|
76
|
+
alertEventSchema.index({ rule_id: 1, fired_at: -1 });
|
|
77
|
+
alertEventSchema.index({ user_id: 1, fired_at: -1 });
|
|
78
|
+
exports.default = (0, mongoose_1.model)("AlertEvent", alertEventSchema);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IAlertRuleState } from "./types";
|
|
2
|
+
declare const _default: import("mongoose").Model<IAlertRuleState, {}, {}, {}, import("mongoose").Document<unknown, {}, IAlertRuleState, {}, import("mongoose").DefaultSchemaOptions> & IAlertRuleState & Required<{
|
|
3
|
+
_id: import("mongoose").Types.ObjectId;
|
|
4
|
+
}> & {
|
|
5
|
+
__v: number;
|
|
6
|
+
} & {
|
|
7
|
+
id: string;
|
|
8
|
+
}, any, IAlertRuleState>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const enum_1 = require("./enum");
|
|
5
|
+
const alertRuleStateSchema = new mongoose_1.Schema({
|
|
6
|
+
rule_id: {
|
|
7
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
8
|
+
ref: "AlertRule",
|
|
9
|
+
required: true,
|
|
10
|
+
unique: true,
|
|
11
|
+
index: true,
|
|
12
|
+
},
|
|
13
|
+
state: {
|
|
14
|
+
type: String,
|
|
15
|
+
enum: Object.values(enum_1.AlertRuleState),
|
|
16
|
+
required: true,
|
|
17
|
+
default: enum_1.AlertRuleState.Ok,
|
|
18
|
+
index: true,
|
|
19
|
+
},
|
|
20
|
+
pending_since: {
|
|
21
|
+
type: Date,
|
|
22
|
+
default: null,
|
|
23
|
+
},
|
|
24
|
+
last_evaluated_at: {
|
|
25
|
+
type: Date,
|
|
26
|
+
required: true,
|
|
27
|
+
},
|
|
28
|
+
last_fired_at: {
|
|
29
|
+
type: Date,
|
|
30
|
+
default: null,
|
|
31
|
+
},
|
|
32
|
+
last_resolved_at: {
|
|
33
|
+
type: Date,
|
|
34
|
+
default: null,
|
|
35
|
+
},
|
|
36
|
+
last_value: {
|
|
37
|
+
type: Number,
|
|
38
|
+
default: null,
|
|
39
|
+
},
|
|
40
|
+
consecutive_errors: {
|
|
41
|
+
type: Number,
|
|
42
|
+
default: 0,
|
|
43
|
+
},
|
|
44
|
+
}, {
|
|
45
|
+
collection: "alert_rule_states",
|
|
46
|
+
});
|
|
47
|
+
alertRuleStateSchema.index({ last_evaluated_at: 1 });
|
|
48
|
+
alertRuleStateSchema.index({ state: 1 });
|
|
49
|
+
exports.default = (0, mongoose_1.model)("AlertRuleState", alertRuleStateSchema);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IAlertRule } from "./types";
|
|
2
|
+
declare const _default: import("mongoose").Model<IAlertRule, {}, {}, {}, import("mongoose").Document<unknown, {}, IAlertRule, {}, import("mongoose").DefaultSchemaOptions> & IAlertRule & Required<{
|
|
3
|
+
_id: import("mongoose").Types.ObjectId;
|
|
4
|
+
}> & {
|
|
5
|
+
__v: number;
|
|
6
|
+
} & {
|
|
7
|
+
id: string;
|
|
8
|
+
}, any, IAlertRule>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const enum_1 = require("./enum");
|
|
5
|
+
const alertRuleSchema = new mongoose_1.Schema({
|
|
6
|
+
user_id: {
|
|
7
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
8
|
+
ref: "User",
|
|
9
|
+
required: true,
|
|
10
|
+
index: true,
|
|
11
|
+
},
|
|
12
|
+
team_id: {
|
|
13
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
14
|
+
ref: "Team",
|
|
15
|
+
default: null,
|
|
16
|
+
index: true,
|
|
17
|
+
},
|
|
18
|
+
project_id: {
|
|
19
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
20
|
+
ref: "Project",
|
|
21
|
+
required: true,
|
|
22
|
+
index: true,
|
|
23
|
+
},
|
|
24
|
+
name: {
|
|
25
|
+
type: String,
|
|
26
|
+
required: true,
|
|
27
|
+
},
|
|
28
|
+
metric: {
|
|
29
|
+
type: String,
|
|
30
|
+
enum: Object.values(enum_1.AlertMetric),
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
condition: {
|
|
34
|
+
type: String,
|
|
35
|
+
enum: Object.values(enum_1.AlertCondition),
|
|
36
|
+
required: true,
|
|
37
|
+
},
|
|
38
|
+
threshold: {
|
|
39
|
+
type: Number,
|
|
40
|
+
required: true,
|
|
41
|
+
},
|
|
42
|
+
duration_seconds: {
|
|
43
|
+
type: Number,
|
|
44
|
+
required: true,
|
|
45
|
+
},
|
|
46
|
+
cooldown_seconds: {
|
|
47
|
+
type: Number,
|
|
48
|
+
required: true,
|
|
49
|
+
},
|
|
50
|
+
channel_mode: {
|
|
51
|
+
type: String,
|
|
52
|
+
enum: Object.values(enum_1.AlertChannelMode),
|
|
53
|
+
required: true,
|
|
54
|
+
},
|
|
55
|
+
channel_ids: [
|
|
56
|
+
{
|
|
57
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
58
|
+
ref: "NotificationChannel",
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
enabled: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: true,
|
|
64
|
+
index: true,
|
|
65
|
+
},
|
|
66
|
+
}, {
|
|
67
|
+
timestamps: {
|
|
68
|
+
createdAt: "created_at",
|
|
69
|
+
updatedAt: "updated_at",
|
|
70
|
+
},
|
|
71
|
+
collection: "alert_rules",
|
|
72
|
+
});
|
|
73
|
+
alertRuleSchema.index({ project_id: 1, enabled: 1 });
|
|
74
|
+
alertRuleSchema.index({ user_id: 1, enabled: 1 });
|
|
75
|
+
alertRuleSchema.index({ team_id: 1, enabled: 1 });
|
|
76
|
+
alertRuleSchema.index({ project_id: 1, created_at: -1 });
|
|
77
|
+
exports.default = (0, mongoose_1.model)("AlertRule", alertRuleSchema);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IDnsChangeLog } from "../types";
|
|
2
|
+
declare const _default: import("mongoose").Model<IDnsChangeLog, {}, {}, {}, import("mongoose").Document<unknown, {}, IDnsChangeLog, {}, import("mongoose").DefaultSchemaOptions> & IDnsChangeLog & Required<{
|
|
3
|
+
_id: import("mongoose").Types.ObjectId;
|
|
4
|
+
}> & {
|
|
5
|
+
__v: number;
|
|
6
|
+
} & {
|
|
7
|
+
id: string;
|
|
8
|
+
}, any, IDnsChangeLog>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const enum_1 = require("../enum");
|
|
5
|
+
const dnsChangeLogSchema = new mongoose_1.Schema({
|
|
6
|
+
domain_id: {
|
|
7
|
+
ref: "Domain",
|
|
8
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
9
|
+
required: true,
|
|
10
|
+
index: true,
|
|
11
|
+
},
|
|
12
|
+
domain_name: {
|
|
13
|
+
type: String,
|
|
14
|
+
required: true,
|
|
15
|
+
trim: true,
|
|
16
|
+
},
|
|
17
|
+
user_id: {
|
|
18
|
+
ref: "User",
|
|
19
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
20
|
+
required: false,
|
|
21
|
+
index: true,
|
|
22
|
+
},
|
|
23
|
+
team_id: {
|
|
24
|
+
ref: "Team",
|
|
25
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
26
|
+
required: false,
|
|
27
|
+
index: true,
|
|
28
|
+
},
|
|
29
|
+
project: {
|
|
30
|
+
ref: "Project",
|
|
31
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
32
|
+
required: false,
|
|
33
|
+
},
|
|
34
|
+
change_type: {
|
|
35
|
+
type: String,
|
|
36
|
+
required: true,
|
|
37
|
+
enum: Object.values(enum_1.DNS_CHANGE_TYPE),
|
|
38
|
+
index: true,
|
|
39
|
+
},
|
|
40
|
+
source: {
|
|
41
|
+
type: String,
|
|
42
|
+
required: true,
|
|
43
|
+
enum: Object.values(enum_1.DNS_CHANGE_SOURCE),
|
|
44
|
+
default: enum_1.DNS_CHANGE_SOURCE.API,
|
|
45
|
+
},
|
|
46
|
+
actor: {
|
|
47
|
+
type: String,
|
|
48
|
+
required: false,
|
|
49
|
+
},
|
|
50
|
+
record_id: {
|
|
51
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
52
|
+
required: false,
|
|
53
|
+
},
|
|
54
|
+
before: {
|
|
55
|
+
type: mongoose_1.Schema.Types.Mixed,
|
|
56
|
+
default: null,
|
|
57
|
+
},
|
|
58
|
+
after: {
|
|
59
|
+
type: mongoose_1.Schema.Types.Mixed,
|
|
60
|
+
default: null,
|
|
61
|
+
},
|
|
62
|
+
records: {
|
|
63
|
+
type: [mongoose_1.Schema.Types.Mixed],
|
|
64
|
+
default: [],
|
|
65
|
+
},
|
|
66
|
+
record_count: {
|
|
67
|
+
type: Number,
|
|
68
|
+
default: 0,
|
|
69
|
+
},
|
|
70
|
+
change_key: {
|
|
71
|
+
type: String,
|
|
72
|
+
required: false,
|
|
73
|
+
},
|
|
74
|
+
}, {
|
|
75
|
+
timestamps: { createdAt: "created_at", updatedAt: "updated_at" },
|
|
76
|
+
collection: "dns_changelogs",
|
|
77
|
+
});
|
|
78
|
+
dnsChangeLogSchema.index({ domain_id: 1, created_at: -1 });
|
|
79
|
+
dnsChangeLogSchema.index({ user_id: 1, created_at: -1 });
|
|
80
|
+
dnsChangeLogSchema.index({ team_id: 1, created_at: -1 });
|
|
81
|
+
dnsChangeLogSchema.index({ change_key: 1 }, { unique: true, sparse: true });
|
|
82
|
+
exports.default = (0, mongoose_1.model)("DnsChangeLog", dnsChangeLogSchema, "dns_changelogs");
|
package/dist/enum/index.d.ts
CHANGED
|
@@ -64,6 +64,30 @@ export declare enum PROJECT_STATUS {
|
|
|
64
64
|
NOMAD_READY = "NOMAD_READY",
|
|
65
65
|
NOMAD_FAILED = "NOMAD_FAILED"
|
|
66
66
|
}
|
|
67
|
+
export declare enum AlertMetric {
|
|
68
|
+
CpuUsagePercent = "cpu_usage_percent",
|
|
69
|
+
MemoryUsagePercent = "memory_usage_percent",
|
|
70
|
+
DiskUsagePercent = "disk_usage_percent",
|
|
71
|
+
ContainerRestarts = "container_restarts",
|
|
72
|
+
ResponseTimeP95Ms = "response_time_p95_ms"
|
|
73
|
+
}
|
|
74
|
+
export declare enum AlertCondition {
|
|
75
|
+
Above = "above",
|
|
76
|
+
Below = "below"
|
|
77
|
+
}
|
|
78
|
+
export declare enum AlertRuleState {
|
|
79
|
+
Ok = "ok",
|
|
80
|
+
Pending = "pending",
|
|
81
|
+
Firing = "firing"
|
|
82
|
+
}
|
|
83
|
+
export declare enum AlertChannelMode {
|
|
84
|
+
AllChannels = "all_channels",
|
|
85
|
+
SpecificChannels = "specific_channels"
|
|
86
|
+
}
|
|
87
|
+
export declare enum AlertEventStatus {
|
|
88
|
+
Firing = "firing",
|
|
89
|
+
Resolved = "resolved"
|
|
90
|
+
}
|
|
67
91
|
export declare enum SUBSCRIPTION_STATUS {
|
|
68
92
|
ACTIVE = "active",
|
|
69
93
|
INACTIVE = "in-active"
|
|
@@ -94,6 +118,16 @@ export declare enum DNS_TYPE {
|
|
|
94
118
|
MX = "MX",
|
|
95
119
|
SPF = "SPF"
|
|
96
120
|
}
|
|
121
|
+
export declare enum DNS_CHANGE_TYPE {
|
|
122
|
+
CREATED = "created",
|
|
123
|
+
UPDATED = "updated",
|
|
124
|
+
DELETED = "deleted",
|
|
125
|
+
ZONE_REMOVED = "zone_removed"
|
|
126
|
+
}
|
|
127
|
+
export declare enum DNS_CHANGE_SOURCE {
|
|
128
|
+
API = "api",
|
|
129
|
+
SYSTEM = "system"
|
|
130
|
+
}
|
|
97
131
|
export declare enum ROLES {
|
|
98
132
|
CREATOR = "CREATOR",
|
|
99
133
|
ADMINISTRATOR = "ADMINISTRATOR",
|
package/dist/enum/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.QUEST_TARGETLESS_REQUIREMENTS = exports.QUEST_CLAIM_REQUIREMENTS = exports.WorkbenchMode = exports.QuestRequirementType = exports.QuestEntity = exports.QuestCriterionType = exports.QuestRewardStatus = exports.RewardType = exports.EligibilityType = exports.ACTION_TO_MILESTONE = exports.QUEST_COUNTABLE_MILESTONES = exports.MilestoneType = void 0;
|
|
3
|
+
exports.StorageTokenStatus = exports.StorageUploadStatus = exports.StorageBucketStatus = exports.SANDBOX_SNAPSHOT_STATUS = exports.SANDBOX_DESTROY_REASON = exports.SANDBOX_STATUS = exports.SANDBOX_TEMPLATE = exports.INVOICE_TYPE = exports.INVOICE_PAYMENT_STATUS = exports.INVOICE_STATUS = exports.COLLAB_TOOLBAR_POSITION = exports.COLLAB_THEME = exports.COLLAB_INTEGRATION_TYPE = exports.COLLAB_ANNOTATION_STATUS = exports.NomadDeploymentStatus = exports.DomainTransferStatus = exports.DomainTransferDirection = exports.DomainTransferProvider = exports.DomainRenewalStatus = exports.FrameworkApplicationType = exports.SCALING_METRIC = exports.SCALING_STRATEGY = exports.LicenseStatus = exports.JobStatus = exports.DatabaseEngine = exports.ServiceType = exports.REGION_CONTINENT = exports.PERMISSION_TYPE = exports.ROLES = exports.DNS_CHANGE_SOURCE = exports.DNS_CHANGE_TYPE = exports.DNS_TYPE = exports.SERVER_STATUS = exports.OAUTH_PERMISSIONS = exports.SUBSCRIPTION_PLAN_TYPE = exports.SUBSCRIPTION_STATUS = exports.AlertEventStatus = exports.AlertChannelMode = exports.AlertRuleState = exports.AlertCondition = exports.AlertMetric = exports.PROJECT_STATUS = exports.CARD_TYPES = exports.INTEGRATION_PROVIDERS = exports.INTEGRATION_TYPES = exports.ENVIRONMENT = exports.REQUEST_TYPE = exports.BUILD_DISABLED_BY = exports.SERVER_PROTOCOL = exports.GIT_TYPE = void 0;
|
|
4
|
+
exports.QUEST_TARGETLESS_REQUIREMENTS = exports.QUEST_CLAIM_REQUIREMENTS = exports.WorkbenchMode = exports.QuestRequirementType = exports.QuestEntity = exports.QuestCriterionType = exports.QuestRewardStatus = exports.RewardType = exports.EligibilityType = exports.ACTION_TO_MILESTONE = exports.QUEST_COUNTABLE_MILESTONES = exports.MilestoneType = exports.QualifyingActionType = exports.XRobotsTag = exports.XContentTypeOptions = exports.XFrameOptions = exports.StorageMigrationStatus = exports.StorageCredentialStatus = exports.StorageCredentialRole = void 0;
|
|
5
5
|
var GIT_TYPE;
|
|
6
6
|
(function (GIT_TYPE) {
|
|
7
7
|
GIT_TYPE["GITHUB"] = "GITHUB";
|
|
@@ -77,6 +77,35 @@ var PROJECT_STATUS;
|
|
|
77
77
|
PROJECT_STATUS["NOMAD_READY"] = "NOMAD_READY";
|
|
78
78
|
PROJECT_STATUS["NOMAD_FAILED"] = "NOMAD_FAILED";
|
|
79
79
|
})(PROJECT_STATUS || (exports.PROJECT_STATUS = PROJECT_STATUS = {}));
|
|
80
|
+
var AlertMetric;
|
|
81
|
+
(function (AlertMetric) {
|
|
82
|
+
AlertMetric["CpuUsagePercent"] = "cpu_usage_percent";
|
|
83
|
+
AlertMetric["MemoryUsagePercent"] = "memory_usage_percent";
|
|
84
|
+
AlertMetric["DiskUsagePercent"] = "disk_usage_percent";
|
|
85
|
+
AlertMetric["ContainerRestarts"] = "container_restarts";
|
|
86
|
+
AlertMetric["ResponseTimeP95Ms"] = "response_time_p95_ms";
|
|
87
|
+
})(AlertMetric || (exports.AlertMetric = AlertMetric = {}));
|
|
88
|
+
var AlertCondition;
|
|
89
|
+
(function (AlertCondition) {
|
|
90
|
+
AlertCondition["Above"] = "above";
|
|
91
|
+
AlertCondition["Below"] = "below";
|
|
92
|
+
})(AlertCondition || (exports.AlertCondition = AlertCondition = {}));
|
|
93
|
+
var AlertRuleState;
|
|
94
|
+
(function (AlertRuleState) {
|
|
95
|
+
AlertRuleState["Ok"] = "ok";
|
|
96
|
+
AlertRuleState["Pending"] = "pending";
|
|
97
|
+
AlertRuleState["Firing"] = "firing";
|
|
98
|
+
})(AlertRuleState || (exports.AlertRuleState = AlertRuleState = {}));
|
|
99
|
+
var AlertChannelMode;
|
|
100
|
+
(function (AlertChannelMode) {
|
|
101
|
+
AlertChannelMode["AllChannels"] = "all_channels";
|
|
102
|
+
AlertChannelMode["SpecificChannels"] = "specific_channels";
|
|
103
|
+
})(AlertChannelMode || (exports.AlertChannelMode = AlertChannelMode = {}));
|
|
104
|
+
var AlertEventStatus;
|
|
105
|
+
(function (AlertEventStatus) {
|
|
106
|
+
AlertEventStatus["Firing"] = "firing";
|
|
107
|
+
AlertEventStatus["Resolved"] = "resolved";
|
|
108
|
+
})(AlertEventStatus || (exports.AlertEventStatus = AlertEventStatus = {}));
|
|
80
109
|
var SUBSCRIPTION_STATUS;
|
|
81
110
|
(function (SUBSCRIPTION_STATUS) {
|
|
82
111
|
SUBSCRIPTION_STATUS["ACTIVE"] = "active";
|
|
@@ -112,6 +141,18 @@ var DNS_TYPE;
|
|
|
112
141
|
DNS_TYPE["MX"] = "MX";
|
|
113
142
|
DNS_TYPE["SPF"] = "SPF";
|
|
114
143
|
})(DNS_TYPE || (exports.DNS_TYPE = DNS_TYPE = {}));
|
|
144
|
+
var DNS_CHANGE_TYPE;
|
|
145
|
+
(function (DNS_CHANGE_TYPE) {
|
|
146
|
+
DNS_CHANGE_TYPE["CREATED"] = "created";
|
|
147
|
+
DNS_CHANGE_TYPE["UPDATED"] = "updated";
|
|
148
|
+
DNS_CHANGE_TYPE["DELETED"] = "deleted";
|
|
149
|
+
DNS_CHANGE_TYPE["ZONE_REMOVED"] = "zone_removed";
|
|
150
|
+
})(DNS_CHANGE_TYPE || (exports.DNS_CHANGE_TYPE = DNS_CHANGE_TYPE = {}));
|
|
151
|
+
var DNS_CHANGE_SOURCE;
|
|
152
|
+
(function (DNS_CHANGE_SOURCE) {
|
|
153
|
+
DNS_CHANGE_SOURCE["API"] = "api";
|
|
154
|
+
DNS_CHANGE_SOURCE["SYSTEM"] = "system";
|
|
155
|
+
})(DNS_CHANGE_SOURCE || (exports.DNS_CHANGE_SOURCE = DNS_CHANGE_SOURCE = {}));
|
|
115
156
|
var ROLES;
|
|
116
157
|
(function (ROLES) {
|
|
117
158
|
ROLES["CREATOR"] = "CREATOR";
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { default as Following } from "./following";
|
|
|
9
9
|
export { default as Integration } from "./integration";
|
|
10
10
|
export { default as Domain } from "./domain";
|
|
11
11
|
export { default as Dns } from "./domain/dns";
|
|
12
|
+
export { default as DnsChangeLog } from "./domain/dns-changelog";
|
|
12
13
|
export { default as Env } from "./env";
|
|
13
14
|
export { default as Token } from "./token";
|
|
14
15
|
export { default as Team } from "./team";
|
|
@@ -54,6 +55,9 @@ export { default as CashierSubscriptionItem } from "./cashier_subscription_item"
|
|
|
54
55
|
export { default as ProjectEnvironment } from "./project-environment";
|
|
55
56
|
export { default as EnvironmentVariable } from "./environment-variable";
|
|
56
57
|
export { default as ActivityLog } from "./activity-log";
|
|
58
|
+
export { default as AlertRule } from "./alert-rule";
|
|
59
|
+
export { default as AlertRuleStateModel } from "./alert-rule-state";
|
|
60
|
+
export { default as AlertEvent } from "./alert-event";
|
|
57
61
|
export { default as OwnershipTransfer } from "./ownership-transfer";
|
|
58
62
|
export { default as Sandbox } from "./sandbox";
|
|
59
63
|
export { default as SandboxActivity } from "./sandbox-activity";
|
|
@@ -72,8 +76,8 @@ export { default as StreakMilestone } from "./streak-milestone";
|
|
|
72
76
|
export { default as QuestCampaign } from "./quest-campaign";
|
|
73
77
|
export { default as QuestParticipation } from "./quest-participation";
|
|
74
78
|
export { default as QuestRewardIssuance } from "./quest-reward-issuance";
|
|
75
|
-
export { IUser, IGit, IProject, IProjectAnalytics, IPreview, IProjectConnection, IProjectNetworkSettings, IRatelimit, RatelimitConfig, RateLimitZone, RateLimitMatcher, DistributedRateLimitConfig, IFollowing, IIntegration, IEnv, IServer, IDomain, IToken, IMember, ITeam, IInstalledIntegration, ILog, ISubscription, ICard, IDns, IRole, IPermission, IMemberPermission, IWallet, IDbImage, IJob, ILicense, IPlanConfiguration, IAutoScalingGroup, IComputeChange, IRegion, IVolume, IFramework, BrimbleFrameworkType, ISettings, ILoadBalancerPort, IDomainRenewal, IDomainTransfer, IWebhookCategory, IWebhookEvent, IWebhookSetting, IIntention, IProvider, ICollabAnnotation, ICollabComment, ICollabAttachment, ICollabIntegration, ICollabSettings, ICollabShareToken, ICollabPushSubscription, IAppMessage, IInvoice, ITag, IProjectTagAssignment, ICashierSubscription, ICashierSubscriptionItem, IProjectEnvironment, IEnvironmentVariable, IActivityLog, IOwnershipTransfer, ISandbox, ISandboxSpecs, ISandboxActivity, ISandboxImage, ISandboxSnapshot, ISandboxSnapshotUsageSegment, ISandboxSnapshotUsageSegmentCosts, ISandboxUsageSegment, ISandboxUsageSegmentCurrent, ISandboxUsageSegmentCosts, IVolumeUsageSegment, IVolumeUsageSegmentCosts, IObjectStorageUsageSegment, IObjectStorageUsageSegmentCosts, IObjectStorageUsageUnitsSummary, IIdempotencyRecord, IStorageBucket, IStorageObject, IStorageUpload, IStorageToken, IStorageCredential, IStorageMigration, StorageTokenPermission, StorageLifecycleRule, StorageCorsRule, StorageLifecycleRuleTransition, IStreak, IStreakMilestoneRef, IStreakEvent, IStreakDay, IStreakMilestone, IQuestCampaign, IQuestCriterion, IQuestRequirement, IQuestReward, IQuestParticipation, IQuestCriterionProgress, IQuestRewardIssuance, IQuestIssuedReward, } from "./types";
|
|
76
|
-
export { GIT_TYPE, INTEGRATION_TYPES, INTEGRATION_PROVIDERS, OAUTH_PERMISSIONS, ENVIRONMENT, SERVER_STATUS, ROLES, SUBSCRIPTION_PLAN_TYPE, PROJECT_STATUS, SUBSCRIPTION_STATUS, CARD_TYPES, DNS_TYPE, PERMISSION_TYPE, REQUEST_TYPE, ServiceType, DatabaseEngine, JobStatus, LicenseStatus, REGION_CONTINENT, BUILD_DISABLED_BY, SERVER_PROTOCOL, FrameworkApplicationType, DomainRenewalStatus, DomainTransferProvider, DomainTransferDirection, DomainTransferStatus, NomadDeploymentStatus, COLLAB_ANNOTATION_STATUS, COLLAB_INTEGRATION_TYPE, COLLAB_THEME, COLLAB_TOOLBAR_POSITION, INVOICE_STATUS, INVOICE_PAYMENT_STATUS, INVOICE_TYPE, SANDBOX_TEMPLATE, SANDBOX_STATUS, SANDBOX_DESTROY_REASON, SANDBOX_SNAPSHOT_STATUS, StorageBucketStatus, StorageUploadStatus, StorageTokenStatus, StorageCredentialRole, StorageCredentialStatus, StorageMigrationStatus, XFrameOptions, XContentTypeOptions, XRobotsTag, QualifyingActionType, MilestoneType, QUEST_COUNTABLE_MILESTONES, ACTION_TO_MILESTONE, EligibilityType, RewardType, QuestRewardStatus, QuestCriterionType, QuestEntity, QuestRequirementType, QUEST_CLAIM_REQUIREMENTS, QUEST_TARGETLESS_REQUIREMENTS, WorkbenchMode } from "./enum";
|
|
79
|
+
export { IUser, IGit, IProject, IProjectAnalytics, IPreview, IProjectConnection, IProjectNetworkSettings, IRatelimit, RatelimitConfig, RateLimitZone, RateLimitMatcher, DistributedRateLimitConfig, IFollowing, IIntegration, IEnv, IServer, IDomain, IToken, IMember, ITeam, IInstalledIntegration, ILog, ISubscription, ICard, IDns, IRole, IPermission, IMemberPermission, IWallet, IDbImage, IJob, ILicense, IPlanConfiguration, IAutoScalingGroup, IComputeChange, IRegion, IVolume, IFramework, BrimbleFrameworkType, ISettings, ILoadBalancerPort, IDomainRenewal, IDomainTransfer, IWebhookCategory, IWebhookEvent, IWebhookSetting, IIntention, IProvider, ICollabAnnotation, ICollabComment, ICollabAttachment, ICollabIntegration, ICollabSettings, ICollabShareToken, ICollabPushSubscription, IAppMessage, IInvoice, ITag, IProjectTagAssignment, ICashierSubscription, ICashierSubscriptionItem, IProjectEnvironment, IEnvironmentVariable, IActivityLog, IAlertRule, IAlertRuleState, IAlertEvent, IAlertNotificationResult, IOwnershipTransfer, ISandbox, ISandboxSpecs, ISandboxActivity, ISandboxImage, ISandboxSnapshot, ISandboxSnapshotUsageSegment, ISandboxSnapshotUsageSegmentCosts, ISandboxUsageSegment, ISandboxUsageSegmentCurrent, ISandboxUsageSegmentCosts, IVolumeUsageSegment, IVolumeUsageSegmentCosts, IObjectStorageUsageSegment, IObjectStorageUsageSegmentCosts, IObjectStorageUsageUnitsSummary, IIdempotencyRecord, IStorageBucket, IStorageObject, IStorageUpload, IStorageToken, IStorageCredential, IStorageMigration, StorageTokenPermission, StorageLifecycleRule, StorageCorsRule, StorageLifecycleRuleTransition, IStreak, IStreakMilestoneRef, IStreakEvent, IStreakDay, IStreakMilestone, IQuestCampaign, IQuestCriterion, IQuestRequirement, IQuestReward, IQuestParticipation, IQuestCriterionProgress, IQuestRewardIssuance, IQuestIssuedReward, } from "./types";
|
|
80
|
+
export { GIT_TYPE, INTEGRATION_TYPES, INTEGRATION_PROVIDERS, OAUTH_PERMISSIONS, ENVIRONMENT, SERVER_STATUS, ROLES, SUBSCRIPTION_PLAN_TYPE, PROJECT_STATUS, AlertMetric, AlertCondition, AlertRuleState, AlertChannelMode, AlertEventStatus, SUBSCRIPTION_STATUS, CARD_TYPES, DNS_TYPE, DNS_CHANGE_TYPE, DNS_CHANGE_SOURCE, PERMISSION_TYPE, REQUEST_TYPE, ServiceType, DatabaseEngine, JobStatus, LicenseStatus, REGION_CONTINENT, BUILD_DISABLED_BY, SERVER_PROTOCOL, FrameworkApplicationType, DomainRenewalStatus, DomainTransferProvider, DomainTransferDirection, DomainTransferStatus, NomadDeploymentStatus, COLLAB_ANNOTATION_STATUS, COLLAB_INTEGRATION_TYPE, COLLAB_THEME, COLLAB_TOOLBAR_POSITION, INVOICE_STATUS, INVOICE_PAYMENT_STATUS, INVOICE_TYPE, SANDBOX_TEMPLATE, SANDBOX_STATUS, SANDBOX_DESTROY_REASON, SANDBOX_SNAPSHOT_STATUS, StorageBucketStatus, StorageUploadStatus, StorageTokenStatus, StorageCredentialRole, StorageCredentialStatus, StorageMigrationStatus, XFrameOptions, XContentTypeOptions, XRobotsTag, QualifyingActionType, MilestoneType, QUEST_COUNTABLE_MILESTONES, ACTION_TO_MILESTONE, EligibilityType, RewardType, QuestRewardStatus, QuestCriterionType, QuestEntity, QuestRequirementType, QUEST_CLAIM_REQUIREMENTS, QUEST_TARGETLESS_REQUIREMENTS, WorkbenchMode } from "./enum";
|
|
77
81
|
import mongoose from "mongoose";
|
|
78
82
|
export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
|
|
79
83
|
export declare const db: mongoose.Connection;
|
package/dist/index.js
CHANGED
|
@@ -12,9 +12,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
15
|
+
exports.AppMessage = exports.CollabPushSubscription = exports.CollabShareToken = exports.CollabSettings = exports.CollabIntegration = exports.CollabComment = exports.CollabAnnotation = exports.Provider = exports.Intention = exports.WebhookSetting = exports.WebhookEvent = exports.WebhookCategory = exports.DomainTransfer = exports.DomainRenewal = exports.LoadBalancerPort = exports.Settings = exports.Framework = exports.Volume = exports.Region = exports.ComputeChange = exports.AutoScalingGroup = exports.PlanConfiguration = exports.Liscense = exports.Job = exports.DbImage = exports.Wallet = exports.Server = exports.Card = exports.Subscription = exports.Log = exports.Role = exports.MemberPermission = exports.Permission = exports.Member = exports.Team = exports.Token = exports.Env = exports.DnsChangeLog = exports.Dns = exports.Domain = exports.Integration = exports.Following = exports.Ratelimit = exports.ProjectNetworkSettings = exports.ProjectConnection = exports.Preview = exports.ProjectAnalytics = exports.DeletedProject = exports.Project = exports.User = void 0;
|
|
16
|
+
exports.CARD_TYPES = exports.SUBSCRIPTION_STATUS = exports.AlertEventStatus = exports.AlertChannelMode = exports.AlertRuleState = exports.AlertCondition = exports.AlertMetric = exports.PROJECT_STATUS = exports.SUBSCRIPTION_PLAN_TYPE = exports.ROLES = exports.SERVER_STATUS = exports.ENVIRONMENT = exports.OAUTH_PERMISSIONS = exports.INTEGRATION_PROVIDERS = exports.INTEGRATION_TYPES = exports.GIT_TYPE = exports.QuestRewardIssuance = exports.QuestParticipation = exports.QuestCampaign = exports.StreakMilestone = exports.StreakDay = exports.StreakEvent = exports.Streak = exports.StorageMigration = exports.StorageCredential = exports.StorageToken = exports.StorageUpload = exports.StorageObject = exports.StorageBucket = exports.IdempotencyRecord = exports.ObjectStorageUsageSegment = exports.VolumeUsageSegment = exports.SandboxUsageSegment = exports.SandboxSnapshotUsageSegment = exports.SandboxSnapshot = exports.SandboxImage = exports.SandboxActivity = exports.Sandbox = exports.OwnershipTransfer = exports.AlertEvent = exports.AlertRuleStateModel = exports.AlertRule = exports.ActivityLog = exports.EnvironmentVariable = exports.ProjectEnvironment = exports.CashierSubscriptionItem = exports.CashierSubscription = exports.ProjectTagAssignment = exports.Tag = exports.Invoice = void 0;
|
|
17
|
+
exports.QUEST_TARGETLESS_REQUIREMENTS = exports.QUEST_CLAIM_REQUIREMENTS = exports.QuestRequirementType = exports.QuestEntity = exports.QuestCriterionType = exports.QuestRewardStatus = exports.RewardType = exports.EligibilityType = exports.ACTION_TO_MILESTONE = exports.QUEST_COUNTABLE_MILESTONES = exports.MilestoneType = exports.QualifyingActionType = exports.XRobotsTag = exports.XContentTypeOptions = exports.XFrameOptions = exports.StorageMigrationStatus = exports.StorageCredentialStatus = exports.StorageCredentialRole = exports.StorageTokenStatus = exports.StorageUploadStatus = exports.StorageBucketStatus = exports.SANDBOX_SNAPSHOT_STATUS = exports.SANDBOX_DESTROY_REASON = exports.SANDBOX_STATUS = exports.SANDBOX_TEMPLATE = exports.INVOICE_TYPE = exports.INVOICE_PAYMENT_STATUS = exports.INVOICE_STATUS = exports.COLLAB_TOOLBAR_POSITION = exports.COLLAB_THEME = exports.COLLAB_INTEGRATION_TYPE = exports.COLLAB_ANNOTATION_STATUS = exports.NomadDeploymentStatus = exports.DomainTransferStatus = exports.DomainTransferDirection = exports.DomainTransferProvider = exports.DomainRenewalStatus = exports.FrameworkApplicationType = exports.SERVER_PROTOCOL = exports.BUILD_DISABLED_BY = exports.REGION_CONTINENT = exports.LicenseStatus = exports.JobStatus = exports.DatabaseEngine = exports.ServiceType = exports.REQUEST_TYPE = exports.PERMISSION_TYPE = exports.DNS_CHANGE_SOURCE = exports.DNS_CHANGE_TYPE = exports.DNS_TYPE = void 0;
|
|
18
|
+
exports.healthCheckMongo = exports.closeMongo = exports.db = exports.connectToMongo = exports.WorkbenchMode = void 0;
|
|
18
19
|
var user_1 = require("./user");
|
|
19
20
|
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return __importDefault(user_1).default; } });
|
|
20
21
|
var project_1 = require("./project");
|
|
@@ -38,6 +39,8 @@ var domain_1 = require("./domain");
|
|
|
38
39
|
Object.defineProperty(exports, "Domain", { enumerable: true, get: function () { return __importDefault(domain_1).default; } });
|
|
39
40
|
var dns_1 = require("./domain/dns");
|
|
40
41
|
Object.defineProperty(exports, "Dns", { enumerable: true, get: function () { return __importDefault(dns_1).default; } });
|
|
42
|
+
var dns_changelog_1 = require("./domain/dns-changelog");
|
|
43
|
+
Object.defineProperty(exports, "DnsChangeLog", { enumerable: true, get: function () { return __importDefault(dns_changelog_1).default; } });
|
|
41
44
|
var env_1 = require("./env");
|
|
42
45
|
Object.defineProperty(exports, "Env", { enumerable: true, get: function () { return __importDefault(env_1).default; } });
|
|
43
46
|
var token_1 = require("./token");
|
|
@@ -128,6 +131,12 @@ var environment_variable_1 = require("./environment-variable");
|
|
|
128
131
|
Object.defineProperty(exports, "EnvironmentVariable", { enumerable: true, get: function () { return __importDefault(environment_variable_1).default; } });
|
|
129
132
|
var activity_log_1 = require("./activity-log");
|
|
130
133
|
Object.defineProperty(exports, "ActivityLog", { enumerable: true, get: function () { return __importDefault(activity_log_1).default; } });
|
|
134
|
+
var alert_rule_1 = require("./alert-rule");
|
|
135
|
+
Object.defineProperty(exports, "AlertRule", { enumerable: true, get: function () { return __importDefault(alert_rule_1).default; } });
|
|
136
|
+
var alert_rule_state_1 = require("./alert-rule-state");
|
|
137
|
+
Object.defineProperty(exports, "AlertRuleStateModel", { enumerable: true, get: function () { return __importDefault(alert_rule_state_1).default; } });
|
|
138
|
+
var alert_event_1 = require("./alert-event");
|
|
139
|
+
Object.defineProperty(exports, "AlertEvent", { enumerable: true, get: function () { return __importDefault(alert_event_1).default; } });
|
|
131
140
|
var ownership_transfer_1 = require("./ownership-transfer");
|
|
132
141
|
Object.defineProperty(exports, "OwnershipTransfer", { enumerable: true, get: function () { return __importDefault(ownership_transfer_1).default; } });
|
|
133
142
|
var sandbox_1 = require("./sandbox");
|
|
@@ -179,9 +188,16 @@ Object.defineProperty(exports, "SERVER_STATUS", { enumerable: true, get: functio
|
|
|
179
188
|
Object.defineProperty(exports, "ROLES", { enumerable: true, get: function () { return enum_1.ROLES; } });
|
|
180
189
|
Object.defineProperty(exports, "SUBSCRIPTION_PLAN_TYPE", { enumerable: true, get: function () { return enum_1.SUBSCRIPTION_PLAN_TYPE; } });
|
|
181
190
|
Object.defineProperty(exports, "PROJECT_STATUS", { enumerable: true, get: function () { return enum_1.PROJECT_STATUS; } });
|
|
191
|
+
Object.defineProperty(exports, "AlertMetric", { enumerable: true, get: function () { return enum_1.AlertMetric; } });
|
|
192
|
+
Object.defineProperty(exports, "AlertCondition", { enumerable: true, get: function () { return enum_1.AlertCondition; } });
|
|
193
|
+
Object.defineProperty(exports, "AlertRuleState", { enumerable: true, get: function () { return enum_1.AlertRuleState; } });
|
|
194
|
+
Object.defineProperty(exports, "AlertChannelMode", { enumerable: true, get: function () { return enum_1.AlertChannelMode; } });
|
|
195
|
+
Object.defineProperty(exports, "AlertEventStatus", { enumerable: true, get: function () { return enum_1.AlertEventStatus; } });
|
|
182
196
|
Object.defineProperty(exports, "SUBSCRIPTION_STATUS", { enumerable: true, get: function () { return enum_1.SUBSCRIPTION_STATUS; } });
|
|
183
197
|
Object.defineProperty(exports, "CARD_TYPES", { enumerable: true, get: function () { return enum_1.CARD_TYPES; } });
|
|
184
198
|
Object.defineProperty(exports, "DNS_TYPE", { enumerable: true, get: function () { return enum_1.DNS_TYPE; } });
|
|
199
|
+
Object.defineProperty(exports, "DNS_CHANGE_TYPE", { enumerable: true, get: function () { return enum_1.DNS_CHANGE_TYPE; } });
|
|
200
|
+
Object.defineProperty(exports, "DNS_CHANGE_SOURCE", { enumerable: true, get: function () { return enum_1.DNS_CHANGE_SOURCE; } });
|
|
185
201
|
Object.defineProperty(exports, "PERMISSION_TYPE", { enumerable: true, get: function () { return enum_1.PERMISSION_TYPE; } });
|
|
186
202
|
Object.defineProperty(exports, "REQUEST_TYPE", { enumerable: true, get: function () { return enum_1.REQUEST_TYPE; } });
|
|
187
203
|
Object.defineProperty(exports, "ServiceType", { enumerable: true, get: function () { return enum_1.ServiceType; } });
|
package/dist/project/index.js
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Document, Types } from "mongoose";
|
|
2
|
+
import { AlertEventStatus, AlertMetric } from "../enum";
|
|
3
|
+
import { IAlertRule } from "./alert-rule";
|
|
4
|
+
import { IProject } from "./project";
|
|
5
|
+
import { IUser } from "./user";
|
|
6
|
+
export interface IAlertNotificationResult {
|
|
7
|
+
channel_id: Types.ObjectId;
|
|
8
|
+
channel_type: string;
|
|
9
|
+
delivered: boolean;
|
|
10
|
+
error: string | null;
|
|
11
|
+
}
|
|
12
|
+
export interface IAlertEvent extends Document {
|
|
13
|
+
rule_id: IAlertRule | Types.ObjectId;
|
|
14
|
+
user_id: IUser | Types.ObjectId;
|
|
15
|
+
project_id: IProject | Types.ObjectId;
|
|
16
|
+
status: AlertEventStatus;
|
|
17
|
+
value: number;
|
|
18
|
+
threshold: number;
|
|
19
|
+
metric: AlertMetric;
|
|
20
|
+
fired_at: Date;
|
|
21
|
+
resolved_at: Date | null;
|
|
22
|
+
notification_results: IAlertNotificationResult[];
|
|
23
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Document, Types } from "mongoose";
|
|
2
|
+
import { AlertRuleState } from "../enum";
|
|
3
|
+
import { IAlertRule } from "./alert-rule";
|
|
4
|
+
export interface IAlertRuleState extends Document {
|
|
5
|
+
rule_id: IAlertRule | Types.ObjectId;
|
|
6
|
+
state: AlertRuleState;
|
|
7
|
+
pending_since: Date | null;
|
|
8
|
+
last_evaluated_at: Date;
|
|
9
|
+
last_fired_at: Date | null;
|
|
10
|
+
last_resolved_at: Date | null;
|
|
11
|
+
last_value: number | null;
|
|
12
|
+
consecutive_errors: number;
|
|
13
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Document, Types } from "mongoose";
|
|
2
|
+
import { AlertChannelMode, AlertCondition, AlertMetric } from "../enum";
|
|
3
|
+
import { IProject } from "./project";
|
|
4
|
+
import { ITeam } from "./team";
|
|
5
|
+
import { IUser } from "./user";
|
|
6
|
+
export interface IAlertRule extends Document {
|
|
7
|
+
user_id: IUser | Types.ObjectId;
|
|
8
|
+
team_id?: ITeam | Types.ObjectId | null;
|
|
9
|
+
project_id: IProject | Types.ObjectId;
|
|
10
|
+
name: string;
|
|
11
|
+
metric: AlertMetric;
|
|
12
|
+
condition: AlertCondition;
|
|
13
|
+
threshold: number;
|
|
14
|
+
duration_seconds: number;
|
|
15
|
+
cooldown_seconds: number;
|
|
16
|
+
channel_mode: AlertChannelMode;
|
|
17
|
+
channel_ids: Types.ObjectId[];
|
|
18
|
+
enabled: boolean;
|
|
19
|
+
created_at: Date;
|
|
20
|
+
updated_at: Date;
|
|
21
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Document, Types } from "mongoose";
|
|
2
|
+
import { DNS_CHANGE_SOURCE, DNS_CHANGE_TYPE } from "../../enum";
|
|
3
|
+
export interface IDnsChangeLog extends Document {
|
|
4
|
+
domain_id: Types.ObjectId;
|
|
5
|
+
domain_name: string;
|
|
6
|
+
user_id?: Types.ObjectId;
|
|
7
|
+
team_id?: Types.ObjectId;
|
|
8
|
+
project?: Types.ObjectId;
|
|
9
|
+
change_type: DNS_CHANGE_TYPE;
|
|
10
|
+
source: DNS_CHANGE_SOURCE;
|
|
11
|
+
actor?: string;
|
|
12
|
+
record_id?: Types.ObjectId | null;
|
|
13
|
+
before?: Record<string, any> | null;
|
|
14
|
+
after?: Record<string, any> | null;
|
|
15
|
+
records: Record<string, any>[];
|
|
16
|
+
record_count: number;
|
|
17
|
+
change_key?: string;
|
|
18
|
+
created_at: Date;
|
|
19
|
+
updated_at: Date;
|
|
20
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export type { IComputeChange } from "./compute";
|
|
|
4
4
|
export type { IDbImage } from "./db-image";
|
|
5
5
|
export type { IDomain } from "./domain";
|
|
6
6
|
export type { IDns } from "./domain/dns";
|
|
7
|
+
export type { IDnsChangeLog } from "./domain/dns-changelog";
|
|
7
8
|
export type { IDomainRenewal } from "./domain/renewal";
|
|
8
9
|
export type { IDomainTransfer } from "./domain/transfer";
|
|
9
10
|
export type { IEnv } from "./env";
|
|
@@ -55,6 +56,9 @@ export type { ICashierSubscription, ICashierSubscriptionItem } from "./cashier_s
|
|
|
55
56
|
export type { IProjectEnvironment } from "./project-environment";
|
|
56
57
|
export type { IEnvironmentVariable } from "./environment-variable";
|
|
57
58
|
export type { IActivityLog } from "./activity-log";
|
|
59
|
+
export type { IAlertRule } from "./alert-rule";
|
|
60
|
+
export type { IAlertRuleState } from "./alert-rule-state";
|
|
61
|
+
export type { IAlertEvent, IAlertNotificationResult } from "./alert-event";
|
|
58
62
|
export type { IOwnershipTransfer } from "./ownership-transfer";
|
|
59
63
|
export type { ISandbox, ISandboxSpecs } from "./sandbox";
|
|
60
64
|
export type { ISandboxActivity } from "./sandbox-activity";
|
|
@@ -20,6 +20,7 @@ export interface IProject extends Document {
|
|
|
20
20
|
free_tier_expires_at?: Date | null;
|
|
21
21
|
free_tier_expiry_notified_at?: Date | null;
|
|
22
22
|
buildCacheEnabled?: boolean;
|
|
23
|
+
alerting_enabled: boolean;
|
|
23
24
|
domains: Array<IDomain>;
|
|
24
25
|
environments: Array<IEnv>;
|
|
25
26
|
uuid: number;
|