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,267 @@
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.Contact = void 0;
13
+ const base_entity_1 = require("../../common/database/base.entity");
14
+ const contact_email_entity_1 = require("../helpers/sales/contact/contact_email.entity");
15
+ const contact_phone_entity_1 = require("../helpers/sales/contact/contact_phone.entity");
16
+ const client_sources_entity_1 = require("../helpers/sales/common/client_sources.entity");
17
+ const client_types_entity_1 = require("../helpers/sales/common/client_types.entity");
18
+ const user_entity_1 = require("../user.entity");
19
+ const typeorm_1 = require("typeorm");
20
+ const poliza_entity_1 = require("./poliza.entity");
21
+ const swagger_1 = require("@nestjs/swagger");
22
+ const lead_entity_1 = require("./lead.entity");
23
+ const common_1 = require("../../common");
24
+ const contact_insurance_entity_1 = require("../helpers/sales/contact/contact_insurance.entity");
25
+ const helpers_1 = require("../helpers");
26
+ let Contact = class Contact extends base_entity_1.BaseEntityWithUser {
27
+ idBitrix;
28
+ typePerson;
29
+ codigo;
30
+ fullName;
31
+ name;
32
+ lastName;
33
+ secondName;
34
+ codigos;
35
+ rfc;
36
+ address;
37
+ phones;
38
+ emails;
39
+ cargo;
40
+ birthdate;
41
+ gender;
42
+ type;
43
+ source;
44
+ assignedBy;
45
+ tasks;
46
+ observador;
47
+ lead;
48
+ relations;
49
+ curp;
50
+ cua;
51
+ photo;
52
+ post;
53
+ comments;
54
+ company;
55
+ export;
56
+ sourceDescription;
57
+ polizas;
58
+ };
59
+ exports.Contact = Contact;
60
+ __decorate([
61
+ (0, swagger_1.ApiProperty)({ type: Number, description: 'Bitrix ID of the contact', required: false }),
62
+ (0, typeorm_1.Column)({ name: "id_bitrix", nullable: true }),
63
+ __metadata("design:type", Number)
64
+ ], Contact.prototype, "idBitrix", void 0);
65
+ __decorate([
66
+ (0, swagger_1.ApiProperty)({
67
+ enum: common_1.PersonType,
68
+ description: 'Type of person',
69
+ default: common_1.PersonType.FISICA
70
+ }),
71
+ (0, typeorm_1.Column)({
72
+ type: "enum",
73
+ enum: common_1.PersonType,
74
+ default: common_1.PersonType.FISICA
75
+ }),
76
+ __metadata("design:type", String)
77
+ ], Contact.prototype, "typePerson", void 0);
78
+ __decorate([
79
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Code of the contact', required: false }),
80
+ (0, typeorm_1.Column)({ name: "codigo", length: 100, nullable: true }),
81
+ __metadata("design:type", String)
82
+ ], Contact.prototype, "codigo", void 0);
83
+ __decorate([
84
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Full name of the contact', required: false }),
85
+ (0, typeorm_1.Column)({ name: "full_name", length: 255, nullable: true }),
86
+ __metadata("design:type", String)
87
+ ], Contact.prototype, "fullName", void 0);
88
+ __decorate([
89
+ (0, swagger_1.ApiProperty)({ type: String, description: 'First name of the contact', required: false }),
90
+ (0, typeorm_1.Column)({ name: "name", length: 150, nullable: true }),
91
+ __metadata("design:type", String)
92
+ ], Contact.prototype, "name", void 0);
93
+ __decorate([
94
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Last name of the contact', required: false }),
95
+ (0, typeorm_1.Column)({ name: "last_name", length: 150, nullable: true }),
96
+ __metadata("design:type", String)
97
+ ], Contact.prototype, "lastName", void 0);
98
+ __decorate([
99
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Second name of the contact', required: false }),
100
+ (0, typeorm_1.Column)({ name: "second_name", length: 150, nullable: true }),
101
+ __metadata("design:type", String)
102
+ ], Contact.prototype, "secondName", void 0);
103
+ __decorate([
104
+ (0, swagger_1.ApiProperty)({ type: () => [contact_insurance_entity_1.ContactInsurance], description: 'Codigos de aseguradoras' }),
105
+ (0, typeorm_1.OneToMany)(() => contact_insurance_entity_1.ContactInsurance, (contactEmail) => contactEmail.contact, {
106
+ onDelete: "CASCADE",
107
+ onUpdate: "CASCADE",
108
+ eager: true,
109
+ }),
110
+ __metadata("design:type", Array)
111
+ ], Contact.prototype, "codigos", void 0);
112
+ __decorate([
113
+ (0, swagger_1.ApiProperty)({ type: String, description: 'RFC of the contact', required: false }),
114
+ (0, typeorm_1.Column)({ name: "rfc", length: 100, nullable: true }),
115
+ __metadata("design:type", String)
116
+ ], Contact.prototype, "rfc", void 0);
117
+ __decorate([
118
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Address of the contact', required: false }),
119
+ (0, typeorm_1.Column)({ name: "address", type: "text", nullable: true }),
120
+ __metadata("design:type", String)
121
+ ], Contact.prototype, "address", void 0);
122
+ __decorate([
123
+ (0, swagger_1.ApiProperty)({ type: () => [contact_phone_entity_1.ContactPhone], description: 'Phones associated with the contact' }),
124
+ (0, typeorm_1.OneToMany)(() => contact_phone_entity_1.ContactPhone, (contactPhone) => contactPhone.contact, {
125
+ onDelete: "CASCADE",
126
+ onUpdate: "CASCADE",
127
+ eager: true,
128
+ }),
129
+ __metadata("design:type", Array)
130
+ ], Contact.prototype, "phones", void 0);
131
+ __decorate([
132
+ (0, swagger_1.ApiProperty)({ type: () => [contact_email_entity_1.ContactEmail], description: 'Emails associated with the contact' }),
133
+ (0, typeorm_1.OneToMany)(() => contact_email_entity_1.ContactEmail, (contactEmail) => contactEmail.contact, {
134
+ onDelete: "CASCADE",
135
+ onUpdate: "CASCADE",
136
+ eager: true,
137
+ }),
138
+ __metadata("design:type", Array)
139
+ ], Contact.prototype, "emails", void 0);
140
+ __decorate([
141
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Cargo of the contact', required: false }),
142
+ (0, typeorm_1.Column)({ name: "cargo", length: 150, nullable: true }),
143
+ __metadata("design:type", String)
144
+ ], Contact.prototype, "cargo", void 0);
145
+ __decorate([
146
+ (0, swagger_1.ApiProperty)({ type: Date, description: 'Birthdate of the contact', required: false }),
147
+ (0, typeorm_1.Column)({ name: "birthdate", nullable: true }),
148
+ __metadata("design:type", Date)
149
+ ], Contact.prototype, "birthdate", void 0);
150
+ __decorate([
151
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Gender of the contact', required: false }),
152
+ (0, typeorm_1.Column)({ name: "gender", length: 10, nullable: true }),
153
+ __metadata("design:type", String)
154
+ ], Contact.prototype, "gender", void 0);
155
+ __decorate([
156
+ (0, swagger_1.ApiProperty)({ type: () => client_types_entity_1.ClientType, description: 'Contact type', required: true }),
157
+ (0, typeorm_1.ManyToOne)(() => client_types_entity_1.ClientType, {
158
+ onDelete: "SET NULL",
159
+ onUpdate: "CASCADE",
160
+ nullable: true,
161
+ eager: true,
162
+ }),
163
+ __metadata("design:type", client_types_entity_1.ClientType)
164
+ ], Contact.prototype, "type", void 0);
165
+ __decorate([
166
+ (0, swagger_1.ApiProperty)({ type: () => client_sources_entity_1.ClientSource, description: 'Contact source', required: true }),
167
+ (0, typeorm_1.ManyToOne)(() => client_sources_entity_1.ClientSource, {
168
+ onDelete: "SET NULL",
169
+ onUpdate: "CASCADE",
170
+ nullable: true,
171
+ eager: true,
172
+ }),
173
+ __metadata("design:type", client_sources_entity_1.ClientSource)
174
+ ], Contact.prototype, "source", void 0);
175
+ __decorate([
176
+ (0, swagger_1.ApiProperty)({ type: () => user_entity_1.User, description: 'User assigned to the contact', required: false }),
177
+ (0, typeorm_1.ManyToOne)(() => user_entity_1.User, {
178
+ onDelete: "SET NULL",
179
+ onUpdate: "CASCADE",
180
+ nullable: true,
181
+ }),
182
+ __metadata("design:type", user_entity_1.User)
183
+ ], Contact.prototype, "assignedBy", void 0);
184
+ __decorate([
185
+ (0, swagger_1.ApiProperty)({ type: () => [helpers_1.TaskCRM], description: 'Tasks associated with the contact' }),
186
+ (0, typeorm_1.OneToMany)(() => helpers_1.TaskCRM, task => task.contact, { cascade: true, onDelete: 'CASCADE' }),
187
+ __metadata("design:type", Array)
188
+ ], Contact.prototype, "tasks", void 0);
189
+ __decorate([
190
+ (0, swagger_1.ApiProperty)({ type: () => user_entity_1.User, description: 'User observing the contact', required: false }),
191
+ (0, typeorm_1.ManyToOne)(() => user_entity_1.User, {
192
+ onDelete: "SET NULL",
193
+ onUpdate: "CASCADE",
194
+ nullable: true,
195
+ }),
196
+ __metadata("design:type", user_entity_1.User)
197
+ ], Contact.prototype, "observador", void 0);
198
+ __decorate([
199
+ (0, swagger_1.ApiProperty)({ type: () => lead_entity_1.Lead, description: 'Lead associated with this contact', required: false }),
200
+ (0, typeorm_1.OneToOne)(() => lead_entity_1.Lead, (lead) => lead.contact, {
201
+ onDelete: "CASCADE",
202
+ onUpdate: "CASCADE",
203
+ }),
204
+ (0, typeorm_1.JoinColumn)(),
205
+ __metadata("design:type", lead_entity_1.Lead)
206
+ ], Contact.prototype, "lead", void 0);
207
+ __decorate([
208
+ (0, swagger_1.ApiProperty)({ type: () => [Contact], description: 'Contacts related' }),
209
+ (0, typeorm_1.ManyToMany)(() => Contact, {
210
+ onDelete: "CASCADE",
211
+ onUpdate: "CASCADE",
212
+ }),
213
+ (0, typeorm_1.JoinTable)(),
214
+ __metadata("design:type", Array)
215
+ ], Contact.prototype, "relations", void 0);
216
+ __decorate([
217
+ (0, swagger_1.ApiProperty)({ type: String, description: 'CURP of the contact', required: false }),
218
+ (0, typeorm_1.Column)({ name: "curp", length: 50, nullable: true }),
219
+ __metadata("design:type", String)
220
+ ], Contact.prototype, "curp", void 0);
221
+ __decorate([
222
+ (0, swagger_1.ApiProperty)({ type: String, description: 'CUA of the contact', required: false }),
223
+ (0, typeorm_1.Column)({ name: "cua", length: 50, nullable: true }),
224
+ __metadata("design:type", String)
225
+ ], Contact.prototype, "cua", void 0);
226
+ __decorate([
227
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Photo URL of the contact', required: false }),
228
+ (0, typeorm_1.Column)({ name: "photo", length: 255, nullable: true }),
229
+ __metadata("design:type", String)
230
+ ], Contact.prototype, "photo", void 0);
231
+ __decorate([
232
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Post of the contact', required: false }),
233
+ (0, typeorm_1.Column)({ name: "post", type: "text", nullable: true }),
234
+ __metadata("design:type", String)
235
+ ], Contact.prototype, "post", void 0);
236
+ __decorate([
237
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Comments about the contact', required: false }),
238
+ (0, typeorm_1.Column)({ name: "comments", type: "text", nullable: true }),
239
+ __metadata("design:type", String)
240
+ ], Contact.prototype, "comments", void 0);
241
+ __decorate([
242
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Company of the contact', required: false }),
243
+ (0, typeorm_1.Column)({ length: 255, nullable: true }),
244
+ __metadata("design:type", String)
245
+ ], Contact.prototype, "company", void 0);
246
+ __decorate([
247
+ (0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is the contact exported?', default: false }),
248
+ (0, typeorm_1.Column)({ name: "export", default: false }),
249
+ __metadata("design:type", Boolean)
250
+ ], Contact.prototype, "export", void 0);
251
+ __decorate([
252
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Source description of the contact', required: false }),
253
+ (0, typeorm_1.Column)({ type: "text", nullable: true }),
254
+ __metadata("design:type", String)
255
+ ], Contact.prototype, "sourceDescription", void 0);
256
+ __decorate([
257
+ (0, swagger_1.ApiProperty)({ type: () => [poliza_entity_1.Poliza], description: 'Polizas associated with the contact' }),
258
+ (0, typeorm_1.OneToMany)(() => poliza_entity_1.Poliza, (poliza) => poliza.contact, {
259
+ onDelete: "CASCADE",
260
+ onUpdate: "CASCADE",
261
+ }),
262
+ __metadata("design:type", Array)
263
+ ], Contact.prototype, "polizas", void 0);
264
+ exports.Contact = Contact = __decorate([
265
+ (0, typeorm_1.Entity)()
266
+ ], Contact);
267
+ //# sourceMappingURL=contact.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact.entity.js","sourceRoot":"","sources":["../../../src/entities/sales/contact.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mEAAuE;AACvE,wFAA6E;AAC7E,wFAA6E;AAC7E,yFAA6E;AAC7E,qFAAyE;AACzE,gDAAsC;AACtC,qCAA4G;AAC5G,mDAAyC;AACzC,6CAA8C;AAC9C,+CAAqC;AACrC,yCAA0C;AAC1C,gGAAqF;AACrF,wCAAqC;AAG9B,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,gCAAkB;IAG7C,QAAQ,CAAU;IAYlB,UAAU,CAAa;IAIvB,MAAM,CAAU;IAKhB,QAAQ,CAAU;IAIlB,IAAI,CAAU;IAId,QAAQ,CAAU;IAIlB,UAAU,CAAU;IASpB,OAAO,CAAsB;IAI7B,GAAG,CAAU;IAIb,OAAO,CAAU;IAQjB,MAAM,CAAkB;IAQxB,MAAM,CAAkB;IAIxB,KAAK,CAAU;IAIf,SAAS,CAAQ;IAIjB,MAAM,CAAU;IAShB,IAAI,CAAc;IASlB,MAAM,CAAgB;IAQtB,UAAU,CAAQ;IAIlB,KAAK,CAAY;IAQjB,UAAU,CAAQ;IAQlB,IAAI,CAAQ;IAQZ,SAAS,CAAa;IAItB,IAAI,CAAU;IAId,GAAG,CAAU;IAIb,KAAK,CAAU;IAIf,IAAI,CAAU;IAId,QAAQ,CAAU;IAIlB,OAAO,CAAU;IAIjB,MAAM,CAAW;IAIjB,iBAAiB,CAAU;IAO3B,OAAO,CAAY;CACpB,CAAA;AA/K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C,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACvB;AAIjB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,0BAA0B,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IACvF,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;uCAC1B;AAIjB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,mCAAmC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAChG,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACd;AAO3B;IALC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,sBAAM,CAAC,EAAE,WAAW,EAAE,qCAAqC,EAAE,CAAC;IACzF,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,sBAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE;QACnD,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACpB,CAAC;;wCACiB;kBA9KR,OAAO;IADnB,IAAA,gBAAM,GAAE;GACI,OAAO,CA+KnB"}
@@ -0,0 +1,13 @@
1
+ export * from './poliza-comment.entity';
2
+ export * from './lead-comment.entity';
3
+ export * from './index';
4
+ export * from './contact.entity';
5
+ export * from './poliza_siniestro.entity';
6
+ export * from './lead.entity';
7
+ export * from './poliza.entity';
8
+ export * from './contact-comment.entity';
9
+ export * from './agente-intermediario.entity';
10
+ export * from "./beneficiarios/person.entity";
11
+ export * from "./beneficiarios/vehicle.entity";
12
+ export * from "./receipt.entity";
13
+ export * from "./receipt-sub-agente.entity";
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./poliza-comment.entity"), exports);
18
+ __exportStar(require("./lead-comment.entity"), exports);
19
+ __exportStar(require("./index"), exports);
20
+ __exportStar(require("./contact.entity"), exports);
21
+ __exportStar(require("./poliza_siniestro.entity"), exports);
22
+ __exportStar(require("./lead.entity"), exports);
23
+ __exportStar(require("./poliza.entity"), exports);
24
+ __exportStar(require("./contact-comment.entity"), exports);
25
+ __exportStar(require("./agente-intermediario.entity"), exports);
26
+ __exportStar(require("./beneficiarios/person.entity"), exports);
27
+ __exportStar(require("./beneficiarios/vehicle.entity"), exports);
28
+ __exportStar(require("./receipt.entity"), exports);
29
+ __exportStar(require("./receipt-sub-agente.entity"), exports);
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/sales/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,wDAAsC;AACtC,0CAAwB;AACxB,mDAAiC;AACjC,4DAA0C;AAC1C,gDAA8B;AAC9B,kDAAgC;AAChC,2DAAyC;AACzC,gEAA8C;AAC9C,gEAA8C;AAC9C,iEAA+C;AAC/C,mDAAiC;AACjC,8DAA2C"}
@@ -0,0 +1,7 @@
1
+ import { BaseEntityWithUser } from "../../common/database/base.entity";
2
+ import { Lead } from "./lead.entity";
3
+ export declare class LeadComment extends BaseEntityWithUser {
4
+ comment: string;
5
+ pinned: boolean;
6
+ lead: Lead;
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.LeadComment = 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 lead_entity_1 = require("./lead.entity");
17
+ const swagger_1 = require("@nestjs/swagger");
18
+ let LeadComment = class LeadComment extends base_entity_1.BaseEntityWithUser {
19
+ comment;
20
+ pinned;
21
+ lead;
22
+ };
23
+ exports.LeadComment = LeadComment;
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
+ ], LeadComment.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
+ ], LeadComment.prototype, "pinned", void 0);
35
+ __decorate([
36
+ (0, swagger_1.ApiProperty)({ type: () => lead_entity_1.Lead, description: 'Lead associated with the comment' }),
37
+ (0, typeorm_1.ManyToOne)(() => lead_entity_1.Lead, {
38
+ onDelete: "CASCADE",
39
+ onUpdate: "CASCADE",
40
+ }),
41
+ __metadata("design:type", lead_entity_1.Lead)
42
+ ], LeadComment.prototype, "lead", void 0);
43
+ exports.LeadComment = LeadComment = __decorate([
44
+ (0, typeorm_1.Entity)()
45
+ ], LeadComment);
46
+ //# sourceMappingURL=lead-comment.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lead-comment.entity.js","sourceRoot":"","sources":["../../../src/entities/sales/lead-comment.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mEAAuE;AACvE,qDAA4C;AAC5C,qCAAoD;AACpD,+CAAqC;AACrC,6CAA8C;AAGvC,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,gCAAkB;IAI/C,OAAO,CAAS;IAIhB,MAAM,CAAU;IAOhB,IAAI,CAAO;CACd,CAAA;AAhBY,kCAAW;AAIpB;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;;4CACT;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;;2CACX;AAOhB;IALC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kBAAI,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;IAClF,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACtB,CAAC;8BACI,kBAAI;yCAAC;sBAfF,WAAW;IADvB,IAAA,gBAAM,GAAE;GACI,WAAW,CAgBvB"}
@@ -0,0 +1,43 @@
1
+ import { BaseEntityWithUser } from "../../common/database/base.entity";
2
+ import { ClientSource } from "../helpers/sales/common/client_sources.entity";
3
+ import { ClientType } from "../helpers/sales/common/client_types.entity";
4
+ import { User } from "../user.entity";
5
+ import { PersonType } from "../../common";
6
+ import { Contact } from "./contact.entity";
7
+ import { LeadStage, LeadCancelReazon, LeadEmail, LeadPhone } from "../helpers";
8
+ export declare class Lead extends BaseEntityWithUser {
9
+ idBitrix?: number;
10
+ typePerson: PersonType;
11
+ codigo?: string;
12
+ fullName?: string;
13
+ name?: string;
14
+ lastName?: string;
15
+ secondName?: string;
16
+ rfc?: string;
17
+ address?: string;
18
+ phones?: LeadPhone[];
19
+ emails?: LeadEmail[];
20
+ cargo?: string;
21
+ birthdate?: Date;
22
+ gender?: string;
23
+ type?: ClientType;
24
+ source?: ClientSource;
25
+ assignedBy?: User;
26
+ observador?: User;
27
+ lead?: Lead;
28
+ relations?: Contact[];
29
+ curp?: string;
30
+ cua?: string;
31
+ photo?: string;
32
+ post?: string;
33
+ comments?: string;
34
+ company?: string;
35
+ export?: boolean;
36
+ sourceDescription?: string;
37
+ cancelReazon: LeadCancelReazon;
38
+ stage: LeadStage;
39
+ cancelledBy?: User;
40
+ cancelledAt?: Date;
41
+ cancelled?: boolean;
42
+ contact?: Contact;
43
+ }