@brimble/models 3.3.4 → 3.3.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.
@@ -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 { IDomainRenewal } from "../types";
27
+ declare const _default: import("mongoose").Model<IDomainRenewal, {}, {}, {}, import("mongoose").Document<unknown, {}, IDomainRenewal> & IDomainRenewal & {
28
+ _id: import("mongoose").Types.ObjectId;
29
+ }, any>;
30
+ export default _default;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const mongoose_1 = require("mongoose");
4
+ const enum_1 = require("../enum");
5
+ const domainRenewalSchema = new mongoose_1.Schema({
6
+ domain_id: {
7
+ ref: "Domain",
8
+ type: mongoose_1.Schema.Types.ObjectId,
9
+ required: true,
10
+ },
11
+ status: {
12
+ type: String,
13
+ required: true,
14
+ enum: Object.values(enum_1.DomainRenewalStatus)
15
+ },
16
+ attempts: {
17
+ type: Number,
18
+ required: true,
19
+ },
20
+ }, { timestamps: true });
21
+ exports.default = (0, mongoose_1.model)("DomainRenewal", domainRenewalSchema, "domain_renewals");
@@ -156,3 +156,8 @@ export declare enum FrameworkApplicationType {
156
156
  Static = "static",
157
157
  Backend = "backend"
158
158
  }
159
+ export declare enum DomainRenewalStatus {
160
+ Pending = "pending",
161
+ Completed = "completed",
162
+ Failed = "failed"
163
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- 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_TYPE = exports.SERVER_STATUS = exports.OAUTH_PERMISSIONS = exports.SUBSCRIPTION_PLAN_TYPE = exports.SUBSCRIPTION_STATUS = 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;
3
+ 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_TYPE = exports.SERVER_STATUS = exports.OAUTH_PERMISSIONS = exports.SUBSCRIPTION_PLAN_TYPE = exports.SUBSCRIPTION_STATUS = 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
4
  var GIT_TYPE;
5
5
  (function (GIT_TYPE) {
6
6
  GIT_TYPE["GITHUB"] = "GITHUB";
@@ -183,3 +183,9 @@ var FrameworkApplicationType;
183
183
  FrameworkApplicationType["Static"] = "static";
184
184
  FrameworkApplicationType["Backend"] = "backend";
185
185
  })(FrameworkApplicationType = exports.FrameworkApplicationType || (exports.FrameworkApplicationType = {}));
186
+ var DomainRenewalStatus;
187
+ (function (DomainRenewalStatus) {
188
+ DomainRenewalStatus["Pending"] = "pending";
189
+ DomainRenewalStatus["Completed"] = "completed";
190
+ DomainRenewalStatus["Failed"] = "failed";
191
+ })(DomainRenewalStatus = exports.DomainRenewalStatus || (exports.DomainRenewalStatus = {}));
package/dist/index.d.ts CHANGED
@@ -29,8 +29,9 @@ export { default as Volume } from "./volume";
29
29
  export { default as Framework } from "./framework";
30
30
  export { default as Settings } from "./settings";
31
31
  export { default as LoadBalancerPort } from "./load-balancer-port";
32
- 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 } from "./types";
33
- 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, } from "./enum";
32
+ export { default as DomainRenewal } from "./domain/renewal";
33
+ 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, } from "./types";
34
+ 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, } from "./enum";
34
35
  import mongoose from "mongoose";
35
36
  export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
36
37
  export declare const db: mongoose.Connection;
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.LicenseStatus = exports.JobStatus = exports.DatabaseEngine = exports.ServiceType = exports.REQUEST_TYPE = exports.PERMISSION_TYPE = 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.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.closeMongo = exports.db = exports.connectToMongo = exports.FrameworkApplicationType = exports.SERVER_PROTOCOL = exports.BUILD_DISABLED_BY = exports.REGION_CONTINENT = void 0;
15
+ exports.JobStatus = exports.DatabaseEngine = exports.ServiceType = exports.REQUEST_TYPE = exports.PERMISSION_TYPE = 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.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.closeMongo = exports.db = exports.connectToMongo = exports.DomainRenewalStatus = exports.FrameworkApplicationType = exports.SERVER_PROTOCOL = exports.BUILD_DISABLED_BY = exports.REGION_CONTINENT = exports.LicenseStatus = 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");
@@ -77,6 +77,8 @@ var settings_1 = require("./settings");
77
77
  Object.defineProperty(exports, "Settings", { enumerable: true, get: function () { return __importDefault(settings_1).default; } });
78
78
  var load_balancer_port_1 = require("./load-balancer-port");
79
79
  Object.defineProperty(exports, "LoadBalancerPort", { enumerable: true, get: function () { return __importDefault(load_balancer_port_1).default; } });
80
+ var renewal_1 = require("./domain/renewal");
81
+ Object.defineProperty(exports, "DomainRenewal", { enumerable: true, get: function () { return __importDefault(renewal_1).default; } });
80
82
  var enum_1 = require("./enum");
81
83
  Object.defineProperty(exports, "GIT_TYPE", { enumerable: true, get: function () { return enum_1.GIT_TYPE; } });
