@brimble/models 3.7.2 → 3.7.5
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/enum/index.d.ts +3 -1
- package/dist/enum/index.js +2 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -2
- package/dist/provider.d.ts +30 -0
- package/dist/provider.js +10 -0
- package/dist/region.js +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/provider.d.ts +7 -0
- package/dist/types/provider.js +2 -0
- package/dist/types/region.d.ts +1 -0
- package/enum/index.ts +3 -1
- package/index.ts +3 -1
- package/package.json +1 -1
- package/provider.ts +11 -0
- package/region.ts +1 -0
- package/types/index.ts +1 -0
- package/types/provider.ts +8 -0
- package/types/region.ts +1 -0
package/dist/enum/index.d.ts
CHANGED
|
@@ -59,7 +59,9 @@ export declare enum PROJECT_STATUS {
|
|
|
59
59
|
PENDING = "PENDING",
|
|
60
60
|
CANCELLED = "CANCELLED",
|
|
61
61
|
DEGRADED = "DEGRADED",
|
|
62
|
-
PAYMENT = "PAYMENT DUE"
|
|
62
|
+
PAYMENT = "PAYMENT DUE",
|
|
63
|
+
NOMAD_READY = "NOMAD_READY",
|
|
64
|
+
NOMAD_FAILED = "NOMAD_FAILED"
|
|
63
65
|
}
|
|
64
66
|
export declare enum SUBSCRIPTION_STATUS {
|
|
65
67
|
ACTIVE = "active",
|
package/dist/enum/index.js
CHANGED
|
@@ -72,6 +72,8 @@ var PROJECT_STATUS;
|
|
|
72
72
|
PROJECT_STATUS["CANCELLED"] = "CANCELLED";
|
|
73
73
|
PROJECT_STATUS["DEGRADED"] = "DEGRADED";
|
|
74
74
|
PROJECT_STATUS["PAYMENT"] = "PAYMENT DUE";
|
|
75
|
+
PROJECT_STATUS["NOMAD_READY"] = "NOMAD_READY";
|
|
76
|
+
PROJECT_STATUS["NOMAD_FAILED"] = "NOMAD_FAILED";
|
|
75
77
|
})(PROJECT_STATUS = exports.PROJECT_STATUS || (exports.PROJECT_STATUS = {}));
|
|
76
78
|
var SUBSCRIPTION_STATUS;
|
|
77
79
|
(function (SUBSCRIPTION_STATUS) {
|
package/dist/index.d.ts
CHANGED
|
@@ -34,7 +34,8 @@ export { default as WebhookCategory } from "./webhook-category";
|
|
|
34
34
|
export { default as WebhookEvent } from "./webhook-event";
|
|
35
35
|
export { default as WebhookSetting } from "./webhook-setting";
|
|
36
36
|
export { default as Intention } from "./intention";
|
|
37
|
-
export {
|
|
37
|
+
export { default as Provider } from "./provider";
|
|
38
|
+
export { IUser, IGit, IProject, IPreview, IProjectConnection, 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, IWebhookCategory, IWebhookEvent, IWebhookSetting, IIntention, IProvider } from "./types";
|
|
38
39
|
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, NomadDeploymentStatus } from "./enum";
|
|
39
40
|
import mongoose from "mongoose";
|
|
40
41
|
export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -12,8 +12,8 @@ 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.healthCheckMongo = exports.closeMongo = exports.db = exports.connectToMongo = exports.NomadDeploymentStatus = 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 = void 0;
|
|
15
|
+
exports.DNS_TYPE = exports.CARD_TYPES = exports.SUBSCRIPTION_STATUS = 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.Provider = exports.Intention = exports.WebhookSetting = exports.WebhookEvent = exports.WebhookCategory = 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.Dns = exports.Domain = exports.Integration = exports.Following = exports.ProjectConnection = exports.Preview = exports.DeletedProject = exports.Project = exports.User = void 0;
|
|
16
|
+
exports.healthCheckMongo = exports.closeMongo = exports.db = exports.connectToMongo = exports.NomadDeploymentStatus = 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 = void 0;
|
|
17
17
|
var user_1 = require("./user");
|
|
18
18
|
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return __importDefault(user_1).default; } });
|
|
19
19
|
var project_1 = require("./project");
|
|
@@ -87,6 +87,8 @@ var webhook_setting_1 = require("./webhook-setting");
|
|
|
87
87
|
Object.defineProperty(exports, "WebhookSetting", { enumerable: true, get: function () { return __importDefault(webhook_setting_1).default; } });
|
|
88
88
|
var intention_1 = require("./intention");
|
|
89
89
|
Object.defineProperty(exports, "Intention", { enumerable: true, get: function () { return __importDefault(intention_1).default; } });
|
|
90
|
+
var provider_1 = require("./provider");
|
|
91
|
+
Object.defineProperty(exports, "Provider", { enumerable: true, get: function () { return __importDefault(provider_1).default; } });
|
|
90
92
|
var enum_1 = require("./enum");
|
|
91
93
|
Object.defineProperty(exports, "GIT_TYPE", { enumerable: true, get: function () { return enum_1.GIT_TYPE; } });
|
|
92
94
|
Object.defineProperty(exports, "INTEGRATION_TYPES", { enumerable: true, get: function () { return enum_1.INTEGRATION_TYPES; } });
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose" />
|
|
25
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
26
|
+
import { IProvider } from "./types/provider";
|
|
27
|
+
declare const _default: import("mongoose").Model<IProvider, {}, {}, {}, import("mongoose").Document<unknown, {}, IProvider> & IProvider & {
|
|
28
|
+
_id: import("mongoose").Types.ObjectId;
|
|
29
|
+
}, any>;
|
|
30
|
+
export default _default;
|
package/dist/provider.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const providerSchema = new mongoose_1.Schema({
|
|
5
|
+
name: { type: String, required: true },
|
|
6
|
+
slug: { type: String, required: true, unique: true },
|
|
7
|
+
logo: { type: String, required: true },
|
|
8
|
+
enabled: { type: Boolean, default: true },
|
|
9
|
+
});
|
|
10
|
+
exports.default = (0, mongoose_1.model)("Provider", providerSchema, "providers");
|
package/dist/region.js
CHANGED
|
@@ -12,5 +12,6 @@ const regionSchema = new mongoose_1.Schema({
|
|
|
12
12
|
provider: { type: String, required: true },
|
|
13
13
|
provider_identifier: { type: String, required: true },
|
|
14
14
|
storage_pricing_factor: { type: Number, required: true, default: 0.25 },
|
|
15
|
+
floating_ip: { type: String },
|
|
15
16
|
});
|
|
16
17
|
exports.default = (0, mongoose_1.model)("Region", regionSchema, "regions");
|
package/dist/types/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export type { IMember } from "./member";
|
|
|
20
20
|
export type { IMemberPermission } from "./member-permission";
|
|
21
21
|
export type { IPermission } from "./permission";
|
|
22
22
|
export type { IPlanConfiguration } from "./plan_configuration";
|
|
23
|
+
export type { IProvider } from "./provider";
|
|
23
24
|
export type { IProject } from "./project";
|
|
24
25
|
export type { IProjectConnection } from "./project/connection";
|
|
25
26
|
export type { IPreview } from "./project/preview";
|
package/dist/types/region.d.ts
CHANGED
package/enum/index.ts
CHANGED
|
@@ -68,6 +68,8 @@ export enum PROJECT_STATUS {
|
|
|
68
68
|
CANCELLED = "CANCELLED",
|
|
69
69
|
DEGRADED = "DEGRADED",
|
|
70
70
|
PAYMENT = "PAYMENT DUE",
|
|
71
|
+
NOMAD_READY = "NOMAD_READY",
|
|
72
|
+
NOMAD_FAILED = "NOMAD_FAILED",
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
export enum SUBSCRIPTION_STATUS {
|
|
@@ -190,4 +192,4 @@ export enum NomadDeploymentStatus {
|
|
|
190
192
|
NOMAD_SETUP = 'nomad_setup',
|
|
191
193
|
NOMAD_READY = 'nomad_ready',
|
|
192
194
|
NOMAD_FAILED = 'nomad_failed',
|
|
193
|
-
}
|
|
195
|
+
}
|
package/index.ts
CHANGED
|
@@ -34,6 +34,7 @@ export { default as WebhookCategory } from "./webhook-category";
|
|
|
34
34
|
export { default as WebhookEvent } from "./webhook-event";
|
|
35
35
|
export { default as WebhookSetting } from "./webhook-setting";
|
|
36
36
|
export { default as Intention } from "./intention";
|
|
37
|
+
export { default as Provider } from "./provider";
|
|
37
38
|
|
|
38
39
|
export {
|
|
39
40
|
IUser,
|
|
@@ -74,7 +75,8 @@ export {
|
|
|
74
75
|
IWebhookCategory,
|
|
75
76
|
IWebhookEvent,
|
|
76
77
|
IWebhookSetting,
|
|
77
|
-
IIntention
|
|
78
|
+
IIntention,
|
|
79
|
+
IProvider
|
|
78
80
|
} from "./types";
|
|
79
81
|
export {
|
|
80
82
|
GIT_TYPE,
|
package/package.json
CHANGED
package/provider.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Schema, model } from "mongoose";
|
|
2
|
+
import { IProvider } from "./types/provider";
|
|
3
|
+
|
|
4
|
+
const providerSchema = new Schema({
|
|
5
|
+
name: { type: String, required: true },
|
|
6
|
+
slug: { type: String, required: true, unique: true },
|
|
7
|
+
logo: { type: String, required: true },
|
|
8
|
+
enabled: { type: Boolean, default: true },
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export default model<IProvider>("Provider", providerSchema, "providers");
|
package/region.ts
CHANGED
|
@@ -12,6 +12,7 @@ const regionSchema = new Schema({
|
|
|
12
12
|
provider: { type: String, required: true },
|
|
13
13
|
provider_identifier: { type: String, required: true },
|
|
14
14
|
storage_pricing_factor: { type: Number, required: true, default: 0.25 },
|
|
15
|
+
floating_ip: { type: String },
|
|
15
16
|
});
|
|
16
17
|
|
|
17
18
|
export default model<IRegion>("Region", regionSchema, "regions");
|
package/types/index.ts
CHANGED
|
@@ -20,6 +20,7 @@ export type { IMember } from "./member";
|
|
|
20
20
|
export type { IMemberPermission } from "./member-permission";
|
|
21
21
|
export type { IPermission } from "./permission";
|
|
22
22
|
export type { IPlanConfiguration } from "./plan_configuration";
|
|
23
|
+
export type { IProvider } from "./provider";
|
|
23
24
|
export type { IProject } from "./project";
|
|
24
25
|
export type { IProjectConnection } from "./project/connection";
|
|
25
26
|
export type { IPreview } from "./project/preview";
|