easywork-common-lib 1.0.298 → 1.0.300

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 (36) hide show
  1. package/dist/entities/easyapp/index.d.ts +1 -0
  2. package/dist/entities/easyapp/index.js +18 -0
  3. package/dist/entities/easyapp/index.js.map +1 -0
  4. package/dist/entities/helpers/sales/contact/contact_sources.entity.d.ts +5 -0
  5. package/dist/entities/helpers/sales/contact/contact_sources.entity.js +36 -0
  6. package/dist/entities/helpers/sales/contact/contact_sources.entity.js.map +1 -0
  7. package/dist/entities/helpers/sales/contact/contact_types.entity.d.ts +5 -0
  8. package/dist/entities/helpers/sales/contact/contact_types.entity.js +36 -0
  9. package/dist/entities/helpers/sales/contact/contact_types.entity.js.map +1 -0
  10. package/dist/entities/helpers/sales/poliza/h_poliza_company.entity.d.ts +5 -0
  11. package/dist/entities/helpers/sales/poliza/h_poliza_company.entity.js +30 -0
  12. package/dist/entities/helpers/sales/poliza/h_poliza_company.entity.js.map +1 -0
  13. package/dist/entities/imap-folder.entity.d.ts +7 -0
  14. package/dist/entities/imap-folder.entity.js +41 -0
  15. package/dist/entities/imap-folder.entity.js.map +1 -0
  16. package/dist/entities/oauth.entity.d.ts +16 -0
  17. package/dist/entities/oauth.entity.js +83 -0
  18. package/dist/entities/oauth.entity.js.map +1 -0
  19. package/dist/entities/sales/index.d.ts +1 -0
  20. package/dist/entities/sales/index.js +1 -0
  21. package/dist/entities/sales/index.js.map +1 -1
  22. package/dist/entities/sales/receipt-sub-agente.entity.d.ts +5 -0
  23. package/dist/entities/sales/receipt-sub-agente.entity.js +35 -0
  24. package/dist/entities/sales/receipt-sub-agente.entity.js.map +1 -0
  25. package/dist/entities/sales/receipt.entity.d.ts +3 -0
  26. package/dist/entities/sales/receipt.entity.js +19 -1
  27. package/dist/entities/sales/receipt.entity.js.map +1 -1
  28. package/dist/entities/thirdparty/oauth.entity.d.ts +1 -1
  29. package/dist/modules/notifier/notifier.module.d.ts +4 -0
  30. package/dist/modules/notifier/notifier.module.js +49 -0
  31. package/dist/modules/notifier/notifier.module.js.map +1 -0
  32. package/dist/modules/notifier/notifier.service.d.ts +19 -0
  33. package/dist/modules/notifier/notifier.service.js +231 -0
  34. package/dist/modules/notifier/notifier.service.js.map +1 -0
  35. package/package.json +1 -1
  36. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1 @@