82
84
  Object.defineProperty(exports, "INTEGRATION_TYPES", { enumerable: true, get: function () { return enum_1.INTEGRATION_TYPES; } });
@@ -100,6 +102,7 @@ Object.defineProperty(exports, "REGION_CONTINENT", { enumerable: true, get: func
100
102
  Object.defineProperty(exports, "BUILD_DISABLED_BY", { enumerable: true, get: function () { return enum_1.BUILD_DISABLED_BY; } });
101
103
  Object.defineProperty(exports, "SERVER_PROTOCOL", { enumerable: true, get: function () { return enum_1.SERVER_PROTOCOL; } });
102
104
  Object.defineProperty(exports, "FrameworkApplicationType", { enumerable: true, get: function () { return enum_1.FrameworkApplicationType; } });
105
+ Object.defineProperty(exports, "DomainRenewalStatus", { enumerable: true, get: function () { return enum_1.DomainRenewalStatus; } });
103
106
  const mongoose_1 = __importDefault(require("mongoose"));
104
107
  const utils_1 = require("@brimble/utils");
105
108
  const connectToMongo = (mongoUrl, config) => __awaiter(void 0, void 0, void 0, function* () {
@@ -0,0 +1,10 @@
1
+ import { Document } from "mongoose";
2
+ import { IDomain } from "../";
3
+ import { DomainRenewalStatus } from "../../enum";
4
+ export interface IDomainRenewal extends Document {
5
+ domain_id: IDomain;
6
+ status: DomainRenewalStatus;
7
+ attempts: number;
8
+ createdAt: Date;
9
+ updatedAt: Date;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -31,3 +31,4 @@ export { IVolume } from "./volume";
31
31
  export { IFramework, BrimbleFrameworkType } from "./framework";
32
32
  export { ISettings } from "./settings";
33
33
  export { ILoadBalancerPort } from "./load-balancer-port";
34
+ export { IDomainRenewal } from "./domain/renewal";
@@ -0,0 +1,25 @@
1
+ import { model, Schema } from "mongoose";
2
+ import { IDomainRenewal } from "../types";
3
+ import { DomainRenewalStatus } from "../enum";
4
+
5
+ const domainRenewalSchema = new Schema(
6
+ {
7
+ domain_id: {
8
+ ref: "Domain",
9
+ type: Schema.Types.ObjectId,
10
+ required: true,
11
+ },
12
+ status: {
13
+ type: String,
14
+ required: true,
15
+ enum: Object.values(DomainRenewalStatus)
16
+ },
17
+ attempts: {
18
+ type: Number,
19
+ required: true,
20
+ },
21
+ },
22
+ { timestamps: true },
23
+ );
24
+
25
+ export default model<IDomainRenewal>("DomainRenewal", domainRenewalSchema, "domain_renewals");
package/enum/index.ts CHANGED
@@ -178,4 +178,10 @@ export enum FrameworkApplicationType {
178
178
  Ssr = 'ssr',
179
179
  Static = 'static',
180
180
  Backend = 'backend'
181
+ }
182
+
183
+ export enum DomainRenewalStatus {
184
+ Pending = "pending",
185
+ Completed = "completed",
186
+ Failed = "failed",
181
187
  }
package/index.ts CHANGED
@@ -29,6 +29,9 @@ export { default as Volume } from "./volume";
29
29
  export { default as Framework } from "./framework";
30
30
  export { default as Settings } from "./settings";
31
31
  export { default as LoadBalancerPort } from "./load-balancer-port";
32
+ export { default as DomainRenewal } from "./domain/renewal";
33
+
34
+
32
35
 
33
36
  export {
34
37
  IUser,
@@ -64,7 +67,8 @@ export {
64
67
  IFramework,
65
68
  BrimbleFrameworkType,
66
69
  ISettings,
67
- ILoadBalancerPort
70
+ ILoadBalancerPort,
71
+ IDomainRenewal,
68
72
  } from "./types";
69
73
  export {
70
74
  GIT_TYPE,
@@ -89,6 +93,7 @@ export {
89
93
  BUILD_DISABLED_BY,
90
94
  SERVER_PROTOCOL,
91
95
  FrameworkApplicationType,
96
+ DomainRenewalStatus,
92
97
  } from "./enum";
93
98
 
94
99
  import mongoose from "mongoose";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "3.3.4",
3
+ "version": "3.3.5",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,11 @@
1
+ import { Document } from "mongoose";
2
+ import { IDomain } from "../";
3
+ import { DomainRenewalStatus } from "../../enum";
4
+
5
+ export interface IDomainRenewal extends Document {
6
+ domain_id: IDomain;
7
+ status: DomainRenewalStatus;
8
+ attempts: number;
9
+ createdAt: Date;
10
+ updatedAt: Date;
11
+ }
package/types/index.ts CHANGED
@@ -31,3 +31,4 @@ export { IVolume } from "./volume";
31
31
  export { IFramework, BrimbleFrameworkType } from "./framework";
32
32
  export { ISettings } from "./settings";
33
33
  export { ILoadBalancerPort } from "./load-balancer-port";
34
+ export { IDomainRenewal } from "./domain/renewal";