@lenne.tech/nest-server 10.5.0 → 10.7.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 +5 -1
- package/dist/core/common/decorators/restricted.decorator.js +20 -3
- package/dist/core/common/decorators/restricted.decorator.js.map +1 -1
- package/dist/core/common/helpers/common.helper.js +2 -3
- package/dist/core/common/helpers/common.helper.js.map +1 -1
- package/dist/core/common/helpers/config.helper.js +1 -2
- package/dist/core/common/helpers/config.helper.js.map +1 -1
- package/dist/core/common/helpers/context.helper.d.ts +0 -1
- package/dist/core/common/helpers/context.helper.js +1 -2
- package/dist/core/common/helpers/context.helper.js.map +1 -1
- package/dist/core/common/helpers/db.helper.d.ts +0 -24
- package/dist/core/common/helpers/db.helper.js +20 -18
- package/dist/core/common/helpers/db.helper.js.map +1 -1
- package/dist/core/common/helpers/decorator.helper.d.ts +0 -24
- package/dist/core/common/helpers/decorator.helper.js +2 -3
- package/dist/core/common/helpers/decorator.helper.js.map +1 -1
- package/dist/core/common/helpers/file.helper.js +3 -4
- package/dist/core/common/helpers/file.helper.js.map +1 -1
- package/dist/core/common/helpers/filter.helper.d.ts +0 -24
- package/dist/core/common/helpers/filter.helper.js +6 -6
- package/dist/core/common/helpers/filter.helper.js.map +1 -1
- package/dist/core/common/helpers/graphql.helper.d.ts +2 -2
- package/dist/core/common/helpers/graphql.helper.js +12 -13
- package/dist/core/common/helpers/graphql.helper.js.map +1 -1
- package/dist/core/common/helpers/input.helper.d.ts +2 -0
- package/dist/core/common/helpers/input.helper.js +45 -38
- package/dist/core/common/helpers/input.helper.js.map +1 -1
- package/dist/core/common/helpers/model.helper.js +8 -8
- package/dist/core/common/helpers/model.helper.js.map +1 -1
- package/dist/core/common/helpers/service.helper.js +3 -4
- package/dist/core/common/helpers/service.helper.js.map +1 -1
- package/dist/core/common/helpers/table.helper.js +1 -2
- package/dist/core/common/helpers/table.helper.js.map +1 -1
- package/dist/core/common/interceptors/check-response.interceptor.d.ts +1 -0
- package/dist/core/common/interceptors/check-response.interceptor.js +8 -1
- package/dist/core/common/interceptors/check-response.interceptor.js.map +1 -1
- package/dist/core/common/interceptors/check-security.interceptor.d.ts +7 -0
- package/dist/core/common/interceptors/check-security.interceptor.js +30 -2
- package/dist/core/common/interceptors/check-security.interceptor.js.map +1 -1
- package/dist/core/common/interfaces/server-options.interface.d.ts +6 -2
- package/dist/core/common/interfaces/service-options.interface.d.ts +0 -24
- package/dist/core/common/models/core-persistence.model.d.ts +0 -26
- package/dist/core/common/models/core-persistence.model.js +1 -23
- package/dist/core/common/models/core-persistence.model.js.map +1 -1
- package/dist/core/common/plugins/mongoose-id.plugin.js +1 -2
- package/dist/core/common/plugins/mongoose-id.plugin.js.map +1 -1
- package/dist/core/common/services/crud.service.d.ts +0 -24
- package/dist/core/common/services/model-doc.service.d.ts +0 -24
- package/dist/core/common/services/module.service.d.ts +0 -24
- package/dist/core/common/types/field-selection.type.d.ts +0 -24
- package/dist/core/common/types/ids.type.d.ts +0 -24
- package/dist/core/common/types/populate-config.type.d.ts +0 -24
- package/dist/core/common/types/string-or-object-id.type.d.ts +0 -24
- package/dist/core/modules/auth/strategies/jwt-refresh.strategy.d.ts +0 -1
- package/dist/core/modules/file/core-file-info.model.d.ts +0 -24
- package/dist/core/modules/file/core-file.service.d.ts +0 -26
- package/dist/core/modules/file/interfaces/file-upload.interface.d.ts +0 -1
- package/dist/core/modules/user/core-user.model.d.ts +0 -24
- package/dist/core/modules/user/core-user.model.js +1 -2
- package/dist/core/modules/user/core-user.model.js.map +1 -1
- package/dist/core/modules/user/core-user.service.d.ts +0 -24
- package/dist/server/common/models/persistence.model.d.ts +0 -24
- package/dist/server/modules/file/file-info.model.d.ts +0 -25
- package/dist/server/modules/file/file.controller.d.ts +0 -1
- package/dist/server/modules/file/file.service.d.ts +0 -24
- package/dist/server/modules/user/avatar.controller.d.ts +0 -1
- package/dist/server/modules/user/user.model.d.ts +1 -24
- package/dist/server/modules/user/user.model.js +8 -2
- package/dist/server/modules/user/user.model.js.map +1 -1
- package/dist/server/modules/user/user.resolver.d.ts +1 -1
- package/dist/server/modules/user/user.resolver.js +1 -1
- package/dist/server/modules/user/user.resolver.js.map +1 -1
- package/dist/server/modules/user/user.service.d.ts +0 -25
- package/dist/test/test.helper.d.ts +0 -2
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +28 -28
- package/src/core/common/decorators/restricted.decorator.ts +32 -6
- package/src/core/common/helpers/db.helper.ts +5 -1
- package/src/core/common/helpers/input.helper.ts +16 -4
- package/src/core/common/interceptors/check-response.interceptor.ts +13 -1
- package/src/core/common/interceptors/check-security.interceptor.ts +37 -2
- package/src/core/common/interfaces/server-options.interface.ts +26 -3
- package/src/core/common/models/core-persistence.model.ts +1 -25
- package/src/core/modules/user/core-user.model.ts +2 -3
- package/src/server/modules/user/user.model.ts +10 -3
- package/src/server/modules/user/user.resolver.ts +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.prepareInput = prepareInput;
|
|
4
|
+
exports.prepareOutput = prepareOutput;
|
|
5
|
+
exports.prepareServiceOptions = prepareServiceOptions;
|
|
4
6
|
const common_1 = require("@nestjs/common");
|
|
5
7
|
const class_transformer_1 = require("class-transformer");
|
|
6
8
|
const js_sha256_1 = require("js-sha256");
|
|
@@ -94,7 +96,6 @@ async function prepareInput(input, currentUser, options = {}) {
|
|
|
94
96
|
}
|
|
95
97
|
return input;
|
|
96
98
|
}
|
|
97
|
-
exports.prepareInput = prepareInput;
|
|
98
99
|
async function prepareOutput(output, options = {}) {
|
|
99
100
|
const config = {
|
|
100
101
|
circles: false,
|
|
@@ -159,7 +160,6 @@ async function prepareOutput(output, options = {}) {
|
|
|
159
160
|
}
|
|
160
161
|
return output;
|
|
161
162
|
}
|
|
162
|
-
exports.prepareOutput = prepareOutput;
|
|
163
163
|
function prepareServiceOptions(serviceOptions, options) {
|
|
164
164
|
const config = {
|
|
165
165
|
circles: true,
|
|
@@ -186,5 +186,4 @@ function prepareServiceOptions(serviceOptions, options) {
|
|
|
186
186
|
}
|
|
187
187
|
return serviceOptions;
|
|
188
188
|
}
|
|
189
|
-
exports.prepareServiceOptions = prepareServiceOptions;
|
|
190
189
|
//# sourceMappingURL=service.helper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.helper.js","sourceRoot":"","sources":["../../../../src/core/common/helpers/service.helper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"service.helper.js","sourceRoot":"","sources":["../../../../src/core/common/helpers/service.helper.ts"],"names":[],"mappings":";;AAgEA,oCAiHC;AAKD,sCA+FC;AAKD,sDAkDC;AA5UD,2CAAuD;AACvD,yDAAoD;AACpD,yCAAmC;AACnC,uCAAiC;AAEjC,kDAA8C;AAK9C,+DAA2D;AAC3D,2CAA2C;AAC3C,iDAAoD;AAEpD,iCAAkC;AAClC,4BAA6B;AAM7B,MAAqB,aAAa;IAIhC,MAAM,CAAC,KAAK,CAAC,YAAY,CACvB,KAAQ,EACR,WAA+C,EAC/C,UASI,EAAE;QAEN,OAAO,YAAY,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC;IAKD,MAAM,CAAC,KAAK,CAAC,aAAa,CACxB,MAAW,EACX,UAQI,EAAE;QAEN,OAAO,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,CAAC;CACF;AAtCD,gCAsCC;AAKM,KAAK,UAAU,YAAY,CAChC,KAAQ,EACR,WAA+C,EAC/C,UAYI,EAAE;IAGN,MAAM,MAAM,GAAG;QACb,UAAU,EAAE,KAAK;QACjB,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,KAAK;QACZ,wBAAwB,EAAE,IAAI;QAC9B,MAAM,EAAE,KAAK;QACb,WAAW,EAAE,KAA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AAc,GAAG,IAAA,oBAAK,EAAC,cAAc,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;IAC3F,CAAC;IAGD,cAAc,GAAG,cAAc,IAAI,EAAE,CAAC;IAGtC,cAAc,CAAC,SAAS,GAAG,cAAc,CAAC,SAAS,IAAI,OAAO,EAAE,SAAS,CAAC;IAC1E,cAAc,CAAC,UAAU,GAAG,cAAc,CAAC,UAAU,IAAI,OAAO,EAAE,UAAU,CAAC;IAG7E,IAAI,CAAC,cAAc,CAAC,YAAY,IAAI,cAAc,IAAI,MAAM,EAAE,CAAC;QAC7D,cAAc,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;IACpD,CAAC;IACD,IAAI,CAAC,cAAc,CAAC,aAAa,IAAI,eAAe,IAAI,MAAM,EAAE,CAAC;QAC/D,cAAc,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;IACtD,CAAC;IAGD,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;QAC7B,IAAK,cAAc,CAAC,cAAkC,EAAE,MAAM,EAAE,CAAC;YAC9D,cAAc,CAAC,cAAkC,CAAC,MAAM,IAAI,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;QAC9F,CAAC;IACH,CAAC;IAGD,OAAO,cAAc,CAAC;AACxB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.htmlTable =
|
|
3
|
+
exports.htmlTable = htmlTable;
|
|
4
4
|
function htmlTable(header, rows, options) {
|
|
5
5
|
const config = {
|
|
6
6
|
tableStyle: 'width: 100%; border: 1px solid #000; border-collapse: collapse;',
|
|
@@ -24,5 +24,4 @@ function htmlTable(header, rows, options) {
|
|
|
24
24
|
table += '</tbody></table>';
|
|
25
25
|
return table;
|
|
26
26
|
}
|
|
27
|
-
exports.htmlTable = htmlTable;
|
|
28
27
|
//# sourceMappingURL=table.helper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.helper.js","sourceRoot":"","sources":["../../../../src/core/common/helpers/table.helper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"table.helper.js","sourceRoot":"","sources":["../../../../src/core/common/helpers/table.helper.ts"],"names":[],"mappings":";;AAAA,8BAoCC;AApCD,SAAgB,SAAS,CACvB,MAAgB,EAChB,IAAgB,EAChB,OAQC;IAED,MAAM,MAAM,GAAG;QACb,UAAU,EAAE,iEAAiE;QAC7E,OAAO,EAAE,wCAAwC;QACjD,OAAO,EAAE,wCAAwC;QACjD,WAAW,EAAE,4BAA4B;QACzC,GAAG,OAAO;KACX,CAAC;IACF,IAAI,KAAK,GAAG,SAAS,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,EAAE,UAC3E,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,EACxD,OAAO,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,MAAM,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC;IACrE,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;QAC1B,KAAK,IAAI,MAAM,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,IAAI,OAAO,CAAC;IACnF,CAAC;IACD,KAAK,IAAI,sBAAsB,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC;IAC3F,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,KAAK,IAAI,MAAM,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC;QACrE,KAAK,MAAM,IAAI,IAAI,GAAG,EAAE,CAAC;YACvB,KAAK,IAAI,MAAM,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,IAAI,OAAO,CAAC;QACnF,CAAC;QACD,KAAK,IAAI,OAAO,CAAC;IACnB,CAAC;IACD,KAAK,IAAI,kBAAkB,CAAC;IAC5B,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -23,6 +23,7 @@ let CheckResponseInterceptor = class CheckResponseInterceptor {
|
|
|
23
23
|
debug: false,
|
|
24
24
|
ignoreUndefined: true,
|
|
25
25
|
mergeRoles: true,
|
|
26
|
+
noteCheckedObjects: true,
|
|
26
27
|
removeUndefinedFromResultArray: true,
|
|
27
28
|
throwError: false,
|
|
28
29
|
};
|
|
@@ -34,7 +35,13 @@ let CheckResponseInterceptor = class CheckResponseInterceptor {
|
|
|
34
35
|
intercept(context, next) {
|
|
35
36
|
const { currentUser } = (0, context_helper_1.getContextData)(context);
|
|
36
37
|
return next.handle().pipe((0, operators_1.map)((data) => {
|
|
37
|
-
|
|
38
|
+
const start = Date.now();
|
|
39
|
+
const result = (0, restricted_decorator_1.checkRestricted)(data, currentUser, this.config);
|
|
40
|
+
if (this.config.debug
|
|
41
|
+
&& Date.now() - start >= (typeof this.config.debug === 'number' ? this.config.debug : 100)) {
|
|
42
|
+
console.warn(`Duration for CheckResponseInterceptor is too long: ${Date.now() - start}ms`, Array.isArray(data) ? `${data[0].constructor.name}[]: ${data.length}` : data?.constructor?.name);
|
|
43
|
+
}
|
|
44
|
+
return result;
|
|
38
45
|
}));
|
|
39
46
|
}
|
|
40
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-response.interceptor.js","sourceRoot":"","sources":["../../../../src/core/common/interceptors/check-response.interceptor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4F;AAE5F,8CAAqC;AAErC,6EAAqE;AACrE,8DAA2D;AAC3D,+DAA2D;AAMpD,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;
|
|
1
|
+
{"version":3,"file":"check-response.interceptor.js","sourceRoot":"","sources":["../../../../src/core/common/interceptors/check-response.interceptor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4F;AAE5F,8CAAqC;AAErC,6EAAqE;AACrE,8DAA2D;AAC3D,+DAA2D;AAMpD,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAWnC,YAA6B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;QAVzD,WAAM,GAAG;YACP,iBAAiB,EAAE,KAAK;YACxB,KAAK,EAAE,KAAK;YACZ,eAAe,EAAE,IAAI;YACrB,UAAU,EAAE,IAAI;YAChB,kBAAkB,EAAE,IAAI;YACxB,8BAA8B,EAAE,IAAI;YACpC,UAAU,EAAE,KAAK;SAClB,CAAC;QAGA,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,mCAAmC,CAAC,CAAC;QACjG,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE,CAAC;YACtC,IAAI,CAAC,MAAM,GAAG,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,aAAa,EAAE,CAAC;QACrD,CAAC;IACH,CAAC;IAKD,SAAS,CAAC,OAAyB,EAAE,IAAiB;QAEpD,MAAM,EAAE,WAAW,EAAE,GAAQ,IAAA,+BAAc,EAAC,OAAO,CAAC,CAAC;QAGrD,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,CACvB,IAAA,eAAG,EAAC,CAAC,IAAI,EAAE,EAAE;YAEX,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YACzB,MAAM,MAAM,GAAG,IAAA,sCAAe,EAAC,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YAC/D,IACE,IAAI,CAAC,MAAM,CAAC,KAAK;mBACd,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,EAC1F,CAAC;gBACD,OAAO,CAAC,IAAI,CACV,sDAAsD,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,EAC5E,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,CAChG,CAAC;YACJ,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;CACF,CAAA;AA5CY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;qCAYiC,8BAAa;GAX9C,wBAAwB,CA4CpC"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { CallHandler, ExecutionContext, NestInterceptor } from '@nestjs/common';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
+
import { ConfigService } from '../services/config.service';
|
|
3
4
|
export declare class CheckSecurityInterceptor implements NestInterceptor {
|
|
5
|
+
private readonly configService;
|
|
6
|
+
config: {
|
|
7
|
+
debug: boolean;
|
|
8
|
+
noteCheckedObjects: boolean;
|
|
9
|
+
};
|
|
10
|
+
constructor(configService: ConfigService);
|
|
4
11
|
intercept(context: ExecutionContext, next: CallHandler): Observable<any>;
|
|
5
12
|
}
|
|
@@ -5,6 +5,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
8
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
12
|
exports.CheckSecurityInterceptor = void 0;
|
|
10
13
|
const common_1 = require("@nestjs/common");
|
|
@@ -12,8 +15,21 @@ const operators_1 = require("rxjs/operators");
|
|
|
12
15
|
const context_helper_1 = require("../helpers/context.helper");
|
|
13
16
|
const db_helper_1 = require("../helpers/db.helper");
|
|
14
17
|
const input_helper_1 = require("../helpers/input.helper");
|
|
18
|
+
const config_service_1 = require("../services/config.service");
|
|
15
19
|
let CheckSecurityInterceptor = class CheckSecurityInterceptor {
|
|
20
|
+
constructor(configService) {
|
|
21
|
+
this.configService = configService;
|
|
22
|
+
this.config = {
|
|
23
|
+
debug: false,
|
|
24
|
+
noteCheckedObjects: true,
|
|
25
|
+
};
|
|
26
|
+
const configuration = this.configService.getFastButReadOnly('security.checkSecurityInterceptor');
|
|
27
|
+
if (typeof configuration === 'object') {
|
|
28
|
+
this.config = { ...this.config, ...configuration };
|
|
29
|
+
}
|
|
30
|
+
}
|
|
16
31
|
intercept(context, next) {
|
|
32
|
+
const start = Date.now();
|
|
17
33
|
const user = (0, context_helper_1.getContextData)(context)?.currentUser || null;
|
|
18
34
|
let force = false;
|
|
19
35
|
if (!user) {
|
|
@@ -21,7 +37,12 @@ let CheckSecurityInterceptor = class CheckSecurityInterceptor {
|
|
|
21
37
|
force = true;
|
|
22
38
|
}
|
|
23
39
|
}
|
|
40
|
+
let objectData;
|
|
24
41
|
const check = (data) => {
|
|
42
|
+
objectData = data;
|
|
43
|
+
if (this.config.noteCheckedObjects && data?._objectAlreadyCheckedForRestrictions) {
|
|
44
|
+
return data;
|
|
45
|
+
}
|
|
25
46
|
if (data && typeof data === 'object' && typeof data.securityCheck === 'function') {
|
|
26
47
|
const dataJson = JSON.stringify(data);
|
|
27
48
|
const response = data.securityCheck(user, force);
|
|
@@ -54,11 +75,18 @@ let CheckSecurityInterceptor = class CheckSecurityInterceptor {
|
|
|
54
75
|
return check(item);
|
|
55
76
|
}, { specialFunctions: ['securityCheck'] });
|
|
56
77
|
};
|
|
57
|
-
|
|
78
|
+
const result = next.handle().pipe((0, operators_1.map)(check));
|
|
79
|
+
if (this.config.debug && Date.now() - start >= (typeof this.config.debug === 'number' ? this.config.debug : 100)) {
|
|
80
|
+
console.warn(`Duration for CheckResponseInterceptor is too long: ${Date.now() - start}ms`, Array.isArray(objectData)
|
|
81
|
+
? `${objectData[0].constructor.name}[]: ${objectData.length}`
|
|
82
|
+
: objectData?.constructor?.name);
|
|
83
|
+
}
|
|
84
|
+
return result;
|
|
58
85
|
}
|
|
59
86
|
};
|
|
60
87
|
exports.CheckSecurityInterceptor = CheckSecurityInterceptor;
|
|
61
88
|
exports.CheckSecurityInterceptor = CheckSecurityInterceptor = __decorate([
|
|
62
|
-
(0, common_1.Injectable)()
|
|
89
|
+
(0, common_1.Injectable)(),
|
|
90
|
+
__metadata("design:paramtypes", [config_service_1.ConfigService])
|
|
63
91
|
], CheckSecurityInterceptor);
|
|
64
92
|
//# sourceMappingURL=check-security.interceptor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-security.interceptor.js","sourceRoot":"","sources":["../../../../src/core/common/interceptors/check-security.interceptor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"check-security.interceptor.js","sourceRoot":"","sources":["../../../../src/core/common/interceptors/check-security.interceptor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4F;AAE5F,8CAAqC;AAErC,8DAA2D;AAC3D,oDAAoD;AACpD,0DAAsD;AACtD,+DAA2D;AAMpD,IAAM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
checkResponseInterceptor?: {
|
|
104
104
|
checkObjectItself?: boolean;
|
|
105
|
-
debug?: boolean;
|
|
105
|
+
debug?: boolean | number;
|
|
106
106
|
ignoreUndefined?: boolean;
|
|
107
107
|
mergeRoles?: boolean;
|
|
108
|
+
noteCheckedObjects?: boolean;
|
|
108
109
|
removeUndefinedFromResultArray?: boolean;
|
|
109
110
|
throwError?: boolean;
|
|
110
111
|
} | boolean;
|
|
111
|
-
checkSecurityInterceptor?:
|
|
112
|
+
checkSecurityInterceptor?: {
|
|
113
|
+
debug?: boolean | number;
|
|
114
|
+
noteCheckedObjects?: boolean;
|
|
115
|
+
} | boolean;
|
|
112
116
|
mapAndValidatePipe?: boolean;
|
|
113
117
|
};
|
|
114
118
|
sha256?: boolean;
|
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
1
|
import { CollationOptions } from 'mongodb';
|
|
26
2
|
import { Model, PopulateOptions } from 'mongoose';
|
|
27
3
|
import { FieldSelection } from '../types/field-selection.type';
|
|
@@ -1,35 +1,9 @@
|
|
|
1
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
1
|
import { Types } from 'mongoose';
|
|
26
2
|
import { CoreModel } from './core-model.model';
|
|
27
3
|
export declare abstract class CorePersistenceModel extends CoreModel {
|
|
28
4
|
get _id(): Types.ObjectId;
|
|
29
5
|
id: string;
|
|
30
6
|
createdAt: Date;
|
|
31
|
-
labels: string[];
|
|
32
|
-
tags: string[];
|
|
33
7
|
updatedAt: Date;
|
|
34
8
|
init(): this;
|
|
35
9
|
map(input: any): this;
|
|
@@ -22,8 +22,6 @@ let CorePersistenceModel = class CorePersistenceModel extends core_model_model_1
|
|
|
22
22
|
super(...arguments);
|
|
23
23
|
this.id = undefined;
|
|
24
24
|
this.createdAt = undefined;
|
|
25
|
-
this.labels = undefined;
|
|
26
|
-
this.tags = undefined;
|
|
27
25
|
this.updatedAt = undefined;
|
|
28
26
|
}
|
|
29
27
|
get _id() {
|
|
@@ -32,9 +30,7 @@ let CorePersistenceModel = class CorePersistenceModel extends core_model_model_1
|
|
|
32
30
|
init() {
|
|
33
31
|
super.init();
|
|
34
32
|
this.createdAt = this.createdAt === undefined ? new Date() : this.createdAt;
|
|
35
|
-
this.
|
|
36
|
-
this.tags = this.tags === undefined ? [] : this.tags;
|
|
37
|
-
this.updatedAt = this.tags === undefined ? this.createdAt : this.updatedAt;
|
|
33
|
+
this.updatedAt = this.updatedAt === undefined ? this.createdAt : this.updatedAt;
|
|
38
34
|
return this;
|
|
39
35
|
}
|
|
40
36
|
map(input) {
|
|
@@ -65,24 +61,6 @@ __decorate([
|
|
|
65
61
|
(0, mongoose_1.Prop)({ onCreate: () => new Date() }),
|
|
66
62
|
__metadata("design:type", Date)
|
|
67
63
|
], CorePersistenceModel.prototype, "createdAt", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
(0, restricted_decorator_1.Restricted)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
70
|
-
(0, graphql_1.Field)(type => [String], {
|
|
71
|
-
description: 'Labels of the object',
|
|
72
|
-
nullable: true,
|
|
73
|
-
}),
|
|
74
|
-
(0, mongoose_1.Prop)([String]),
|
|
75
|
-
__metadata("design:type", Array)
|
|
76
|
-
], CorePersistenceModel.prototype, "labels", void 0);
|
|
77
|
-
__decorate([
|
|
78
|
-
(0, restricted_decorator_1.Restricted)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
79
|
-
(0, graphql_1.Field)(type => [String], {
|
|
80
|
-
description: 'Tags for the object',
|
|
81
|
-
nullable: true,
|
|
82
|
-
}),
|
|
83
|
-
(0, mongoose_1.Prop)([String]),
|
|
84
|
-
__metadata("design:type", Array)
|
|
85
|
-
], CorePersistenceModel.prototype, "tags", void 0);
|
|
86
64
|
__decorate([
|
|
87
65
|
(0, restricted_decorator_1.Restricted)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
88
66
|
(0, graphql_1.Field)({ description: 'Updated date', nullable: true }),
|
|
@@ -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;AAEjC,6EAAgE;AAChE,kDAA8C;AAC9C,oDAAoD;AACpD,yDAA+C;AAoBxC,IAAe,oBAAoB,GAAnC,MAAe,oBAAqB,SAAQ,4BAAS;IAArD;;QAsBL,OAAE,GAAW,SAAS,CAAC;QAQvB,cAAS,GAAS,SAAS,CAAC;
|
|
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;AAEjC,6EAAgE;AAChE,kDAA8C;AAC9C,oDAAoD;AACpD,yDAA+C;AAoBxC,IAAe,oBAAoB,GAAnC,MAAe,oBAAqB,SAAQ,4BAAS;IAArD;;QAsBL,OAAE,GAAW,SAAS,CAAC;QAQvB,cAAS,GAAS,SAAS,CAAC;QAQ5B,cAAS,GAAS,SAAS,CAAC;IA0B9B,CAAC;IA3DC,IACI,GAAG;QACL,OAAO,IAAI,gBAAK,CAAC,QAAQ,CAAC,IAAI,CA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/B,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;+BAtCR,oBAAoB;IANzC,IAAA,iCAAU,EAAC,oBAAQ,CAAC,UAAU,CAAC;IAC/B,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,CAgEzC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mongooseIdPlugin =
|
|
3
|
+
exports.mongooseIdPlugin = mongooseIdPlugin;
|
|
4
4
|
function mongooseIdPlugin(schema, options) {
|
|
5
5
|
schema.post(['find', 'findOne', 'save', 'deleteOne'], function (docs) {
|
|
6
6
|
if (!Array.isArray(docs)) {
|
|
@@ -13,6 +13,5 @@ function mongooseIdPlugin(schema, options) {
|
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
|
-
exports.mongooseIdPlugin = mongooseIdPlugin;
|
|
17
16
|
module.exports = mongooseIdPlugin;
|
|
18
17
|
//# sourceMappingURL=mongoose-id.plugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mongoose-id.plugin.js","sourceRoot":"","sources":["../../../../src/core/common/plugins/mongoose-id.plugin.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mongoose-id.plugin.js","sourceRoot":"","sources":["../../../../src/core/common/plugins/mongoose-id.plugin.js"],"names":[],"mappings":";;AAAA,4CAYC;AAZD,SAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO;IAC9C,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,UAAU,IAAI;QAClE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACzB,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;QAChB,CAAC;QAED,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,CAAC,GAAG,EAAE,CAAC;gBAC5B,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;YACjC,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,OAAO,GAAG,gBAAgB,CAAC"}
|
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
1
|
import { AggregateOptions, Document, FilterQuery, Model as MongooseModel, PipelineStage, Query, QueryOptions } from 'mongoose';
|
|
26
2
|
import { FilterArgs } from '../args/filter.args';
|
|
27
3
|
import { ServiceOptions } from '../interfaces/service-options.interface';
|
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
1
|
import { OnApplicationBootstrap } from '@nestjs/common';
|
|
26
2
|
import { Connection } from 'mongoose';
|
|
27
3
|
export interface ModelDocSchemaConfig {
|
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
1
|
import { Document, Model, Types } from 'mongoose';
|
|
26
2
|
import { ProcessType } from '../enums/process-type.enum';
|
|
27
3
|
import { ServiceOptions } from '../interfaces/service-options.interface';
|
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
1
|
import { SelectionNode } from 'graphql';
|
|
26
2
|
import { PopulateOptions } from 'mongoose';
|
|
27
3
|
import { ResolveSelector } from '../interfaces/resolve-selector.interface';
|
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
1
|
import { Types } from 'mongoose';
|
|
26
2
|
export type IdsType = ({
|
|
27
3
|
_id?: Types.ObjectId | string;
|
|
@@ -1,26 +1,2 @@
|
|
|
1
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
1
|
import { PopulateOptions } from 'mongoose';
|
|
26
2
|
export type PopulateConfig = (PopulateOptions | string)[] | PopulateOptions | string | string[];
|
|
@@ -1,26 +1,2 @@
|
|
|
1
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
1
|
import { Types } from 'mongoose';
|
|
26
2
|
export type StringOrObjectId<T = any> = T | Types.ObjectId | string;
|