1
+ export * from "./filter-view.entity";
@@ -0,0 +1,18 @@
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("./filter-view.entity"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/easyapp/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC"}
@@ -0,0 +1,5 @@
1
+ import { BaseEntity } from "../../../../common/database";
2
+ export declare class ContactSource extends BaseEntity {
3
+ name: string;
4
+ isDefault: boolean;
5
+ }
@@ -0,0 +1,36 @@
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.ContactSource = void 0;
13
+ const database_1 = require("../../../../common/database");
14
+ const class_validator_1 = require("class-validator");
15
+ const typeorm_1 = require("typeorm");
16
+ const swagger_1 = require("@nestjs/swagger");
17
+ let ContactSource = class ContactSource extends database_1.BaseEntity {
18
+ name;
19
+ isDefault;
20
+ };
21
+ exports.ContactSource = ContactSource;
22
+ __decorate([
23
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Name of the contact source', minLength: 3 }),
24
+ (0, class_validator_1.MinLength)(3),
25
+ (0, typeorm_1.Column)({ unique: true }),
26
+ __metadata("design:type", String)
27
+ ], ContactSource.prototype, "name", void 0);
28
+ __decorate([
29
+ (0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is this the default contact source?', default: false }),
30
+ (0, typeorm_1.Column)({ default: false }),
31
+ __metadata("design:type", Boolean)
32
+ ], ContactSource.prototype, "isDefault", void 0);
33
+ exports.ContactSource = ContactSource = __decorate([
34
+ (0, typeorm_1.Entity)()
35
+ ], ContactSource);
36
+ //# sourceMappingURL=contact_sources.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact_sources.entity.js","sourceRoot":"","sources":["../../../../../src/entities/helpers/sales/contact/contact_sources.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0DAAyD;AACzD,qDAA4C;AAC5C,qCAAyC;AACzC,6CAA8C;AAGvC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,qBAAU;IAI3C,IAAI,CAAS;IAIb,SAAS,CAAU;CACpB,CAAA;AATY,sCAAa;AAIxB;IAHC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,4BAA4B,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACtF,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;2CACZ;AAIb;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,qCAAqC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAClG,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;gDACR;wBARR,aAAa;IADzB,IAAA,gBAAM,GAAE;GACI,aAAa,CASzB"}
@@ -0,0 +1,5 @@
1
+ import { BaseEntity } from "../../../../common/database";
2
+ export declare class ContactType extends BaseEntity {
3
+ name: string;
4
+ isDefault: boolean;
5
+ }
@@ -0,0 +1,36 @@
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.ContactType = void 0;
13
+ const database_1 = require("../../../../common/database");
14
+ const class_validator_1 = require("class-validator");
15
+ const typeorm_1 = require("typeorm");
16
+ const swagger_1 = require("@nestjs/swagger");
17
+ let ContactType = class ContactType extends database_1.BaseEntity {
18
+ name;
19
+ isDefault;
20
+ };
21
+ exports.ContactType = ContactType;
22
+ __decorate([
23
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Name of the contact type', minLength: 3 }),
24
+ (0, class_validator_1.MinLength)(3),
25
+ (0, typeorm_1.Column)({ unique: true }),
26
+ __metadata("design:type", String)
27
+ ], ContactType.prototype, "name", void 0);
28
+ __decorate([
29
+ (0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is this the default contact type?', default: false }),
30
+ (0, typeorm_1.Column)({ default: false }),
31
+ __metadata("design:type", Boolean)
32
+ ], ContactType.prototype, "isDefault", void 0);
33
+ exports.ContactType = ContactType = __decorate([
34
+ (0, typeorm_1.Entity)()
35
+ ], ContactType);
36
+ //# sourceMappingURL=contact_types.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact_types.entity.js","sourceRoot":"","sources":["../../../../../src/entities/helpers/sales/contact/contact_types.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0DAAyD;AACzD,qDAA4C;AAC5C,qCAAyC;AACzC,6CAA8C;AAGvC,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,qBAAU;IAIzC,IAAI,CAAS;IAIb,SAAS,CAAU;CACpB,CAAA;AATY,kCAAW;AAItB;IAHC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,0BAA0B,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACpF,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;yCACZ;AAIb;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,mCAAmC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAChG,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;8CACR;sBARR,WAAW;IADvB,IAAA,gBAAM,GAAE;GACI,WAAW,CASvB"}
@@ -0,0 +1,5 @@
1
+ import { BaseEntity } from "typeorm";
2
+ export declare class PolizaCompany extends BaseEntity {
3
+ id?: string;
4
+ name: string;
5
+ }
@@ -0,0 +1,30 @@
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.PolizaCompany = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ let PolizaCompany = class PolizaCompany extends typeorm_1.BaseEntity {
15
+ id;
16
+ name;
17
+ };
18
+ exports.PolizaCompany = PolizaCompany;
19
+ __decorate([
20
+ (0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
21
+ __metadata("design:type", String)
22
+ ], PolizaCompany.prototype, "id", void 0);
23
+ __decorate([
24
+ (0, typeorm_1.Column)({ unique: true }),
25
+ __metadata("design:type", String)
26
+ ], PolizaCompany.prototype, "name", void 0);
27
+ exports.PolizaCompany = PolizaCompany = __decorate([
28
+ (0, typeorm_1.Entity)()
29
+ ], PolizaCompany);
30
+ //# sourceMappingURL=h_poliza_company.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"h_poliza_company.entity.js","sourceRoot":"","sources":["../../../../../src/entities/helpers/sales/poliza/h_poliza_company.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA8E;AAGvE,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,oBAAU;IAEzC,EAAE,CAAU;IAGZ,IAAI,CAAS;CAChB,CAAA;AANY,sCAAa;AAEtB;IADC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;yCACnB;AAGZ;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;2CACZ;wBALJ,aAAa;IADzB,IAAA,gBAAM,GAAE;GACI,aAAa,CAMzB"}
@@ -0,0 +1,7 @@
1
+ import { BaseEntity } from "../common/database";
2
+ export declare class ImapFolder extends BaseEntity {
3
+ imapFolderId: string;
4
+ mailboxName: string;
5
+ userId: string;
6
+ type: string;
7
+ }
@@ -0,0 +1,41 @@
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.ImapFolder = void 0;
13
+ const database_1 = require("../common/database");
14
+ const typeorm_1 = require("typeorm");
15
+ let ImapFolder = class ImapFolder extends database_1.BaseEntity {
16
+ imapFolderId;
17
+ mailboxName;
18
+ userId;
19
+ type;
20
+ };
21
+ exports.ImapFolder = ImapFolder;
22
+ __decorate([
23
+ (0, typeorm_1.Column)(),
24
+ __metadata("design:type", String)
25
+ ], ImapFolder.prototype, "imapFolderId", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.Column)(),
28
+ __metadata("design:type", String)
29
+ ], ImapFolder.prototype, "mailboxName", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.Column)(),
32
+ __metadata("design:type", String)
33
+ ], ImapFolder.prototype, "userId", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.Column)(),
36
+ __metadata("design:type", String)
37
+ ], ImapFolder.prototype, "type", void 0);
38
+ exports.ImapFolder = ImapFolder = __decorate([
39
+ (0, typeorm_1.Entity)()
40
+ ], ImapFolder);
41
+ //# sourceMappingURL=imap-folder.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imap-folder.entity.js","sourceRoot":"","sources":["../../src/entities/imap-folder.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAAgD;AAChD,qCAAyC;AAGlC,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,qBAAU;IAEtC,YAAY,CAAS;IAGrB,WAAW,CAAS;IAGpB,MAAM,CAAS;IAGf,IAAI,CAAS;CAChB,CAAA;AAZY,gCAAU;AAEnB;IADC,IAAA,gBAAM,GAAE;;gDACY;AAGrB;IADC,IAAA,gBAAM,GAAE;;+CACW;AAGpB;IADC,IAAA,gBAAM,GAAE;;0CACM;AAGf;IADC,IAAA,gBAAM,GAAE;;wCACI;qBAXJ,UAAU;IADtB,IAAA,gBAAM,GAAE;GACI,UAAU,CAYtB"}
@@ -0,0 +1,16 @@
1
+ import { BaseEntity } from "../common/database";
2
+ import { EmailThirdparty } from "./thirdparty/email.entity";
3
+ export declare class Oauth extends BaseEntity {
4
+ service: number;
5
+ refresh_token: string;
6
+ access_token: string;
7
+ expires_in: number;
8
+ userId: string;
9
+ usergoogle_id: string;
10
+ family_name: string;
11
+ given_name: string;
12
+ email: string;
13
+ picture: string;
14
+ id_token: string;
15
+ emails: EmailThirdparty[];
16
+ }
@@ -0,0 +1,83 @@
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.Oauth = void 0;
13
+ const database_1 = require("../common/database");
14
+ const typeorm_1 = require("typeorm");
15
+ const email_entity_1 = require("./thirdparty/email.entity");
16
+ let Oauth = class Oauth extends database_1.BaseEntity {
17
+ service;
18
+ refresh_token;
19
+ access_token;
20
+ expires_in;
21
+ userId;
22
+ usergoogle_id;
23
+ family_name;
24
+ given_name;
25
+ email;
26
+ picture;
27
+ id_token;
28
+ emails;
29
+ };
30
+ exports.Oauth = Oauth;
31
+ __decorate([
32
+ (0, typeorm_1.Column)("int"),
33
+ __metadata("design:type", Number)
34
+ ], Oauth.prototype, "service", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.Column)(),
37
+ __metadata("design:type", String)
38
+ ], Oauth.prototype, "refresh_token", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.Column)(),
41
+ __metadata("design:type", String)
42
+ ], Oauth.prototype, "access_token", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)("int"),
45
+ __metadata("design:type", Number)
46
+ ], Oauth.prototype, "expires_in", void 0);
47
+ __decorate([
48
+ (0, typeorm_1.Column)(),
49
+ __metadata("design:type", String)
50
+ ], Oauth.prototype, "userId", void 0);
51
+ __decorate([
52
+ (0, typeorm_1.Column)({ nullable: true }),
53
+ __metadata("design:type", String)
54
+ ], Oauth.prototype, "usergoogle_id", void 0);
55
+ __decorate([
56
+ (0, typeorm_1.Column)({ nullable: true }),
57
+ __metadata("design:type", String)
58
+ ], Oauth.prototype, "family_name", void 0);
59
+ __decorate([
60
+ (0, typeorm_1.Column)({ nullable: true }),
61
+ __metadata("design:type", String)
62
+ ], Oauth.prototype, "given_name", void 0);
63
+ __decorate([
64
+ (0, typeorm_1.Column)({ nullable: true }),
65
+ __metadata("design:type", String)
66
+ ], Oauth.prototype, "email", void 0);
67
+ __decorate([
68
+ (0, typeorm_1.Column)({ nullable: true }),
69
+ __metadata("design:type", String)
70
+ ], Oauth.prototype, "picture", void 0);
71
+ __decorate([
72
+ (0, typeorm_1.Column)({ nullable: true }),
73
+ __metadata("design:type", String)
74
+ ], Oauth.prototype, "id_token", void 0);
75
+ __decorate([
76
+ (0, typeorm_1.OneToMany)(() => email_entity_1.EmailThirdparty, email => email.id),
77
+ __metadata("design:type", Array)
78
+ ], Oauth.prototype, "emails", void 0);
79
+ exports.Oauth = Oauth = __decorate([
80
+ (0, typeorm_1.Entity)(),
81
+ (0, typeorm_1.Index)(["email"], { unique: true })
82
+ ], Oauth);
83
+ //# sourceMappingURL=oauth.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth.entity.js","sourceRoot":"","sources":["../../src/entities/oauth.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAAgD;AAChD,qCAA2D;AAC3D,4DAA2D;AAIpD,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,qBAAU;IAEnC,OAAO,CAAS;IAGhB,aAAa,CAAS;IAGtB,YAAY,CAAS;IAGrB,UAAU,CAAS;IAGnB,MAAM,CAAS;IAGf,aAAa,CAAS;IAGtB,WAAW,CAAS;IAGpB,UAAU,CAAS;IAGnB,KAAK,CAAS;IAGd,OAAO,CAAS;IAGhB,QAAQ,CAAS;IAGjB,MAAM,CAAoB;CAC3B,CAAA;AApCY,sBAAK;AAEhB;IADC,IAAA,gBAAM,EAAC,KAAK,CAAC;;sCACE;AAGhB;IADC,IAAA,gBAAM,GAAE;;4CACa;AAGtB;IADC,IAAA,gBAAM,GAAE;;2CACY;AAGrB;IADC,IAAA,gBAAM,EAAC,KAAK,CAAC;;yCACK;AAGnB;IADC,IAAA,gBAAM,GAAE;;qCACM;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACL;AAGtB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACP;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACR;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oCACb;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACX;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACV;AAGjB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,8BAAe,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;;qCAC1B;gBAnCf,KAAK;IAFjB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;GACtB,KAAK,CAoCjB"}
@@ -10,3 +10,4 @@ export * from './agente-intermediario.entity';
10
10
  export * from "./beneficiarios/person.entity";
