easywork-common-lib 1.0.379 → 1.0.381

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.
Files changed (235) hide show
  1. package/dist/common/database/base.entity.d.ts +27 -0
  2. package/dist/common/index.d.ts +7 -0
  3. package/dist/common/index.js +24 -0
  4. package/dist/common/index.js.map +1 -0
  5. package/dist/entities/app_config/app-config.entity.d.ts +5 -0
  6. package/dist/entities/app_config/app-config.entity.js +33 -0
  7. package/dist/entities/app_config/app-config.entity.js.map +1 -0
  8. package/dist/entities/currency.entity.d.ts +6 -0
  9. package/dist/entities/currency.entity.js +43 -0
  10. package/dist/entities/currency.entity.js.map +1 -0
  11. package/dist/entities/drive/attached_object.entity.d.ts +17 -0
  12. package/dist/entities/drive/attached_object.entity.js +125 -0
  13. package/dist/entities/drive/attached_object.entity.js.map +1 -0
  14. package/dist/entities/drive/file.entity.d.ts +14 -0
  15. package/dist/entities/drive/file.entity.js +88 -0
  16. package/dist/entities/drive/file.entity.js.map +1 -0
  17. package/dist/entities/drive/folder.entity.d.ts +14 -0
  18. package/dist/entities/drive/folder.entity.js +108 -0
  19. package/dist/entities/drive/folder.entity.js.map +1 -0
  20. package/dist/entities/drive/index.d.ts +3 -0
  21. package/dist/entities/drive/index.js +20 -0
  22. package/dist/entities/drive/index.js.map +1 -0
  23. package/dist/entities/easyapp/filter-view.entity.d.ts +7 -0
  24. package/dist/entities/easyapp/filter-view.entity.js +41 -0
  25. package/dist/entities/easyapp/filter-view.entity.js.map +1 -0
  26. package/dist/entities/email.entity.d.ts +5 -0
  27. package/dist/entities/email.entity.js +36 -0
  28. package/dist/entities/email.entity.js.map +1 -0
  29. package/dist/entities/group.entity.d.ts +5 -0
  30. package/dist/entities/group.entity.js +33 -0
  31. package/dist/entities/group.entity.js.map +1 -0
  32. package/dist/entities/helpers/entity_file.entity.d.ts +10 -0
  33. package/dist/entities/helpers/entity_file.entity.js +61 -0
  34. package/dist/entities/helpers/entity_file.entity.js.map +1 -0
  35. package/dist/entities/helpers/entity_folder.entity.d.ts +10 -0
  36. package/dist/entities/helpers/entity_folder.entity.js +61 -0
  37. package/dist/entities/helpers/entity_folder.entity.js.map +1 -0
  38. package/dist/entities/helpers/index.d.ts +4 -0
  39. package/dist/entities/helpers/sales/common/client_sources.entity.d.ts +5 -0
  40. package/dist/entities/helpers/sales/common/client_sources.entity.js +36 -0
  41. package/dist/entities/helpers/sales/common/client_sources.entity.js.map +1 -0
  42. package/dist/entities/helpers/sales/common/client_types.entity.d.ts +5 -0
  43. package/dist/entities/helpers/sales/common/client_types.entity.js +36 -0
  44. package/dist/entities/helpers/sales/common/client_types.entity.js.map +1 -0
  45. package/dist/entities/helpers/sales/contact/contact_email.entity.d.ts +11 -0
  46. package/dist/entities/helpers/sales/contact/contact_email.entity.js +68 -0
  47. package/dist/entities/helpers/sales/contact/contact_email.entity.js.map +1 -0
  48. package/dist/entities/helpers/sales/contact/contact_insurance.entity.d.ts +11 -0
  49. package/dist/entities/helpers/sales/contact/contact_insurance.entity.js +68 -0
  50. package/dist/entities/helpers/sales/contact/contact_insurance.entity.js.map +1 -0
  51. package/dist/entities/helpers/sales/contact/contact_phone.entity.d.ts +11 -0
  52. package/dist/entities/helpers/sales/contact/contact_phone.entity.js +68 -0
  53. package/dist/entities/helpers/sales/contact/contact_phone.entity.js.map +1 -0
  54. package/dist/entities/helpers/sales/contact/index.d.ts +5 -0
  55. package/dist/entities/helpers/sales/contact/index.js +22 -0
  56. package/dist/entities/helpers/sales/contact/index.js.map +1 -0
  57. package/dist/entities/helpers/sales/index.d.ts +6 -0
  58. package/dist/entities/helpers/sales/lead/h_lead_source.entity.d.ts +4 -0
  59. package/dist/entities/helpers/sales/lead/h_lead_source.entity.js +30 -0
  60. package/dist/entities/helpers/sales/lead/h_lead_source.entity.js.map +1 -0
  61. package/dist/entities/helpers/sales/lead/h_lead_stage.entity.d.ts +5 -0
  62. package/dist/entities/helpers/sales/lead/h_lead_stage.entity.js +36 -0
  63. package/dist/entities/helpers/sales/lead/h_lead_stage.entity.js.map +1 -0
  64. package/dist/entities/helpers/sales/lead/h_lead_types.entity.d.ts +4 -0
  65. package/dist/entities/helpers/sales/lead/h_lead_types.entity.js +30 -0
  66. package/dist/entities/helpers/sales/lead/h_lead_types.entity.js.map +1 -0
  67. package/dist/entities/helpers/sales/lead/index.d.ts +6 -0
  68. package/dist/entities/helpers/sales/lead/index.js +23 -0
  69. package/dist/entities/helpers/sales/lead/index.js.map +1 -0
  70. package/dist/entities/helpers/sales/lead/lead_cancel_reazon.entity.d.ts +4 -0
  71. package/dist/entities/helpers/sales/lead/lead_cancel_reazon.entity.js +28 -0
  72. package/dist/entities/helpers/sales/lead/lead_cancel_reazon.entity.js.map +1 -0
  73. package/dist/entities/helpers/sales/lead/lead_email.entity.d.ts +11 -0
  74. package/dist/entities/helpers/sales/lead/lead_email.entity.js +66 -0
  75. package/dist/entities/helpers/sales/lead/lead_email.entity.js.map +1 -0
  76. package/dist/entities/helpers/sales/lead/lead_phone.entity.d.ts +11 -0
  77. package/dist/entities/helpers/sales/lead/lead_phone.entity.js +66 -0
  78. package/dist/entities/helpers/sales/lead/lead_phone.entity.js.map +1 -0
  79. package/dist/entities/helpers/sales/poliza/index.d.ts +9 -0
  80. package/dist/entities/helpers/sales/poliza/poliza_beneficiary.entity.d.ts +12 -0
  81. package/dist/entities/helpers/sales/poliza/poliza_beneficiary.entity.js +73 -0
  82. package/dist/entities/helpers/sales/poliza/poliza_beneficiary.entity.js.map +1 -0
  83. package/dist/entities/helpers/sales/poliza/poliza_file.entity.d.ts +11 -0
  84. package/dist/entities/helpers/sales/poliza/poliza_file.entity.js +68 -0
  85. package/dist/entities/helpers/sales/poliza/poliza_file.entity.js.map +1 -0
  86. package/dist/entities/helpers/tools/index.d.ts +1 -0
  87. package/dist/entities/helpers/tools/index.js +18 -0
  88. package/dist/entities/helpers/tools/index.js.map +1 -0
  89. package/dist/entities/helpers/tools/task_crm.entity.d.ts +17 -0
  90. package/dist/entities/helpers/tools/task_crm.entity.js +121 -0
  91. package/dist/entities/helpers/tools/task_crm.entity.js.map +1 -0
  92. package/dist/entities/imap-config.entity.d.ts +11 -0
  93. package/dist/entities/imap-config.entity.js +61 -0
  94. package/dist/entities/imap-config.entity.js.map +1 -0
  95. package/dist/entities/index.d.ts +26 -0
  96. package/dist/entities/index.js +43 -0
  97. package/dist/entities/index.js.map +1 -0
  98. package/dist/entities/menu-permissions.entity.d.ts +7 -0
  99. package/dist/entities/menu-permissions.entity.js +42 -0
  100. package/dist/entities/menu-permissions.entity.js.map +1 -0
  101. package/dist/entities/notifications/index.d.ts +2 -0
  102. package/dist/entities/notifications/index.js +19 -0
  103. package/dist/entities/notifications/index.js.map +1 -0
  104. package/dist/entities/notifications/notification.entity.d.ts +15 -0
  105. package/dist/entities/notifications/notification.entity.js +119 -0
  106. package/dist/entities/notifications/notification.entity.js.map +1 -0
  107. package/dist/entities/notifications/push-token.entity.d.ts +7 -0
  108. package/dist/entities/notifications/push-token.entity.js +45 -0
  109. package/dist/entities/notifications/push-token.entity.js.map +1 -0
  110. package/dist/entities/otp-log.entity.d.ts +8 -0
  111. package/dist/entities/otp-log.entity.js +49 -0
  112. package/dist/entities/otp-log.entity.js.map +1 -0
  113. package/dist/entities/permission.entity.d.ts +7 -0
  114. package/dist/entities/permission.entity.js +46 -0
  115. package/dist/entities/permission.entity.js.map +1 -0
  116. package/dist/entities/phone.entity.d.ts +5 -0
  117. package/dist/entities/phone.entity.js +36 -0
  118. package/dist/entities/phone.entity.js.map +1 -0
  119. package/dist/entities/profile.entity.d.ts +9 -0
  120. package/dist/entities/protocol.entity.d.ts +8 -0
  121. package/dist/entities/protocol.entity.js +46 -0
  122. package/dist/entities/protocol.entity.js.map +1 -0
  123. package/dist/entities/refresh-token.entity.d.ts +8 -0
  124. package/dist/entities/refresh-token.entity.js +46 -0
  125. package/dist/entities/refresh-token.entity.js.map +1 -0
  126. package/dist/entities/role.entity.d.ts +5 -0
  127. package/dist/entities/role.entity.js +36 -0
  128. package/dist/entities/role.entity.js.map +1 -0
  129. package/dist/entities/sales/agente-intermediario.entity.d.ts +5 -0
  130. package/dist/entities/sales/agente-intermediario.entity.js +34 -0
  131. package/dist/entities/sales/agente-intermediario.entity.js.map +1 -0
  132. package/dist/entities/sales/beneficiarios/person.entity.d.ts +10 -0
  133. package/dist/entities/sales/beneficiarios/person.entity.js +64 -0
  134. package/dist/entities/sales/beneficiarios/person.entity.js.map +1 -0
  135. package/dist/entities/sales/beneficiarios/vehicle.entity.d.ts +13 -0
  136. package/dist/entities/sales/beneficiarios/vehicle.entity.js +83 -0
  137. package/dist/entities/sales/beneficiarios/vehicle.entity.js.map +1 -0
  138. package/dist/entities/sales/contact-comment.entity.d.ts +7 -0
  139. package/dist/entities/sales/contact-comment.entity.js +46 -0
  140. package/dist/entities/sales/contact-comment.entity.js.map +1 -0
  141. package/dist/entities/sales/contact.entity.d.ts +44 -0
  142. package/dist/entities/sales/contact.entity.js +267 -0
  143. package/dist/entities/sales/contact.entity.js.map +1 -0
  144. package/dist/entities/sales/index.d.ts +13 -0
  145. package/dist/entities/sales/index.js +30 -0
  146. package/dist/entities/sales/index.js.map +1 -0
  147. package/dist/entities/sales/lead-comment.entity.d.ts +7 -0
  148. package/dist/entities/sales/lead-comment.entity.js +46 -0
  149. package/dist/entities/sales/lead-comment.entity.js.map +1 -0
  150. package/dist/entities/sales/lead.entity.d.ts +43 -0
  151. package/dist/entities/sales/lead.entity.js +291 -0
  152. package/dist/entities/sales/lead.entity.js.map +1 -0
  153. package/dist/entities/sales/poliza-comment.entity.d.ts +7 -0
  154. package/dist/entities/sales/poliza-comment.entity.js +46 -0
  155. package/dist/entities/sales/poliza-comment.entity.js.map +1 -0
  156. package/dist/entities/sales/poliza.entity.d.ts +105 -0
  157. package/dist/entities/sales/poliza.entity.js +723 -0
  158. package/dist/entities/sales/poliza.entity.js.map +1 -0
  159. package/dist/entities/sales/poliza_siniestro.entity.d.ts +12 -0
  160. package/dist/entities/sales/poliza_siniestro.entity.js +72 -0
  161. package/dist/entities/sales/poliza_siniestro.entity.js.map +1 -0
  162. package/dist/entities/sales/receipt-sub-agente.entity.d.ts +5 -0
  163. package/dist/entities/sales/receipt-sub-agente.entity.js +35 -0
  164. package/dist/entities/sales/receipt-sub-agente.entity.js.map +1 -0
  165. package/dist/entities/sales/receipt.entity.d.ts +27 -0
  166. package/dist/entities/sales/receipt.entity.js +172 -0
  167. package/dist/entities/sales/receipt.entity.js.map +1 -0
  168. package/dist/entities/tag.entity.d.ts +8 -0
  169. package/dist/entities/tag.entity.js +53 -0
  170. package/dist/entities/tag.entity.js.map +1 -0
  171. package/dist/entities/thirdparty/email-config.entity.d.ts +14 -0
  172. package/dist/entities/thirdparty/email-config.entity.js +76 -0
  173. package/dist/entities/thirdparty/email-config.entity.js.map +1 -0
  174. package/dist/entities/thirdparty/email.entity.d.ts +17 -0
  175. package/dist/entities/thirdparty/email.entity.js +79 -0
  176. package/dist/entities/thirdparty/email.entity.js.map +1 -0
  177. package/dist/entities/thirdparty/oauth.entity.d.ts +17 -0
  178. package/dist/entities/thirdparty/oauth.entity.js +88 -0
  179. package/dist/entities/thirdparty/oauth.entity.js.map +1 -0
  180. package/dist/entities/thirdparty/service.entity.d.ts +6 -0
  181. package/dist/entities/thirdparty/service.entity.js +32 -0
  182. package/dist/entities/thirdparty/service.entity.js.map +1 -0
  183. package/dist/entities/thirdparty/user-email-relation.entity.d.ts +7 -0
  184. package/dist/entities/thirdparty/user-email-relation.entity.js +35 -0
  185. package/dist/entities/thirdparty/user-email-relation.entity.js.map +1 -0
  186. package/dist/entities/tools/calendar/event.entity.d.ts +17 -0
  187. package/dist/entities/tools/calendar/event.entity.js +110 -0
  188. package/dist/entities/tools/calendar/event.entity.js.map +1 -0
  189. package/dist/entities/tools/calendar/index.d.ts +1 -0
  190. package/dist/entities/tools/calendar/index.js +18 -0
  191. package/dist/entities/tools/calendar/index.js.map +1 -0
  192. package/dist/entities/tools/index.d.ts +4 -0
  193. package/dist/entities/tools/index.js +21 -0
  194. package/dist/entities/tools/index.js.map +1 -0
  195. package/dist/entities/tools/task-comment.entity.d.ts +9 -0
  196. package/dist/entities/tools/task-comment.entity.js +57 -0
  197. package/dist/entities/tools/task-comment.entity.js.map +1 -0
  198. package/dist/entities/tools/task.entity.d.ts +34 -0
  199. package/dist/entities/tools/task.entity.js +221 -0
  200. package/dist/entities/tools/task.entity.js.map +1 -0
  201. package/dist/entities/user.entity.d.ts +28 -0
  202. package/dist/entities/user.entity.js +160 -0
  203. package/dist/entities/user.entity.js.map +1 -0
  204. package/dist/eslint.config.d.ts +2 -0
  205. package/dist/eslint.config.js +46 -0
  206. package/dist/eslint.config.js.map +1 -0
  207. package/dist/grpc/drive/drive.proto +74 -0
  208. package/dist/index.d.ts +3 -0
  209. package/dist/index.js +20 -0
  210. package/dist/index.js.map +1 -0
  211. package/dist/modules/index.d.ts +3 -0
  212. package/dist/modules/index.js +20 -0
  213. package/dist/modules/index.js.map +1 -0
  214. package/dist/modules/queue/notifier.service.d.ts +15 -0
  215. package/dist/modules/queue/notifier.service.js +70 -0
  216. package/dist/modules/queue/notifier.service.js.map +1 -0
  217. package/dist/modules/queue/notifiers/contact.notifier.d.ts +7 -0
  218. package/dist/modules/queue/notifiers/contact.notifier.js +49 -0
  219. package/dist/modules/queue/notifiers/contact.notifier.js.map +1 -0
  220. package/dist/modules/queue/notifiers/index.d.ts +4 -0
  221. package/dist/modules/queue/notifiers/index.js +21 -0
  222. package/dist/modules/queue/notifiers/index.js.map +1 -0
  223. package/dist/modules/queue/notifiers/lead.notifier.d.ts +7 -0
  224. package/dist/modules/queue/notifiers/lead.notifier.js +49 -0
  225. package/dist/modules/queue/notifiers/lead.notifier.js.map +1 -0
  226. package/dist/modules/queue/notifiers/task.notifier.d.ts +15 -0
  227. package/dist/modules/queue/notifiers/task.notifier.js +130 -0
  228. package/dist/modules/queue/notifiers/task.notifier.js.map +1 -0
  229. package/dist/modules/queue/queue.module.d.ts +4 -0
  230. package/dist/modules/queue/queue.module.js +55 -0
  231. package/dist/modules/queue/queue.module.js.map +1 -0
  232. package/dist/modules/queue/scheduler.service.d.ts +9 -0
  233. package/package.json +1 -1
  234. package/tsconfig.json +1 -1
  235. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1,291 @@
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.Lead = void 0;
13
+ const base_entity_1 = require("../../common/database/base.entity");
14
+ const client_sources_entity_1 = require("../helpers/sales/common/client_sources.entity");
15
+ const client_types_entity_1 = require("../helpers/sales/common/client_types.entity");
16
+ const user_entity_1 = require("../user.entity");
17
+ const typeorm_1 = require("typeorm");
18
+ const swagger_1 = require("@nestjs/swagger");
19
+ const common_1 = require("../../common");
20
+ const contact_entity_1 = require("./contact.entity");
21
+ const helpers_1 = require("../helpers");
22
+ let Lead = class Lead extends base_entity_1.BaseEntityWithUser {
23
+ idBitrix;
24
+ typePerson;
25
+ codigo;
26
+ fullName;
27
+ name;
28
+ lastName;
29
+ secondName;
30
+ rfc;
31
+ address;
32
+ phones;
33
+ emails;
34
+ cargo;
35
+ birthdate;
36
+ gender;
37
+ type;
38
+ source;
39
+ assignedBy;
40
+ observador;
41
+ lead;
42
+ relations;
43
+ curp;
44
+ cua;
45
+ photo;
46
+ post;
47
+ comments;
48
+ company;
49
+ export;
50
+ sourceDescription;
51
+ cancelReazon;
52
+ stage;
53
+ cancelledBy;
54
+ cancelledAt;
55
+ cancelled;
56
+ contact;
57
+ };
58
+ exports.Lead = Lead;
59
+ __decorate([
60
+ (0, swagger_1.ApiProperty)({ type: Number, description: 'Bitrix ID of the lead', required: false }),
61
+ (0, typeorm_1.Column)({ name: "id_bitrix", nullable: true }),
62
+ __metadata("design:type", Number)
63
+ ], Lead.prototype, "idBitrix", void 0);
64
+ __decorate([
65
+ (0, swagger_1.ApiProperty)({
66
+ enum: common_1.PersonType,
67
+ description: 'Type of person',
68
+ default: common_1.PersonType.FISICA
69
+ }),
70
+ (0, typeorm_1.Column)({
71
+ type: "enum",
72
+ enum: common_1.PersonType,
73
+ default: common_1.PersonType.FISICA
74
+ }),
75
+ __metadata("design:type", String)
76
+ ], Lead.prototype, "typePerson", void 0);
77
+ __decorate([
78
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Code of the lead', required: false }),
79
+ (0, typeorm_1.Column)({ name: "codigo", length: 100, nullable: true }),
80
+ __metadata("design:type", String)
81
+ ], Lead.prototype, "codigo", void 0);
82
+ __decorate([
83
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Full name of the lead', required: false }),
84
+ (0, typeorm_1.Column)({ name: "full_name", length: 255, nullable: true }),
85
+ __metadata("design:type", String)
86
+ ], Lead.prototype, "fullName", void 0);
87
+ __decorate([
88
+ (0, swagger_1.ApiProperty)({ type: String, description: 'First name of the lead', required: false }),
89
+ (0, typeorm_1.Column)({ name: "name", length: 150, nullable: true }),
90
+ __metadata("design:type", String)
91
+ ], Lead.prototype, "name", void 0);
92
+ __decorate([
93
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Last name of the lead', required: false }),
94
+ (0, typeorm_1.Column)({ name: "last_name", length: 150, nullable: true }),
95
+ __metadata("design:type", String)
96
+ ], Lead.prototype, "lastName", void 0);
97
+ __decorate([
98
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Second name of the lead', required: false }),
99
+ (0, typeorm_1.Column)({ name: "second_name", length: 150, nullable: true }),
100
+ __metadata("design:type", String)
101
+ ], Lead.prototype, "secondName", void 0);
102
+ __decorate([
103
+ (0, swagger_1.ApiProperty)({ type: String, description: 'RFC of the lead', required: false }),
104
+ (0, typeorm_1.Column)({ name: "rfc", length: 100, nullable: true }),
105
+ __metadata("design:type", String)
106
+ ], Lead.prototype, "rfc", void 0);
107
+ __decorate([
108
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Address of the lead', required: false }),
109
+ (0, typeorm_1.Column)({ name: "address", type: "text", nullable: true }),
110
+ __metadata("design:type", String)
111
+ ], Lead.prototype, "address", void 0);
112
+ __decorate([
113
+ (0, swagger_1.ApiProperty)({ type: () => [helpers_1.LeadPhone], description: 'Phones associated with the lead' }),
114
+ (0, typeorm_1.OneToMany)(() => helpers_1.LeadPhone, (leadPhone) => leadPhone.lead, {
115
+ onDelete: "CASCADE",
116
+ onUpdate: "CASCADE",
117
+ eager: true,
118
+ }),
119
+ __metadata("design:type", Array)
120
+ ], Lead.prototype, "phones", void 0);
121
+ __decorate([
122
+ (0, swagger_1.ApiProperty)({ type: () => [helpers_1.LeadEmail], description: 'Emails associated with the lead' }),
123
+ (0, typeorm_1.OneToMany)(() => helpers_1.LeadEmail, (leadEmail) => leadEmail.lead, {
124
+ onDelete: "CASCADE",
125
+ onUpdate: "CASCADE",
126
+ eager: true,
127
+ }),
128
+ __metadata("design:type", Array)
129
+ ], Lead.prototype, "emails", void 0);
130
+ __decorate([
131
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Cargo of the lead', required: false }),
132
+ (0, typeorm_1.Column)({ name: "cargo", length: 150, nullable: true }),
133
+ __metadata("design:type", String)
134
+ ], Lead.prototype, "cargo", void 0);
135
+ __decorate([
136
+ (0, swagger_1.ApiProperty)({ type: Date, description: 'Birthdate of the lead', required: false }),
137
+ (0, typeorm_1.Column)({ name: "birthdate", nullable: true }),
138
+ __metadata("design:type", Date)
139
+ ], Lead.prototype, "birthdate", void 0);
140
+ __decorate([
141
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Gender of the lead', required: false }),
142
+ (0, typeorm_1.Column)({ name: "gender", length: 10, nullable: true }),
143
+ __metadata("design:type", String)
144
+ ], Lead.prototype, "gender", void 0);
145
+ __decorate([
146
+ (0, swagger_1.ApiProperty)({ type: () => client_types_entity_1.ClientType, description: 'Lead type', required: true }),
147
+ (0, typeorm_1.ManyToOne)(() => client_types_entity_1.ClientType, {
148
+ onDelete: "SET NULL",
149
+ onUpdate: "CASCADE",
150
+ nullable: true,
151
+ eager: true,
152
+ }),
153
+ __metadata("design:type", client_types_entity_1.ClientType)
154
+ ], Lead.prototype, "type", void 0);
155
+ __decorate([
156
+ (0, swagger_1.ApiProperty)({ type: () => client_sources_entity_1.ClientSource, description: 'Lead source', required: true }),
157
+ (0, typeorm_1.ManyToOne)(() => client_sources_entity_1.ClientSource, {
158
+ onDelete: "SET NULL",
159
+ onUpdate: "CASCADE",
160
+ nullable: true,
161
+ eager: true,
162
+ }),
163
+ __metadata("design:type", client_sources_entity_1.ClientSource)
164
+ ], Lead.prototype, "source", void 0);
165
+ __decorate([
166
+ (0, swagger_1.ApiProperty)({ type: () => user_entity_1.User, description: 'User assigned to the lead', required: false }),
167
+ (0, typeorm_1.ManyToOne)(() => user_entity_1.User, {
168
+ onDelete: "SET NULL",
169
+ onUpdate: "CASCADE",
170
+ nullable: true,
171
+ }),
172
+ __metadata("design:type", user_entity_1.User)
173
+ ], Lead.prototype, "assignedBy", void 0);
174
+ __decorate([
175
+ (0, swagger_1.ApiProperty)({ type: () => user_entity_1.User, description: 'User observing the lead', required: false }),
176
+ (0, typeorm_1.ManyToOne)(() => user_entity_1.User, {
177
+ onDelete: "SET NULL",
178
+ onUpdate: "CASCADE",
179
+ nullable: true,
180
+ }),
181
+ __metadata("design:type", user_entity_1.User)
182
+ ], Lead.prototype, "observador", void 0);
183
+ __decorate([
184
+ (0, swagger_1.ApiProperty)({ type: () => Lead, description: 'Lead', required: false }),
185
+ (0, typeorm_1.ManyToOne)(() => Lead, {
186
+ onDelete: "SET NULL",
187
+ onUpdate: "CASCADE",
188
+ nullable: true,
189
+ }),
190
+ __metadata("design:type", Lead)
191
+ ], Lead.prototype, "lead", void 0);
192
+ __decorate([
193
+ (0, swagger_1.ApiProperty)({ type: () => [contact_entity_1.Contact], description: 'Contacts related' }),
194
+ (0, typeorm_1.ManyToMany)(() => contact_entity_1.Contact, {
195
+ onDelete: "CASCADE",
196
+ onUpdate: "CASCADE",
197
+ }),
198
+ (0, typeorm_1.JoinTable)(),
199
+ __metadata("design:type", Array)
200
+ ], Lead.prototype, "relations", void 0);
201
+ __decorate([
202
+ (0, swagger_1.ApiProperty)({ type: String, description: 'CURP of the lead', required: false }),
203
+ (0, typeorm_1.Column)({ name: "curp", length: 50, nullable: true }),
204
+ __metadata("design:type", String)
205
+ ], Lead.prototype, "curp", void 0);
206
+ __decorate([
207
+ (0, swagger_1.ApiProperty)({ type: String, description: 'CUA of the lead', required: false }),
208
+ (0, typeorm_1.Column)({ name: "cua", length: 50, nullable: true }),
209
+ __metadata("design:type", String)
210
+ ], Lead.prototype, "cua", void 0);
211
+ __decorate([
212
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Photo URL of the lead', required: false }),
213
+ (0, typeorm_1.Column)({ name: "photo", length: 255, nullable: true }),
214
+ __metadata("design:type", String)
215
+ ], Lead.prototype, "photo", void 0);
216
+ __decorate([
217
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Post of the lead', required: false }),
218
+ (0, typeorm_1.Column)({ name: "post", type: "text", nullable: true }),
219
+ __metadata("design:type", String)
220
+ ], Lead.prototype, "post", void 0);
221
+ __decorate([
222
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Comments about the lead', required: false }),
223
+ (0, typeorm_1.Column)({ name: "comments", type: "text", nullable: true }),
224
+ __metadata("design:type", String)
225
+ ], Lead.prototype, "comments", void 0);
226
+ __decorate([
227
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Company of the lead', required: false }),
228
+ (0, typeorm_1.Column)({ length: 255, nullable: true }),
229
+ __metadata("design:type", String)
230
+ ], Lead.prototype, "company", void 0);
231
+ __decorate([
232
+ (0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is the lead exported?', default: false }),
233
+ (0, typeorm_1.Column)({ name: "export", default: false }),
234
+ __metadata("design:type", Boolean)
235
+ ], Lead.prototype, "export", void 0);
236
+ __decorate([
237
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Source description of the lead', required: false }),
238
+ (0, typeorm_1.Column)({ type: "text", nullable: true }),
239
+ __metadata("design:type", String)
240
+ ], Lead.prototype, "sourceDescription", void 0);
241
+ __decorate([
242
+ (0, swagger_1.ApiProperty)({ type: () => helpers_1.LeadCancelReazon, description: 'Cancel Reazon', required: false }),
243
+ (0, typeorm_1.ManyToOne)(() => helpers_1.LeadCancelReazon, {
244
+ onDelete: "SET NULL",
245
+ onUpdate: "CASCADE",
246
+ }),
247
+ __metadata("design:type", helpers_1.LeadCancelReazon)
248
+ ], Lead.prototype, "cancelReazon", void 0);
249
+ __decorate([
250
+ (0, swagger_1.ApiProperty)({ type: () => helpers_1.LeadStage, description: 'Stage of the lead', required: true }),
251
+ (0, typeorm_1.ManyToOne)(() => helpers_1.LeadStage, {
252
+ onDelete: "SET NULL",
253
+ onUpdate: "CASCADE",
254
+ nullable: true,
255
+ eager: true,
256
+ }),
257
+ __metadata("design:type", helpers_1.LeadStage)
258
+ ], Lead.prototype, "stage", void 0);
259
+ __decorate([
260
+ (0, swagger_1.ApiProperty)({ type: () => user_entity_1.User, description: 'User assigned to the lead', required: false }),
261
+ (0, typeorm_1.ManyToOne)(() => user_entity_1.User, {
262
+ onDelete: "SET NULL",
263
+ onUpdate: "CASCADE",
264
+ nullable: true,
265
+ }),
266
+ __metadata("design:type", user_entity_1.User)
267
+ ], Lead.prototype, "cancelledBy", void 0);
268
+ __decorate([
269
+ (0, swagger_1.ApiProperty)({ type: Date, description: 'Cancelled at', required: false }),
270
+ (0, typeorm_1.Column)({ nullable: true }),
271
+ __metadata("design:type", Date)
272
+ ], Lead.prototype, "cancelledAt", void 0);
273
+ __decorate([
274
+ (0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is the lead cancelled?', default: false }),
275
+ (0, typeorm_1.Column)({ default: false }),
276
+ __metadata("design:type", Boolean)
277
+ ], Lead.prototype, "cancelled", void 0);
278
+ __decorate([
279
+ (0, swagger_1.ApiProperty)({ type: () => contact_entity_1.Contact, description: 'Contact associated with this lead', required: false }),
280
+ (0, typeorm_1.OneToOne)(() => contact_entity_1.Contact, (contact) => contact.lead, {
281
+ cascade: true,
282
+ onDelete: "CASCADE",
283
+ onUpdate: "CASCADE",
284
+ }),
285
+ (0, typeorm_1.JoinColumn)(),
286
+ __metadata("design:type", contact_entity_1.Contact)
287
+ ], Lead.prototype, "contact", void 0);
288
+ exports.Lead = Lead = __decorate([
289
+ (0, typeorm_1.Entity)()
290
+ ], Lead);
291
+ //# sourceMappingURL=lead.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lead.entity.js","sourceRoot":"","sources":["../../../src/entities/sales/lead.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mEAAuE;AACvE,yFAA6E;AAC7E,qFAAyE;AACzE,gDAAsC;AACtC,qCAA4G;AAC5G,6CAA8C;AAC9C,yCAA0C;AAC1C,qDAA2C;AAC3C,wCAA8E;AAEvE,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,gCAAkB;IAG1C,QAAQ,CAAU;IAYlB,UAAU,CAAa;IAIvB,MAAM,CAAU;IAKhB,QAAQ,CAAU;IAIlB,IAAI,CAAU;IAId,QAAQ,CAAU;IAIlB,UAAU,CAAU;IAKpB,GAAG,CAAU;IAIb,OAAO,CAAU;IAQjB,MAAM,CAAe;IAQrB,MAAM,CAAe;IAIrB,KAAK,CAAU;IAIf,SAAS,CAAQ;IA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E,KAAK,EAAE,CAAC;IACzE,IAAA,gBAAM,EAAC,EAAG,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACd,IAAI;yCAAC;AAInB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IACrF,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;uCACP;AASpB;IAPC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,wBAAO,EAAE,WAAW,EAAE,mCAAmC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACvG,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,wBAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE;QAClD,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,IAAA,oBAAU,GAAE;8BACH,wBAAO;qCAAC;eArMP,IAAI;IADhB,IAAA,gBAAM,GAAE;GACI,IAAI,CAuMhB"}
@@ -0,0 +1,7 @@
1
+ import { BaseEntityWithUser } from "../../common/database/base.entity";
2
+ import { Poliza } from "./poliza.entity";
3
+ export declare class PolizaComment extends BaseEntityWithUser {
4
+ comment: string;
5
+ pinned: boolean;
6
+ poliza: Poliza;
7
+ }
@@ -0,0 +1,46 @@
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.PolizaComment = void 0;
13
+ const base_entity_1 = require("../../common/database/base.entity");
14
+ const class_validator_1 = require("class-validator");
15
+ const typeorm_1 = require("typeorm");
16
+ const poliza_entity_1 = require("./poliza.entity");
17
+ const swagger_1 = require("@nestjs/swagger");
18
+ let PolizaComment = class PolizaComment extends base_entity_1.BaseEntityWithUser {
19
+ comment;
20
+ pinned;
21
+ poliza;
22
+ };
23
+ exports.PolizaComment = PolizaComment;
24
+ __decorate([
25
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Comment text', minLength: 1 }),
26
+ (0, class_validator_1.MinLength)(1),
27
+ (0, typeorm_1.Column)({ type: "text" }),
28
+ __metadata("design:type", String)
29
+ ], PolizaComment.prototype, "comment", void 0);
30
+ __decorate([
31
+ (0, swagger_1.ApiProperty)({ type: Boolean, description: 'Pinned comment', default: false }),
32
+ (0, typeorm_1.Column)({ default: false }),
33
+ __metadata("design:type", Boolean)
34
+ ], PolizaComment.prototype, "pinned", void 0);
35
+ __decorate([
36
+ (0, swagger_1.ApiProperty)({ type: () => poliza_entity_1.Poliza, description: 'Poliza associated with the comment' }),
37
+ (0, typeorm_1.ManyToOne)(() => poliza_entity_1.Poliza, {
38
+ onDelete: "CASCADE",
39
+ onUpdate: "CASCADE",
40
+ }),
41
+ __metadata("design:type", poliza_entity_1.Poliza)
42
+ ], PolizaComment.prototype, "poliza", void 0);
43
+ exports.PolizaComment = PolizaComment = __decorate([
44
+ (0, typeorm_1.Entity)()
45
+ ], PolizaComment);
46
+ //# sourceMappingURL=poliza-comment.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"poliza-comment.entity.js","sourceRoot":"","sources":["../../../src/entities/sales/poliza-comment.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mEAAuE;AACvE,qDAA4C;AAC5C,qCAAoD;AACpD,mDAAyC;AACzC,6CAA8C;AAGvC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,gCAAkB;IAIjD,OAAO,CAAS;IAIhB,MAAM,CAAU;IAOhB,MAAM,CAAS;CAClB,CAAA;AAhBY,sCAAa;AAItB;IAHC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACxE,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8CACT;AAIhB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC7E,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;6CACX;AAOhB;IALC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,sBAAM,EAAE,WAAW,EAAE,oCAAoC,EAAE,CAAC;IACtF,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,sBAAM,EAAE;QACrB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACtB,CAAC;8BACM,sBAAM;6CAAC;wBAfN,aAAa;IADzB,IAAA,gBAAM,GAAE;GACI,aAAa,CAgBzB"}
@@ -0,0 +1,105 @@
1
+ import { User } from "../user.entity";
2
+ import { Contact } from "./contact.entity";
3
+ import { PolizaInsurance, PolizaFormaCobro, PolizaType, PolizaFile, PolizaFrecuenciaPago, PolizaCategory, PolizaSubramo, PolizaBeneficiary, PolizaConductoPago, TaskCRM } from "../helpers";
4
+ import { PolizaSiniestro } from "./poliza_siniestro.entity";
5
+ import { PolizaDiasPlazoPago, PolizaStatus } from "../../common/enums";
6
+ import { BaseEntityWithUser } from "../../common/database/base.entity";
7
+ import { Currency } from "../currency.entity";
8
+ import { Receipt } from "./receipt.entity";
9
+ import { BeneficiaryVehicle } from "./beneficiarios/vehicle.entity";
10
+ import { AgenteIntermediario } from "./agente-intermediario.entity";
11
+ export declare class Poliza extends BaseEntityWithUser {
12
+ idBitrix: number;
13
+ poliza: string;
14
+ polizaRenovacion: string;
15
+ tipoConexion: string;
16
+ version: number;
17
+ versionRenovacion: number;
18
+ renovacion: number;
19
+ repeated?: boolean;
20
+ renewal?: boolean;
21
+ vigenciaDesde: Date;
22
+ vigenciaHasta: Date;
23
+ vigenciaDesdeVersion: Date;
24
+ vigenciaHastaVersion: Date;
25
+ vigenciaDesdeRenovacion: Date;
26
+ vigenciaHastaRenovacion: Date;
27
+ fechaEmision: Date;
28
+ fechaEmisionRenovacion: Date;
29
+ description: string;
30
+ primaNeta?: number;
31
+ recargoFraccionado?: number;
32
+ derechoPoliza?: number;
33
+ iva?: number;
34
+ importePagar?: number;
35
+ primaNetaRenovacion?: number;
36
+ recargoFraccionadoRenovacion?: number;
37
+ derechoPolizaRenovacion?: number;
38
+ ivaRenovacion?: number;
39
+ importePagarRenovacion?: number;
40
+ primaNetaMovimiento?: number;
41
+ recargoFraccionadoMovimiento?: number;
42
+ derechoPolizaMovimiento?: number;
43
+ ivaMovimiento?: number;
44
+ importePagarMovimiento?: number;
45
+ frecuenciaCobro: PolizaFrecuenciaPago;
46
+ frecuenciaCobroRenovacion: PolizaFrecuenciaPago;
47
+ currency: Currency;
48
+ plazoPago: PolizaDiasPlazoPago;
49
+ expeditionDate: Date;
50
+ cobertura: string;
51
+ plan: string;
52
+ typeMovement: string;
53
+ movementDescription: string;
54
+ agentText: string;
55
+ name: string;
56
+ closed?: boolean;
57
+ opportunity?: number;
58
+ isManualOpportunity?: boolean;
59
+ taxValue?: number;
60
+ opportunityAccount?: number;
61
+ taxValueAccount?: number;
62
+ accountCurrencyId?: string;
63
+ probability?: number;
64
+ comments?: string;
65
+ eventDate?: Date;
66
+ eventId?: string;
67
+ eventDescription?: string;
68
+ exchRate?: number;
69
+ product?: string;
70
+ source: string;
71
+ sourceDescription: string;
72
+ company: PolizaInsurance;
73
+ type: PolizaType;
74
+ conductoPago: PolizaConductoPago;
75
+ formaCobro: PolizaFormaCobro;
76
+ formaCobroRenovacion: PolizaFormaCobro;
77
+ agenteIntermediario: AgenteIntermediario;
78
+ agenteIntermediarioRenovacion: AgenteIntermediario;
79
+ contact: Contact;
80
+ files?: PolizaFile[];
81
+ status: PolizaStatus;
82
+ siniestros: PolizaSiniestro[];
83
+ assignedBy?: User;
84
+ descripcionMovimiento?: string;
85
+ especificacionesPlan: string;
86
+ agenteReclamo?: User;
87
+ observers?: User[];
88
+ agenteReembolso?: User;
89
+ agenteProgramaciones?: User;
90
+ agenteReembolsoSubsecuente?: User;
91
+ agenteRescateFondos?: User;
92
+ agenteGMM?: User;
93
+ agenteVida?: User;
94
+ agenteAutos?: User;
95
+ fechaReferidaPago?: string;
96
+ fechaReferidaPagoRenovacion?: string;
97
+ receipts?: Receipt[];
98
+ beneficiaries?: PolizaBeneficiary[];
99
+ vehicles?: BeneficiaryVehicle[];
100
+ category?: PolizaCategory;
101
+ subramo?: PolizaSubramo;
102
+ subramoSalud?: PolizaSubramo;
103
+ metadata: Record<string, any>;
104
+ tasks: TaskCRM[];
105
+ }