@cleardu/core 1.0.522 → 1.0.524
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/interceptors/success.interceptor.d.ts +1 -1
- package/interceptors/success.interceptor.js +4 -2
- package/interceptors/success.interceptor.ts +6 -2
- package/package.json +1 -1
- package/schemas/loanContacts/index.js +1 -0
- package/schemas/loanContacts/index.ts +1 -0
- package/schemas/loanSummary/index.d.ts +1 -0
- package/schemas/loanSummary/index.js +8 -1
- package/schemas/loanSummary/index.ts +8 -1
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -4,5 +4,5 @@ export interface Response<T> {
|
|
|
4
4
|
data: T;
|
|
5
5
|
}
|
|
6
6
|
export declare class SuccessInterceptor<T> implements NestInterceptor<T, Response<T>> {
|
|
7
|
-
intercept(
|
|
7
|
+
intercept(context: ExecutionContext, next: CallHandler): Observable<Response<T>>;
|
|
8
8
|
}
|
|
@@ -5,10 +5,12 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const common_1 = require("@nestjs/common");
|
|
6
6
|
const operators_1 = require("rxjs/operators");
|
|
7
7
|
let SuccessInterceptor = class SuccessInterceptor {
|
|
8
|
-
intercept(
|
|
8
|
+
intercept(context, next) {
|
|
9
9
|
return next
|
|
10
10
|
.handle()
|
|
11
|
-
.pipe((0, operators_1.map)((data) =>
|
|
11
|
+
.pipe((0, operators_1.map)((data) => {
|
|
12
|
+
return { ...data, statusCode: common_1.HttpStatus.OK };
|
|
13
|
+
}));
|
|
12
14
|
}
|
|
13
15
|
};
|
|
14
16
|
exports.SuccessInterceptor = SuccessInterceptor;
|
|
@@ -15,10 +15,14 @@ export interface Response<T> {
|
|
|
15
15
|
|
|
16
16
|
@Injectable()
|
|
17
17
|
export class SuccessInterceptor<T> implements NestInterceptor<T, Response<T>> {
|
|
18
|
-
intercept(
|
|
18
|
+
intercept(context: ExecutionContext, next: CallHandler): Observable<Response<T>> {
|
|
19
19
|
return next
|
|
20
20
|
.handle()
|
|
21
|
-
.pipe(
|
|
21
|
+
.pipe(
|
|
22
|
+
map((data) => {
|
|
23
|
+
return { ...data, statusCode: HttpStatus.OK };
|
|
24
|
+
}),
|
|
25
|
+
);
|
|
22
26
|
}
|
|
23
27
|
}
|
|
24
28
|
|
package/package.json
CHANGED
|
@@ -27,6 +27,7 @@ tslib_1.__decorate([
|
|
|
27
27
|
type: sequelize_typescript_1.DataType.ENUM(...Object.values(types_1.preferenceTypes)),
|
|
28
28
|
allowNull: true,
|
|
29
29
|
}),
|
|
30
|
+
(0, sequelize_typescript_1.Index)('idx_loan_contacts_number_type'),
|
|
30
31
|
tslib_1.__metadata("design:type", String)
|
|
31
32
|
], LoanContacts.prototype, "numberType", void 0);
|
|
32
33
|
LoanContacts = tslib_1.__decorate([
|
|
@@ -9,8 +9,9 @@ let LoanSummary = class LoanSummary extends baseModel_1.default {
|
|
|
9
9
|
};
|
|
10
10
|
tslib_1.__decorate([
|
|
11
11
|
(0, sequelize_typescript_1.ForeignKey)(() => loans_1.default),
|
|
12
|
-
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.INTEGER, allowNull: true
|
|
12
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.INTEGER, allowNull: true }),
|
|
13
13
|
(0, sequelize_typescript_1.Column)(sequelize_typescript_1.DataType.INTEGER),
|
|
14
|
+
(0, sequelize_typescript_1.Index)({ name: 'uniq_loan_number_type', unique: true }),
|
|
14
15
|
tslib_1.__metadata("design:type", Number)
|
|
15
16
|
], LoanSummary.prototype, "loanId", void 0);
|
|
16
17
|
tslib_1.__decorate([
|
|
@@ -19,8 +20,14 @@ tslib_1.__decorate([
|
|
|
19
20
|
], LoanSummary.prototype, "loanSummary", void 0);
|
|
20
21
|
tslib_1.__decorate([
|
|
21
22
|
(0, sequelize_typescript_1.Column)(sequelize_typescript_1.DataType.ENUM(...Object.values(types_1.autoCallableNumberTypes))),
|
|
23
|
+
(0, sequelize_typescript_1.Index)({ name: 'uniq_loan_number_type', unique: true }),
|
|
22
24
|
tslib_1.__metadata("design:type", String)
|
|
23
25
|
], LoanSummary.prototype, "leadNumberType", void 0);
|
|
26
|
+
tslib_1.__decorate([
|
|
27
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.BOOLEAN, defaultValue: false }),
|
|
28
|
+
(0, sequelize_typescript_1.Column)(sequelize_typescript_1.DataType.BOOLEAN),
|
|
29
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
30
|
+
], LoanSummary.prototype, "isCalled", void 0);
|
|
24
31
|
LoanSummary = tslib_1.__decorate([
|
|
25
32
|
(0, sequelize_typescript_1.Table)({ tableName: 'loan_summary' })
|
|
26
33
|
], LoanSummary);
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
Column,
|
|
4
4
|
DataType,
|
|
5
5
|
ForeignKey,
|
|
6
|
+
Index,
|
|
6
7
|
Table,
|
|
7
8
|
} from 'sequelize-typescript';
|
|
8
9
|
import BaseModel from '../baseModel';
|
|
@@ -15,12 +16,18 @@ export default class LoanSummary
|
|
|
15
16
|
implements ILoanSummary
|
|
16
17
|
{
|
|
17
18
|
@ForeignKey(() => Loans)
|
|
18
|
-
@Column({ type: DataType.INTEGER, allowNull: true
|
|
19
|
+
@Column({ type: DataType.INTEGER, allowNull: true })
|
|
19
20
|
@Column(DataType.INTEGER)
|
|
21
|
+
@Index({ name: 'uniq_loan_number_type', unique: true })
|
|
20
22
|
loanId: number;
|
|
21
23
|
@BelongsTo(() => Loans)
|
|
22
24
|
loanSummary: Loans;
|
|
23
25
|
|
|
24
26
|
@Column(DataType.ENUM(...Object.values(autoCallableNumberTypes)))
|
|
27
|
+
@Index({ name: 'uniq_loan_number_type', unique: true })
|
|
25
28
|
public leadNumberType: autoCallableNumberTypes;
|
|
29
|
+
|
|
30
|
+
@Column({ type: DataType.BOOLEAN, defaultValue: false })
|
|
31
|
+
@Column(DataType.BOOLEAN)
|
|
32
|
+
isCalled: boolean;
|
|
26
33
|
}
|