11
11
  export * from "./beneficiarios/vehicle.entity";
12
12
  export * from "./receipt.entity";
13
+ export * from "./receipt-sub-agente.entity";
@@ -26,4 +26,5 @@ __exportStar(require("./agente-intermediario.entity"), exports);
26
26
  __exportStar(require("./beneficiarios/person.entity"), exports);
27
27
  __exportStar(require("./beneficiarios/vehicle.entity"), exports);
28
28
  __exportStar(require("./receipt.entity"), exports);
29
+ __exportStar(require("./receipt-sub-agente.entity"), exports);
29
30
  //# sourceMappingURL=index.js.map
@@ -1 +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"}
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,5 @@
1
+ import { BaseEntitySimple } from "../../common/database";
2
+ export declare class SubAgente extends BaseEntitySimple {
3
+ name: string;
4
+ cua: string;
5
+ }
@@ -0,0 +1,35 @@
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.SubAgente = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const database_1 = require("../../common/database");
15
+ const typeorm_1 = require("typeorm");
16
+ let SubAgente = class SubAgente extends database_1.BaseEntitySimple {
17
+ name;
18
+ cua;
19
+ };
20
+ exports.SubAgente = SubAgente;
21
+ __decorate([
22
+ (0, swagger_1.ApiProperty)({ type: String, description: 'name of the sub agent' }),
23
+ (0, typeorm_1.Column)({ length: 255 }),
24
+ __metadata("design:type", String)
25
+ ], SubAgente.prototype, "name", void 0);
26
+ __decorate([
27
+ (0, swagger_1.ApiProperty)({ type: String, description: 'CUA of the sub agent', required: false }),
28
+ (0, typeorm_1.Column)({ length: 50, unique: true, nullable: true }),
29
+ __metadata("design:type", String)
30
+ ], SubAgente.prototype, "cua", void 0);
31
+ exports.SubAgente = SubAgente = __decorate([
32
+ (0, typeorm_1.Index)('sub_agente_unique', ['name', "cua"], { unique: true }),
33
+ (0, typeorm_1.Entity)()
34
+ ], SubAgente);
35
+ //# sourceMappingURL=receipt-sub-agente.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"receipt-sub-agente.entity.js","sourceRoot":"","sources":["../../../src/entities/sales/receipt-sub-agente.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,oDAAyD;AACzD,qCAAgD;AAIzC,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,2BAAgB;IAG7C,IAAI,CAAS;IAIb,GAAG,CAAS;CACb,CAAA;AARY,8BAAS;AAGpB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;IACnE,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;uCACX;AAIb;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,sBAAsB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACnF,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACzC;oBAPD,SAAS;IAFrB,IAAA,eAAK,EAAC,mBAAmB,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC7D,IAAA,gBAAM,GAAE;GACI,SAAS,CAQrB"}
@@ -4,7 +4,9 @@ import { PolizaFormaCobro, PolizaFrecuenciaPago } from "./../helpers";
4
4
  import { Currency } from "../currency.entity";
