@uniorganization/uni-lib 5.0.5 → 5.0.7

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.
@@ -7,5 +7,6 @@ export declare class EvaluationQuestions {
7
7
  answer: string;
8
8
  comments: string;
9
9
  answerScore: number;
10
+ isAutoFail: boolean;
10
11
  question: Questions;
11
12
  }
@@ -40,7 +40,7 @@ __decorate([
40
40
  __decorate([
41
41
  (0, typeorm_1.Column)({
42
42
  type: 'float',
43
- name: "answer_score",
43
+ name: 'answer_score',
44
44
  transformer: {
45
45
  to: (value) => value,
46
46
  from: (value) => parseFloat(value),
@@ -48,6 +48,10 @@ __decorate([
48
48
  }),
49
49
  __metadata("design:type", Number)
50
50
  ], EvaluationQuestions.prototype, "answerScore", void 0);
51
+ __decorate([
52
+ (0, typeorm_1.Column)({ name: 'is_autofail', default: false }),
53
+ __metadata("design:type", Boolean)
54
+ ], EvaluationQuestions.prototype, "isAutoFail", void 0);
51
55
  __decorate([
52
56
  (0, typeorm_1.ManyToOne)(() => questions_entity_1.Questions),
53
57
  (0, typeorm_1.JoinColumn)({ name: 'question_id' }),
@@ -20,6 +20,7 @@ export declare class Evaluations {
20
20
  autofail: string;
21
21
  autofailReason: string;
22
22
  autofailComments: string;
23
+ responseAutofail?: boolean;
23
24
  blankTransactionId: string;
24
25
  blankBpNumber: string;
25
26
  blankAgentComments: string;
@@ -89,6 +89,7 @@ export * from './file-type.entity';
89
89
  export * from './file.entity';
90
90
  export * from './service-center.entity';
91
91
  export * from './service-center-unsupported-model.entity';
92
+ export * from './service-center-unsupported-product.entity';
92
93
  export * from './service-center-ranking.entity';
93
94
  export * from './service-center-interaction.entity';
94
95
  export * from './service-center-review.entity';
@@ -105,6 +105,7 @@ __exportStar(require("./file-type.entity"), exports);
105
105
  __exportStar(require("./file.entity"), exports);
106
106
  __exportStar(require("./service-center.entity"), exports);
107
107
  __exportStar(require("./service-center-unsupported-model.entity"), exports);
108
+ __exportStar(require("./service-center-unsupported-product.entity"), exports);
108
109
  __exportStar(require("./service-center-ranking.entity"), exports);
109
110
  __exportStar(require("./service-center-interaction.entity"), exports);
110
111
  __exportStar(require("./service-center-review.entity"), exports);
@@ -1,4 +1,13 @@
1
1
  import { QuestionGroup } from './question-group.entity';
2
+ export interface QuestionOption {
3
+ text: string;
4
+ value: number;
5
+ isAutoFail: boolean;
6
+ }
7
+ export interface QuestionOptions {
8
+ type: string;
9
+ options: QuestionOption[];
10
+ }
2
11
  export declare class Questions {
3
12
  clientId: number;
4
13
  id: number;
@@ -6,6 +15,5 @@ export declare class Questions {
6
15
  sequence: number;
7
16
  header: string;
8
17
  text: string;
9
- options: JSON;
10
- isAutoFail: boolean;
18
+ options: QuestionOptions;
11
19
  }
@@ -44,10 +44,6 @@ __decorate([
44
44
  (0, typeorm_1.Column)('json'),
45
45
  __metadata("design:type", Object)
46
46
  ], Questions.prototype, "options", void 0);
47
- __decorate([
48
- (0, typeorm_1.Column)({ name: 'is_autofail' }),
49
- __metadata("design:type", Boolean)
50
- ], Questions.prototype, "isAutoFail", void 0);
51
47
  exports.Questions = Questions = __decorate([
52
48
  (0, typeorm_1.Entity)('questions', { schema: 'tracking' })
53
49
  ], Questions);
@@ -0,0 +1,14 @@
1
+ import { ServiceCenterEntity } from './service-center.entity';
2
+ import { Users } from './usr.entity';
3
+ export declare class ServiceCenterUnsupportedProductEntity {
4
+ clientId: number;
5
+ id: number;
6
+ serviceCenter: ServiceCenterEntity;
7
+ serviceCenterId: number;
8
+ product: string;
9
+ isActive: boolean;
10
+ createdBy?: Users | null;
11
+ createdById?: number | null;
12
+ dateCreated: Date;
13
+ dateUpdated: Date;
14
+ }
@@ -0,0 +1,64 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ServiceCenterUnsupportedProductEntity = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const service_center_entity_1 = require("./service-center.entity");
15
+ const usr_entity_1 = require("./usr.entity");
16
+ let ServiceCenterUnsupportedProductEntity = class ServiceCenterUnsupportedProductEntity {
17
+ };
18
+ exports.ServiceCenterUnsupportedProductEntity = ServiceCenterUnsupportedProductEntity;
19
+ __decorate([
20
+ (0, typeorm_1.Column)({ name: 'client_id', type: 'integer' }),
21
+ __metadata("design:type", Number)
22
+ ], ServiceCenterUnsupportedProductEntity.prototype, "clientId", void 0);
23
+ __decorate([
24
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
25
+ __metadata("design:type", Number)
26
+ ], ServiceCenterUnsupportedProductEntity.prototype, "id", void 0);
27
+ __decorate([
28
+ (0, typeorm_1.ManyToOne)(() => service_center_entity_1.ServiceCenterEntity),
29
+ (0, typeorm_1.JoinColumn)({ name: 'service_center_id' }),
30
+ __metadata("design:type", service_center_entity_1.ServiceCenterEntity)
31
+ ], ServiceCenterUnsupportedProductEntity.prototype, "serviceCenter", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)({ name: 'service_center_id', type: 'integer' }),
34
+ __metadata("design:type", Number)
35
+ ], ServiceCenterUnsupportedProductEntity.prototype, "serviceCenterId", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Column)({ name: 'product', type: 'varchar' }),
38
+ __metadata("design:type", String)
39
+ ], ServiceCenterUnsupportedProductEntity.prototype, "product", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ name: 'is_active', type: 'boolean', default: true }),
42
+ __metadata("design:type", Boolean)
43
+ ], ServiceCenterUnsupportedProductEntity.prototype, "isActive", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.ManyToOne)(() => usr_entity_1.Users, { nullable: true }),
46
+ (0, typeorm_1.JoinColumn)({ name: 'created_by_id' }),
47
+ __metadata("design:type", usr_entity_1.Users)
48
+ ], ServiceCenterUnsupportedProductEntity.prototype, "createdBy", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ name: 'created_by_id', type: 'integer', nullable: true }),
51
+ __metadata("design:type", Number)
52
+ ], ServiceCenterUnsupportedProductEntity.prototype, "createdById", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.CreateDateColumn)({ name: 'date_created', type: 'timestamp' }),
55
+ __metadata("design:type", Date)
56
+ ], ServiceCenterUnsupportedProductEntity.prototype, "dateCreated", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.UpdateDateColumn)({ name: 'date_updated', type: 'timestamp' }),
59
+ __metadata("design:type", Date)
60
+ ], ServiceCenterUnsupportedProductEntity.prototype, "dateUpdated", void 0);
61
+ exports.ServiceCenterUnsupportedProductEntity = ServiceCenterUnsupportedProductEntity = __decorate([
62
+ (0, typeorm_1.Entity)('service_center_unsupported_product', { schema: 'enr' }),
63
+ (0, typeorm_1.Index)(['clientId', 'serviceCenterId', 'product'])
64
+ ], ServiceCenterUnsupportedProductEntity);
@@ -3,6 +3,7 @@ import { Users } from './usr.entity';
3
3
  import { ServiceCenterPhoneEntity } from './service-center-phone.entity';
