easywork-common-lib 1.0.6 → 1.0.8

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 (86) hide show
  1. package/dist/common/database/index.js +18 -1
  2. package/dist/entities/app_config/app-config.entity.d.ts +1 -1
  3. package/dist/entities/app_config/app-config.entity.js +33 -0
  4. package/dist/entities/app_config/app-config.entity.js.map +1 -0
  5. package/dist/entities/drive/folder.entity.d.ts +1 -1
  6. package/dist/entities/drive/folder.entity.js +33 -0
  7. package/dist/entities/drive/folder.entity.js.map +1 -0
  8. package/dist/entities/email.entity.d.ts +1 -1
  9. package/dist/entities/email.entity.js +33 -0
  10. package/dist/entities/email.entity.js.map +1 -0
  11. package/dist/entities/group.entity.d.ts +1 -1
  12. package/dist/entities/group.entity.js +1 -1
  13. package/dist/entities/group.entity.js.map +1 -1
  14. package/dist/entities/helpers/contact_email.entity.js +61 -0
  15. package/dist/entities/helpers/contact_email.entity.js.map +1 -0
  16. package/dist/entities/helpers/contact_phone.entity.js +61 -0
  17. package/dist/entities/helpers/contact_phone.entity.js.map +1 -0
  18. package/dist/entities/helpers/contact_sources.entity.d.ts +1 -1
  19. package/dist/entities/helpers/contact_sources.entity.js +33 -0
  20. package/dist/entities/helpers/contact_sources.entity.js.map +1 -0
  21. package/dist/entities/helpers/contact_types.entity.d.ts +1 -1
  22. package/dist/entities/helpers/contact_types.entity.js +33 -0
  23. package/dist/entities/helpers/contact_types.entity.js.map +1 -0
  24. package/dist/entities/helpers/lead_email.entity.js +59 -0
  25. package/dist/entities/helpers/lead_email.entity.js.map +1 -0
  26. package/dist/entities/helpers/lead_phone.entity.js +59 -0
  27. package/dist/entities/helpers/lead_phone.entity.js.map +1 -0
  28. package/dist/entities/index.js +34 -1
  29. package/dist/entities/index.js.map +1 -1
  30. package/dist/entities/otp-log.entity.d.ts +1 -1
  31. package/dist/entities/otp-log.entity.js +1 -1
  32. package/dist/entities/otp-log.entity.js.map +1 -1
  33. package/dist/entities/permission.entity.d.ts +1 -1
  34. package/dist/entities/permission.entity.js +1 -1
  35. package/dist/entities/permission.entity.js.map +1 -1
  36. package/dist/entities/phone.entity.d.ts +1 -1
  37. package/dist/entities/phone.entity.js +33 -0
  38. package/dist/entities/phone.entity.js.map +1 -0
  39. package/dist/entities/profile.entity.d.ts +1 -1
  40. package/dist/entities/profile.entity.js +2 -2
  41. package/dist/entities/profile.entity.js.map +1 -1
  42. package/dist/entities/protocol.entity.d.ts +1 -1
  43. package/dist/entities/protocol.entity.js +1 -1
  44. package/dist/entities/protocol.entity.js.map +1 -1
  45. package/dist/entities/refresh-token.entity.d.ts +1 -1
  46. package/dist/entities/refresh-token.entity.js +1 -1
  47. package/dist/entities/refresh-token.entity.js.map +1 -1
  48. package/dist/entities/role.entity.d.ts +1 -1
  49. package/dist/entities/role.entity.js +1 -1
  50. package/dist/entities/role.entity.js.map +1 -1
  51. package/dist/entities/sales/contact.entity.d.ts +1 -1
  52. package/dist/entities/sales/contact.entity.js +221 -0
  53. package/dist/entities/sales/contact.entity.js.map +1 -0
  54. package/dist/entities/sales/lead.entity.d.ts +1 -1
  55. package/dist/entities/sales/lead.entity.js +244 -0
  56. package/dist/entities/sales/lead.entity.js.map +1 -0
  57. package/dist/entities/sales/poliza.entity.d.ts +1 -1
  58. package/dist/entities/sales/poliza.entity.js +342 -0
  59. package/dist/entities/sales/poliza.entity.js.map +1 -0
  60. package/dist/entities/user.entity.d.ts +1 -1
  61. package/dist/entities/user.entity.js +1 -1
  62. package/dist/entities/user.entity.js.map +1 -1
  63. package/dist/eslint.config.js +47 -1
  64. package/dist/index.js +18 -2
  65. package/package.json +3 -2
  66. package/src/entities/app_config/app-config.entity.ts +1 -1
  67. package/src/entities/drive/file.entity.ts +40 -0
  68. package/src/entities/drive/folder.entity.ts +11 -7
  69. package/src/entities/email.entity.ts +1 -1
  70. package/src/entities/group.entity.ts +1 -1
  71. package/src/entities/helpers/contact_sources.entity.ts +1 -1
  72. package/src/entities/helpers/contact_types.entity.ts +1 -1
  73. package/src/entities/helpers/entity_file.entity.ts +26 -0
  74. package/src/entities/otp-log.entity.ts +1 -1
  75. package/src/entities/permission.entity.ts +1 -1
  76. package/src/entities/phone.entity.ts +1 -1
  77. package/src/entities/profile.entity.ts +1 -1
  78. package/src/entities/protocol.entity.ts +1 -1
  79. package/src/entities/refresh-token.entity.ts +1 -1
  80. package/src/entities/role.entity.ts +1 -1
  81. package/src/entities/sales/contact.entity.ts +1 -1
  82. package/src/entities/sales/lead.entity.ts +1 -1
  83. package/src/entities/sales/poliza.entity.ts +1 -1
  84. package/src/entities/user.entity.ts +1 -1
  85. package/tsconfig.json +0 -4
  86. package/dist/index.js.LICENSE.txt +0 -19
