@brimble/models 3.8.71 → 3.8.73
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/index.d.ts +2 -1
- package/dist/index.js +4 -2
- package/dist/project/index.js +5 -0
- package/dist/project_analytics.d.ts +30 -0
- package/dist/project_analytics.js +18 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/project/index.d.ts +1 -0
- package/dist/types/project_analytics.d.ts +11 -0
- package/dist/types/project_analytics.js +2 -0
- package/index.ts +2 -0
- package/package.json +1 -1
- package/project/index.ts +5 -0
- package/project_analytics.ts +26 -0
- package/types/index.ts +1 -0
- package/types/project/index.ts +1 -0
- package/types/project_analytics.ts +12 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as User } from "./user";
|
|
2
2
|
export { default as Project, DeletedProject } from "./project";
|
|
3
|
+
export { default as ProjectAnalytics } from "./project_analytics";
|
|
3
4
|
export { default as Preview } from "./project/preview";
|
|
4
5
|
export { default as ProjectConnection } from "./project/connection";
|
|
5
6
|
export { default as Following } from "./following";
|
|
@@ -52,7 +53,7 @@ export { default as ProjectEnvironment } from "./project-environment";
|
|
|
52
53
|
export { default as EnvironmentVariable } from "./environment-variable";
|
|
53
54
|
export { default as ActivityLog } from "./activity-log";
|
|
54
55
|
export { default as OwnershipTransfer } from "./ownership-transfer";
|
|
55
|
-
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, IDomainTransfer, IWebhookCategory, IWebhookEvent, IWebhookSetting, IIntention, IProvider, ICollabAnnotation, ICollabComment, ICollabAttachment, ICollabIntegration, ICollabSettings, ICollabShareToken, ICollabPushSubscription, IAppMessage, IInvoice, ITag, IProjectTagAssignment, ICashierSubscription, ICashierSubscriptionItem, IProjectEnvironment, IEnvironmentVariable, IActivityLog, IOwnershipTransfer, } from "./types";
|
|
56
|
+
export { IUser, IGit, IProject, IProjectAnalytics, 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, IDomainTransfer, IWebhookCategory, IWebhookEvent, IWebhookSetting, IIntention, IProvider, ICollabAnnotation, ICollabComment, ICollabAttachment, ICollabIntegration, ICollabSettings, ICollabShareToken, ICollabPushSubscription, IAppMessage, IInvoice, ITag, IProjectTagAssignment, ICashierSubscription, ICashierSubscriptionItem, IProjectEnvironment, IEnvironmentVariable, IActivityLog, IOwnershipTransfer, } from "./types";
|
|
56
57
|
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 } from "./enum";
|
|
57
58
|
import mongoose from "mongoose";
|
|
58
59
|
export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -12,13 +12,15 @@ 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.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_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.OwnershipTransfer = exports.ActivityLog = exports.EnvironmentVariable = exports.ProjectEnvironment = exports.CashierSubscriptionItem = void 0;
|
|
15
|
+
exports.ProjectTagAssignment = exports.Tag = exports.Invoice = 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.Dns = exports.Domain = exports.Integration = exports.Following = exports.ProjectConnection = exports.Preview = exports.ProjectAnalytics = exports.DeletedProject = exports.Project = exports.User = void 0;
|
|
16
|
+
exports.healthCheckMongo = exports.closeMongo = exports.db = exports.connectToMongo = 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_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.OwnershipTransfer = exports.ActivityLog = exports.EnvironmentVariable = exports.ProjectEnvironment = exports.CashierSubscriptionItem = exports.CashierSubscription = 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");
|
|
20
20
|
Object.defineProperty(exports, "Project", { enumerable: true, get: function () { return __importDefault(project_1).default; } });
|
|
21
21
|
Object.defineProperty(exports, "DeletedProject", { enumerable: true, get: function () { return project_1.DeletedProject; } });
|
|
22
|
+
var project_analytics_1 = require("./project_analytics");
|
|
23
|
+
Object.defineProperty(exports, "ProjectAnalytics", { enumerable: true, get: function () { return __importDefault(project_analytics_1).default; } });
|
|
22
24
|
var preview_1 = require("./project/preview");
|
|
23
25
|
Object.defineProperty(exports, "Preview", { enumerable: true, get: function () { return __importDefault(preview_1).default; } });
|
|
24
26
|
var connection_1 = require("./project/connection");
|
package/dist/project/index.js
CHANGED
|
@@ -47,6 +47,11 @@ const projectSchema = new mongoose_1.Schema({
|
|
|
47
47
|
ref: "Team",
|
|
48
48
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
49
49
|
},
|
|
50
|
+
watchPaths: {
|
|
51
|
+
type: Array,
|
|
52
|
+
required: false,
|
|
53
|
+
default: [],
|
|
54
|
+
},
|
|
50
55
|
server: {
|
|
51
56
|
ref: "Server",
|
|
52
57
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
@@ -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 { IProjectAnalytics } from "./types/project_analytics";
|
|
27
|
+
declare const _default: import("mongoose").Model<IProjectAnalytics, {}, {}, {}, import("mongoose").Document<unknown, {}, IProjectAnalytics> & IProjectAnalytics & {
|
|
28
|
+
_id: import("mongoose").Types.ObjectId;
|
|
29
|
+
}, any>;
|
|
30
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const ProjectAnalyticsSchema = new mongoose_1.Schema({
|
|
5
|
+
project: {
|
|
6
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
7
|
+
ref: "Project",
|
|
8
|
+
required: true,
|
|
9
|
+
unique: true,
|
|
10
|
+
index: true,
|
|
11
|
+
},
|
|
12
|
+
provider: { type: String, enum: ["umami"], required: true, default: "umami" },
|
|
13
|
+
websiteId: { type: String, required: true, unique: true },
|
|
14
|
+
shareId: { type: String, default: null },
|
|
15
|
+
domain: { type: String, required: true },
|
|
16
|
+
enabled: { type: Boolean, default: true },
|
|
17
|
+
}, { timestamps: true });
|
|
18
|
+
exports.default = (0, mongoose_1.model)("ProjectAnalytics", ProjectAnalyticsSchema, "project_analytics");
|
package/dist/types/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export type { IPermission } from "./permission";
|
|
|
23
23
|
export type { IPlanConfiguration } from "./plan_configuration";
|
|
24
24
|
export type { IProvider } from "./provider";
|
|
25
25
|
export type { IProject } from "./project";
|
|
26
|
+
export type { IProjectAnalytics } from "./project_analytics";
|
|
26
27
|
export type { IProjectConnection } from "./project/connection";
|
|
27
28
|
export type { IPreview } from "./project/preview";
|
|
28
29
|
export type { IRegion } from "./region";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Document, Types } from "mongoose";
|
|
2
|
+
export interface IProjectAnalytics extends Document {
|
|
3
|
+
project: Types.ObjectId;
|
|
4
|
+
provider: "umami";
|
|
5
|
+
websiteId: string;
|
|
6
|
+
shareId?: string | null;
|
|
7
|
+
domain: string;
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
createdAt: Date;
|
|
10
|
+
updatedAt: Date;
|
|
11
|
+
}
|
package/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as User } from "./user";
|
|
2
2
|
export { default as Project, DeletedProject } from "./project";
|
|
3
|
+
export { default as ProjectAnalytics } from "./project_analytics";
|
|
3
4
|
export { default as Preview } from "./project/preview";
|
|
4
5
|
export { default as ProjectConnection } from "./project/connection";
|
|
5
6
|
export { default as Following } from "./following";
|
|
@@ -57,6 +58,7 @@ export {
|
|
|
57
58
|
IUser,
|
|
58
59
|
IGit,
|
|
59
60
|
IProject,
|
|
61
|
+
IProjectAnalytics,
|
|
60
62
|
IPreview,
|
|
61
63
|
IProjectConnection,
|
|
62
64
|
IFollowing,
|
package/package.json
CHANGED
package/project/index.ts
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Schema, model } from "mongoose";
|
|
2
|
+
import { IProjectAnalytics } from "./types/project_analytics";
|
|
3
|
+
|
|
4
|
+
const ProjectAnalyticsSchema = new Schema<IProjectAnalytics>(
|
|
5
|
+
{
|
|
6
|
+
project: {
|
|
7
|
+
type: Schema.Types.ObjectId,
|
|
8
|
+
ref: "Project",
|
|
9
|
+
required: true,
|
|
10
|
+
unique: true,
|
|
11
|
+
index: true,
|
|
12
|
+
},
|
|
13
|
+
provider: { type: String, enum: ["umami"], required: true, default: "umami" },
|
|
14
|
+
websiteId: { type: String, required: true, unique: true },
|
|
15
|
+
shareId: { type: String, default: null },
|
|
16
|
+
domain: { type: String, required: true },
|
|
17
|
+
enabled: { type: Boolean, default: true },
|
|
18
|
+
},
|
|
19
|
+
{ timestamps: true },
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
export default model<IProjectAnalytics>(
|
|
23
|
+
"ProjectAnalytics",
|
|
24
|
+
ProjectAnalyticsSchema,
|
|
25
|
+
"project_analytics",
|
|
26
|
+
);
|
package/types/index.ts
CHANGED
|
@@ -23,6 +23,7 @@ export type { IPermission } from "./permission";
|
|
|
23
23
|
export type { IPlanConfiguration } from "./plan_configuration";
|
|
24
24
|
export type { IProvider } from "./provider";
|
|
25
25
|
export type { IProject } from "./project";
|
|
26
|
+
export type { IProjectAnalytics } from "./project_analytics";
|
|
26
27
|
export type { IProjectConnection } from "./project/connection";
|
|
27
28
|
export type { IPreview } from "./project/preview";
|
|
28
29
|
export type { IRegion } from "./region";
|
package/types/project/index.ts
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Document, Types } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface IProjectAnalytics extends Document {
|
|
4
|
+
project: Types.ObjectId;
|
|
5
|
+
provider: "umami";
|
|
6
|
+
websiteId: string;
|
|
7
|
+
shareId?: string | null;
|
|
8
|
+
domain: string;
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
updatedAt: Date;
|
|
12
|
+
}
|