@brimble/models 1.3.34 → 1.3.36
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 +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -0
- package/dist/installed_integration.d.ts +4 -0
- package/dist/installed_integration.js +21 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/installed_integration.d.ts +6 -0
- package/dist/types/installed_integration.js +2 -0
- package/index.ts +2 -0
- package/installed_integration.ts +25 -0
- package/package.json +1 -1
- package/types/index.ts +1 -0
- package/types/installed_integration.ts +9 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
[32m@brimble/models:build: [0mcache hit, replaying output [
|
|
1
|
+
[32m@brimble/models:build: [0mcache hit, replaying output [2m0abdc462c3e54714[0m
|
|
2
2
|
[32m@brimble/models:build: [0m$ tsc -p .
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { default as Env } from "./env";
|
|
|
7
7
|
export { default as Token } from "./token";
|
|
8
8
|
export { default as Team } from "./team";
|
|
9
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
|
+
export { IUser, IGit, IProject, IFollowing, IIntegration, IEnv, IDomain, IToken, IMember, ITeam, IInstalledIntegration, } from "./types";
|
|
11
|
+
export { GIT_TYPE, INTEGRATION_TYPE, OAUTH_PERMISSIONS, ENVIRONMENT, ROLES, PROJECT_STATUS, } from "./enum";
|
|
12
12
|
export declare const connectToMongo: (mongoUrl: string) => Promise<void>;
|
|
13
13
|
export declare const closeMongo: () => void;
|
package/dist/index.js
CHANGED
|
@@ -37,6 +37,7 @@ Object.defineProperty(exports, "INTEGRATION_TYPE", { enumerable: true, get: func
|
|
|
37
37
|
Object.defineProperty(exports, "OAUTH_PERMISSIONS", { enumerable: true, get: function () { return enum_1.OAUTH_PERMISSIONS; } });
|
|
38
38
|
Object.defineProperty(exports, "ENVIRONMENT", { enumerable: true, get: function () { return enum_1.ENVIRONMENT; } });
|
|
39
39
|
Object.defineProperty(exports, "ROLES", { enumerable: true, get: function () { return enum_1.ROLES; } });
|
|
40
|
+
Object.defineProperty(exports, "PROJECT_STATUS", { enumerable: true, get: function () { return enum_1.PROJECT_STATUS; } });
|
|
40
41
|
const mongoose_1 = __importDefault(require("mongoose"));
|
|
41
42
|
const utils_1 = require("@brimble/utils");
|
|
42
43
|
// Connection to Mongo
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const installedIntegrationSchema = new mongoose_1.Schema({
|
|
5
|
+
user_id: {
|
|
6
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
7
|
+
ref: "User",
|
|
8
|
+
default: null,
|
|
9
|
+
required: false,
|
|
10
|
+
},
|
|
11
|
+
integration_id: {
|
|
12
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
13
|
+
ref: "Integration",
|
|
14
|
+
required: true,
|
|
15
|
+
},
|
|
16
|
+
enabled: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: true,
|
|
19
|
+
},
|
|
20
|
+
}, { timestamps: true });
|
|
21
|
+
exports.default = mongoose_1.model("InstalledIntegration", installedIntegrationSchema);
|
package/dist/types/index.d.ts
CHANGED
package/index.ts
CHANGED
|
@@ -18,6 +18,7 @@ export {
|
|
|
18
18
|
IToken,
|
|
19
19
|
IMember,
|
|
20
20
|
ITeam,
|
|
21
|
+
IInstalledIntegration,
|
|
21
22
|
} from "./types";
|
|
22
23
|
export {
|
|
23
24
|
GIT_TYPE,
|
|
@@ -25,6 +26,7 @@ export {
|
|
|
25
26
|
OAUTH_PERMISSIONS,
|
|
26
27
|
ENVIRONMENT,
|
|
27
28
|
ROLES,
|
|
29
|
+
PROJECT_STATUS,
|
|
28
30
|
} from "./enum";
|
|
29
31
|
|
|
30
32
|
import mongoose from "mongoose";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { model, Schema } from "mongoose";
|
|
2
|
+
import { IInstalledIntegration } from "./types";
|
|
3
|
+
|
|
4
|
+
const installedIntegrationSchema: Schema = new Schema(
|
|
5
|
+
{
|
|
6
|
+
user_id: {
|
|
7
|
+
type: Schema.Types.ObjectId,
|
|
8
|
+
ref: "User",
|
|
9
|
+
default: null,
|
|
10
|
+
required: false,
|
|
11
|
+
},
|
|
12
|
+
integration_id: {
|
|
13
|
+
type: Schema.Types.ObjectId,
|
|
14
|
+
ref: "Integration",
|
|
15
|
+
required: true,
|
|
16
|
+
},
|
|
17
|
+
enabled: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: true,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
{ timestamps: true },
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
export default model<IInstalledIntegration>("InstalledIntegration", installedIntegrationSchema);
|
package/package.json
CHANGED
package/types/index.ts
CHANGED