@@ -1,4 +1,4 @@
1
- import { BaseEntity } from "@common/database";
1
+ import { BaseEntity } from "../common/database";
2
2
  export declare class Phone extends BaseEntity {
3
3
  number: string;
4
4
  isDefault: boolean;
@@ -0,0 +1,33 @@
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.Phone = void 0;
13
+ const database_1 = require("../common/database");
14
+ const class_validator_1 = require("class-validator");
15
+ const typeorm_1 = require("typeorm");
16
+ let Phone = class Phone extends database_1.BaseEntity {
17
+ number;
18
+ isDefault;
19
+ };
20
+ exports.Phone = Phone;
21
+ __decorate([
22
+ (0, class_validator_1.MinLength)(3),
23
+ (0, typeorm_1.Column)({ unique: true }),
24
+ __metadata("design:type", String)
25
+ ], Phone.prototype, "number", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.Column)({ name: "is_default", default: false }),
28
+ __metadata("design:type", Boolean)
29
+ ], Phone.prototype, "isDefault", void 0);
30
+ exports.Phone = Phone = __decorate([
31
+ (0, typeorm_1.Entity)()
32
+ ], Phone);
33
+ //# sourceMappingURL=phone.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phone.entity.js","sourceRoot":"","sources":["../../src/entities/phone.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAAgD;AAChD,qDAA4C;AAC5C,qCAAyC;AAGlC,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,qBAAU;IAGnC,MAAM,CAAS;IAGf,SAAS,CAAU;CACpB,CAAA;AAPY,sBAAK;AAGhB;IAFC,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;qCACV;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;wCAC5B;gBANR,KAAK;IADjB,IAAA,gBAAM,GAAE;GACI,KAAK,CAOjB"}
@@ -1,4 +1,4 @@
1
- import { BaseEntity } from "@common/database";
1
+ import { BaseEntity } from "../common/database";
2
2
  import { User } from "./user.entity";