5
5
  import { User } from "../user.entity";
6
6
  import { Poliza } from "./poliza.entity";
7
+ import { SubAgente } from "./receipt-sub-agente.entity";
7
8
  export declare class Receipt extends BaseEntity {
9
+ idBitrix: number;
8
10
  status: ReceiptStatus;
9
11
  title: string;
10
12
  methodPayment: ReceiptMethodPayment;
@@ -17,5 +19,6 @@ export declare class Receipt extends BaseEntity {
17
19
  description: string;
18
20
  responsible?: User;
19
21
  poliza: Poliza;
22
+ subAgente: SubAgente;
20
23
  metadata: Record<string, any>;
21
24
  }
@@ -18,7 +18,9 @@ const helpers_1 = require("./../helpers");
18
18
  const currency_entity_1 = require("../currency.entity");
19
19
  const user_entity_1 = require("../user.entity");
20
20
  const poliza_entity_1 = require("./poliza.entity");
21
+ const receipt_sub_agente_entity_1 = require("./receipt-sub-agente.entity");
21
22
  let Receipt = class Receipt extends database_1.BaseEntity {
23
+ idBitrix;
22
24
  status;
23
25
  title;
24
26
  methodPayment;
@@ -31,9 +33,15 @@ let Receipt = class Receipt extends database_1.BaseEntity {
31
33
  description;
32
34
  responsible;
33
35
  poliza;
36
+ subAgente;
34
37
  metadata;
35
38
  };
36
39
  exports.Receipt = Receipt;
40
+ __decorate([
41
+ (0, swagger_1.ApiProperty)({ type: Number, description: 'Bitrix ID of the receipt', required: false }),
42
+ (0, typeorm_1.Column)({ name: "id_bitrix", nullable: true }),
43
+ __metadata("design:type", Number)
44
+ ], Receipt.prototype, "idBitrix", void 0);
37
45
  __decorate([
38
46
  (0, swagger_1.ApiProperty)({ enum: common_1.ReceiptStatus, description: 'Status of the Receipt', default: common_1.ReceiptStatus.VIGENTE }),
39
47
  (0, typeorm_1.Column)({
@@ -49,10 +57,11 @@ __decorate([
49
57
  __metadata("design:type", String)
50
58
  ], Receipt.prototype, "title", void 0);
51
59
  __decorate([
52
- (0, swagger_1.ApiProperty)({ enum: common_1.ReceiptMethodPayment, description: 'Method of payment' }),
60
+ (0, swagger_1.ApiProperty)({ enum: common_1.ReceiptMethodPayment, description: 'Method of payment', required: false }),
53
61
  (0, typeorm_1.Column)({
54
62
  type: "enum",
55
63
  enum: common_1.ReceiptMethodPayment,
64
+ nullable: true,
56
65
  }),
57
66
  __metadata("design:type", String)
58
67
  ], Receipt.prototype, "methodPayment", void 0);
@@ -121,6 +130,15 @@ __decorate([
121
130
  }),
122
131
  __metadata("design:type", poliza_entity_1.Poliza)
123
132
  ], Receipt.prototype, "poliza", void 0);
133
+ __decorate([
134
+ (0, swagger_1.ApiProperty)({ type: () => receipt_sub_agente_entity_1.SubAgente, description: 'Sub Agent associated with the receipt', required: false }),
135
+ (0, typeorm_1.ManyToOne)(() => receipt_sub_agente_entity_1.SubAgente, {
136
+ onDelete: "SET NULL",
137
+ onUpdate: "CASCADE",
138
+ nullable: true,
139
+ }),
140
+ __metadata("design:type", receipt_sub_agente_entity_1.SubAgente)
141
+ ], Receipt.prototype, "subAgente", void 0);
124
142
  __decorate([
125
143
  (0, swagger_1.ApiProperty)({ type: String, description: 'Metadata', required: false }),
126
144
  (0, typeorm_1.Column)({ type: "jsonb", nullable: true }),
@@ -1 +1 @@
1
- {"version":3,"file":"receipt.entity.js","sourceRoot":"","sources":["../../../src/entities/sales/receipt.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,oDAAmD;AACnD,qCAAoD;AACpD,yCAAmE;AACnE,0CAAsE;AACtE,wDAA8C;AAC9C,gDAAsC;AACtC,mDA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KACjB,CAAC;8BACM,sBAAM;uCAAC;AAQf;IANC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,qCAAS,EAAE,WAAW,EAAE,uCAAuC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC7G,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,qCAAS,EAAE;QACxB,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,IAAI;KACjB,CAAC;8BACS,qCAAS;0CAAC;AAKrB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACvE,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACZ;kBAnGrB,OAAO;IADnB,IAAA,gBAAM,GAAE;GACI,OAAO,CAoGnB"}
@@ -12,6 +12,6 @@ export declare class Oauth extends BaseEntity {
12
12
  email: string;
13
13
  picture: string;
14
14
  id_token: string;
15
- labelId: object[];
15
+ labelId: string[];
16
16
  emails: EmailThirdparty[];
17
17
  }
@@ -0,0 +1,4 @@
1
+ import { DynamicModule } from '@nestjs/common';
2
+ export declare class EasyNotifierModule {
3
+ static register(exchangeName: string, routingKey: string, rabbitMQUri: string): DynamicModule;
4
+ }
@@ -0,0 +1,49 @@
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 EasyNotifierModule_1;
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.EasyNotifierModule = void 0;
11
+ const common_1 = require("@nestjs/common");
12
+ const notifier_service_1 = require("./notifier.service");
13
+ const nestjs_rabbitmq_1 = require("@golevelup/nestjs-rabbitmq");
14
+ let EasyNotifierModule = EasyNotifierModule_1 = class EasyNotifierModule {
15
+ static register(exchangeName, routingKey, rabbitMQUri) {
16
+ return {
17
+ module: EasyNotifierModule_1,
18
+ imports: [
19
+ nestjs_rabbitmq_1.RabbitMQModule.forRoot(nestjs_rabbitmq_1.RabbitMQModule, {
20
+ exchanges: [
21
+ {
22
+ name: exchangeName,
23
+ type: 'topic',
24
+ },
25
+ ],
26
+ uri: rabbitMQUri,
27
+ }),
28
+ ],
29
+ providers: [
30
+ {
31
+ provide: 'EXCHANGE_NAME',
32
+ useValue: exchangeName,
33
+ },
34
+ {
35
+ provide: 'ROUTING_KEY',
36
+ useValue: routingKey,
37
+ },
38
+ notifier_service_1.EasyNotifierService,
39
+ ],
40
+ exports: [notifier_service_1.EasyNotifierService],
41
+ };
42
+ }
43
+ };
44
+ exports.EasyNotifierModule = EasyNotifierModule;
45
+ exports.EasyNotifierModule = EasyNotifierModule = EasyNotifierModule_1 = __decorate([
46
+ (0, common_1.Global)(),
47
+ (0, common_1.Module)({})
48
+ ], EasyNotifierModule);
49
+ //# sourceMappingURL=notifier.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifier.module.js","sourceRoot":"","sources":["../../../src/modules/notifier/notifier.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA+D;AAC/D,yDAAyD;AACzD,gEAA4D;AAIrD,IAAM,kBAAkB,0BAAxB,MAAM,kBAAkB;IAC3B,MAAM,CAAC,QAAQ,CAAC,YAAoB,EAAE,UAAkB,EAAE,WAAmB;QACzE,OAAO;YACH,MAAM,EAAE,oBAAkB;YAC1B,OAAO,EAAE;gBACL,gCAAc,CAAC,OAAO,CAAC,gCAAc,EAAE;oBACnC,SAAS,EAAE;wBACP;4BACI,IAAI,EAAE,YAAY;4BAClB,IAAI,EAAE,OAAO;yBAChB;qBACJ;oBACD,GAAG,EAAE,WAAW;iBACnB,CAAC;aACL;YACD,SAAS,EAAE;gBACP;oBACI,OAAO,EAAE,eAAe;oBACxB,QAAQ,EAAE,YAAY;iBACzB;gBACD;oBACI,OAAO,EAAE,aAAa;oBACtB,QAAQ,EAAE,UAAU;iBACvB;gBACD,sCAAmB;aACtB;YACD,OAAO,EAAE,CAAC,sCAAmB,CAAC;SACjC,CAAC;IACN,CAAC;CACJ,CAAA;AA7BY,gDAAkB;6BAAlB,kBAAkB;IAF9B,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,kBAAkB,CA6B9B"}
@@ -0,0 +1,19 @@
1
+ import { AmqpConnection } from "@golevelup/nestjs-rabbitmq";
2
+ import { SendNotificationDto } from "../../common";
3
+ import { Contact, ContactComment, Task, TaskComment } from "../../entities";
4
+ export declare class EasyNotifierService {
5
+ private readonly amqpConnection;
6
+ private readonly exchangeName;
7
+ private readonly routingKey;
8
+ constructor(amqpConnection: AmqpConnection, exchangeName: string, routingKey: string);
9
+ sendNotification(data: SendNotificationDto): Promise<void>;
10
+ notifyTaskCompletion(task: Task, recipientsId: string[]): Promise<void>;
11
+ notifyTaskOverdue(task: Task, recipientsId: string[]): Promise<void>;
12
+ notifyTaskContinue(task: Task, recipientsId: string[]): Promise<void>;
13
+ notifyNewTask(task: Task, recipientsId: string[]): Promise<void>;
14
+ notifyTaskUpdate(task: Task, recipientsId: string[], changedFields: string[]): Promise<void>;
15
+ notifyNewComment(task: Task, comment: TaskComment, recipientsId: string[]): Promise<void>;
16
+ notifyNewCommentContact(contact: Contact, comment: ContactComment, recipientsId: string[]): Promise<void>;
17
+ sendOTPPhone(code: string, recipientsId: string[]): Promise<void>;
18
+ sendOTPEmail(code: string, recipientsId: string[]): Promise<void>;
19
+ }