easywork-common-lib 1.0.846 → 1.0.848

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.
@@ -27,6 +27,7 @@ export * from './tools';
27
27
  export * from './tools/mail/mailbox-signatures.entity';
28
28
  export * from './tools/mail/mailbox-user-access.entity';
29
29
  export * from './tools/mail/mailbox.entity';
30
+ export * from './tools/mail/mail.entity';
30
31
  export * from './thirdparty/google-webhooks-config.entity';
31
32
  export * from './thirdparty/oauth.entity';
32
33
  export * from './helpers';
@@ -43,6 +43,7 @@ __exportStar(require("./tools"), exports);
43
43
  __exportStar(require("./tools/mail/mailbox-signatures.entity"), exports);
44
44
  __exportStar(require("./tools/mail/mailbox-user-access.entity"), exports);
45
45
  __exportStar(require("./tools/mail/mailbox.entity"), exports);
46
+ __exportStar(require("./tools/mail/mail.entity"), exports);
46
47
  __exportStar(require("./thirdparty/google-webhooks-config.entity"), exports);
47
48
  __exportStar(require("./thirdparty/oauth.entity"), exports);
48
49
  __exportStar(require("./helpers"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iEAA+C;AAC/C,oDAAkC;AAClC,0CAAwB;AACxB,+DAA6C;AAC7C,iDAA+B;AAC/B,iDAA+B;AAC/B,uDAAqC;AACrC,yDAAuC;AACvC,2DAAyC;AACzC,mDAAiC;AACjC,4DAA0C;AAC1C,kDAAgC;AAChC,mDAAiC;AACjC,sDAAoC;AACpC,iDAA+B;AAC/B,2CAAyB;AACzB,mDAAiC;AACjC,oDAAkC;AAClC,yDAAuC;AACvC,gDAA8B;AAC9B,0CAAwB;AACxB,+CAA6B;AAC7B,4DAA0C;AAC1C,gDAA8B;AAG9B,iDAA+B;AAG/B,0CAAwB;AAGxB,yEAAuD;AACvD,0EAAwD;AACxD,8DAA4C;AAG5C,6EAA2D;AAC3D,4DAA0C;AAG1C,4CAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iEAA+C;AAC/C,oDAAkC;AAClC,0CAAwB;AACxB,+DAA6C;AAC7C,iDAA+B;AAC/B,iDAA+B;AAC/B,uDAAqC;AACrC,yDAAuC;AACvC,2DAAyC;AACzC,mDAAiC;AACjC,4DAA0C;AAC1C,kDAAgC;AAChC,mDAAiC;AACjC,sDAAoC;AACpC,iDAA+B;AAC/B,2CAAyB;AACzB,mDAAiC;AACjC,oDAAkC;AAClC,yDAAuC;AACvC,gDAA8B;AAC9B,0CAAwB;AACxB,+CAA6B;AAC7B,4DAA0C;AAC1C,gDAA8B;AAG9B,iDAA+B;AAG/B,0CAAwB;AAGxB,yEAAuD;AACvD,0EAAwD;AACxD,8DAA4C;AAC5C,2DAAyC;AAGzC,6EAA2D;AAC3D,4DAA0C;AAG1C,4CAA0B"}
@@ -0,0 +1,26 @@
1
+ import { Mailbox } from './mailbox.entity';
2
+ export declare enum MailCRMType {
3
+ CONTACT = "contact",
4
+ LEAD = "lead",
5
+ AGENT = "agent"
6
+ }
7
+ export type MailMessageCRMLink = {
8
+ id: string;
9
+ type: MailCRMType;
10
+ };
11
+ export declare class MailMessage {
12
+ id: string;
13
+ labelIds: string[];
14
+ to: string;
15
+ messageId: string;
16
+ date: string;
17
+ subject: string;
18
+ from: string;
19
+ snippet: string;
20
+ internalDate: string;
21
+ body: string;
22
+ crm: MailMessageCRMLink;
23
+ mailbox: Mailbox;
24
+ createdAt?: Date;
25
+ updatedAt?: Date;
26
+ }
@@ -0,0 +1,102 @@
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.MailMessage = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const swagger_1 = require("@nestjs/swagger");
15
+ const mailbox_entity_1 = require("./mailbox.entity");
16
+ let MailMessage = class MailMessage {
17
+ id;
18
+ labelIds;
19
+ to;
20
+ messageId;
21
+ date;
22
+ subject;
23
+ from;
24
+ snippet;
25
+ internalDate;
26
+ body;
27
+ crm;
28
+ mailbox;
29
+ createdAt;
30
+ updatedAt;
31
+ };
32
+ exports.MailMessage = MailMessage;
33
+ __decorate([
34
+ (0, typeorm_1.PrimaryColumn)('varchar'),
35
+ __metadata("design:type", String)
36
+ ], MailMessage.prototype, "id", void 0);
37
+ __decorate([
38
+ (0, swagger_1.ApiProperty)({ description: 'Mail labels', required: false }),
39
+ (0, typeorm_1.Column)({ nullable: true }),
40
+ __metadata("design:type", Array)
41
+ ], MailMessage.prototype, "labelIds", void 0);
42
+ __decorate([
43
+ (0, swagger_1.ApiProperty)({ description: 'Email recipient', required: true }),
44
+ (0, typeorm_1.Column)(),
45
+ __metadata("design:type", String)
46
+ ], MailMessage.prototype, "to", void 0);
47
+ __decorate([
48
+ (0, swagger_1.ApiProperty)({ description: 'Email ID at external provider', required: false }),
49
+ (0, typeorm_1.Column)({ nullable: true }),
50
+ __metadata("design:type", String)
51
+ ], MailMessage.prototype, "messageId", void 0);
52
+ __decorate([
53
+ (0, swagger_1.ApiProperty)({ description: 'Email sent date', required: true }),
54
+ (0, typeorm_1.Column)({ type: 'timestamp', nullable: false }),
55
+ __metadata("design:type", String)
56
+ ], MailMessage.prototype, "date", void 0);
57
+ __decorate([
58
+ (0, swagger_1.ApiProperty)({ description: 'Email subject', required: true }),
59
+ (0, typeorm_1.Column)(),
60
+ __metadata("design:type", String)
61
+ ], MailMessage.prototype, "subject", void 0);
62
+ __decorate([
63
+ (0, swagger_1.ApiProperty)({ description: 'Email sender', required: true }),
64
+ (0, typeorm_1.Column)(),
65
+ __metadata("design:type", String)
66
+ ], MailMessage.prototype, "from", void 0);
67
+ __decorate([
68
+ (0, swagger_1.ApiProperty)({ description: "Mmm I'm not sure what's this", required: true }),
69
+ (0, typeorm_1.Column)(),
70
+ __metadata("design:type", String)
71
+ ], MailMessage.prototype, "snippet", void 0);
72
+ __decorate([
73
+ (0, swagger_1.ApiProperty)({ description: "Email provider's date", required: true }),
74
+ (0, typeorm_1.Column)(),
75
+ __metadata("design:type", String)
76
+ ], MailMessage.prototype, "internalDate", void 0);
77
+ __decorate([
78
+ (0, swagger_1.ApiProperty)({ description: "Email's body", required: true }),
79
+ (0, typeorm_1.Column)(),
80
+ __metadata("design:type", String)
81
+ ], MailMessage.prototype, "body", void 0);
82
+ __decorate([
83
+ (0, swagger_1.ApiProperty)({ isArray: true, type: String, description: "Email's body", required: true }),
84
+ (0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
85
+ __metadata("design:type", Object)
86
+ ], MailMessage.prototype, "crm", void 0);
87
+ __decorate([
88
+ (0, typeorm_1.ManyToOne)(() => mailbox_entity_1.Mailbox, { nullable: false, onDelete: 'CASCADE' }),
89
+ __metadata("design:type", mailbox_entity_1.Mailbox)
90
+ ], MailMessage.prototype, "mailbox", void 0);
91
+ __decorate([
92
+ (0, typeorm_1.CreateDateColumn)(),
93
+ __metadata("design:type", Date)
94
+ ], MailMessage.prototype, "createdAt", void 0);
95
+ __decorate([
96
+ (0, typeorm_1.UpdateDateColumn)(),
97
+ __metadata("design:type", Date)
98
+ ], MailMessage.prototype, "updatedAt", void 0);
99
+ exports.MailMessage = MailMessage = __decorate([
100
+ (0, typeorm_1.Entity)()
101
+ ], MailMess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"easywork-common-lib",
3
- "version": "1.0.846",
3
+ "version": "1.0.848",
4
4
  "description": "Librería común de Easywork",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {