@rowengine/common 1.0.127 → 1.0.129
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/build/models/activity.model.d.ts +2 -2
- package/build/models/activity.model.js +4 -4
- package/build/models/company.model.d.ts +2 -2
- package/build/models/company.model.js +4 -4
- package/build/models/project.model.d.ts +2 -2
- package/build/models/project.model.js +4 -4
- package/build/models/refund.model.d.ts +2 -2
- package/build/models/refund.model.js +4 -4
- package/build/models/reload.model.d.ts +2 -2
- package/build/models/reload.model.js +4 -4
- package/build/models/user.model.d.ts +2 -2
- package/build/models/user.model.js +4 -4
- package/package.json +1 -1
|
@@ -21,5 +21,5 @@ type ActivityDoc = mongoose.Document & Activity;
|
|
|
21
21
|
interface ActivityModel extends mongoose.Model<ActivityDoc> {
|
|
22
22
|
build(attrs: ActivityAttrs): ActivityDoc;
|
|
23
23
|
}
|
|
24
|
-
declare const
|
|
25
|
-
export {
|
|
24
|
+
declare const ActivityModel: ActivityModel;
|
|
25
|
+
export { ActivityModel, ActivityDoc };
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.ActivityModel = void 0;
|
|
7
7
|
const mongoose_1 = __importDefault(require("mongoose"));
|
|
8
8
|
const interfaces_1 = require("../interfaces");
|
|
9
9
|
const activitySchema = new mongoose_1.default.Schema({
|
|
@@ -77,7 +77,7 @@ const autoPopulate = function (next) {
|
|
|
77
77
|
};
|
|
78
78
|
activitySchema.pre('findOne', autoPopulate).pre('find', autoPopulate);
|
|
79
79
|
activitySchema.statics.build = (attrs) => {
|
|
80
|
-
return new
|
|
80
|
+
return new ActivityModel(attrs);
|
|
81
81
|
};
|
|
82
|
-
const
|
|
83
|
-
exports.
|
|
82
|
+
const ActivityModel = mongoose_1.default.model('Activity', activitySchema);
|
|
83
|
+
exports.ActivityModel = ActivityModel;
|
|
@@ -11,5 +11,5 @@ type CompanyDoc = Company & mongoose.Document;
|
|
|
11
11
|
interface CompanyModel extends mongoose.Model<CompanyDoc> {
|
|
12
12
|
build(attrs: CompanyAttrs): CompanyDoc;
|
|
13
13
|
}
|
|
14
|
-
declare const
|
|
15
|
-
export {
|
|
14
|
+
declare const CompanyModel: CompanyModel;
|
|
15
|
+
export { CompanyModel, CompanyDoc };
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.CompanyModel = void 0;
|
|
7
7
|
const mongoose_1 = __importDefault(require("mongoose"));
|
|
8
8
|
const companySchema = new mongoose_1.default.Schema({
|
|
9
9
|
name: {
|
|
@@ -38,7 +38,7 @@ const companySchema = new mongoose_1.default.Schema({
|
|
|
38
38
|
},
|
|
39
39
|
});
|
|
40
40
|
companySchema.statics.build = (attrs) => {
|
|
41
|
-
return new
|
|
41
|
+
return new CompanyModel(attrs);
|
|
42
42
|
};
|
|
43
|
-
const
|
|
44
|
-
exports.
|
|
43
|
+
const CompanyModel = mongoose_1.default.model('Company', companySchema);
|
|
44
|
+
exports.CompanyModel = CompanyModel;
|
|
@@ -21,5 +21,5 @@ type ProjectDoc = mongoose.Document & Project;
|
|
|
21
21
|
interface ProjectModel extends mongoose.Model<ProjectDoc> {
|
|
22
22
|
build(attrs: ProjectAttrs): ProjectDoc;
|
|
23
23
|
}
|
|
24
|
-
declare const
|
|
25
|
-
export {
|
|
24
|
+
declare const ProjectModel: ProjectModel;
|
|
25
|
+
export { ProjectModel, ProjectDoc };
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.ProjectModel = void 0;
|
|
7
7
|
const mongoose_1 = __importDefault(require("mongoose"));
|
|
8
8
|
const interfaces_1 = require("../interfaces");
|
|
9
9
|
const projectSchema = new mongoose_1.default.Schema({
|
|
@@ -128,7 +128,7 @@ projectSchema.pre('findOne', autoPopulateOne);
|
|
|
128
128
|
projectSchema.pre('find', autoPopulateAll);
|
|
129
129
|
// Pass the ts interface.
|
|
130
130
|
projectSchema.statics.build = (attrs) => {
|
|
131
|
-
return new
|
|
131
|
+
return new ProjectModel(attrs);
|
|
132
132
|
};
|
|
133
|
-
const
|
|
134
|
-
exports.
|
|
133
|
+
const ProjectModel = mongoose_1.default.model('Project', projectSchema);
|
|
134
|
+
exports.ProjectModel = ProjectModel;
|
|
@@ -14,5 +14,5 @@ type RefundDoc = mongoose.Document & Refund;
|
|
|
14
14
|
interface RefundModel extends mongoose.Model<RefundDoc> {
|
|
15
15
|
build(attrs: RefundAttrs): RefundDoc;
|
|
16
16
|
}
|
|
17
|
-
declare const
|
|
18
|
-
export {
|
|
17
|
+
declare const RefundModel: RefundModel;
|
|
18
|
+
export { RefundModel };
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.RefundModel = void 0;
|
|
7
7
|
const mongoose_1 = __importDefault(require("mongoose"));
|
|
8
8
|
const refundSchema = new mongoose_1.default.Schema({
|
|
9
9
|
company: {
|
|
@@ -35,7 +35,7 @@ const refundSchema = new mongoose_1.default.Schema({
|
|
|
35
35
|
},
|
|
36
36
|
});
|
|
37
37
|
refundSchema.statics.build = (attrs) => {
|
|
38
|
-
return new
|
|
38
|
+
return new RefundModel(attrs);
|
|
39
39
|
};
|
|
40
40
|
const autoPopulate = function (next) {
|
|
41
41
|
// @ts-ignore
|
|
@@ -43,5 +43,5 @@ const autoPopulate = function (next) {
|
|
|
43
43
|
next();
|
|
44
44
|
};
|
|
45
45
|
refundSchema.pre('findOne', autoPopulate).pre('find', autoPopulate);
|
|
46
|
-
const
|
|
47
|
-
exports.
|
|
46
|
+
const RefundModel = mongoose_1.default.model('Refund', refundSchema);
|
|
47
|
+
exports.RefundModel = RefundModel;
|
|
@@ -12,5 +12,5 @@ type ReloadDoc = mongoose.Document & Reload;
|
|
|
12
12
|
interface ReloadModel extends mongoose.Model<ReloadDoc> {
|
|
13
13
|
build(attrs: ReloadAttrs): ReloadDoc;
|
|
14
14
|
}
|
|
15
|
-
declare const
|
|
16
|
-
export {
|
|
15
|
+
declare const ReloadModel: ReloadModel;
|
|
16
|
+
export { ReloadModel, ReloadDoc };
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.ReloadModel = void 0;
|
|
7
7
|
const mongoose_1 = __importDefault(require("mongoose"));
|
|
8
8
|
const reloadSchema = new mongoose_1.default.Schema({
|
|
9
9
|
company: {
|
|
@@ -37,7 +37,7 @@ const reloadSchema = new mongoose_1.default.Schema({
|
|
|
37
37
|
},
|
|
38
38
|
});
|
|
39
39
|
reloadSchema.statics.build = (attrs) => {
|
|
40
|
-
return new
|
|
40
|
+
return new ReloadModel(attrs);
|
|
41
41
|
};
|
|
42
42
|
const autoPopulate = function (next) {
|
|
43
43
|
// @ts-ignore
|
|
@@ -45,5 +45,5 @@ const autoPopulate = function (next) {
|
|
|
45
45
|
next();
|
|
46
46
|
};
|
|
47
47
|
reloadSchema.pre('find', autoPopulate).pre('findOne', autoPopulate);
|
|
48
|
-
const
|
|
49
|
-
exports.
|
|
48
|
+
const ReloadModel = mongoose_1.default.model('Reload', reloadSchema);
|
|
49
|
+
exports.ReloadModel = ReloadModel;
|
|
@@ -15,5 +15,5 @@ type UserDoc = User & mongoose.Document;
|
|
|
15
15
|
interface UserModel extends mongoose.Model<UserDoc> {
|
|
16
16
|
build(attrs: UserAttrs): UserDoc;
|
|
17
17
|
}
|
|
18
|
-
declare const
|
|
19
|
-
export {
|
|
18
|
+
declare const UserModel: UserModel;
|
|
19
|
+
export { UserModel, UserDoc, UserLevel };
|
|
@@ -45,7 +45,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
45
45
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.UserLevel = exports.
|
|
48
|
+
exports.UserLevel = exports.UserModel = void 0;
|
|
49
49
|
const mongoose_1 = __importStar(require("mongoose"));
|
|
50
50
|
const bcrypt_1 = __importDefault(require("bcrypt"));
|
|
51
51
|
const interfaces_1 = require("../interfaces");
|
|
@@ -113,7 +113,7 @@ userSchema.pre('save', function (done) {
|
|
|
113
113
|
});
|
|
114
114
|
// Create function to pass ts interface.
|
|
115
115
|
userSchema.statics.build = (attrs) => {
|
|
116
|
-
return new
|
|
116
|
+
return new UserModel(attrs);
|
|
117
117
|
};
|
|
118
|
-
const
|
|
119
|
-
exports.
|
|
118
|
+
const UserModel = mongoose_1.default.model('User', userSchema);
|
|
119
|
+
exports.UserModel = UserModel;
|