@lenne.tech/nest-server 8.3.0 → 8.5.0
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/core/common/decorators/restricted.decorator.d.ts +12 -5
- package/dist/core/common/decorators/restricted.decorator.js +91 -29
- package/dist/core/common/decorators/restricted.decorator.js.map +1 -1
- package/dist/core/common/enums/process-type.enum.d.ts +4 -0
- package/dist/core/common/enums/process-type.enum.js +9 -0
- package/dist/core/common/enums/process-type.enum.js.map +1 -0
- package/dist/core/common/enums/role.enum.d.ts +1 -2
- package/dist/core/common/enums/role.enum.js +0 -1
- package/dist/core/common/enums/role.enum.js.map +1 -1
- package/dist/core/common/helpers/db.helper.d.ts +3 -3
- package/dist/core/common/helpers/db.helper.js +25 -25
- package/dist/core/common/helpers/db.helper.js.map +1 -1
- package/dist/core/common/helpers/input.helper.d.ts +6 -5
- package/dist/core/common/helpers/input.helper.js +4 -15
- package/dist/core/common/helpers/input.helper.js.map +1 -1
- package/dist/core/common/helpers/service.helper.d.ts +1 -0
- package/dist/core/common/helpers/service.helper.js +18 -2
- package/dist/core/common/helpers/service.helper.js.map +1 -1
- package/dist/core/common/interfaces/service-options.interface.d.ts +1 -3
- package/dist/core/common/models/core-persistence.model.d.ts +0 -1
- package/dist/core/common/models/core-persistence.model.js +0 -10
- package/dist/core/common/models/core-persistence.model.js.map +1 -1
- package/dist/core/common/services/module.service.d.ts +3 -3
- package/dist/core/common/services/module.service.js +27 -26
- package/dist/core/common/services/module.service.js.map +1 -1
- package/dist/core/common/types/require-only-one.type.d.ts +3 -0
- package/dist/core/common/types/require-only-one.type.js +3 -0
- package/dist/core/common/types/require-only-one.type.js.map +1 -0
- package/dist/core/common/types/required-at-least-one.type.d.ts +3 -0
- package/dist/core/common/types/required-at-least-one.type.js +3 -0
- package/dist/core/common/types/required-at-least-one.type.js.map +1 -0
- package/dist/core.module.js +0 -5
- package/dist/core.module.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/server/modules/user/user.model.d.ts +1 -1
- package/dist/server/modules/user/user.model.js +1 -1
- package/dist/server/modules/user/user.model.js.map +1 -1
- package/dist/server/modules/user/user.service.js +1 -1
- package/dist/server/modules/user/user.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/core/common/decorators/restricted.decorator.ts +150 -53
- package/src/core/common/enums/process-type.enum.ts +7 -0
- package/src/core/common/enums/role.enum.ts +6 -9
- package/src/core/common/helpers/db.helper.ts +43 -51
- package/src/core/common/helpers/input.helper.ts +24 -15
- package/src/core/common/helpers/service.helper.ts +17 -2
- package/src/core/common/interfaces/service-options.interface.ts +4 -8
- package/src/core/common/models/core-persistence.model.ts +0 -11
- package/src/core/common/services/module.service.ts +32 -31
- package/src/core/common/types/require-only-one.type.ts +6 -0
- package/src/core/common/types/required-at-least-one.type.ts +6 -0
- package/src/core.module.ts +1 -19
- package/src/index.ts +3 -0
- package/src/server/modules/user/user.model.ts +2 -2
- package/src/server/modules/user/user.service.ts +3 -3
|
@@ -20,7 +20,6 @@ let CorePersistenceModel = class CorePersistenceModel extends core_model_model_1
|
|
|
20
20
|
this.id = undefined;
|
|
21
21
|
this.createdAt = undefined;
|
|
22
22
|
this.labels = undefined;
|
|
23
|
-
this.ownerIds = undefined;
|
|
24
23
|
this.tags = undefined;
|
|
25
24
|
this.updatedAt = undefined;
|
|
26
25
|
}
|
|
@@ -31,7 +30,6 @@ let CorePersistenceModel = class CorePersistenceModel extends core_model_model_1
|
|
|
31
30
|
super.init();
|
|
32
31
|
this.createdAt = this.createdAt === undefined ? new Date() : this.createdAt;
|
|
33
32
|
this.labels = this.labels === undefined ? [] : this.labels;
|
|
34
|
-
this.ownerIds = this.ownerIds === undefined ? [] : this.ownerIds;
|
|
35
33
|
this.tags = this.tags === undefined ? [] : this.tags;
|
|
36
34
|
this.updatedAt = this.tags === undefined ? this.createdAt : this.updatedAt;
|
|
37
35
|
return this;
|
|
@@ -57,14 +55,6 @@ __decorate([
|
|
|
57
55
|
(0, mongoose_1.Prop)([String]),
|
|
58
56
|
__metadata("design:type", Array)
|
|
59
57
|
], CorePersistenceModel.prototype, "labels", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, graphql_1.Field)((type) => [String], {
|
|
62
|
-
description: 'Users who own the object',
|
|
63
|
-
nullable: true,
|
|
64
|
-
}),
|
|
65
|
-
(0, mongoose_1.Prop)([String]),
|
|
66
|
-
__metadata("design:type", Array)
|
|
67
|
-
], CorePersistenceModel.prototype, "ownerIds", void 0);
|
|
68
58
|
__decorate([
|
|
69
59
|
(0, graphql_1.Field)((type) => [String], {
|
|
70
60
|
description: 'Tags for the object',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-persistence.model.js","sourceRoot":"","sources":["../../../../src/core/common/models/core-persistence.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAwD;AACxD,+CAAgD;AAChD,uCAAiC;AACjC,yDAA+C;AAmB/C,IAAsB,oBAAoB,GAA1C,MAAsB,oBAAqB,SAAQ,4BAAS;IAA5D;;QAoBE,OAAE,GAAW,SAAS,CAAC;QAOvB,cAAS,GAAS,SAAS,CAAC;QAU5B,WAAM,GAAa,SAAS,CAAC;QAU7B,
|
|
1
|
+
{"version":3,"file":"core-persistence.model.js","sourceRoot":"","sources":["../../../../src/core/common/models/core-persistence.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAwD;AACxD,+CAAgD;AAChD,uCAAiC;AACjC,yDAA+C;AAmB/C,IAAsB,oBAAoB,GAA1C,MAAsB,oBAAqB,SAAQ,4BAAS;IAA5D;;QAoBE,OAAE,GAAW,SAAS,CAAC;QAOvB,cAAS,GAAS,SAAS,CAAC;QAU5B,WAAM,GAAa,SAAS,CAAC;QAU7B,SAAI,GAAa,SAAS,CAAC;QAO3B,cAAS,GAAS,SAAS,CAAC;IAiB9B,CA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IACD,IAAA,eAAI,EAAC,CAAC,MAAM,CAAC,CAAC;;oDACc;AAU7B;IALC,IAAA,eAAK,EAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE;QACzB,WAAW,EAAE,qBAAqB;QAClC,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,eAAI,EAAC,CAAC,MAAM,CAAC,CAAC;;kDACY;AAO3B;IAFC,IAAA,eAAK,EAAC,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACtD,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;8BAC1B,IAAI;uDAAa;AAtDR,oBAAoB;IALzC,IAAA,oBAAU,EAAC;QACV,WAAW,EAAE,6CAA6C;QAC1D,UAAU,EAAE,IAAI;KACjB,CAAC;IACD,IAAA,iBAAM,EAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;GACP,oBAAoB,CAuEzC;AAvEqB,oDAAoB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Document, Model, Types } from 'mongoose';
|
|
2
|
+
import { ProcessType } from '../enums/process-type.enum';
|
|
2
3
|
import { ServiceOptions } from '../interfaces/service-options.interface';
|
|
3
4
|
import { CoreModel } from '../models/core-model.model';
|
|
4
5
|
import { FieldSelection } from '../types/field-selection.type';
|
|
5
|
-
import { IdsType } from '../types/ids.type';
|
|
6
6
|
export declare abstract class ModuleService<T extends CoreModel = any> {
|
|
7
7
|
protected mainModelConstructor: new (...args: any[]) => T;
|
|
8
8
|
protected mainDbModel: Model<T & Document>;
|
|
@@ -14,9 +14,9 @@ export declare abstract class ModuleService<T extends CoreModel = any> {
|
|
|
14
14
|
id: any;
|
|
15
15
|
hasRole: (roles: string[]) => boolean;
|
|
16
16
|
}, options?: {
|
|
17
|
-
|
|
17
|
+
dbObject?: any;
|
|
18
18
|
metatype?: any;
|
|
19
|
-
|
|
19
|
+
processType?: ProcessType;
|
|
20
20
|
roles?: string | string[];
|
|
21
21
|
throwError?: boolean;
|
|
22
22
|
}): Promise<any>;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ModuleService = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
|
+
const process_type_enum_1 = require("../enums/process-type.enum");
|
|
5
6
|
const db_helper_1 = require("../helpers/db.helper");
|
|
6
7
|
const input_helper_1 = require("../helpers/input.helper");
|
|
7
8
|
const service_helper_1 = require("../helpers/service.helper");
|
|
@@ -15,33 +16,26 @@ class ModuleService {
|
|
|
15
16
|
return (0, input_helper_1.check)(input, currentUser, config);
|
|
16
17
|
}
|
|
17
18
|
async process(serviceFunc, options) {
|
|
18
|
-
var _a, _b, _c;
|
|
19
19
|
const config = Object.assign({ checkRights: true, dbObject: options === null || options === void 0 ? void 0 : options.dbObject, input: options === null || options === void 0 ? void 0 : options.input, processFieldSelection: {}, prepareInput: {}, prepareOutput: {}, pubSub: true }, options === null || options === void 0 ? void 0 : options.serviceOptions);
|
|
20
20
|
if (config.prepareInput && this.prepareInput) {
|
|
21
|
-
|
|
21
|
+
const opts = config.prepareInput;
|
|
22
|
+
if (!opts.targetModel && config.inputType) {
|
|
23
|
+
opts.targetModel = config.inputType;
|
|
24
|
+
}
|
|
25
|
+
await this.prepareInput(config.input, opts);
|
|
22
26
|
}
|
|
23
|
-
|
|
24
|
-
if (config.dbObject) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
config.dbObject = dbObject;
|
|
29
|
-
}
|
|
27
|
+
if (config.dbObject && config.checkRights && this.checkRights) {
|
|
28
|
+
if (typeof config.dbObject === 'string' || config.dbObject instanceof mongoose_1.Types.ObjectId) {
|
|
29
|
+
const dbObject = await this.get((0, db_helper_1.getStringIds)(config.dbObject));
|
|
30
|
+
if (dbObject) {
|
|
31
|
+
config.dbObject = dbObject;
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
|
-
return config.dbObject;
|
|
33
|
-
};
|
|
34
|
-
let ownerIds = undefined;
|
|
35
|
-
if (config.checkRights && this.checkRights) {
|
|
36
|
-
ownerIds = (0, db_helper_1.getStringIds)(config.ownerIds);
|
|
37
|
-
if (!(ownerIds === null || ownerIds === void 0 ? void 0 : ownerIds.length)) {
|
|
38
|
-
ownerIds = (_a = (await getDbObject())) === null || _a === void 0 ? void 0 : _a.ownerIds;
|
|
39
|
-
}
|
|
40
34
|
}
|
|
41
35
|
if (config.input && config.checkRights && this.checkRights) {
|
|
42
|
-
const opts = {
|
|
36
|
+
const opts = { dbObject: config.dbObject, processType: process_type_enum_1.ProcessType.INPUT, roles: config.roles };
|
|
43
37
|
if (config.inputType) {
|
|
44
|
-
opts.metatype = config.
|
|
38
|
+
opts.metatype = config.inputType;
|
|
45
39
|
}
|
|
46
40
|
config.input = await this.checkRights(config.input, config.currentUser, opts);
|
|
47
41
|
}
|
|
@@ -50,22 +44,29 @@ class ModuleService {
|
|
|
50
44
|
await this.processFieldSelection(result, config.fieldSelection, config.processFieldSelection);
|
|
51
45
|
}
|
|
52
46
|
if (config.prepareOutput && this.prepareOutput) {
|
|
53
|
-
|
|
54
|
-
|
|
47
|
+
const opts = config.prepareOutput;
|
|
48
|
+
if (!opts.targetModel && config.outputType) {
|
|
49
|
+
opts.targetModel = config.outputType;
|
|
55
50
|
}
|
|
56
|
-
result = await this.prepareOutput(result,
|
|
51
|
+
result = await this.prepareOutput(result, opts);
|
|
57
52
|
}
|
|
58
53
|
if (config.checkRights && this.checkRights) {
|
|
59
|
-
const opts = {
|
|
60
|
-
|
|
61
|
-
|
|
54
|
+
const opts = {
|
|
55
|
+
dbObject: config.dbObject,
|
|
56
|
+
processType: process_type_enum_1.ProcessType.OUTPUT,
|
|
57
|
+
roles: config.roles,
|
|
58
|
+
throwError: false,
|
|
59
|
+
};
|
|
60
|
+
if (config.outputType) {
|
|
61
|
+
opts.metatype = config.outputType;
|
|
62
62
|
}
|
|
63
63
|
result = await this.checkRights(result, config.currentUser, opts);
|
|
64
64
|
}
|
|
65
65
|
return result;
|
|
66
66
|
}
|
|
67
67
|
async prepareInput(input, options = {}) {
|
|
68
|
-
|
|
68
|
+
const config = Object.assign({ targetModel: this.mainModelConstructor }, options === null || options === void 0 ? void 0 : options.prepareInput);
|
|
69
|
+
return (0, service_helper_1.prepareInput)(input, options.currentUser, config);
|
|
69
70
|
}
|
|
70
71
|
async prepareOutput(output, options = {}) {
|
|
71
72
|
const config = Object.assign({ targetModel: this.mainModelConstructor }, options === null || options === void 0 ? void 0 : options.prepareOutput);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.service.js","sourceRoot":"","sources":["../../../../src/core/common/services/module.service.ts"],"names":[],"mappings":";;;AAAA,uCAAkD;AAClD,oDAA+D;AAC/D,0DAAgD;AAChD,8DAAwE;
|
|
1
|
+
{"version":3,"file":"module.service.js","sourceRoot":"","sources":["../../../../src/core/common/services/module.service.ts"],"names":[],"mappings":";;;AAAA,uCAAkD;AAClD,kEAAyD;AACzD,oDAA+D;AAC/D,0DAAgD;AAChD,8DAAwE;AAQxE,MAAsB,aAAa;IAcjC,YAAsB,OAGrB;QACC,IAAI,CAAC,WAAW,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,CAAC;QACxC,IAAI,CAAC,oBAAoB,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,oBAAoB,CAAC;IAC5D,CAAC;IAKD,WAAW,CACT,KAAU,EACV,WAA+D,EAC/D,OAMC;QAED,MAAM,MAAM,mBACV,QAAQ,EAAE,IAAI,CAAC,oBAAoB,IAChC,OAAO,CACX,CAAC;QACF,OAAO,IAAA,oBAAK,EAAC,KAAK,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC;IAUD,KAAK,CAAC,OAAO,CACX,WAAoG,EACpG,OAKC;QAGD,MAAM,MAAM,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AC,MAAM,EAAE,MAAM,CAAC,WAAkB,EAAE,IAAI,CAAC,CAAC;SAC1E;QAGD,OAAO,MAAM,CAAC;IAChB,CAAC;IAKD,KAAK,CAAC,YAAY,CAAC,KAA0B,EAAE,UAA0B,EAAE;QACzE,MAAM,MAAM,mBACV,WAAW,EAAE,IAAI,CAAC,oBAAoB,IACnC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,CACzB,CAAC;QACF,OAAO,IAAA,6BAAY,EAAC,KAAK,EAAE,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAC1D,CAAC;IAKD,KAAK,CAAC,aAAa,CAAC,MAAW,EAAE,UAA0B,EAAE;QAC3D,MAAM,MAAM,mBACV,WAAW,EAAE,IAAI,CAAC,oBAAoB,IACnC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,CAC1B,CAAC;QACF,OAAO,IAAA,8BAAa,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;IAMD,KAAK,CAAC,qBAAqB,CACzB,IAAS,EACT,eAA+B,EAC/B,UAGI,EAAE;QAEN,MAAM,MAAM,mBACV,KAAK,EAAE,IAAI,CAAC,oBAAoB,EAChC,OAAO,EAAE,IAAI,CAAC,WAAW,IACtB,OAAO,CACX,CAAC;QACF,OAAO,IAAA,qBAAS,EAAC,IAAI,EAAE,eAAe,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACxE,CAAC;CACF;AAhLD,sCAgLC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require-only-one.type.js","sourceRoot":"","sources":["../../../../src/core/common/types/require-only-one.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"required-at-least-one.type.js","sourceRoot":"","sources":["../../../../src/core/common/types/required-at-least-one.type.ts"],"names":[],"mappings":""}
|
package/dist/core.module.js
CHANGED
|
@@ -12,7 +12,6 @@ const common_1 = require("@nestjs/common");
|
|
|
12
12
|
const core_1 = require("@nestjs/core");
|
|
13
13
|
const graphql_1 = require("@nestjs/graphql");
|
|
14
14
|
const config_helper_1 = require("./core/common/helpers/config.helper");
|
|
15
|
-
const check_response_interceptor_1 = require("./core/common/interceptors/check-response.interceptor");
|
|
16
15
|
const map_and_validate_pipe_1 = require("./core/common/pipes/map-and-validate.pipe");
|
|
17
16
|
const config_service_1 = require("./core/common/services/config.service");
|
|
18
17
|
const email_service_1 = require("./core/common/services/email.service");
|
|
@@ -71,10 +70,6 @@ let CoreModule = CoreModule_1 = class CoreModule {
|
|
|
71
70
|
provide: config_service_1.ConfigService,
|
|
72
71
|
useValue: new config_service_1.ConfigService(config),
|
|
73
72
|
},
|
|
74
|
-
{
|
|
75
|
-
provide: core_1.APP_INTERCEPTOR,
|
|
76
|
-
useClass: check_response_interceptor_1.CheckResponseInterceptor,
|
|
77
|
-
},
|
|
78
73
|
{
|
|
79
74
|
provide: core_1.APP_PIPE,
|
|
80
75
|
useClass: map_and_validate_pipe_1.MapAndValidatePipe,
|
package/dist/core.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.module.js","sourceRoot":"","sources":["../src/core.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAsF;AACtF,
|
|
1
|
+
{"version":3,"file":"core.module.js","sourceRoot":"","sources":["../src/core.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAsF;AACtF,uCAAwC;AACxC,6CAAgD;AAChD,uEAA4D;AAE5D,qFAA+E;AAC/E,0EAAsE;AACtE,wEAAoE;AACpE,8EAA0E;AAC1E,+CAAkD;AAClD,4EAAwE;AACxE,2CAAkE;AAiBlE,IAAa,UAAU,kBAAvB,MAAa,UAAU;IAKrB,MAAM,CAAC,OAAO,CAAC,WAAgB,EAAE,UAAe,EAAE,OAAgC;QAEhF,MAAM,MAAM,GAAmB,IAAA,qBAAK,EAClC;YACE,GAAG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,UAAU,EAAE,EAAE;wBAEhC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,0CAA0C,CAAC,CAAC,CAAC;wBACvE,OAAO,UAAU,CAAC;oBACpB,CAAC;iBACF;aACF;SACgB,EACnB,OAAO,CACR,CAAC;QAGF,MAAM,SAAS,GAAG;YAEhB;gBACE,OAAO,EAAE,8BAAa;gBACtB,QAAQ,EAAE,IAAI,8BAAa,CAAC,MAAM,CAAC;aACpC;YAGD;gBACE,OAAO,EAAE,eAAQ;gBACjB,QAAQ,EAAE,0CAAkB;aAC7B;YAGD,4BAAY;YACZ,kCAAe;YACf,gCAAc;SACf,CAAC;QAGF,OAAO;YACL,MAAM,EAAE,YAAU;YAClB,OAAO,EAAE;gBACP,yBAAc,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC;gBACpE,uBAAa,CAAC,YAAY,CAAqB,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,qBAAY,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;aAC/G;YACD,SAAS;YACT,OAAO,EAAE,CAAC,8BAAa,EAAE,4BAAY,EAAE,kCAAe,EAAE,gCAAc,CAAC;SACxE,CAAC;IACJ,CAAC;CACF,CAAA;AA7FY,UAAU;IAFtB,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,UAAU,CA6FtB;AA7FY,gCAAU"}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './core/common/decorators/restricted.decorator';
|
|
|
7
7
|
export * from './core/common/decorators/roles.decorator';
|
|
8
8
|
export * from './core/common/enums/comparison-operator.enum';
|
|
9
9
|
export * from './core/common/enums/logical-operator.enum';
|
|
10
|
+
export * from './core/common/enums/process-type.enum';
|
|
10
11
|
export * from './core/common/enums/role.enum';
|
|
11
12
|
export * from './core/common/enums/sort-order.emum';
|
|
12
13
|
export * from './core/common/helpers/config.helper';
|
|
@@ -46,6 +47,8 @@ export * from './core/common/types/core-model-constructor.type';
|
|
|
46
47
|
export * from './core/common/types/field-selection.type';
|
|
47
48
|
export * from './core/common/types/ids.type';
|
|
48
49
|
export * from './core/common/types/plain-input.type';
|
|
50
|
+
export * from './core/common/types/require-only-one.type';
|
|
51
|
+
export * from './core/common/types/required-at-least-one.type';
|
|
49
52
|
export * from './core/common/types/string-or-object-id.type';
|
|
50
53
|
export * from './core/modules/auth/guards/auth.guard';
|
|
51
54
|
export * from './core/modules/auth/guards/roles.guard';
|
package/dist/index.js
CHANGED
|
@@ -23,6 +23,7 @@ __exportStar(require("./core/common/decorators/restricted.decorator"), exports);
|
|
|
23
23
|
__exportStar(require("./core/common/decorators/roles.decorator"), exports);
|
|
24
24
|
__exportStar(require("./core/common/enums/comparison-operator.enum"), exports);
|
|
25
25
|
__exportStar(require("./core/common/enums/logical-operator.enum"), exports);
|
|
26
|
+
__exportStar(require("./core/common/enums/process-type.enum"), exports);
|
|
26
27
|
__exportStar(require("./core/common/enums/role.enum"), exports);
|
|
27
28
|
__exportStar(require("./core/common/enums/sort-order.emum"), exports);
|
|
28
29
|
__exportStar(require("./core/common/helpers/config.helper"), exports);
|
|
@@ -62,6 +63,8 @@ __exportStar(require("./core/common/types/core-model-constructor.type"), exports
|
|
|
62
63
|
__exportStar(require("./core/common/types/field-selection.type"), exports);
|
|
63
64
|
__exportStar(require("./core/common/types/ids.type"), exports);
|
|
64
65
|
__exportStar(require("./core/common/types/plain-input.type"), exports);
|
|
66
|
+
__exportStar(require("./core/common/types/require-only-one.type"), exports);
|
|
67
|
+
__exportStar(require("./core/common/types/required-at-least-one.type"), exports);
|
|
65
68
|
__exportStar(require("./core/common/types/string-or-object-id.type"), exports);
|
|
66
69
|
__exportStar(require("./core/modules/auth/guards/auth.guard"), exports);
|
|
67
70
|
__exportStar(require("./core/modules/auth/guards/roles.guard"), exports);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAIA,gDAA8B;AAK9B,iEAA+C;AAC/C,qEAAmD;AACnD,kFAAgE;AAChE,+EAA6D;AAC7D,gFAA8D;AAC9D,2EAAyD;AACzD,+EAA6D;AAC7D,4EAA0D;AAC1D,gEAA8C;AAC9C,sEAAoD;AACpD,sEAAoD;AACpD,uEAAqD;AACrD,kEAAgD;AAChD,oEAAkD;AAClD,sEAAoD;AACpD,uEAAqD;AACrD,qEAAmD;AACnD,qEAAmD;AACnD,uEAAqD;AACrD,6EAA2D;AAC3D,wEAAsD;AACtD,oEAAkD;AAClD,2EAAyD;AACzD,kEAAgD;AAChD,wFAAsE;AACtE,4FAA0E;AAC1E,qFAAmE;AACnE,sFAAoE;AACpE,oFAAkE;AAClE,qFAAmE;AACnE,wEAAsD;AACtD,8EAA4D;AAC5D,uEAAqD;AACrD,4EAA0D;AAC1D,mEAAiD;AACjD,oEAAkD;AAClD,oEAAkD;AAClD,wEAAsD;AACtD,sEAAoD;AACpD,uEAAqD;AACrD,yEAAuD;AACvD,wEAAsD;AACtD,0EAAwD;AACxD,kFAAgE;AAChE,2EAAyD;AACzD,+DAA6C;AAC7C,uEAAqD;AACrD,+EAA6D;AAM7D,wEAAsD;AACtD,yEAAuD;AACvD,0FAAwE;AACxE,uFAAqE;AACrE,iFAA+D;AAC/D,sFAAoE;AACpE,sEAAoD;AACpD,uEAAqD;AACrD,yEAAuD;AACvD,mEAAiD;AAMjD,6EAA2D;AAC3D,oFAAkE;AAClE,sEAAoD;AACpD,wEAAsD;AAMtD,qDAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAIA,gDAA8B;AAK9B,iEAA+C;AAC/C,qEAAmD;AACnD,kFAAgE;AAChE,+EAA6D;AAC7D,gFAA8D;AAC9D,2EAAyD;AACzD,+EAA6D;AAC7D,4EAA0D;AAC1D,wEAAsD;AACtD,gEAA8C;AAC9C,sEAAoD;AACpD,sEAAoD;AACpD,uEAAqD;AACrD,kEAAgD;AAChD,oEAAkD;AAClD,sEAAoD;AACpD,uEAAqD;AACrD,qEAAmD;AACnD,qEAAmD;AACnD,uEAAqD;AACrD,6EAA2D;AAC3D,wEAAsD;AACtD,oEAAkD;AAClD,2EAAyD;AACzD,kEAAgD;AAChD,wFAAsE;AACtE,4FAA0E;AAC1E,qFAAmE;AACnE,sFAAoE;AACpE,oFAAkE;AAClE,qFAAmE;AACnE,wEAAsD;AACtD,8EAA4D;AAC5D,uEAAqD;AACrD,4EAA0D;AAC1D,mEAAiD;AACjD,oEAAkD;AAClD,oEAAkD;AAClD,wEAAsD;AACtD,sEAAoD;AACpD,uEAAqD;AACrD,yEAAuD;AACvD,wEAAsD;AACtD,0EAAwD;AACxD,kFAAgE;AAChE,2EAAyD;AACzD,+DAA6C;AAC7C,uEAAqD;AACrD,4EAA0D;AAC1D,iFAA+D;AAC/D,+EAA6D;AAM7D,wEAAsD;AACtD,yEAAuD;AACvD,0FAAwE;AACxE,uFAAqE;AACrE,iFAA+D;AAC/D,sFAAoE;AACpE,sEAAoD;AACpD,uEAAqD;AACrD,yEAAuD;AACvD,mEAAiD;AAMjD,6EAA2D;AAC3D,oFAAkE;AAClE,sEAAoD;AACpD,wEAAsD;AAMtD,qDAAmC"}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
/// <reference types="mongoose/types/mongooseoptions" />
|
|
7
7
|
/// <reference types="mongoose/types/pipelinestage" />
|
|
8
8
|
/// <reference types="mongoose/types/schemaoptions" />
|
|
9
|
+
import { Document, Schema } from 'mongoose';
|
|
9
10
|
import { CoreUserModel } from '../../../core/modules/user/core-user.model';
|
|
10
11
|
import { PersistenceModel } from '../../common/models/persistence.model';
|
|
11
|
-
import { Schema, Document } from 'mongoose';
|
|
12
12
|
export declare type UserDocument = User & Document;
|
|
13
13
|
export declare class User extends CoreUserModel implements PersistenceModel {
|
|
14
14
|
avatar: string;
|
|
@@ -12,9 +12,9 @@ var User_1;
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.UserSchema = exports.User = void 0;
|
|
14
14
|
const graphql_1 = require("@nestjs/graphql");
|
|
15
|
-
const core_user_model_1 = require("../../../core/modules/user/core-user.model");
|
|
16
15
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
17
16
|
const mongoose_2 = require("mongoose");
|
|
17
|
+
const core_user_model_1 = require("../../../core/modules/user/core-user.model");
|
|
18
18
|
let User = User_1 = class User extends core_user_model_1.CoreUserModel {
|
|
19
19
|
constructor() {
|
|
20
20
|
super(...arguments);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.model.js","sourceRoot":"","sources":["../../../../src/server/modules/user/user.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,6CAAoD;AACpD
|
|
1
|
+
{"version":3,"file":"user.model.js","sourceRoot":"","sources":["../../../../src/server/modules/user/user.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,6CAAoD;AACpD,+CAAiF;AACjF,uCAA4C;AAC5C,gFAA2E;AAU3E,IAAa,IAAI,YAAjB,MAAa,IAAK,SAAQ,+BAAa;IAAvC;;QAUE,WAAM,GAAW,SAAS,CAAC;QAY3B,cAAS,GAAS,SAAS,CAAC;QAY5B,cAAS,GAAS,SAAS,CAAC;IAc9B,CAAC;IALC,IAAI;QACF,KAAK,CAAC,IAAI,EAAE,CAAC;QAEb,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAA;AAtCC;IAFC,IAAA,eAAK,EAAC,EAAE,WAAW,EAAE,gCAAgC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACxE,IAAA,eAAI,GAAE;;oCACoB;AAY3B;IALC,IAAA,eAAK,EAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAI,EAAE;QACrB,WAAW,EAAE,uCAAuC;QACpD,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC;8BACxC,IAAI;uCAAa;AAY5B;IALC,IAAA,eAAK,EAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAI,EAAE;QACrB,WAAW,EAAE,4CAA4C;QACzD,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC;8BACxC,IAAI;uCAAa;AAlCjB,IAAI;IAFhB,IAAA,oBAAU,EAAC,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC;IACnC,IAAA,iBAAc,EAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;GACxB,IAAI,CAgDhB;AAhDY,oBAAI;AAkDJ,QAAA,UAAU,GAAG,wBAAa,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -36,7 +36,7 @@ let UserService = class UserService extends core_user_service_1.CoreUserService
|
|
|
36
36
|
let user = await super.create(input, serviceOptions);
|
|
37
37
|
if (!user.createdBy) {
|
|
38
38
|
await this.mainDbModel.findByIdAndUpdate(user.id, { createdBy: user.id });
|
|
39
|
-
user = await this.get(user.id, serviceOptions);
|
|
39
|
+
user = await this.get(user.id, Object.assign(Object.assign({}, serviceOptions), { currentUser: serviceOptions.currentUser || user }));
|
|
40
40
|
}
|
|
41
41
|
if ((serviceOptions === null || serviceOptions === void 0 ? void 0 : serviceOptions.pubSub) === undefined || serviceOptions.pubSub) {
|
|
42
42
|
await this.pubSub.publish('userCreated', user_model_1.User.map(user));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.service.js","sourceRoot":"","sources":["../../../../src/server/modules/user/user.service.ts"],"names":[],"mappings":";;;;;;;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