@uniorganization/uni-lib 1.1.72 → 1.1.74
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/config/db.config.d.ts +4 -4
- package/dist/config/db.config.js +28 -28
- package/dist/config/index.d.ts +3 -3
- package/dist/config/index.js +15 -15
- package/dist/config/shared-db.config.d.ts +4 -4
- package/dist/config/shared-db.config.js +28 -28
- package/dist/config/swagger.config.d.ts +1 -1
- package/dist/config/swagger.config.js +14 -14
- package/dist/entities/active-loads.entity.d.ts +18 -18
- package/dist/entities/active-loads.entity.js +84 -84
- package/dist/entities/applications.entity.d.ts +9 -9
- package/dist/entities/applications.entity.js +41 -41
- package/dist/entities/apps-user-id.entity.d.ts +20 -20
- package/dist/entities/apps-user-id.entity.js +91 -91
- package/dist/entities/audit.entity.d.ts +19 -19
- package/dist/entities/audit.entity.js +61 -61
- package/dist/entities/autofail-reasons.entity.d.ts +4 -4
- package/dist/entities/autofail-reasons.entity.js +27 -27
- package/dist/entities/blacklist.entity.d.ts +9 -9
- package/dist/entities/blacklist.entity.js +43 -43
- package/dist/entities/call-driver-data.entity.d.ts +25 -23
- package/dist/entities/call-driver-data.entity.js +105 -97
- package/dist/entities/call-drivers.entity.d.ts +19 -19
- package/dist/entities/call-drivers.entity.js +79 -79
- package/dist/entities/cb-completed-reasons.entity.d.ts +5 -5
- package/dist/entities/cb-completed-reasons.entity.js +31 -31
- package/dist/entities/change-alert.entity.d.ts +11 -11
- package/dist/entities/change-alert.entity.js +51 -51
- package/dist/entities/config.entity.d.ts +5 -5
- package/dist/entities/config.entity.js +31 -31
- package/dist/entities/daily-payment-status.entity.d.ts +27 -27
- package/dist/entities/daily-payment-status.entity.js +120 -120
- package/dist/entities/depreciation-categories.entity.d.ts +6 -6
- package/dist/entities/depreciation-categories.entity.js +32 -32
- package/dist/entities/depreciation-details.entity.d.ts +9 -9
- package/dist/entities/depreciation-details.entity.js +45 -45
- package/dist/entities/detail-type.entity.d.ts +4 -4
- package/dist/entities/detail-type.entity.js +27 -27
- package/dist/entities/dispute-request.entity.d.ts +27 -27
- package/dist/entities/dispute-request.entity.js +110 -110
- package/dist/entities/enr-calculation-log.entity.d.ts +49 -49
- package/dist/entities/enr-calculation-log.entity.js +203 -203
- package/dist/entities/enr-inventory.entity.d.ts +14 -14
- package/dist/entities/enr-inventory.entity.js +67 -67
- package/dist/entities/enr-results.entity.d.ts +5 -5
- package/dist/entities/enr-results.entity.js +31 -31
- package/dist/entities/escalation-category.entity.d.ts +4 -4
- package/dist/entities/escalation-category.entity.js +27 -27
- package/dist/entities/escalation-notes.entity.d.ts +10 -10
- package/dist/entities/escalation-notes.entity.js +43 -43
- package/dist/entities/escalation-outcome.entity.d.ts +4 -4
- package/dist/entities/escalation-outcome.entity.js +27 -27
- package/dist/entities/escalation-status-log.entity.d.ts +8 -8
- package/dist/entities/escalation-status-log.entity.js +37 -37
- package/dist/entities/escalation-status.entity.d.ts +4 -4
- package/dist/entities/escalation-status.entity.js +27 -27
- package/dist/entities/escalation-type.entity.d.ts +5 -5
- package/dist/entities/escalation-type.entity.js +31 -31
- package/dist/entities/escalations.entity.d.ts +39 -39
- package/dist/entities/escalations.entity.js +163 -163
- package/dist/entities/evaluation-autofail-reasons.entity.d.ts +7 -7
- package/dist/entities/evaluation-autofail-reasons.entity.js +35 -35
- package/dist/entities/evaluation-data.entity.d.ts +8 -8
- package/dist/entities/evaluation-data.entity.js +43 -43
- package/dist/entities/evaluation-forms.entity.d.ts +20 -20
- package/dist/entities/evaluation-forms.entity.js +67 -67
- package/dist/entities/evaluation-questions.entity.d.ts +10 -10
- package/dist/entities/evaluation-questions.entity.js +47 -47
- package/dist/entities/evaluations.entity.d.ts +37 -37
- package/dist/entities/evaluations.entity.js +151 -151
- package/dist/entities/file-contents.entity.d.ts +56 -56
- package/dist/entities/file-contents.entity.js +231 -231
- package/dist/entities/file-upload.entity.d.ts +10 -10
- package/dist/entities/file-upload.entity.js +47 -47
- package/dist/entities/form-definition.entity.d.ts +9 -9
- package/dist/entities/form-definition.entity.js +43 -43
- package/dist/entities/form-fields.entity.d.ts +18 -18
- package/dist/entities/form-fields.entity.js +79 -79
- package/dist/entities/form.entity.d.ts +15 -15
- package/dist/entities/form.entity.js +68 -68
- package/dist/entities/incident-notes.entity.d.ts +10 -10
- package/dist/entities/incident-notes.entity.js +43 -43
- package/dist/entities/incident.entity.d.ts +20 -20
- package/dist/entities/incident.entity.js +82 -82
- package/dist/entities/incoterms.entity.d.ts +9 -9
- package/dist/entities/incoterms.entity.js +47 -47
- package/dist/entities/index.d.ts +74 -74
- package/dist/entities/index.js +86 -86
- package/dist/entities/inventory.entity.d.ts +11 -11
- package/dist/entities/inventory.entity.js +55 -55
- package/dist/entities/it-info.entity.d.ts +12 -12
- package/dist/entities/it-info.entity.js +59 -59
- package/dist/entities/lob-assignment.entity.d.ts +6 -6
- package/dist/entities/lob-assignment.entity.js +35 -35
- package/dist/entities/lob-call-drivers.entity.d.ts +5 -5
- package/dist/entities/lob-call-drivers.entity.js +31 -31
- package/dist/entities/location-addresses.entity.d.ts +12 -12
- package/dist/entities/location-addresses.entity.js +59 -59
- package/dist/entities/ltp-history-transactions.entity.d.ts +11 -11
- package/dist/entities/ltp-history-transactions.entity.js +53 -53
- package/dist/entities/ltp-stm-roster.entity.d.ts +11 -11
- package/dist/entities/ltp-stm-roster.entity.js +55 -55
- package/dist/entities/modules-roles.entity.d.ts +13 -13
- package/dist/entities/modules-roles.entity.js +53 -53
- package/dist/entities/offphone-activities.entity.d.ts +5 -5
- package/dist/entities/offphone-activities.entity.js +31 -31
- package/dist/entities/onsite-ordering.entity.d.ts +11 -11
- package/dist/entities/onsite-ordering.entity.js +55 -55
- package/dist/entities/ost.entity.d.ts +6 -6
- package/dist/entities/ost.entity.js +35 -35
- package/dist/entities/otwe-offers.entity.d.ts +5 -5
- package/dist/entities/otwe-offers.entity.js +31 -31
- package/dist/entities/outbound-ticket-history.entity.d.ts +13 -13
- package/dist/entities/outbound-ticket-history.entity.js +53 -53
- package/dist/entities/pending-ticket-history.entity.d.ts +9 -9
- package/dist/entities/pending-ticket-history.entity.js +47 -47
- package/dist/entities/product-codes.entity.d.ts +17 -17
- package/dist/entities/product-codes.entity.js +77 -77
- package/dist/entities/question-group.entity.d.ts +11 -11
- package/dist/entities/question-group.entity.js +50 -50
- package/dist/entities/questions.entity.d.ts +10 -10
- package/dist/entities/questions.entity.js +49 -49
- package/dist/entities/regional-service-mgr.entity.d.ts +4 -4
- package/dist/entities/regional-service-mgr.entity.js +27 -27
- package/dist/entities/role-definition.entity.d.ts +7 -7
- package/dist/entities/role-definition.entity.js +35 -35
- package/dist/entities/role-privileges.entity.d.ts +10 -10
- package/dist/entities/role-privileges.entity.js +44 -44
- package/dist/entities/roster-personnel.entity.d.ts +9 -9
- package/dist/entities/roster-personnel.entity.js +49 -49
- package/dist/entities/roster.entity.d.ts +19 -19
- package/dist/entities/roster.entity.js +80 -80
- package/dist/entities/sap-raw-data.entity.d.ts +132 -132
- package/dist/entities/sap-raw-data.entity.js +539 -539
- package/dist/entities/sap-raw.entity.d.ts +36 -36
- package/dist/entities/sap-raw.entity.js +155 -155
- package/dist/entities/service-type.entity.d.ts +4 -4
- package/dist/entities/service-type.entity.js +27 -27
- package/dist/entities/skipped-ticket.entity.d.ts +13 -13
- package/dist/entities/skipped-ticket.entity.js +63 -63
- package/dist/entities/state.entity.d.ts +8 -8
- package/dist/entities/state.entity.js +43 -43
- package/dist/entities/template.entity.d.ts +10 -10
- package/dist/entities/template.entity.js +51 -51
- package/dist/entities/ticket-queue.entity.d.ts +8 -8
- package/dist/entities/ticket-queue.entity.js +43 -43
- package/dist/entities/transactions.entity.d.ts +32 -32
- package/dist/entities/transactions.entity.js +132 -132
- package/dist/entities/user-campaign.entity.d.ts +11 -10
- package/dist/entities/user-campaign.entity.js +45 -45
- package/dist/entities/user-roles.entity.d.ts +8 -8
- package/dist/entities/user-roles.entity.js +41 -41
- package/dist/entities/user-roster.view.d.ts +38 -38
- package/dist/entities/user-roster.view.js +163 -163
- package/dist/entities/usr.entity.d.ts +24 -24
- package/dist/entities/usr.entity.js +104 -104
- package/dist/entities/vw-escalation-age.d.ts +12 -12
- package/dist/entities/vw-escalation-age.js +62 -62
- package/dist/entities/warranty-category.entity.d.ts +4 -4
- package/dist/entities/warranty-category.entity.js +27 -27
- package/dist/index.d.ts +5 -5
- package/dist/index.js +17 -17
- package/dist/middlewares/index.d.ts +1 -1
- package/dist/middlewares/index.js +13 -13
- package/dist/middlewares/version-checker.middleware.d.ts +2 -2
- package/dist/middlewares/version-checker.middleware.js +28 -28
- package/dist/modules/common/common.module.d.ts +2 -2
- package/dist/modules/common/common.module.js +28 -28
- package/dist/modules/common/index.d.ts +4 -4
- package/dist/modules/common/index.js +16 -16
- package/dist/modules/common/jwt-auth.guard.d.ts +5 -5
- package/dist/modules/common/jwt-auth.guard.js +26 -26
- package/dist/modules/common/jwt.strategy.d.ts +9 -9
- package/dist/modules/common/jwt.strategy.js +43 -43
- package/dist/modules/common/logged-user.decorator.d.ts +1 -1
- package/dist/modules/common/logged-user.decorator.js +9 -9
- package/dist/modules/index.d.ts +1 -1
- package/dist/modules/index.js +13 -13
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js +14 -14
- package/dist/utils/object.utils.d.ts +2 -2
- package/dist/utils/object.utils.js +19 -19
- package/dist/utils/parse.util.d.ts +3 -3
- package/dist/utils/parse.util.js +32 -32
- package/dist/utils/string.utils.d.ts +5 -5
- package/dist/utils/string.utils.js +118 -118
- package/package.json +75 -75
- package/dist/entities/pending-ticket-history.entity..d.ts +0 -10
- package/dist/entities/pending-ticket-history.entity..js +0 -47
- package/dist/interceptors/audit-user-activity.interceptor.d.ts +0 -12
- package/dist/interceptors/audit-user-activity.interceptor.js +0 -57
- package/dist/interceptors/index.d.ts +0 -1
- package/dist/interceptors/index.js +0 -13
- package/dist/modules/crud/base-service.interface.d.ts +0 -7
- package/dist/modules/crud/base-service.interface.js +0 -2
- package/dist/modules/crud/base.controller.d.ts +0 -11
- package/dist/modules/crud/base.controller.js +0 -92
- package/dist/modules/crud/base.entity.d.ts +0 -3
- package/dist/modules/crud/base.entity.js +0 -20
- package/dist/modules/crud/base.service.d.ts +0 -12
- package/dist/modules/crud/base.service.js +0 -88
- package/dist/modules/crud/index.d.ts +0 -4
- package/dist/modules/crud/index.js +0 -20
- package/dist/services/audit.service.d.ts +0 -8
- package/dist/services/audit.service.js +0 -49
- package/dist/services/index.d.ts +0 -1
- package/dist/services/index.js +0 -13
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.CommonModule = void 0;
|
|
10
|
-
const common_1 = require("@nestjs/common");
|
|
11
|
-
const passport_1 = require("@nestjs/passport");
|
|
12
|
-
const jwt_1 = require("@nestjs/jwt");
|
|
13
|
-
const jwt_strategy_1 = require("./jwt.strategy");
|
|
14
|
-
let CommonModule = class CommonModule {
|
|
15
|
-
};
|
|
16
|
-
CommonModule = __decorate([
|
|
17
|
-
(0, common_1.Module)({
|
|
18
|
-
imports: [
|
|
19
|
-
passport_1.PassportModule,
|
|
20
|
-
jwt_1.JwtModule.register({
|
|
21
|
-
secret: process.env.JWT_SECRET,
|
|
22
|
-
signOptions: { expiresIn: '12h' },
|
|
23
|
-
}),
|
|
24
|
-
],
|
|
25
|
-
providers: [jwt_strategy_1.JwtStrategy],
|
|
26
|
-
})
|
|
27
|
-
], CommonModule);
|
|
28
|
-
exports.CommonModule = CommonModule;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.CommonModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const passport_1 = require("@nestjs/passport");
|
|
12
|
+
const jwt_1 = require("@nestjs/jwt");
|
|
13
|
+
const jwt_strategy_1 = require("./jwt.strategy");
|
|
14
|
+
let CommonModule = class CommonModule {
|
|
15
|
+
};
|
|
16
|
+
CommonModule = __decorate([
|
|
17
|
+
(0, common_1.Module)({
|
|
18
|
+
imports: [
|
|
19
|
+
passport_1.PassportModule,
|
|
20
|
+
jwt_1.JwtModule.register({
|
|
21
|
+
secret: process.env.JWT_SECRET,
|
|
22
|
+
signOptions: { expiresIn: '12h' },
|
|
23
|
+
}),
|
|
24
|
+
],
|
|
25
|
+
providers: [jwt_strategy_1.JwtStrategy],
|
|
26
|
+
})
|
|
27
|
+
], CommonModule);
|
|
28
|
+
exports.CommonModule = CommonModule;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './common.module';
|
|
2
|
-
export * from './jwt-auth.guard';
|
|
3
|
-
export * from './jwt.strategy';
|
|
4
|
-
export * from './logged-user.decorator';
|
|
1
|
+
export * from './common.module';
|
|
2
|
+
export * from './jwt-auth.guard';
|
|
3
|
+
export * from './jwt.strategy';
|
|
4
|
+
export * from './logged-user.decorator';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./common.module"), exports);
|
|
14
|
-
__exportStar(require("./jwt-auth.guard"), exports);
|
|
15
|
-
__exportStar(require("./jwt.strategy"), exports);
|
|
16
|
-
__exportStar(require("./logged-user.decorator"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./common.module"), exports);
|
|
14
|
+
__exportStar(require("./jwt-auth.guard"), exports);
|
|
15
|
+
__exportStar(require("./jwt.strategy"), exports);
|
|
16
|
+
__exportStar(require("./logged-user.decorator"), exports);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare const JwtAuthGuard_base: import("@nestjs/passport").Type<import("@nestjs/passport").IAuthGuard>;
|
|
2
|
-
export declare class JwtAuthGuard extends JwtAuthGuard_base {
|
|
3
|
-
handleRequest(err: any, user: any, info: any): any;
|
|
4
|
-
}
|
|
5
|
-
export {};
|
|
1
|
+
declare const JwtAuthGuard_base: import("@nestjs/passport").Type<import("@nestjs/passport").IAuthGuard>;
|
|
2
|
+
export declare class JwtAuthGuard extends JwtAuthGuard_base {
|
|
3
|
+
handleRequest(err: any, user: any, info: any): any;
|
|
4
|
+
}
|
|
5
|
+
export {};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.JwtAuthGuard = void 0;
|
|
10
|
-
const common_1 = require("@nestjs/common");
|
|
11
|
-
const passport_1 = require("@nestjs/passport");
|
|
12
|
-
let JwtAuthGuard = class JwtAuthGuard extends (0, passport_1.AuthGuard)('jwt') {
|
|
13
|
-
handleRequest(err, user, info) {
|
|
14
|
-
const enableJWT = JSON.parse(process.env.JWT_ENABLE);
|
|
15
|
-
if (enableJWT) {
|
|
16
|
-
if (err || !user) {
|
|
17
|
-
throw err || new common_1.UnauthorizedException();
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return user;
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
JwtAuthGuard = __decorate([
|
|
24
|
-
(0, common_1.Injectable)()
|
|
25
|
-
], JwtAuthGuard);
|
|
26
|
-
exports.JwtAuthGuard = JwtAuthGuard;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.JwtAuthGuard = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const passport_1 = require("@nestjs/passport");
|
|
12
|
+
let JwtAuthGuard = class JwtAuthGuard extends (0, passport_1.AuthGuard)('jwt') {
|
|
13
|
+
handleRequest(err, user, info) {
|
|
14
|
+
const enableJWT = JSON.parse(process.env.JWT_ENABLE);
|
|
15
|
+
if (enableJWT) {
|
|
16
|
+
if (err || !user) {
|
|
17
|
+
throw err || new common_1.UnauthorizedException();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return user;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
JwtAuthGuard = __decorate([
|
|
24
|
+
(0, common_1.Injectable)()
|
|
25
|
+
], JwtAuthGuard);
|
|
26
|
+
exports.JwtAuthGuard = JwtAuthGuard;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Strategy } from 'passport-jwt';
|
|
2
|
-
declare const JwtStrategy_base: new (...args: any[]) => Strategy;
|
|
3
|
-
export declare class JwtStrategy extends JwtStrategy_base {
|
|
4
|
-
constructor();
|
|
5
|
-
validate(payload: any): Promise<{
|
|
6
|
-
payload: any;
|
|
7
|
-
}>;
|
|
8
|
-
}
|
|
9
|
-
export {};
|
|
1
|
+
import { Strategy } from 'passport-jwt';
|
|
2
|
+
declare const JwtStrategy_base: new (...args: any[]) => Strategy;
|
|
3
|
+
export declare class JwtStrategy extends JwtStrategy_base {
|
|
4
|
+
constructor();
|
|
5
|
+
validate(payload: any): Promise<{
|
|
6
|
+
payload: any;
|
|
7
|
+
}>;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
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
|
-
};
|
|
11
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.JwtStrategy = void 0;
|
|
22
|
-
const common_1 = require("@nestjs/common");
|
|
23
|
-
const passport_1 = require("@nestjs/passport");
|
|
24
|
-
const passport_jwt_1 = require("passport-jwt");
|
|
25
|
-
let JwtStrategy = class JwtStrategy extends (0, passport_1.PassportStrategy)(passport_jwt_1.Strategy) {
|
|
26
|
-
constructor() {
|
|
27
|
-
super({
|
|
28
|
-
jwtFromRequest: passport_jwt_1.ExtractJwt.fromAuthHeaderAsBearerToken(),
|
|
29
|
-
ignoreExpiration: JSON.parse(process.env.JWT_IGNORE_EXPIRATION) || false,
|
|
30
|
-
secretOrKey: process.env.JWT_SECRET,
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
validate(payload) {
|
|
34
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
return { payload };
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
JwtStrategy = __decorate([
|
|
40
|
-
(0, common_1.Injectable)(),
|
|
41
|
-
__metadata("design:paramtypes", [])
|
|
42
|
-
], JwtStrategy);
|
|
43
|
-
exports.JwtStrategy = JwtStrategy;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
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
|
+
};
|
|
11
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.JwtStrategy = void 0;
|
|
22
|
+
const common_1 = require("@nestjs/common");
|
|
23
|
+
const passport_1 = require("@nestjs/passport");
|
|
24
|
+
const passport_jwt_1 = require("passport-jwt");
|
|
25
|
+
let JwtStrategy = class JwtStrategy extends (0, passport_1.PassportStrategy)(passport_jwt_1.Strategy) {
|
|
26
|
+
constructor() {
|
|
27
|
+
super({
|
|
28
|
+
jwtFromRequest: passport_jwt_1.ExtractJwt.fromAuthHeaderAsBearerToken(),
|
|
29
|
+
ignoreExpiration: JSON.parse(process.env.JWT_IGNORE_EXPIRATION) || false,
|
|
30
|
+
secretOrKey: process.env.JWT_SECRET,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
validate(payload) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
return { payload };
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
JwtStrategy = __decorate([
|
|
40
|
+
(0, common_1.Injectable)(),
|
|
41
|
+
__metadata("design:paramtypes", [])
|
|
42
|
+
], JwtStrategy);
|
|
43
|
+
exports.JwtStrategy = JwtStrategy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LoggedUser: (...dataOrPipes: unknown[]) => ParameterDecorator;
|
|
1
|
+
export declare const LoggedUser: (...dataOrPipes: unknown[]) => ParameterDecorator;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LoggedUser = void 0;
|
|
4
|
-
const common_1 = require("@nestjs/common");
|
|
5
|
-
exports.LoggedUser = (0, common_1.createParamDecorator)((data, ctx) => {
|
|
6
|
-
var _a, _b;
|
|
7
|
-
const request = ctx.switchToHttp().getRequest();
|
|
8
|
-
return (_b = (_a = request === null || request === void 0 ? void 0 : request.user) === null || _a === void 0 ? void 0 : _a.payload) === null || _b === void 0 ? void 0 : _b.user;
|
|
9
|
-
});
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LoggedUser = void 0;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
exports.LoggedUser = (0, common_1.createParamDecorator)((data, ctx) => {
|
|
6
|
+
var _a, _b;
|
|
7
|
+
const request = ctx.switchToHttp().getRequest();
|
|
8
|
+
return (_b = (_a = request === null || request === void 0 ? void 0 : request.user) === null || _a === void 0 ? void 0 : _a.payload) === null || _b === void 0 ? void 0 : _b.user;
|
|
9
|
+
});
|
package/dist/modules/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './common';
|
|
1
|
+
export * from './common';
|
package/dist/modules/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./common"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./common"), exports);
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './object.utils';
|
|
2
|
-
export * from './string.utils';
|
|
1
|
+
export * from './object.utils';
|
|
2
|
+
export * from './string.utils';
|
package/dist/utils/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./object.utils"), exports);
|
|
14
|
-
__exportStar(require("./string.utils"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./object.utils"), exports);
|
|
14
|
+
__exportStar(require("./string.utils"), exports);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const objValsToString: (obj: any) => any;
|
|
2
|
-
export declare const parseObjArrToPlainArr: (objs: any) => [];
|
|
1
|
+
export declare const objValsToString: (obj: any) => any;
|
|
2
|
+
export declare const parseObjArrToPlainArr: (objs: any) => [];
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseObjArrToPlainArr = exports.objValsToString = void 0;
|
|
4
|
-
const objValsToString = (obj) => {
|
|
5
|
-
Object.keys(obj).forEach(function (key) {
|
|
6
|
-
typeof obj[key] == 'object'
|
|
7
|
-
? this.objValsToString(obj[key])
|
|
8
|
-
: (obj[key] = String(obj[key]).trim());
|
|
9
|
-
});
|
|
10
|
-
return obj;
|
|
11
|
-
};
|
|
12
|
-
exports.objValsToString = objValsToString;
|
|
13
|
-
const parseObjArrToPlainArr = (objs) => {
|
|
14
|
-
const arrs = Object.values(objs).map((data) => {
|
|
15
|
-
return [...Object.values(data)];
|
|
16
|
-
});
|
|
17
|
-
return [].concat.apply([], arrs);
|
|
18
|
-
};
|
|
19
|
-
exports.parseObjArrToPlainArr = parseObjArrToPlainArr;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseObjArrToPlainArr = exports.objValsToString = void 0;
|
|
4
|
+
const objValsToString = (obj) => {
|
|
5
|
+
Object.keys(obj).forEach(function (key) {
|
|
6
|
+
typeof obj[key] == 'object'
|
|
7
|
+
? this.objValsToString(obj[key])
|
|
8
|
+
: (obj[key] = String(obj[key]).trim());
|
|
9
|
+
});
|
|
10
|
+
return obj;
|
|
11
|
+
};
|
|
12
|
+
exports.objValsToString = objValsToString;
|
|
13
|
+
const parseObjArrToPlainArr = (objs) => {
|
|
14
|
+
const arrs = Object.values(objs).map((data) => {
|
|
15
|
+
return [...Object.values(data)];
|
|
16
|
+
});
|
|
17
|
+
return [].concat.apply([], arrs);
|
|
18
|
+
};
|
|
19
|
+
exports.parseObjArrToPlainArr = parseObjArrToPlainArr;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare class ParseUtils {
|
|
2
|
-
parseCsvDataToJson(file: any): Promise<any[]>;
|
|
3
|
-
}
|
|
1
|
+
export declare class ParseUtils {
|
|
2
|
+
parseCsvDataToJson(file: any): Promise<any[]>;
|
|
3
|
+
}
|
package/dist/utils/parse.util.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
10
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
12
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
13
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
14
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.ParseUtils = void 0;
|
|
19
|
-
const common_1 = require("@nestjs/common");
|
|
20
|
-
const csv = require("csvtojson");
|
|
21
|
-
let ParseUtils = class ParseUtils {
|
|
22
|
-
parseCsvDataToJson(file) {
|
|
23
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
const data = yield csv({ eol: '\n' }).fromFile(file.path);
|
|
25
|
-
return data;
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
ParseUtils = __decorate([
|
|
30
|
-
(0, common_1.Injectable)()
|
|
31
|
-
], ParseUtils);
|
|
32
|
-
exports.ParseUtils = ParseUtils;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
10
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
12
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
13
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
14
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ParseUtils = void 0;
|
|
19
|
+
const common_1 = require("@nestjs/common");
|
|
20
|
+
const csv = require("csvtojson");
|
|
21
|
+
let ParseUtils = class ParseUtils {
|
|
22
|
+
parseCsvDataToJson(file) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const data = yield csv({ eol: '\n' }).fromFile(file.path);
|
|
25
|
+
return data;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
ParseUtils = __decorate([
|
|
30
|
+
(0, common_1.Injectable)()
|
|
31
|
+
], ParseUtils);
|
|
32
|
+
exports.ParseUtils = ParseUtils;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare const clean: (value: any) => any;
|
|
2
|
-
export declare const formatDate: (date: any) => string;
|
|
3
|
-
declare const sortCsvList: (ob: String) => String;
|
|
4
|
-
declare const parsedCvs: (ob: any, file: any) => Promise<any>;
|
|
5
|
-
export { parsedCvs, clean, sortCsvList };
|
|
1
|
+
declare const clean: (value: any) => any;
|
|
2
|
+
export declare const formatDate: (date: any) => string;
|
|
3
|
+
declare const sortCsvList: (ob: String) => String;
|
|
4
|
+
declare const parsedCvs: (ob: any, file: any) => Promise<any>;
|
|
5
|
+
export { parsedCvs, clean, sortCsvList };
|