@brimble/models 1.4.54 → 1.4.56
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/.turbo/turbo-build.log +0 -2
- package/brimble.json +3 -0
- package/dist/activity.d.ts +4 -0
- package/dist/activity.js +25 -0
- package/dist/installed_integration.js +12 -18
- package/dist/invitation.d.ts +4 -0
- package/dist/invitation.js +24 -0
- package/dist/logs.d.ts +0 -0
- package/dist/logs.js +0 -0
- package/dist/types/activity.d.ts +10 -0
- package/dist/types/activity.js +2 -0
- package/dist/types/invitation.d.ts +8 -0
- package/dist/types/invitation.js +2 -0
- package/dist/types/logs.d.ts +0 -0
- package/dist/types/logs.js +0 -0
- package/dist/types/user.d.ts +4 -3
- package/dist/user.js +14 -42
- package/package.json +2 -2
- package/types/user.ts +4 -3
- package/user.ts +14 -42
- package/yarn-error.log +11098 -0
package/.turbo/turbo-build.log
CHANGED
package/brimble.json
ADDED
package/dist/activity.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const enum_1 = require("./enum");
|
|
5
|
+
const activitySchema = new mongoose_1.Schema({
|
|
6
|
+
type: {
|
|
7
|
+
type: String,
|
|
8
|
+
enum: Object.values(enum_1.ACTIVITY_TYPE),
|
|
9
|
+
required: true,
|
|
10
|
+
},
|
|
11
|
+
authUser: {
|
|
12
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
13
|
+
ref: "User",
|
|
14
|
+
required: true,
|
|
15
|
+
},
|
|
16
|
+
project: {
|
|
17
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
18
|
+
ref: "Project",
|
|
19
|
+
},
|
|
20
|
+
user: {
|
|
21
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
22
|
+
ref: "User",
|
|
23
|
+
},
|
|
24
|
+
}, { timestamps: true });
|
|
25
|
+
exports.default = mongoose_1.model("Activity", activitySchema);
|
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const mongoose_1 = require("mongoose");
|
|
4
|
-
const installedIntegrationSchema = new mongoose_1.Schema(
|
|
5
|
-
{
|
|
4
|
+
const installedIntegrationSchema = new mongoose_1.Schema({
|
|
6
5
|
user_id: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
7
|
+
ref: "User",
|
|
8
|
+
default: null,
|
|
9
|
+
required: false,
|
|
11
10
|
},
|
|
12
11
|
integration_id: {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
13
|
+
ref: "Integration",
|
|
14
|
+
required: true,
|
|
16
15
|
},
|
|
17
16
|
enabled: {
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: true,
|
|
20
19
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
);
|
|
24
|
-
exports.default = mongoose_1.model(
|
|
25
|
-
"InstalledIntegration",
|
|
26
|
-
installedIntegrationSchema,
|
|
27
|
-
);
|
|
20
|
+
}, { timestamps: true });
|
|
21
|
+
exports.default = (0, mongoose_1.model)("InstalledIntegration", installedIntegrationSchema);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const invitationSchema = new mongoose_1.Schema({
|
|
5
|
+
email: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: true,
|
|
8
|
+
},
|
|
9
|
+
team: {
|
|
10
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
11
|
+
ref: "Team",
|
|
12
|
+
},
|
|
13
|
+
accepted: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: false,
|
|
16
|
+
},
|
|
17
|
+
invitedBy: {
|
|
18
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
19
|
+
ref: "User",
|
|
20
|
+
},
|
|
21
|
+
}, {
|
|
22
|
+
timestamps: true,
|
|
23
|
+
});
|
|
24
|
+
exports.default = mongoose_1.model("Invitation", invitationSchema);
|
package/dist/logs.d.ts
CHANGED
|
File without changes
|
package/dist/logs.js
CHANGED
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { ACTIVITY_TYPE } from "../enum";
|
|
3
|
+
import { IProject } from "./project";
|
|
4
|
+
import { IUser } from "./user";
|
|
5
|
+
export interface IActivity extends Document {
|
|
6
|
+
type: ACTIVITY_TYPE;
|
|
7
|
+
project: IProject;
|
|
8
|
+
user: IUser;
|
|
9
|
+
authUser: IUser;
|
|
10
|
+
}
|
package/dist/types/logs.d.ts
CHANGED
|
File without changes
|
package/dist/types/logs.js
CHANGED
|
File without changes
|
package/dist/types/user.d.ts
CHANGED
|
@@ -16,8 +16,9 @@ export interface IUser extends Document {
|
|
|
16
16
|
location: string;
|
|
17
17
|
interests: Array<string>;
|
|
18
18
|
bitbucket: IGit;
|
|
19
|
-
following:
|
|
20
|
-
projects:
|
|
21
|
-
teams:
|
|
19
|
+
following: IFollowing[];
|
|
20
|
+
projects: IProject[];
|
|
21
|
+
teams: ITeam[];
|
|
22
22
|
avatar: string;
|
|
23
|
+
freeTrialActive: boolean;
|
|
23
24
|
}
|
package/dist/user.js
CHANGED
|
@@ -5,53 +5,25 @@ const userSchema = new mongoose_1.Schema({
|
|
|
5
5
|
first_name: String,
|
|
6
6
|
last_name: String,
|
|
7
7
|
username: String,
|
|
8
|
-
email: {
|
|
9
|
-
|
|
10
|
-
required: true,
|
|
11
|
-
},
|
|
12
|
-
password: {
|
|
13
|
-
type: String,
|
|
14
|
-
select: false,
|
|
15
|
-
},
|
|
8
|
+
email: { type: String, required: true },
|
|
9
|
+
password: { type: String, select: false },
|
|
16
10
|
email_verified_at: Date,
|
|
17
|
-
following: [
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
],
|
|
23
|
-
verification_token: {
|
|
24
|
-
type: Number,
|
|
25
|
-
select: false,
|
|
26
|
-
},
|
|
27
|
-
location: {
|
|
28
|
-
type: String,
|
|
29
|
-
},
|
|
30
|
-
interests: {
|
|
31
|
-
type: Array,
|
|
32
|
-
},
|
|
11
|
+
following: [{ type: mongoose_1.Schema.Types.ObjectId, ref: "Following" }],
|
|
12
|
+
verification_token: { ype: Number, select: false },
|
|
13
|
+
location: { type: String },
|
|
14
|
+
interests: { type: Array },
|
|
33
15
|
github: Object,
|
|
34
16
|
gitlab: Object,
|
|
35
17
|
bitbucket: Object,
|
|
36
|
-
access_code: {
|
|
37
|
-
type: Number,
|
|
38
|
-
select: false,
|
|
39
|
-
},
|
|
18
|
+
access_code: { type: Number, select: false },
|
|
40
19
|
company: String,
|
|
41
|
-
projects: [
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
{
|
|
49
|
-
type: mongoose_1.Schema.Types.ObjectId,
|
|
50
|
-
ref: "Team",
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
avatar: {
|
|
54
|
-
type: String,
|
|
20
|
+
projects: [{ type: mongoose_1.Schema.Types.ObjectId, ref: "Project" }],
|
|
21
|
+
teams: [{ type: mongoose_1.Schema.Types.ObjectId, ref: "Team" }],
|
|
22
|
+
avatar: { type: String },
|
|
23
|
+
freeTrialActive: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: true,
|
|
26
|
+
required: false,
|
|
55
27
|
},
|
|
56
28
|
}, { timestamps: true });
|
|
57
29
|
exports.default = (0, mongoose_1.model)("User", userSchema);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brimble/models",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.56",
|
|
4
4
|
"description": "Brimble models",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,5 +21,5 @@
|
|
|
21
21
|
"ts-node": "^8.10.2",
|
|
22
22
|
"typescript": "^4.9.4"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "b9e9d22d99223c2becf8438995dd8ead0975f707"
|
|
25
25
|
}
|
package/types/user.ts
CHANGED
|
@@ -17,8 +17,9 @@ export interface IUser extends Document {
|
|
|
17
17
|
location: string;
|
|
18
18
|
interests: Array<string>;
|
|
19
19
|
bitbucket: IGit;
|
|
20
|
-
following:
|
|
21
|
-
projects:
|
|
22
|
-
teams:
|
|
20
|
+
following: IFollowing[];
|
|
21
|
+
projects: IProject[];
|
|
22
|
+
teams: ITeam[];
|
|
23
23
|
avatar: string;
|
|
24
|
+
freeTrialActive: boolean;
|
|
24
25
|
}
|
package/user.ts
CHANGED
|
@@ -7,53 +7,25 @@ const userSchema: Schema = new Schema(
|
|
|
7
7
|
first_name: String,
|
|
8
8
|
last_name: String,
|
|
9
9
|
username: String,
|
|
10
|
-
email: {
|
|
11
|
-
|
|
12
|
-
required: true,
|
|
13
|
-
},
|
|
14
|
-
password: {
|
|
15
|
-
type: String,
|
|
16
|
-
select: false,
|
|
17
|
-
},
|
|
10
|
+
email: { type: String, required: true },
|
|
11
|
+
password: { type: String, select: false },
|
|
18
12
|
email_verified_at: Date,
|
|
19
|
-
following: [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
verification_token: {
|
|
26
|
-
type: Number,
|
|
27
|
-
select: false,
|
|
28
|
-
},
|
|
29
|
-
location: {
|
|
30
|
-
type: String,
|
|
31
|
-
},
|
|
32
|
-
interests: {
|
|
33
|
-
type: Array,
|
|
34
|
-
},
|
|
13
|
+
following: [{ type: Schema.Types.ObjectId, ref: "Following" }],
|
|
14
|
+
verification_token: { ype: Number, select: false },
|
|
15
|
+
location: { type: String },
|
|
16
|
+
interests: { type: Array },
|
|
35
17
|
github: Object,
|
|
36
18
|
gitlab: Object,
|
|
37
19
|
bitbucket: Object,
|
|
38
|
-
access_code: {
|
|
39
|
-
type: Number,
|
|
40
|
-
select: false,
|
|
41
|
-
},
|
|
20
|
+
access_code: { type: Number, select: false },
|
|
42
21
|
company: String,
|
|
43
|
-
projects: [
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
{
|
|
51
|
-
type: Schema.Types.ObjectId,
|
|
52
|
-
ref: "Team",
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
avatar: {
|
|
56
|
-
type: String,
|
|
22
|
+
projects: [{ type: Schema.Types.ObjectId, ref: "Project" }],
|
|
23
|
+
teams: [{ type: Schema.Types.ObjectId, ref: "Team" }],
|
|
24
|
+
avatar: { type: String },
|
|
25
|
+
freeTrialActive: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: true,
|
|
28
|
+
required: false,
|
|
57
29
|
},
|
|
58
30
|
},
|
|
59
31
|
{ timestamps: true },
|