@brimble/models 1.3.21 → 1.3.22
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 +4 -2
- package/dist/index.js +6 -1
- package/dist/team.js +1 -0
- package/dist/token.js +1 -0
- package/dist/types/token.d.ts +1 -0
- package/dist/types/user.d.ts +2 -1
- package/index.ts +13 -3
- package/package.json +1 -1
- package/team.ts +1 -0
- package/token.ts +1 -0
- package/types/token.ts +2 -0
- package/types/user.ts +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,9 @@ export { default as Integration } from "./integration";
|
|
|
5
5
|
export { default as Domain } from "./domain";
|
|
6
6
|
export { default as Env } from "./env";
|
|
7
7
|
export { default as Token } from "./token";
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
8
|
+
export { default as Team } from "./team";
|
|
9
|
+
export { default as Member } from "./member";
|
|
10
|
+
export { IUser, IGit, IProject, IFollowing, IIntegration, IEnv, IDomain, IToken, IMember, ITeam, } from "./types";
|
|
11
|
+
export { GIT_TYPE, INTEGRATION_TYPE, OAUTH_PERMISSIONS, ENVIRONMENT, ROLES, } from "./enum";
|
|
10
12
|
export declare const connectToMongo: (mongoUrl: string) => Promise<void>;
|
|
11
13
|
export declare const closeMongo: () => void;
|
package/dist/index.js
CHANGED
|
@@ -27,14 +27,19 @@ var env_1 = require("./env");
|
|
|
27
27
|
Object.defineProperty(exports, "Env", { enumerable: true, get: function () { return env_1.default; } });
|
|
28
28
|
var token_1 = require("./token");
|
|
29
29
|
Object.defineProperty(exports, "Token", { enumerable: true, get: function () { return token_1.default; } });
|
|
30
|
+
var team_1 = require("./team");
|
|
31
|
+
Object.defineProperty(exports, "Team", { enumerable: true, get: function () { return team_1.default; } });
|
|
32
|
+
var member_1 = require("./member");
|
|
33
|
+
Object.defineProperty(exports, "Member", { enumerable: true, get: function () { return member_1.default; } });
|
|
30
34
|
var enum_1 = require("./enum");
|
|
31
35
|
Object.defineProperty(exports, "GIT_TYPE", { enumerable: true, get: function () { return enum_1.GIT_TYPE; } });
|
|
32
36
|
Object.defineProperty(exports, "INTEGRATION_TYPE", { enumerable: true, get: function () { return enum_1.INTEGRATION_TYPE; } });
|
|
33
37
|
Object.defineProperty(exports, "OAUTH_PERMISSIONS", { enumerable: true, get: function () { return enum_1.OAUTH_PERMISSIONS; } });
|
|
34
38
|
Object.defineProperty(exports, "ENVIRONMENT", { enumerable: true, get: function () { return enum_1.ENVIRONMENT; } });
|
|
39
|
+
Object.defineProperty(exports, "ROLES", { enumerable: true, get: function () { return enum_1.ROLES; } });
|
|
35
40
|
const mongoose_1 = __importDefault(require("mongoose"));
|
|
36
41
|
const utils_1 = require("@brimble/utils");
|
|
37
|
-
// Connection to Mongo
|
|
42
|
+
// Connection to Mongo
|
|
38
43
|
exports.connectToMongo = (mongoUrl) => __awaiter(void 0, void 0, void 0, function* () {
|
|
39
44
|
const options = { useNewUrlParser: true, useUnifiedTopology: true };
|
|
40
45
|
mongoose_1.default.set("useFindAndModify", false);
|
package/dist/team.js
CHANGED
package/dist/token.js
CHANGED
package/dist/types/token.d.ts
CHANGED
package/dist/types/user.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
2
|
import { IGit } from ".";
|
|
3
|
-
import { IFollowing, IProject } from "./";
|
|
3
|
+
import { IFollowing, IProject, ITeam } from "./";
|
|
4
4
|
export interface IUser extends Document {
|
|
5
5
|
first_name: string;
|
|
6
6
|
last_name: string;
|
|
@@ -18,4 +18,5 @@ export interface IUser extends Document {
|
|
|
18
18
|
bitbucket: IGit;
|
|
19
19
|
following: Array<IFollowing>;
|
|
20
20
|
projects: Array<IProject>;
|
|
21
|
+
teams: Array<ITeam>;
|
|
21
22
|
}
|
package/index.ts
CHANGED
|
@@ -5,6 +5,8 @@ export { default as Integration } from "./integration";
|
|
|
5
5
|
export { default as Domain } from "./domain";
|
|
6
6
|
export { default as Env } from "./env";
|
|
7
7
|
export { default as Token } from "./token";
|
|
8
|
+
export { default as Team } from "./team";
|
|
9
|
+
export { default as Member } from "./member";
|
|
8
10
|
export {
|
|
9
11
|
IUser,
|
|
10
12
|
IGit,
|
|
@@ -14,13 +16,21 @@ export {
|
|
|
14
16
|
IEnv,
|
|
15
17
|
IDomain,
|
|
16
18
|
IToken,
|
|
19
|
+
IMember,
|
|
20
|
+
ITeam,
|
|
17
21
|
} from "./types";
|
|
18
|
-
export {
|
|
22
|
+
export {
|
|
23
|
+
GIT_TYPE,
|
|
24
|
+
INTEGRATION_TYPE,
|
|
25
|
+
OAUTH_PERMISSIONS,
|
|
26
|
+
ENVIRONMENT,
|
|
27
|
+
ROLES,
|
|
28
|
+
} from "./enum";
|
|
19
29
|
|
|
20
30
|
import mongoose from "mongoose";
|
|
21
31
|
import { log } from "@brimble/utils";
|
|
22
32
|
|
|
23
|
-
// Connection to Mongo
|
|
33
|
+
// Connection to Mongo
|
|
24
34
|
export const connectToMongo = async (mongoUrl: string): Promise<void> => {
|
|
25
35
|
const options = { useNewUrlParser: true, useUnifiedTopology: true };
|
|
26
36
|
mongoose.set("useFindAndModify", false);
|
|
@@ -43,4 +53,4 @@ export const connectToMongo = async (mongoUrl: string): Promise<void> => {
|
|
|
43
53
|
|
|
44
54
|
export const closeMongo = () => {
|
|
45
55
|
mongoose.connection.close(true);
|
|
46
|
-
}
|
|
56
|
+
};
|
package/package.json
CHANGED
package/team.ts
CHANGED
package/token.ts
CHANGED
package/types/token.ts
CHANGED
package/types/user.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
2
|
import { IGit } from ".";
|
|
3
|
-
import { IFollowing, IProject } from "./";
|
|
3
|
+
import { IFollowing, IProject, ITeam } from "./";
|
|
4
4
|
|
|
5
5
|
export interface IUser extends Document {
|
|
6
6
|
first_name: string;
|
|
@@ -19,4 +19,5 @@ export interface IUser extends Document {
|
|
|
19
19
|
bitbucket: IGit;
|
|
20
20
|
following: Array<IFollowing>;
|
|
21
21
|
projects: Array<IProject>;
|
|
22
|
+
teams: Array<ITeam>;
|
|
22
23
|
}
|