easywork-common-lib 1.0.845 → 1.0.847
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.
- package/dist/entities/index.d.ts +1 -0
- package/dist/entities/index.js +1 -0
- package/dist/entities/index.js.map +1 -1
- package/dist/entities/tools/mail/mail.entity.d.ts +24 -0
- package/dist/entities/tools/mail/mail.entity.js +88 -0
- package/dist/entities/tools/mail/mail.entity.js.map +1 -0
- package/dist/entities/tools/mail/mailbox.entity.d.ts +1 -0
- package/dist/entities/tools/mail/mailbox.entity.js.map +1 -1
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/dist/entities/index.d.ts
CHANGED
|
@@ -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';
|
package/dist/entities/index.js
CHANGED
|
@@ -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;
|
|
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,24 @@
|
|
|
1
|
+
import { BaseEntityOnlyEssential } from '../../../common/database/base.entity';
|
|
2
|
+
import { Mailbox } from './mailbox.entity';
|
|
3
|
+
export declare enum MailCRMType {
|
|
4
|
+
CONTACT = "contact",
|
|
5
|
+
LEAD = "lead",
|
|
6
|
+
AGENT = "agent"
|
|
7
|
+
}
|
|
8
|
+
export type MailMessageCRMLink = {
|
|
9
|
+
id: string;
|
|
10
|
+
type: MailCRMType;
|
|
11
|
+
};
|
|
12
|
+
export declare class MailMessage extends BaseEntityOnlyEssential {
|
|
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
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
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 base_entity_1 = require("../../../common/database/base.entity");
|
|
16
|
+
const mailbox_entity_1 = require("./mailbox.entity");
|
|
17
|
+
let MailMessage = class MailMessage extends base_entity_1.BaseEntityOnlyEssential {
|
|
18
|
+
labelIds;
|
|
19
|
+
to;
|
|
20
|
+
messageId;
|
|
21
|
+
date;
|
|
22
|
+
subject;
|
|
23
|
+
from;
|
|
24
|
+
snippet;
|
|
25
|
+
internalDate;
|
|
26
|
+
body;
|
|
27
|
+
crm;
|
|
28
|
+
mailbox;
|
|
29
|
+
};
|
|
30
|
+
exports.MailMessage = MailMessage;
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, swagger_1.ApiProperty)({ description: 'Mailbox name', required: false }),
|
|
33
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], MailMessage.prototype, "labelIds", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, swagger_1.ApiProperty)({ description: 'Email recipient', required: true }),
|
|
38
|
+
(0, typeorm_1.Column)(),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], MailMessage.prototype, "to", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, swagger_1.ApiProperty)({ description: 'Email ID at external provider', required: false }),
|
|
43
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], MailMessage.prototype, "messageId", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, swagger_1.ApiProperty)({ description: 'Email sent date', required: true }),
|
|
48
|
+
(0, typeorm_1.Column)({ type: 'timestamp', nullable: false }),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], MailMessage.prototype, "date", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, swagger_1.ApiProperty)({ description: 'Email subject', required: true }),
|
|
53
|
+
(0, typeorm_1.Column)(),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], MailMessage.prototype, "subject", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, swagger_1.ApiProperty)({ description: 'Email sender', required: true }),
|
|
58
|
+
(0, typeorm_1.Column)(),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], MailMessage.prototype, "from", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, swagger_1.ApiProperty)({ description: "Mmm I'm not sure what's this", required: true }),
|
|
63
|
+
(0, typeorm_1.Column)(),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], MailMessage.prototype, "snippet", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, swagger_1.ApiProperty)({ description: "Email provider's date", required: true }),
|
|
68
|
+
(0, typeorm_1.Column)(),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], MailMessage.prototype, "internalDate", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, swagger_1.ApiProperty)({ description: "Email's body", required: true }),
|
|
73
|
+
(0, typeorm_1.Column)(),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], MailMessage.prototype, "body", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, swagger_1.ApiProperty)({ isArray: true, type: String, description: "Email's body", required: true }),
|
|
78
|
+
(0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
|
|
79
|
+
__metadata("design:type", Object)
|
|
80
|
+
], MailMessage.prototype, "crm", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, typeorm_1.ManyToOne)(() => mailbox_entity_1.Mailbox, { nullable: false, onDelete: 'CASCADE' }),
|
|
83
|
+
__metadata("design:type", mailbox_entity_1.Mailbox)
|
|
84
|
+
], MailMessage.prototype, "mailbox", void 0);
|
|
85
|
+
exports.MailMessage = MailMessage = __decorate([
|
|
86
|
+
(0, typeorm_1.Entity)()
|
|
87
|
+
], MailMessage);
|
|
88
|
+
//# sourceMappingURL=mail.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mail.entity.js","sourceRoot":"","sources":["../../../../src/entities/tools/mail/mail.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAoD;AACpD,6CAA8C;AAE9C,sEAA+E;AAC/E,qDAA2C;AAcpC,IAAM,WAAW,GAAjB,MAAM,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Q,EAAE,IAAI,EAAE,CAAC;IAC5E,IAAA,gBAAM,GAAE;;4CACO;AAIhB;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,uBAAuB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACrE,IAAA,gBAAM,GAAE;;iDACY;AAIrB;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5D,IAAA,gBAAM,GAAE;;yCACI;AAIb;IAFC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACzF,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCAClB;AAGxB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;8BAC1D,wBAAO;4CAAC;sBA1CN,WAAW;IADvB,IAAA,gBAAM,GAAE;GACI,WAAW,CA2CvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mailbox.entity.js","sourceRoot":"","sources":["../../../../src/entities/tools/mail/mailbox.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA4D;AAC5D,6CAA8C;AAE9C,sEAA+E;AAC/E,mDAAyC;AACzC,gEAAsD;AAEtD,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,0CAAuB,CAAA;AACzB,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B;
|
|
1
|
+
{"version":3,"file":"mailbox.entity.js","sourceRoot":"","sources":["../../../../src/entities/tools/mail/mailbox.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,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