3
3
  export declare class Profile extends BaseEntity {
4
4
  firstName: string;
@@ -10,7 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Profile = void 0;
13
- const database_1 = require("@common/database");
13
+ const database_1 = require("../common/database");
14
14
  const typeorm_1 = require("typeorm");
15
15
  const user_entity_1 = require("./user.entity");
16
16
  let Profile = class Profile extends database_1.BaseEntity {
@@ -38,7 +38,7 @@ __decorate([
38
38
  __metadata("design:type", Date)
39
39
  ], Profile.prototype, "birthday", void 0);
40
40
  __decorate([
41
- (0, typeorm_1.OneToOne)(() => user_entity_1.User, (user) => user.profile, {
41
+ (0, typeorm_1.OneToOne)(() => user_entity_1.User, user => user.profile, {
42
42
  onDelete: "CASCADE",
43
43
  onUpdate: "CASCADE",
44
44
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"profile.entity.js","sourceRoot":"","sources":["../../src/entities/profile.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA8C;AAC9C,qCAAmD;AACnD,+CAAqC;AAG9B,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,qBAAU;IAErC,SAAS,CAAS;IAGlB,QAAQ,CAAS;IAGjB,MAAM,CAAS;IAGf,QAAQ,CAAO;IAMf,IAAI,CAAO;CACZ,CAAA;AAlBY,0BAAO;AAElB;IADC,IAAA,gBAAM,GAAE;;0CACS;AAGlB;IADC,IAAA,gBAAM,GAAE;;yCACQ;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;uCACV;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACjB,IAAI;yCAAC;AAMf;IAJC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE;QAC5C,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACpB,CAAC;8BACI,kBAAI;qCAAC;kBAjBA,OAAO;IADnB,IAAA,gBAAM,EAAC,cAAc,CAAC;GACV,OAAO,CAkBnB"}
1
+ {"version":3,"file":"profile.entity.js","sourceRoot":"","sources":["../../src/entities/profile.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAAgD;AAChD,qCAAmD;AACnD,+CAAqC;AAG9B,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,qBAAU;IAErC,SAAS,CAAS;IAGlB,QAAQ,CAAS;IAGjB,MAAM,CAAS;IAGf,QAAQ,CAAO;IAMf,IAAI,CAAO;CACZ,CAAA;AAlBY,0BAAO;AAElB;IADC,IAAA,gBAAM,GAAE;;0CACS;AAGlB;IADC,IAAA,gBAAM,GAAE;;yCACQ;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;uCACV;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACjB,IAAI;yCAAC;AAMf;IAJC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE;QAC1C,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACpB,CAAC;8BACI,kBAAI;qCAAC;kBAjBA,OAAO;IADnB,IAAA,gBAAM,EAAC,cAAc,CAAC;GACV,OAAO,CAkBnB"}
@@ -1,4 +1,4 @@
1
- import { BaseEntity } from "@common/database";
1
+ import { BaseEntity } from "../common/database";
2
2
  export declare class Protocol extends BaseEntity {
3
3
  loginAttemptInterval: number;
4
4
  loginIntervalUnit: string;
@@ -11,7 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Protocol = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
- const database_1 = require("@common/database");
14
+ const database_1 = require("../common/database");
15
15
  let Protocol = class Protocol extends database_1.BaseEntity {
16
16
  loginAttemptInterval;
17
17
  loginIntervalUnit;
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.entity.js","sourceRoot":"","sources":["../../src/entities/protocol.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAyC;AACzC,+CAA8C;AAKvC,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,qBAAU;IAEtC,oBAAoB,CAAU;IAG9B,iBAAiB,CAAU;IAG3B,aAAa,CAAU;IAGvB,kBAAkB,CAAU;IAE5B,YAAY,OAA2B;QACrC,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;CACF,CAAA;AAjBY,4BAAQ;AAEnB;IADC,IAAA,gBAAM,GAAE;;sDACqB;AAG9B;IADC,IAAA,gBAAM,GAAE;;mDACkB;AAG3B;IADC,IAAA,gBAAM,GAAE;;+CACc;AAGvB;IADC,IAAA,gBAAM,GAAE;;oDACmB;mBAXjB,QAAQ;IADpB,IAAA,gBAAM,GAAE;;GACI,QAAQ,CAiBpB"}
1
+ {"version":3,"file":"protocol.entity.js","sourceRoot":"","sources":["../../src/entities/protocol.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAyC;AACzC,iDAAgD;AAKzC,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,qBAAU;IAEtC,oBAAoB,CAAU;IAG9B,iBAAiB,CAAU;IAG3B,aAAa,CAAU;IAGvB,kBAAkB,CAAU;IAE5B,YAAY,OAA2B;QACrC,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;CACF,CAAA;AAjBY,4BAAQ;AAEnB;IADC,IAAA,gBAAM,GAAE;;sDACqB;AAG9B;IADC,IAAA,gBAAM,GAAE;;mDACkB;AAG3B;IADC,IAAA,gBAAM,GAAE;;+CACc;AAGvB;IADC,IAAA,gBAAM,GAAE;;oDACmB;mBAXjB,QAAQ;IADpB,IAAA,gBAAM,GAAE;;GACI,QAAQ,CAiBpB"}
@@ -1,4 +1,4 @@
1
- import { BaseEntity } from "@common/database";
1
+ import { BaseEntity } from "../common/database";
2
2
  import { User } from "./user.entity";
3
3
  export declare class RefreshToken extends BaseEntity {
4
4
  expiresIn: Date;
@@ -11,7 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.RefreshToken = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
- const database_1 = require("@common/database");
14
+ const database_1 = require("../common/database");
15
15
  const user_entity_1 = require("./user.entity");
16
16
  let RefreshToken = class RefreshToken extends database_1.BaseEntity {
17
17
  expiresIn;
@@ -1 +1 @@
1
- {"version":3,"file":"refresh-token.entity.js","sourceRoot":"","sources":["../../src/entities/refresh-token.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAoD;AACpD,+CAA8C;AAC9C,+CAAqC;AAG9B,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,qBAAU;IAE1C,SAAS,CAAQ;IAOjB,IAAI,CAAQ;IAGZ,SAAS,CAAW;IAEpB,YAAY,OAA+B;QACzC,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;CACF,CAAA;AAlBY,oCAAY;AAEvB;IADC,IAAA,gBAAM,GAAE;8BACG,IAAI;+CAAC;AAOjB;IALC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE;QACrB,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACpB,CAAC;8BACK,kBAAI;0CAAC;AAGZ;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;+CACP;uBAZT,YAAY;IADxB,IAAA,gBAAM,GAAE;;GACI,YAAY,CAkBxB"}
1
+ {"version":3,"file":"refresh-token.entity.js","sourceRoot":"","sources":["../../src/entities/refresh-token.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAoD;AACpD,iDAAgD;AAChD,+CAAqC;AAG9B,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,qBAAU;IAE1C,SAAS,CAAQ;IAOjB,IAAI,CAAQ;IAGZ,SAAS,CAAW;IAEpB,YAAY,OAA+B;QACzC,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;CACF,CAAA;AAlBY,oCAAY;AAEvB;IADC,IAAA,gBAAM,GAAE;8BACG,IAAI;+CAAC;AAOjB;IALC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE;QACrB,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACpB,CAAC;8BACK,kBAAI;0CAAC;AAGZ;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;+CACP;uBAZT,YAAY;IADxB,IAAA,gBAAM,GAAE;;GACI,YAAY,CAkBxB"}
@@ -1,4 +1,4 @@
1
- import { BaseEntity } from "@common/database";
1
+ import { BaseEntity } from "../common/database";
2
2
  export declare class Role extends BaseEntity {
3
3
  name: string;
4
4
  isDefault: boolean;
@@ -10,7 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Role = void 0;
13
- const database_1 = require("@common/database");
13
+ const database_1 = require("../common/database");
14
14
  const class_validator_1 = require("class-validator");
15
15
  const typeorm_1 = require("typeorm");
16
16
  let Role = class Role extends database_1.BaseEntity {
@@ -1 +1 @@
1
- {"version":3,"file":"role.entity.js","sourceRoot":"","sources":["../../src/entities/role.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA8C;AAC9C,qDAA4C;AAC5C,qCAAyC;AAGlC,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,qBAAU;IAGlC,IAAI,CAAS;IAGb,SAAS,CAAU;CACpB,CAAA;AAPY,oBAAI;AAGf;IAFC,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;kCACZ;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;uCACR;eANR,IAAI;IADhB,IAAA,gBAAM,GAAE;GACI,IAAI,CAOhB"}
1
+ {"version":3,"file":"role.entity.js","sourceRoot":"","sources":["../../src/entities/role.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAAgD;AAChD,qDAA4C;AAC5C,qCAAyC;AAGlC,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,qBAAU;IAGlC,IAAI,CAAS;IAGb,SAAS,CAAU;CACpB,CAAA;AAPY,oBAAI;AAGf;IAFC,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;kCACZ;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;uCACR;eANR,IAAI;IADhB,IAAA,gBAAM,GAAE;GACI,IAAI,CAOhB"}
@@ -1,4 +1,4 @@
1
- import { BaseEntity } from "@common/database";
1
+ import { BaseEntity } from "../../common/database";
2
2
  import { ContactEmail } from "../helpers/contact_email.entity";
3
3
  import { ContactPhone } from "../helpers/contact_phone.entity";
4
4
  import { ContactSource } from "../helpers/contact_sources.entity";
@@ -0,0 +1,221 @@
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 database_1 = require("../../common/database");
14
+ const contact_email_entity_1 = require("../helpers/contact_email.entity");
15
+ const contact_phone_entity_1 = require("../helpers/contact_phone.entity");
16
+ const contact_sources_entity_1 = require("../helpers/contact_sources.entity");
17
+ const contact_types_entity_1 = require("../helpers/contact_types.entity");
18
+ const user_entity_1 = require("../user.entity");
19
+ const typeorm_1 = require("typeorm");
20
+ let Contact = class Contact extends database_1.BaseEntity {
21
+ curp;
22
+ idBitrix;
23
+ cua;
24
+ cargo;
25
+ fullName;
26
+ name;
27
+ lastName;
28
+ secondName;
29
+ photo;
30
+ post;
31
+ address;
32
+ comments;
33
+ lead;
34
+ export;
35
+ originatorId;
36
+ originId;
37
+ originVersion;
38
+ birthdate;
39
+ honorific;
40
+ hasPhone;
41
+ hasEmail;
42
+ hasImol;
43
+ faceId;
44
+ opened;
45
+ company;
46
+ sourceDescription;
47
+ assignedBy;
48
+ createdBy;
49
+ observador;
50
+ type;
51
+ source;
52
+ phones;
53
+ emails;
54
+ };
55
+ exports.Contact = Contact;
56
+ __decorate([
57
+ (0, typeorm_1.Column)({ name: "curp", length: 50, nullable: true }),
58
+ __metadata("design:type", String)
59
+ ], Contact.prototype, "curp", void 0);
60
+ __decorate([
61
+ (0, typeorm_1.Column)({ name: "id_bitrix", nullable: true }),
62
+ __metadata("design:type", Number)
63
+ ], Contact.prototype, "idBitrix", void 0);
64
+ __decorate([
65
+ (0, typeorm_1.Column)({ name: "cua", length: 50, nullable: true }),
66
+ __metadata("design:type", String)
67
+ ], Contact.prototype, "cua", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.Column)({ name: "cargo", length: 50, nullable: true }),
70
+ __metadata("design:type", String)
71
+ ], Contact.prototype, "cargo", void 0);
72
+ __decorate([
73
+ (0, typeorm_1.Column)({ name: "full_name", length: 100, nullable: true }),
74
+ __metadata("design:type", String)
75
+ ], Contact.prototype, "fullName", void 0);
76
+ __decorate([
77
+ (0, typeorm_1.Column)({ name: "name", length: 50, nullable: true }),
78
+ __metadata("design:type", String)
79
+ ], Contact.prototype, "name", void 0);
80
+ __decorate([
81
+ (0, typeorm_1.Column)({ name: "last_name", length: 50, nullable: true }),
82
+ __metadata("design:type", String)
83
+ ], Contact.prototype, "lastName", void 0);
84
+ __decorate([
85
+ (0, typeorm_1.Column)({ name: "second_name", length: 50, nullable: true }),
86
+ __metadata("design:type", String)
87
+ ], Contact.prototype, "secondName", void 0);
88
+ __decorate([
89
+ (0, typeorm_1.Column)({ name: "photo", length: 255, nullable: true }),
90
+ __metadata("design:type", String)
91
+ ], Contact.prototype, "photo", void 0);
92
+ __decorate([
93
+ (0, typeorm_1.Column)({ name: "post", type: "text", nullable: true }),
94
+ __metadata("design:type", String)
95
+ ], Contact.prototype, "post", void 0);
96
+ __decorate([
97
+ (0, typeorm_1.Column)({ name: "address", type: "text", nullable: true }),
98
+ __metadata("design:type", String)
99
+ ], Contact.prototype, "address", void 0);
100
+ __decorate([
101
+ (0, typeorm_1.Column)({ name: "comments", type: "text", nullable: true }),
102
+ __metadata("design:type", String)
103
+ ], Contact.prototype, "comments", void 0);
104
+ __decorate([
105
+ (0, typeorm_1.Column)({ name: "lead", nullable: true }),
106
+ __metadata("design:type", String)
107
+ ], Contact.prototype, "lead", void 0);
108
+ __decorate([
109
+ (0, typeorm_1.Column)({ name: "export", default: false }),
110
+ __metadata("design:type", Boolean)
111
+ ], Contact.prototype, "export", void 0);
112
+ __decorate([
113
+ (0, typeorm_1.Column)({ name: "originator_id", length: 255, nullable: true }),
114
+ __metadata("design:type", String)
115
+ ], Contact.prototype, "originatorId", void 0);
116
+ __decorate([
117
+ (0, typeorm_1.Column)({ name: "origin_id", length: 255, nullable: true }),
118
+ __metadata("design:type", String)
119
+ ], Contact.prototype, "originId", void 0);
120
+ __decorate([
121
+ (0, typeorm_1.Column)({ name: "origin_version", length: 255, nullable: true }),
122
+ __metadata("design:type", String)
123
+ ], Contact.prototype, "originVersion", void 0);
124
+ __decorate([
125
+ (0, typeorm_1.Column)({ name: "birthdate", nullable: true }),
126
+ __metadata("design:type", Date)
127
+ ], Contact.prototype, "birthdate", void 0);
128
+ __decorate([
129
+ (0, typeorm_1.Column)({ name: "honorific", length: 128, nullable: true }),
130
+ __metadata("design:type", String)
131
+ ], Contact.prototype, "honorific", void 0);
132
+ __decorate([
133
+ (0, typeorm_1.Column)({ name: "has_phone", default: false }),
134
+ __metadata("design:type", Boolean)
135
+ ], Contact.prototype, "hasPhone", void 0);
136
+ __decorate([
137
+ (0, typeorm_1.Column)({ name: "has_email", default: false }),
138
+ __metadata("design:type", Boolean)
139
+ ], Contact.prototype, "hasEmail", void 0);
140
+ __decorate([
141
+ (0, typeorm_1.Column)({ name: "has_imol", default: false }),
142
+ __metadata("design:type", Boolean)
143
+ ], Contact.prototype, "hasImol", void 0);
144
+ __decorate([
145
+ (0, typeorm_1.Column)({ name: "face_id", nullable: true }),
146
+ __metadata("design:type", String)
147
+ ], Contact.prototype, "faceId", void 0);
148
+ __decorate([
149
+ (0, typeorm_1.Column)({ name: "opened", default: false }),
150
+ __metadata("design:type", Boolean)
151
+ ], Contact.prototype, "opened", void 0);
152
+ __decorate([
153
+ (0, typeorm_1.Column)({ name: "company", nullable: true }),
154
+ __metadata("design:type", String)
155
+ ], Contact.prototype, "company", void 0);
156
+ __decorate([
157
+ (0, typeorm_1.Column)({ name: "source_description", type: "text", nullable: true }),
158
+ __metadata("design:type", String)
159
+ ], Contact.prototype, "sourceDescription", void 0);
160
+ __decorate([
161
+ (0, typeorm_1.ManyToOne)(() => user_entity_1.User, {
162
+ onDelete: "SET NULL",
163
+ onUpdate: "CASCADE",
164
+ nullable: true,
165
+ }),
166
+ __metadata("design:type", user_entity_1.User)
167
+ ], Contact.prototype, "assignedBy", void 0);
168
+ __decorate([
169
+ (0, typeorm_1.ManyToOne)(() => user_entity_1.User, {
170
+ onDelete: "SET NULL",
171
+ onUpdate: "CASCADE",
172
+ nullable: true,
173
+ }),
174
+ __metadata("design:type", user_entity_1.User)
175
+ ], Contact.prototype, "createdBy", void 0);
176
+ __decorate([
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, "observador", void 0);
184
+ __decorate([
185
+ (0, typeorm_1.ManyToOne)(() => contact_types_entity_1.ContactType, {
186
+ onDelete: "SET NULL",
187
+ onUpdate: "CASCADE",
188
+ nullable: true,
189
+ eager: true,
190
+ }),
191
+ __metadata("design:type", contact_types_entity_1.ContactType)
192
+ ], Contact.prototype, "type", void 0);
193
+ __decorate([
194
+ (0, typeorm_1.ManyToOne)(() => contact_sources_entity_1.ContactSource, {
195
+ onDelete: "SET NULL",
196
+ onUpdate: "CASCADE",
197
+ nullable: true,
198
+ eager: true,
199
+ }),
200
+ __metadata("design:type", contact_sources_entity_1.ContactSource)
201
+ ], Contact.prototype, "source", void 0);
202
+ __decorate([
203
+ (0, typeorm_1.OneToMany)(() => contact_phone_entity_1.ContactPhone, (contactPhone) => contactPhone.contact, {
204
+ onDelete: "CASCADE",
205
+ onUpdate: "CASCADE",
206
+ eager: true,
207
+ }),
208
+ __metadata("design:type", Array)
209
+ ], Contact.prototype, "phones", void 0);
210
+ __decorate([
211
+ (0, typeorm_1.OneToMany)(() => contact_email_entity_1.ContactEmail, (contactEmail) => contactEmail.contact, {
212
+ onDelete: "CASCADE",
213
+ onUpdate: "CASCADE",
214
+ eager: true,
215
+ }),
216
+ __metadata("design:type", Array)
217
+ ], Contact.prototype, "emails", void 0);
218
+ exports.Contact = Contact = __decorate([
219
+ (0, typeorm_1.Entity)()
220
+ ], Contact);
221
+ //# sourceMappingURL=contact.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact.entity.js","sourceRoot":"","sources":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AE;QACrE,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,IAAI;KACZ,CAAC;;uCACsB;AAOxB;IALC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,mCAAY,EAAE,CAAC,YAAY,EAAE,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE;QACrE,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,IAAI;KACZ,CAAC;;uCACsB;kBAjIb,OAAO;IADnB,IAAA,gBAAM,GAAE;GACI,OAAO,CAkInB"}
@@ -1,4 +1,4 @@
1
- import { BaseEntity } from "@common/database";
1
+ import { BaseEntity } from "../../common/database";
2
2
  import { LeadEmail } from "../helpers/lead_email.entity";
3
3
  import { LeadPhone } from "../helpers/lead_phone.entity";
4
4
  import { User } from "../user.entity";
@@ -0,0 +1,244 @@
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 database_1 = require("../../common/database");
14
+ const lead_email_entity_1 = require("../helpers/lead_email.entity");
15
+ const lead_phone_entity_1 = require("../helpers/lead_phone.entity");
16
+ const user_entity_1 = require("../user.entity");
17
+ const typeorm_1 = require("typeorm");
18
+ const contact_entity_1 = require("./contact.entity");
19
+ let Lead = class Lead extends database_1.BaseEntity {
20
+ curp;
21
+ idBitrix;
22
+ cua;
23
+ fullName;
24
+ name;
25
+ lastName;
26
+ secondName;
27
+ photo;
28
+ opportunity;
29
+ post;
30
+ address;
31
+ comments;
32
+ lead;
33
+ export;
34
+ originatorId;
35
+ originId;
36
+ originVersion;
37
+ birthdate;
38
+ honorific;
39
+ hasPhone;
40
+ hasEmail;
41
+ hasImol;
42
+ faceId;
43
+ opened;
44
+ company;
45
+ statusId;
46
+ companyTitle;
47
+ accountCurrencyId;
48
+ title;
49
+ source;
50
+ sourceDescription;
51
+ isReturnCustomer;
52
+ isManualOpportunity;
53
+ assignedBy;
54
+ createdBy;
55
+ observador;
56
+ contact;
57
+ phones;
58
+ emails;
59
+ };
60
+ exports.Lead = Lead;
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ name: "curp", length: 50, nullable: true }),
63
+ __metadata("design:type", String)
64
+ ], Lead.prototype, "curp", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({ name: "id_bitrix" }),
67
+ __metadata("design:type", Number)
68
+ ], Lead.prototype, "idBitrix", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.Column)({ name: "cua", length: 50, nullable: true }),
71
+ __metadata("design:type", String)
72
+ ], Lead.prototype, "cua", void 0);
73
+ __decorate([
74
+ (0, typeorm_1.Column)({ name: "full_name", length: 100, nullable: true }),
75
+ __metadata("design:type", String)
76
+ ], Lead.prototype, "fullName", void 0);
77
+ __decorate([
78
+ (0, typeorm_1.Column)({ name: "name", length: 50, nullable: true }),
79
+ __metadata("design:type", String)
80
+ ], Lead.prototype, "name", void 0);
81
+ __decorate([
82
+ (0, typeorm_1.Column)({ name: "last_name", length: 50, nullable: true }),
83
+ __metadata("design:type", String)
84
+ ], Lead.prototype, "lastName", void 0);
85
+ __decorate([
86
+ (0, typeorm_1.Column)({ name: "second_name", length: 50, nullable: true }),
87
+ __metadata("design:type", String)
88
+ ], Lead.prototype, "secondName", void 0);
89
+ __decorate([
90
+ (0, typeorm_1.Column)({ name: "photo", length: 255, nullable: true }),
91
+ __metadata("design:type", String)
92
+ ], Lead.prototype, "photo", void 0);
93
+ __decorate([
94
+ (0, typeorm_1.Column)({ type: "decimal" }),
95
+ __metadata("design:type", Number)
96
+ ], Lead.prototype, "opportunity", void 0);
97
+ __decorate([
98
+ (0, typeorm_1.Column)({ name: "post", type: "text", nullable: true }),
99
+ __metadata("design:type", String)
100
+ ], Lead.prototype, "post", void 0);
101
+ __decorate([
102
+ (0, typeorm_1.Column)({ name: "address", type: "text", nullable: true }),
103
+ __metadata("design:type", String)
104
+ ], Lead.prototype, "address", void 0);
105
+ __decorate([
106
+ (0, typeorm_1.Column)({ name: "comments", type: "text", nullable: true }),
107
+ __metadata("design:type", String)
108
+ ], Lead.prototype, "comments", void 0);
109
+ __decorate([
110
+ (0, typeorm_1.Column)({ name: "lead", nullable: true }),
111
+ __metadata("design:type", String)
112
+ ], Lead.prototype, "lead", void 0);
113
+ __decorate([
114
+ (0, typeorm_1.Column)({ name: "export", default: false }),
115
+ __metadata("design:type", Boolean)
116
+ ], Lead.prototype, "export", void 0);
117
+ __decorate([
118
+ (0, typeorm_1.Column)({ name: "originator_id", length: 255, nullable: true }),
119
+ __metadata("design:type", String)
120
+ ], Lead.prototype, "originatorId", void 0);
121
+ __decorate([
122
+ (0, typeorm_1.Column)({ name: "origin_id", length: 255, nullable: true }),
123
+ __metadata("design:type", String)
124
+ ], Lead.prototype, "originId", void 0);
125
+ __decorate([
126
+ (0, typeorm_1.Column)({ name: "origin_version", length: 255, nullable: true }),
127
+ __metadata("design:type", String)
128
+ ], Lead.prototype, "originVersion", void 0);
129
+ __decorate([
130
+ (0, typeorm_1.Column)({ name: "birthdate", nullable: true }),
131
+ __metadata("design:type", Date)
132
+ ], Lead.prototype, "birthdate", void 0);
133
+ __decorate([
134
+ (0, typeorm_1.Column)({ name: "honorific", length: 128, nullable: true }),
135
+ __metadata("design:type", String)
136
+ ], Lead.prototype, "honorific", void 0);
137
+ __decorate([
138
+ (0, typeorm_1.Column)({ name: "has_phone", default: false }),
139
+ __metadata("design:type", Boolean)
140
+ ], Lead.prototype, "hasPhone", void 0);
141
+ __decorate([
142
+ (0, typeorm_1.Column)({ name: "has_email", default: false }),
143
+ __metadata("design:type", Boolean)
144
+ ], Lead.prototype, "hasEmail", void 0);
145
+ __decorate([
146
+ (0, typeorm_1.Column)({ name: "has_imol", default: false }),
147
+ __metadata("design:type", Boolean)
148
+ ], Lead.prototype, "hasImol", void 0);
149
+ __decorate([
150
+ (0, typeorm_1.Column)({ name: "face_id", nullable: true }),
151
+ __metadata("design:type", String)
152
+ ], Lead.prototype, "faceId", void 0);
153
+ __decorate([
154
+ (0, typeorm_1.Column)({ name: "opened", default: false }),
155
+ __metadata("design:type", Boolean)
156
+ ], Lead.prototype, "opened", void 0);
157
+ __decorate([
158
+ (0, typeorm_1.Column)({ name: "company", nullable: true }),
159
+ __metadata("design:type", String)
160
+ ], Lead.prototype, "company", void 0);
161
+ __decorate([
162
+ (0, typeorm_1.Column)({ name: "status_id", nullable: true }),
163
+ __metadata("design:type", String)
164
+ ], Lead.prototype, "statusId", void 0);
165
+ __decorate([
166
+ (0, typeorm_1.Column)({ name: "company_title", length: 255, nullable: true }),
167
+ __metadata("design:type", String)
168
+ ], Lead.prototype, "companyTitle", void 0);
169
+ __decorate([
170
+ (0, typeorm_1.Column)({ name: "account_currency_id", nullable: true }),
171
+ __metadata("design:type", String)
172
+ ], Lead.prototype, "accountCurrencyId", void 0);
173
+ __decorate([
174
+ (0, typeorm_1.Column)({ nullable: true }),
175
+ __metadata("design:type", String)
176
+ ], Lead.prototype, "title", void 0);
177
+ __decorate([
178
+ (0, typeorm_1.Column)({ name: "source", length: 50, nullable: true }),
179
+ __metadata("design:type", String)
180
+ ], Lead.prototype, "source", void 0);
181
+ __decorate([
182
+ (0, typeorm_1.Column)({ name: "source_description", type: "text", nullable: true }),
183
+ __metadata("design:type", String)
184
+ ], Lead.prototype, "sourceDescription", void 0);
185
+ __decorate([
186
+ (0, typeorm_1.Column)({ name: "is_return_customer", nullable: true }),
187
+ __metadata("design:type", Boolean)
188
+ ], Lead.prototype, "isReturnCustomer", void 0);
189
+ __decorate([
190
+ (0, typeorm_1.Column)({ name: "is_manual_opportunity", nullable: true }),
191
+ __metadata("design:type", Boolean)
192
+ ], Lead.prototype, "isManualOpportunity", void 0);
193
+ __decorate([
194
+ (0, typeorm_1.ManyToOne)(() => user_entity_1.User, {
195
+ onDelete: "SET NULL",
196
+ onUpdate: "CASCADE",
197
+ nullable: true,
198
+ }),
199
+ __metadata("design:type", user_entity_1.User)
200
+ ], Lead.prototype, "assignedBy", void 0);
201
+ __decorate([
202
+ (0, typeorm_1.ManyToOne)(() => user_entity_1.User, {
203
+ onDelete: "SET NULL",
204
+ onUpdate: "CASCADE",
205
+ nullable: true,
206
+ }),
207
+ __metadata("design:type", user_entity_1.User)
208
+ ], Lead.prototype, "createdBy", void 0);
209
+ __decorate([
210
+ (0, typeorm_1.ManyToOne)(() => user_entity_1.User, {
211
+ onDelete: "SET NULL",
212
+ onUpdate: "CASCADE",
213
+ nullable: true,
214
+ }),
215
+ __metadata("design:type", user_entity_1.User)
216
+ ], Lead.prototype, "observador", void 0);
217
+ __decorate([
218
+ (0, typeorm_1.OneToOne)(() => contact_entity_1.Contact, {
219
+ onDelete: "SET NULL",
220
+ onUpdate: "CASCADE",
221
+ nullable: true,
222
+ }),
223
+ __metadata("design:type", contact_entity_1.Contact)
224
+ ], Lead.prototype, "contact", void 0);
225
+ __decorate([
226
+ (0, typeorm_1.OneToMany)(() => lead_phone_entity_1.LeadPhone, (leadPhone) => leadPhone.lead, {
227
+ onDelete: "CASCADE",
228
+ onUpdate: "CASCADE",
229
+ eager: true,
230
+ }),
231
+ __metadata("design:type", Array)
232
+ ], Lead.prototype, "phones", void 0);
233
+ __decorate([
234
+ (0, typeorm_1.OneToMany)(() => lead_email_entity_1.LeadEmail, (leadEmail) => leadEmail.lead, {
235
+ onDelete: "CASCADE",
236
+ onUpdate: "CASCADE",
237
+ eager: true,
238
+ }),
239
+ __metadata("design:type", Array)
240
+ ], Lead.prototype, "emails", void 0);
241
+ exports.Lead = Lead = __decorate([
242
+ (0, typeorm_1.Entity)()
243
+ ], Lead);
244
+ //# 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,oDAAmD;AACnD,oEAAyD;AACzD,oEAAyD;AACzD,gDAAsC;AACtC,qCAAyE;AACzE,qDAA2C;AAGpC,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,qBAAU;IAElC,IAAI,CAAS;IAGb,QAAQ,CAAS;IAGjB,GAAG,CAAS;IAGZ,QAAQ,CAAS;IAGjB,IAAI,CAAS;IAGb,QAAQ,CAAS;IAGjB,UAAU,CAAS;IAGnB,KAAK,CAAS;IAGd,WAAW,CAAS;IAGpB,IAAI,CAAS;IAGb,OAAO,CAAS;IAGhB,QAAQ,CAAS;IAGjB,IAAI,CAAS;IAGb,MAAM,CAAU;IAGhB,YAAY,CAAS;IAGrB,QAAQ,CAAS;IAGjB,aAAa,CAAS;IAGtB,SAAS,CAAO;IAGhB,SAAS,CAAS;IAGlB,QAAQ,CAAU;IAGlB,QAAQ,CAAU;IAGlB,OAAO,CAAU;IAGjB,MAAM,CAAS;IAGf,MAAM,CAAU;IAGhB,OAAO,CAAS;IAGhB,QAAQ,CAAS;IAGjB,YAAY,CAAS;IAGrB,iBAAiB,CAAS;IAG1B,KAAK,CAAS;IAGd,MAAM,CAAS;IAGf,iBAAiB,CAAS;IAG1B,gBAAgB,CAAU;IAG1B,mBAAmB,CAAU;IAQ7B,UAAU,CAAO;IAOjB,SAAS,CAAO;IAOhB,UAAU,CAAO;IAOjB,OAAO,CAAU;IAOjB,MAAM,CAAe;IAOrB,MAAM,CAAe;CACtB,CAAA;AA9IY,oBAAI;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