4
4
  import { ServiceCenterRankingEntity } from './service-center-ranking.entity';
5
5
  import { ServiceCenterUnsupportedModelEntity } from './service-center-unsupported-model.entity';
6
+ import { ServiceCenterUnsupportedProductEntity } from './service-center-unsupported-product.entity';
6
7
  import { ServiceCenterStatus } from '../enums/service-center-status.enum';
7
8
  export type ServiceCenterDeactivationSource = 'MANUAL' | 'ASC_UPLOAD';
8
9
  export declare class ServiceCenterEntity {
@@ -43,6 +44,7 @@ export declare class ServiceCenterEntity {
43
44
  totalReviews: number;
44
45
  phones: ServiceCenterPhoneEntity[];
45
46
  unsupportedModels: ServiceCenterUnsupportedModelEntity[];
47
+ unsupportedProducts: ServiceCenterUnsupportedProductEntity[];
46
48
  serviceCenterRanking: ServiceCenterRankingEntity;
47
49
  agent: Users;
48
50
  agentId: number;
@@ -15,6 +15,7 @@ const usr_entity_1 = require("./usr.entity");
15
15
  const service_center_phone_entity_1 = require("./service-center-phone.entity");
16
16
  const service_center_ranking_entity_1 = require("./service-center-ranking.entity");
17
17
  const service_center_unsupported_model_entity_1 = require("./service-center-unsupported-model.entity");
18
+ const service_center_unsupported_product_entity_1 = require("./service-center-unsupported-product.entity");
18
19
  const service_center_status_enum_1 = require("../enums/service-center-status.enum");
19
20
  let ServiceCenterEntity = class ServiceCenterEntity {
20
21
  };
@@ -171,6 +172,12 @@ __decorate([
171
172
  }),
172
173
  __metadata("design:type", Array)
173
174
  ], ServiceCenterEntity.prototype, "unsupportedModels", void 0);
175
+ __decorate([
176
+ (0, typeorm_1.OneToMany)(() => service_center_unsupported_product_entity_1.ServiceCenterUnsupportedProductEntity, (unsupportedProduct) => unsupportedProduct.serviceCenter, {
177
+ cascade: ['insert', 'update'],
178
+ }),
179
+ __metadata("design:type", Array)
180
+ ], ServiceCenterEntity.prototype, "unsupportedProducts", void 0);
174
181
  __decorate([
175
182
  (0, typeorm_1.OneToOne)(() => service_center_ranking_entity_1.ServiceCenterRankingEntity, (serviceCenterRanking) => serviceCenterRanking.serviceCenter, {
176
183
  createForeignKeyConstraints: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniorganization/uni-lib",
3
- "version": "5.0.5",
3
+ "version": "5.0.7",
4
4
  "description": "UNI Library",
5
5
  "author": "Jhomiguel",
6
6
  "main": "dist/index.js",