@brimble/models 1.3.23 → 1.3.24
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 +2 -1
- package/dist/index.js +2 -0
- package/dist/invitation.d.ts +4 -0
- package/dist/invitation.js +20 -0
- package/dist/team.js +6 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/invitation.d.ts +6 -0
- package/dist/types/invitation.js +2 -0
- package/dist/types/team.d.ts +2 -1
- package/index.ts +2 -0
- package/invitation.ts +24 -0
- package/package.json +1 -1
- package/team.ts +6 -0
- package/types/index.ts +1 -0
- package/types/invitation.ts +7 -0
- package/types/team.ts +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,8 @@ 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 {
|
|
10
|
+
export { default as Invitation } from "./invitation";
|
|
11
|
+
export { IUser, IGit, IProject, IFollowing, IIntegration, IEnv, IDomain, IToken, IMember, ITeam, IInvitation, } from "./types";
|
|
11
12
|
export { GIT_TYPE, INTEGRATION_TYPE, OAUTH_PERMISSIONS, ENVIRONMENT, ROLES, } from "./enum";
|
|
12
13
|
export declare const connectToMongo: (mongoUrl: string) => Promise<void>;
|
|
13
14
|
export declare const closeMongo: () => void;
|
package/dist/index.js
CHANGED
|
@@ -31,6 +31,8 @@ var team_1 = require("./team");
|
|
|
31
31
|
Object.defineProperty(exports, "Team", { enumerable: true, get: function () { return team_1.default; } });
|
|
32
32
|
var member_1 = require("./member");
|
|
33
33
|
Object.defineProperty(exports, "Member", { enumerable: true, get: function () { return member_1.default; } });
|
|
34
|
+
var invitation_1 = require("./invitation");
|
|
35
|
+
Object.defineProperty(exports, "Invitation", { enumerable: true, get: function () { return invitation_1.default; } });
|
|
34
36
|
var enum_1 = require("./enum");
|
|
35
37
|
Object.defineProperty(exports, "GIT_TYPE", { enumerable: true, get: function () { return enum_1.GIT_TYPE; } });
|
|
36
38
|
Object.defineProperty(exports, "INTEGRATION_TYPE", { enumerable: true, get: function () { return enum_1.INTEGRATION_TYPE; } });
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
}, {
|
|
18
|
+
timestamps: true,
|
|
19
|
+
});
|
|
20
|
+
exports.default = mongoose_1.model("Invitation", invitationSchema);
|
package/dist/team.js
CHANGED
package/dist/types/index.d.ts
CHANGED
package/dist/types/team.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { IMember, IProject } from "./";
|
|
1
|
+
import { IMember, IProject, IInvitation } from "./";
|
|
2
2
|
export interface ITeam extends Document {
|
|
3
3
|
name: string;
|
|
4
4
|
description: string;
|
|
5
5
|
members: Array<IMember>;
|
|
6
6
|
projects: Array<IProject>;
|
|
7
|
+
invitations: Array<IInvitation>;
|
|
7
8
|
avatar: string;
|
|
8
9
|
}
|
package/index.ts
CHANGED
|
@@ -7,6 +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 { default as Invitation } from "./invitation";
|
|
10
11
|
export {
|
|
11
12
|
IUser,
|
|
12
13
|
IGit,
|
|
@@ -18,6 +19,7 @@ export {
|
|
|
18
19
|
IToken,
|
|
19
20
|
IMember,
|
|
20
21
|
ITeam,
|
|
22
|
+
IInvitation,
|
|
21
23
|
} from "./types";
|
|
22
24
|
export {
|
|
23
25
|
GIT_TYPE,
|
package/invitation.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { model, Schema } from "mongoose";
|
|
2
|
+
import { IInvitation } from "./types";
|
|
3
|
+
|
|
4
|
+
const invitationSchema: Schema = new Schema(
|
|
5
|
+
{
|
|
6
|
+
email: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
},
|
|
10
|
+
team: {
|
|
11
|
+
type: Schema.Types.ObjectId,
|
|
12
|
+
ref: "Team",
|
|
13
|
+
},
|
|
14
|
+
accepted: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
timestamps: true,
|
|
21
|
+
},
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
export default model<IInvitation>("Invitation", invitationSchema);
|
package/package.json
CHANGED
package/team.ts
CHANGED
package/types/index.ts
CHANGED
package/types/team.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { IMember, IProject } from "./";
|
|
1
|
+
import { IMember, IProject, IInvitation } from "./";
|
|
2
2
|
|
|
3
3
|
export interface ITeam extends Document {
|
|
4
4
|
name: string;
|
|
5
5
|
description: string;
|
|
6
6
|
members: Array<IMember>;
|
|
7
7
|
projects: Array<IProject>;
|
|
8
|
+
invitations: Array<IInvitation>;
|
|
8
9
|
avatar: string;
|
|
9
10
|
}
|