@brimble/models 3.8.83 → 3.8.84
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/drain.js +3 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5 -3
- package/dist/project-drain-subscription.d.ts +9 -0
- package/dist/project-drain-subscription.js +12 -0
- package/dist/types/drain.d.ts +2 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/project-drain-subscription.d.ts +11 -0
- package/dist/types/project-drain-subscription.js +2 -0
- package/package.json +1 -1
package/dist/drain.js
CHANGED
|
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const mongoose_1 = require("mongoose");
|
|
4
4
|
const enum_1 = require("./enum");
|
|
5
5
|
const DrainSchema = new mongoose_1.Schema({
|
|
6
|
-
|
|
6
|
+
user_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "User", required: false, index: true },
|
|
7
|
+
team: { type: mongoose_1.Schema.Types.ObjectId, ref: "Team", required: false, index: true },
|
|
7
8
|
name: { type: String, required: true, minlength: 1, maxlength: 64 },
|
|
8
9
|
type: { type: String, enum: Object.values(enum_1.DrainType), default: enum_1.DrainType.Https, required: true },
|
|
9
10
|
url: { type: String },
|
|
@@ -27,5 +28,5 @@ const DrainSchema = new mongoose_1.Schema({
|
|
|
27
28
|
disabledAt: { type: Date, default: null },
|
|
28
29
|
deletedAt: { type: Date, default: null },
|
|
29
30
|
}, { timestamps: true });
|
|
30
|
-
DrainSchema.index({
|
|
31
|
+
DrainSchema.index({ user_id: 1, team: 1, deletedAt: 1 });
|
|
31
32
|
exports.default = (0, mongoose_1.model)("Drain", DrainSchema);
|
package/dist/index.d.ts
CHANGED
|
@@ -59,6 +59,7 @@ export { default as AlertRule } from "./alert-rule";
|
|
|
59
59
|
export { default as AlertRuleStateModel } from "./alert-rule-state";
|
|
60
60
|
export { default as AlertEvent } from "./alert-event";
|
|
61
61
|
export { default as Drain } from "./drain";
|
|
62
|
+
export { default as ProjectDrainSubscription } from "./project-drain-subscription";
|
|
62
63
|
export { default as OwnershipTransfer } from "./ownership-transfer";
|
|
63
64
|
export { default as Sandbox } from "./sandbox";
|
|
64
65
|
export { default as SandboxActivity } from "./sandbox-activity";
|
|
@@ -77,7 +78,7 @@ export { default as StreakMilestone } from "./streak-milestone";
|
|
|
77
78
|
export { default as QuestCampaign } from "./quest-campaign";
|
|
78
79
|
export { default as QuestParticipation } from "./quest-participation";
|
|
79
80
|
export { default as QuestRewardIssuance } from "./quest-reward-issuance";
|
|
80
|
-
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, IDnsChangeLog, 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, IDrain, 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";
|
|
81
|
+
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, IDnsChangeLog, 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, IDrain, IProjectDrainSubscription, 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";
|
|
81
82
|
export { GIT_TYPE, INTEGRATION_TYPES, INTEGRATION_PROVIDERS, OAUTH_PERMISSIONS, ENVIRONMENT, SERVER_STATUS, ROLES, SUBSCRIPTION_PLAN_TYPE, PROJECT_STATUS, AlertMetric, AlertCondition, AlertRuleState, AlertChannelMode, AlertEventStatus, DrainType, DrainStatus, LogSource, DrainEventType, SUBSCRIPTION_STATUS, CARD_TYPES, DNS_TYPE, DNS_CHANGE_TYPE, DNS_CHANGE_SOURCE, PERMISSION_TYPE, REQUEST_TYPE, ServiceType, SCALING_SOURCE, DatabaseEngine, JobStatus, LicenseStatus, REGION_CONTINENT, BUILD_DISABLED_BY, PROJECT_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_EGRESS_MODE, 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";
|
|
82
83
|
import mongoose from "mongoose";
|
|
83
84
|
export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -13,9 +13,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
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.
|
|
17
|
-
exports.
|
|
18
|
-
exports.healthCheckMongo = exports.closeMongo = exports.db = exports.connectToMongo = exports.WorkbenchMode = exports.QUEST_TARGETLESS_REQUIREMENTS = exports.QUEST_CLAIM_REQUIREMENTS = exports.QuestRequirementType = exports.QuestEntity = exports.QuestCriterionType = exports.QuestRewardStatus = exports.RewardType = exports.EligibilityType = void 0;
|
|
16
|
+
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.ProjectDrainSubscription = exports.Drain = 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_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_EGRESS_MODE = 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.PROJECT_DISABLED_BY = exports.BUILD_DISABLED_BY = exports.REGION_CONTINENT = exports.LicenseStatus = exports.JobStatus = exports.DatabaseEngine = exports.SCALING_SOURCE = exports.ServiceType = exports.REQUEST_TYPE = exports.PERMISSION_TYPE = exports.DNS_CHANGE_SOURCE = exports.DNS_CHANGE_TYPE = exports.DNS_TYPE = exports.CARD_TYPES = exports.SUBSCRIPTION_STATUS = exports.DrainEventType = exports.LogSource = exports.DrainStatus = exports.DrainType = void 0;
|
|
18
|
+
exports.healthCheckMongo = exports.closeMongo = exports.db = exports.connectToMongo = exports.WorkbenchMode = exports.QUEST_TARGETLESS_REQUIREMENTS = exports.QUEST_CLAIM_REQUIREMENTS = exports.QuestRequirementType = exports.QuestEntity = exports.QuestCriterionType = exports.QuestRewardStatus = exports.RewardType = exports.EligibilityType = exports.ACTION_TO_MILESTONE = void 0;
|
|
19
19
|
var user_1 = require("./user");
|
|
20
20
|
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return __importDefault(user_1).default; } });
|
|
21
21
|
var project_1 = require("./project");
|
|
@@ -139,6 +139,8 @@ var alert_event_1 = require("./alert-event");
|
|
|
139
139
|
Object.defineProperty(exports, "AlertEvent", { enumerable: true, get: function () { return __importDefault(alert_event_1).default; } });
|
|
140
140
|
var drain_1 = require("./drain");
|
|
141
141
|
Object.defineProperty(exports, "Drain", { enumerable: true, get: function () { return __importDefault(drain_1).default; } });
|
|
142
|
+
var project_drain_subscription_1 = require("./project-drain-subscription");
|
|
143
|
+
Object.defineProperty(exports, "ProjectDrainSubscription", { enumerable: true, get: function () { return __importDefault(project_drain_subscription_1).default; } });
|
|
142
144
|
var ownership_transfer_1 = require("./ownership-transfer");
|
|
143
145
|
Object.defineProperty(exports, "OwnershipTransfer", { enumerable: true, get: function () { return __importDefault(ownership_transfer_1).default; } });
|
|
144
146
|
var sandbox_1 = require("./sandbox");
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IProjectDrainSubscription } from "./types";
|
|
2
|
+
declare const _default: import("mongoose").Model<IProjectDrainSubscription, {}, {}, {}, import("mongoose").Document<unknown, {}, IProjectDrainSubscription, {}, import("mongoose").DefaultSchemaOptions> & IProjectDrainSubscription & Required<{
|
|
3
|
+
_id: import("mongoose").Types.ObjectId;
|
|
4
|
+
}> & {
|
|
5
|
+
__v: number;
|
|
6
|
+
} & {
|
|
7
|
+
id: string;
|
|
8
|
+
}, any, IProjectDrainSubscription>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const ProjectDrainSubscriptionSchema = new mongoose_1.Schema({
|
|
5
|
+
drain: { type: mongoose_1.Schema.Types.ObjectId, ref: "Drain", required: true, index: true },
|
|
6
|
+
project: { type: mongoose_1.Schema.Types.ObjectId, ref: "Project", required: true, index: true },
|
|
7
|
+
enabled: { type: Boolean, default: true },
|
|
8
|
+
disabledAt: { type: Date, default: null },
|
|
9
|
+
deletedAt: { type: Date, default: null },
|
|
10
|
+
}, { timestamps: true });
|
|
11
|
+
ProjectDrainSubscriptionSchema.index({ drain: 1, project: 1, deletedAt: 1 });
|
|
12
|
+
exports.default = (0, mongoose_1.model)("ProjectDrainSubscription", ProjectDrainSubscriptionSchema);
|
package/dist/types/drain.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ import { Document, Types } from "mongoose";
|
|
|
2
2
|
import { DrainStatus, DrainType, LogSource } from "../enum";
|
|
3
3
|
export interface IDrain extends Document {
|
|
4
4
|
_id: Types.ObjectId;
|
|
5
|
-
|
|
5
|
+
user_id?: Types.ObjectId;
|
|
6
|
+
team?: Types.ObjectId | null;
|
|
6
7
|
name: string;
|
|
7
8
|
type: DrainType;
|
|
8
9
|
url?: string | null;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -60,6 +60,7 @@ export type { IAlertRule } from "./alert-rule";
|
|
|
60
60
|
export type { IAlertRuleState } from "./alert-rule-state";
|
|
61
61
|
export type { IAlertEvent, IAlertNotificationResult } from "./alert-event";
|
|
62
62
|
export type { IDrain } from "./drain";
|
|
63
|
+
export type { IProjectDrainSubscription } from "./project-drain-subscription";
|
|
63
64
|
export type { IOwnershipTransfer } from "./ownership-transfer";
|
|
64
65
|
export type { ISandbox, ISandboxSpecs, ISandboxEgress } from "./sandbox";
|
|
65
66
|
export type { ISandboxActivity } from "./sandbox-activity";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Document, Types } from "mongoose";
|
|
2
|
+
export interface IProjectDrainSubscription extends Document {
|
|
3
|
+
_id: Types.ObjectId;
|
|
4
|
+
drain: Types.ObjectId;
|
|
5
|
+
project: Types.ObjectId;
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
disabledAt?: Date | null;
|
|
8
|
+
deletedAt?: Date | null;
|
|
9
|
+
createdAt: Date;
|
|
10
|
+
updatedAt: Date;
|
|
11
|
+
}
|