@brimble/models 3.8.70 → 3.8.72
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 +3 -1
- package/dist/index.js +6 -2
- package/dist/ownership-transfer.d.ts +30 -0
- package/dist/ownership-transfer.js +35 -0
- package/dist/project_analytics.d.ts +30 -0
- package/dist/project_analytics.js +18 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/ownership-transfer.d.ts +12 -0
- package/dist/types/ownership-transfer.js +2 -0
- package/dist/types/project_analytics.d.ts +11 -0
- package/dist/types/project_analytics.js +2 -0
- package/index.ts +4 -0
- package/ownership-transfer.ts +42 -0
- package/package.json +1 -1
- package/project_analytics.ts +26 -0
- package/types/index.ts +2 -0
- package/types/ownership-transfer.ts +13 -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";
|
|
@@ -51,7 +52,8 @@ export { default as CashierSubscriptionItem } from "./cashier_subscription_item"
|
|
|
51
52
|
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
|
-
export {
|
|
55
|
+
export { default as OwnershipTransfer } from "./ownership-transfer";
|
|
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";
|
|
55
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";
|
|
56
58
|
import mongoose from "mongoose";
|
|
57
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.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");
|
|
@@ -121,6 +123,8 @@ var environment_variable_1 = require("./environment-variable");
|
|
|
121
123
|
Object.defineProperty(exports, "EnvironmentVariable", { enumerable: true, get: function () { return __importDefault(environment_variable_1).default; } });
|
|
122
124
|
var activity_log_1 = require("./activity-log");
|
|
123
125
|
Object.defineProperty(exports, "ActivityLog", { enumerable: true, get: function () { return __importDefault(activity_log_1).default; } });
|
|
126
|
+
var ownership_transfer_1 = require("./ownership-transfer");
|
|
127
|
+
Object.defineProperty(exports, "OwnershipTransfer", { enumerable: true, get: function () { return __importDefault(ownership_transfer_1).default; } });
|
|
124
128
|
var enum_1 = require("./enum");
|
|
125
129
|
Object.defineProperty(exports, "GIT_TYPE", { enumerable: true, get: function () { return enum_1.GIT_TYPE; } });
|
|
126
130
|
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 { IOwnershipTransfer } from "./types";
|
|
27
|
+
declare const _default: import("mongoose").Model<IOwnershipTransfer, {}, {}, {}, import("mongoose").Document<unknown, {}, IOwnershipTransfer> & IOwnershipTransfer & {
|
|
28
|
+
_id: import("mongoose").Types.ObjectId;
|
|
29
|
+
}, any>;
|
|
30
|
+
export default _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const ownershipTransferSchema = new mongoose_1.Schema({
|
|
5
|
+
team: {
|
|
6
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
7
|
+
ref: "Team",
|
|
8
|
+
required: true,
|
|
9
|
+
},
|
|
10
|
+
from_user: {
|
|
11
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
12
|
+
ref: "User",
|
|
13
|
+
required: true,
|
|
14
|
+
},
|
|
15
|
+
to_user: {
|
|
16
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
17
|
+
ref: "User",
|
|
18
|
+
required: true,
|
|
19
|
+
},
|
|
20
|
+
status: {
|
|
21
|
+
type: String,
|
|
22
|
+
enum: ["pending", "accepted", "denied", "expired"],
|
|
23
|
+
default: "pending",
|
|
24
|
+
},
|
|
25
|
+
expires_at: {
|
|
26
|
+
type: Date,
|
|
27
|
+
required: true,
|
|
28
|
+
},
|
|
29
|
+
}, {
|
|
30
|
+
timestamps: {
|
|
31
|
+
createdAt: "created_at",
|
|
32
|
+
updatedAt: "updated_at",
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
exports.default = (0, mongoose_1.model)("OwnershipTransfer", ownershipTransferSchema);
|
|
@@ -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";
|
|
@@ -52,3 +53,4 @@ export type { ICashierSubscription, ICashierSubscriptionItem } from "./cashier_s
|
|
|
52
53
|
export type { IProjectEnvironment } from "./project-environment";
|
|
53
54
|
export type { IEnvironmentVariable } from "./environment-variable";
|
|
54
55
|
export type { IActivityLog } from "./activity-log";
|
|
56
|
+
export type { IOwnershipTransfer } from "./ownership-transfer";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { ITeam } from "./team";
|
|
3
|
+
import { IUser } from "./user";
|
|
4
|
+
export interface IOwnershipTransfer extends Document {
|
|
5
|
+
team: ITeam;
|
|
6
|
+
from_user: IUser;
|
|
7
|
+
to_user: IUser;
|
|
8
|
+
status: "pending" | "accepted" | "denied" | "expired";
|
|
9
|
+
expires_at: Date;
|
|
10
|
+
created_at: Date;
|
|
11
|
+
updated_at: Date;
|
|
12
|
+
}
|
|
@@ -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";
|
|
@@ -51,11 +52,13 @@ export { default as CashierSubscriptionItem } from "./cashier_subscription_item"
|
|
|
51
52
|
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";
|
|
55
|
+
export { default as OwnershipTransfer } from "./ownership-transfer";
|
|
54
56
|
|
|
55
57
|
export {
|
|
56
58
|
IUser,
|
|
57
59
|
IGit,
|
|
58
60
|
IProject,
|
|
61
|
+
IProjectAnalytics,
|
|
59
62
|
IPreview,
|
|
60
63
|
IProjectConnection,
|
|
61
64
|
IFollowing,
|
|
@@ -110,6 +113,7 @@ export {
|
|
|
110
113
|
IProjectEnvironment,
|
|
111
114
|
IEnvironmentVariable,
|
|
112
115
|
IActivityLog,
|
|
116
|
+
IOwnershipTransfer,
|
|
113
117
|
} from "./types";
|
|
114
118
|
export {
|
|
115
119
|
GIT_TYPE,
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { model, Schema } from "mongoose";
|
|
2
|
+
import { IOwnershipTransfer } from "./types";
|
|
3
|
+
|
|
4
|
+
const ownershipTransferSchema: Schema = new Schema(
|
|
5
|
+
{
|
|
6
|
+
team: {
|
|
7
|
+
type: Schema.Types.ObjectId,
|
|
8
|
+
ref: "Team",
|
|
9
|
+
required: true,
|
|
10
|
+
},
|
|
11
|
+
from_user: {
|
|
12
|
+
type: Schema.Types.ObjectId,
|
|
13
|
+
ref: "User",
|
|
14
|
+
required: true,
|
|
15
|
+
},
|
|
16
|
+
to_user: {
|
|
17
|
+
type: Schema.Types.ObjectId,
|
|
18
|
+
ref: "User",
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
status: {
|
|
22
|
+
type: String,
|
|
23
|
+
enum: ["pending", "accepted", "denied", "expired"],
|
|
24
|
+
default: "pending",
|
|
25
|
+
},
|
|
26
|
+
expires_at: {
|
|
27
|
+
type: Date,
|
|
28
|
+
required: true,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
timestamps: {
|
|
33
|
+
createdAt: "created_at",
|
|
34
|
+
updatedAt: "updated_at",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
export default model<IOwnershipTransfer>(
|
|
40
|
+
"OwnershipTransfer",
|
|
41
|
+
ownershipTransferSchema,
|
|
42
|
+
);
|
package/package.json
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";
|
|
@@ -52,3 +53,4 @@ export type { ICashierSubscription, ICashierSubscriptionItem } from "./cashier_s
|
|
|
52
53
|
export type { IProjectEnvironment } from "./project-environment";
|
|
53
54
|
export type { IEnvironmentVariable } from "./environment-variable";
|
|
54
55
|
export type { IActivityLog } from "./activity-log";
|
|
56
|
+
export type { IOwnershipTransfer } from "./ownership-transfer";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { ITeam } from "./team";
|
|
3
|
+
import { IUser } from "./user";
|
|
4
|
+
|
|
5
|
+
export interface IOwnershipTransfer extends Document {
|
|
6
|
+
team: ITeam;
|
|
7
|
+
from_user: IUser;
|
|
8
|
+
to_user: IUser;
|
|
9
|
+
status: "pending" | "accepted" | "denied" | "expired";
|
|
10
|
+
expires_at: Date;
|
|
11
|
+
created_at: Date;
|
|
12
|
+
updated_at: Date;
|
|
13
|
+
}
|
|
@@ -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
|
+
}
|