@brimble/models 1.2.0-alpha.1 → 1.2.0-alpha.2
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/CHANGELOG.md +16 -0
- package/dist/enum/index.js +0 -0
- package/dist/index.js +0 -2
- package/dist/oauthUser.js +0 -0
- package/dist/project.js +0 -0
- package/dist/types/git.js +2 -0
- package/dist/types/index.js +0 -0
- package/dist/types/oauthUser.js +0 -0
- package/dist/types/project.js +0 -0
- package/dist/types/user.js +0 -0
- package/dist/user.js +5 -9
- package/index.ts +1 -2
- package/package.json +1 -1
- package/types/{oauthUser.ts → git.ts} +3 -9
- package/types/index.ts +1 -1
- package/types/user.ts +4 -0
- package/user.ts +6 -10
- package/oauthUser.ts +0 -25
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.2.0-alpha.2](https://github.com/brimblehq/brimble/compare/@brimble/models@1.2.0-alpha.1...@brimble/models@1.2.0-alpha.2) (2021-12-28)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* worked on subcribing to event and updated model ([0a43f88](https://github.com/brimblehq/brimble/commit/0a43f88a67923f2d96f0017b036cee1c151253db))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Performance Improvements
|
|
15
|
+
|
|
16
|
+
* updated IGit interface ([3a4e2b6](https://github.com/brimblehq/brimble/commit/3a4e2b6f93e89a51dfe8ed40d9569dc1215fa1ff))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
# 1.2.0-alpha.1 (2021-12-01)
|
|
7
23
|
|
|
8
24
|
|
package/dist/enum/index.js
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
@@ -33,7 +33,5 @@ const connectToMongo = (mongoUrl) => __awaiter(void 0, void 0, void 0, function*
|
|
|
33
33
|
exports.default = connectToMongo;
|
|
34
34
|
var user_1 = require("./user");
|
|
35
35
|
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return user_1.default; } });
|
|
36
|
-
var oauthUser_1 = require("./oauthUser");
|
|
37
|
-
Object.defineProperty(exports, "OauthUser", { enumerable: true, get: function () { return oauthUser_1.default; } });
|
|
38
36
|
var project_1 = require("./project");
|
|
39
37
|
Object.defineProperty(exports, "Project", { enumerable: true, get: function () { return project_1.default; } });
|
package/dist/oauthUser.js
CHANGED
|
File without changes
|
package/dist/project.js
CHANGED
|
File without changes
|
package/dist/types/index.js
CHANGED
|
File without changes
|
package/dist/types/oauthUser.js
CHANGED
|
File without changes
|
package/dist/types/project.js
CHANGED
|
File without changes
|
package/dist/types/user.js
CHANGED
|
File without changes
|
package/dist/user.js
CHANGED
|
@@ -2,21 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const mongoose_1 = require("mongoose");
|
|
4
4
|
const userSchema = new mongoose_1.Schema({
|
|
5
|
-
first_name:
|
|
6
|
-
|
|
7
|
-
required: true,
|
|
8
|
-
},
|
|
9
|
-
last_name: {
|
|
10
|
-
type: String,
|
|
11
|
-
required: true,
|
|
12
|
-
},
|
|
5
|
+
first_name: String,
|
|
6
|
+
last_name: String,
|
|
13
7
|
email: {
|
|
14
8
|
type: String,
|
|
15
9
|
required: true,
|
|
16
10
|
},
|
|
17
11
|
password: {
|
|
18
12
|
type: String,
|
|
19
|
-
required: true,
|
|
20
13
|
select: false,
|
|
21
14
|
},
|
|
22
15
|
email_verified_at: Date,
|
|
@@ -24,5 +17,8 @@ const userSchema = new mongoose_1.Schema({
|
|
|
24
17
|
type: Number,
|
|
25
18
|
select: false,
|
|
26
19
|
},
|
|
20
|
+
github: Object,
|
|
21
|
+
gitlab: Object,
|
|
22
|
+
bitbucket: Object,
|
|
27
23
|
}, { timestamps: true });
|
|
28
24
|
exports.default = mongoose_1.model("User", userSchema);
|
package/index.ts
CHANGED
|
@@ -21,6 +21,5 @@ const connectToMongo = async (mongoUrl: string): Promise<void> => {
|
|
|
21
21
|
|
|
22
22
|
export default connectToMongo;
|
|
23
23
|
export { default as User } from "./user";
|
|
24
|
-
export { default as OauthUser } from "./oauthUser";
|
|
25
24
|
export { default as Project } from "./project";
|
|
26
|
-
export { IUser,
|
|
25
|
+
export { IUser, IGit, IProject } from "./types";
|
package/package.json
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
2
|
|
|
3
|
-
export interface
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
token: Token;
|
|
7
|
-
company?: string;
|
|
8
|
-
oauth_provider: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface Token {
|
|
3
|
+
export interface IGit extends Document {
|
|
4
|
+
git_id?: number;
|
|
5
|
+
installation_id?: number;
|
|
12
6
|
access_token: string;
|
|
13
7
|
token_type: string;
|
|
14
8
|
scope?: string;
|
package/types/index.ts
CHANGED
package/types/user.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
|
+
import { IGit } from ".";
|
|
2
3
|
|
|
3
4
|
export interface IUser extends Document {
|
|
4
5
|
first_name: string;
|
|
@@ -10,4 +11,7 @@ export interface IUser extends Document {
|
|
|
10
11
|
verification_token: number;
|
|
11
12
|
token?: string;
|
|
12
13
|
company?: string;
|
|
14
|
+
github: IGit;
|
|
15
|
+
gitlab: IGit;
|
|
16
|
+
bitbucket: IGit;
|
|
13
17
|
}
|
package/user.ts
CHANGED
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
import { model, Schema } from "mongoose";
|
|
2
2
|
|
|
3
|
-
import { IUser } from "./types
|
|
3
|
+
import { IUser } from "./types";
|
|
4
4
|
|
|
5
5
|
const userSchema: Schema = new Schema(
|
|
6
6
|
{
|
|
7
|
-
first_name:
|
|
8
|
-
|
|
9
|
-
required: true,
|
|
10
|
-
},
|
|
11
|
-
last_name: {
|
|
12
|
-
type: String,
|
|
13
|
-
required: true,
|
|
14
|
-
},
|
|
7
|
+
first_name: String,
|
|
8
|
+
last_name: String,
|
|
15
9
|
email: {
|
|
16
10
|
type: String,
|
|
17
11
|
required: true,
|
|
18
12
|
},
|
|
19
13
|
password: {
|
|
20
14
|
type: String,
|
|
21
|
-
required: true,
|
|
22
15
|
select: false,
|
|
23
16
|
},
|
|
24
17
|
email_verified_at: Date,
|
|
@@ -26,6 +19,9 @@ const userSchema: Schema = new Schema(
|
|
|
26
19
|
type: Number,
|
|
27
20
|
select: false,
|
|
28
21
|
},
|
|
22
|
+
github: Object,
|
|
23
|
+
gitlab: Object,
|
|
24
|
+
bitbucket: Object,
|
|
29
25
|
},
|
|
30
26
|
{ timestamps: true }
|
|
31
27
|
);
|
package/oauthUser.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { model, Schema } from "mongoose";
|
|
2
|
-
|
|
3
|
-
import { IOauthUser } from "./types/oauthUser";
|
|
4
|
-
|
|
5
|
-
const oauthUserSchema: Schema = new Schema(
|
|
6
|
-
{
|
|
7
|
-
username: {
|
|
8
|
-
type: String,
|
|
9
|
-
required: true,
|
|
10
|
-
},
|
|
11
|
-
email: String,
|
|
12
|
-
company: String,
|
|
13
|
-
oauth_provider: {
|
|
14
|
-
type: String,
|
|
15
|
-
required: true,
|
|
16
|
-
},
|
|
17
|
-
token: {
|
|
18
|
-
type: JSON,
|
|
19
|
-
required: true,
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
{ timestamps: true }
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
export default model<IOauthUser>("oauth_users", oauthUserSchema);
|