easywork-common-lib 1.0.195 → 1.0.197
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/thirdparty/email.entity.d.ts +3 -1
- package/dist/entities/thirdparty/email.entity.js +10 -4
- package/dist/entities/thirdparty/email.entity.js.map +1 -1
- package/dist/entities/thirdparty/user-email-relation.entity.d.ts +7 -0
- package/dist/entities/thirdparty/user-email-relation.entity.js +35 -0
- package/dist/entities/thirdparty/user-email-relation.entity.js.map +1 -0
- package/dist/entities/user.entity.d.ts +2 -0
- package/dist/entities/user.entity.js +6 -0
- package/dist/entities/user.entity.js.map +1 -1
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { BaseEntity } from "../../common/database";
|
|
2
|
+
import { UserEmailRelation } from "./user-email-relation.entity";
|
|
2
3
|
import { ServiceThirdparty } from "./service.entity";
|
|
3
4
|
export declare class EmailThirdparty extends BaseEntity {
|
|
5
|
+
googleId: string;
|
|
4
6
|
subject: string;
|
|
5
7
|
from: string;
|
|
6
8
|
date: Date;
|
|
7
9
|
to: string[];
|
|
8
10
|
body: string;
|
|
9
11
|
service: ServiceThirdparty;
|
|
10
|
-
|
|
12
|
+
userRelations: UserEmailRelation[];
|
|
11
13
|
}
|
|
@@ -11,18 +11,24 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.EmailThirdparty = void 0;
|
|
13
13
|
const database_1 = require("../../common/database");
|
|
14
|
+
const user_email_relation_entity_1 = require("./user-email-relation.entity");
|
|
14
15
|
const typeorm_1 = require("typeorm");
|
|
15
16
|
const service_entity_1 = require("./service.entity");
|
|
16
17
|
let EmailThirdparty = class EmailThirdparty extends database_1.BaseEntity {
|
|
18
|
+
googleId;
|
|
17
19
|
subject;
|
|
18
20
|
from;
|
|
19
21
|
date;
|
|
20
22
|
to;
|
|
21
23
|
body;
|
|
22
24
|
service;
|
|
23
|
-
|
|
25
|
+
userRelations;
|
|
24
26
|
};
|
|
25
27
|
exports.EmailThirdparty = EmailThirdparty;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], EmailThirdparty.prototype, "googleId", void 0);
|
|
26
32
|
__decorate([
|
|
27
33
|
(0, typeorm_1.Column)(),
|
|
28
34
|
__metadata("design:type", String)
|
|
@@ -48,9 +54,9 @@ __decorate([
|
|
|
48
54
|
__metadata("design:type", service_entity_1.ServiceThirdparty)
|
|
49
55
|
], EmailThirdparty.prototype, "service", void 0);
|
|
50
56
|
__decorate([
|
|
51
|
-
(0, typeorm_1.
|
|
52
|
-
__metadata("design:type",
|
|
53
|
-
], EmailThirdparty.prototype, "
|
|
57
|
+
(0, typeorm_1.OneToMany)(() => user_email_relation_entity_1.UserEmailRelation, (relation) => relation.email),
|
|
58
|
+
__metadata("design:type", Array)
|
|
59
|
+
], EmailThirdparty.prototype, "userRelations", void 0);
|
|
54
60
|
exports.EmailThirdparty = EmailThirdparty = __decorate([
|
|
55
61
|
(0, typeorm_1.Entity)()
|
|
56
62
|
], EmailThirdparty);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.entity.js","sourceRoot":"","sources":["../../../src/entities/thirdparty/email.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAmD;AACnD,
|
|
1
|
+
{"version":3,"file":"email.entity.js","sourceRoot":"","sources":["../../../src/entities/thirdparty/email.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAmD;AACnD,6EAAiE;AACjE,qCAA+D;AAC/D,qDAAqD;AAG9C,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,qBAAU;IAE7C,QAAQ,CAAS;IAGjB,OAAO,CAAS;IAGhB,IAAI,CAAS;IAGb,IAAI,CAAO;IAGX,EAAE,CAAW;IAGb,IAAI,CAAS;IAGb,OAAO,CAAoB;IAG3B,aAAa,CAAsB;CACpC,CAAA;AAxBY,0CAAe;AAE1B;IADC,IAAA,gBAAM,GAAE;;iDACQ;AAGjB;IADC,IAAA,gBAAM,GAAE;;gDACO;AAGhB;IADC,IAAA,gBAAM,GAAE;;6CACI;AAGb;IADC,IAAA,gBAAM,GAAE;8BACH,IAAI;6CAAC;AAGX;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;2CACnB;AAGb;IADC,IAAA,gBAAM,GAAE;;6CACI;AAGb;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kCAAiB,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;8BACvD,kCAAiB;gDAAC;AAG3B;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,8CAAiB,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC;;sDAC9B;0BAvBxB,eAAe;IAD3B,IAAA,gBAAM,GAAE;GACI,eAAe,CAwB3B"}
|
|
@@ -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.UserEmailRelation = void 0;
|
|
13
|
+
const database_1 = require("../../common/database");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const user_entity_1 = require("../user.entity");
|
|
16
|
+
const email_entity_1 = require("./email.entity");
|
|
17
|
+
let UserEmailRelation = class UserEmailRelation extends database_1.BaseEntity {
|
|
18
|
+
user;
|
|
19
|
+
email;
|
|
20
|
+
};
|
|
21
|
+
exports.UserEmailRelation = UserEmailRelation;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, (user) => user.emailRelations, { onDelete: "CASCADE", onUpdate: "CASCADE" }),
|
|
24
|
+
(0, typeorm_1.JoinColumn)(),
|
|
25
|
+
__metadata("design:type", user_entity_1.User)
|
|
26
|
+
], UserEmailRelation.prototype, "user", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.ManyToOne)(() => email_entity_1.EmailThirdparty, (email) => email.userRelations, { onDelete: "CASCADE", onUpdate: "CASCADE" }),
|
|
29
|
+
(0, typeorm_1.JoinColumn)(),
|
|
30
|
+
__metadata("design:type", email_entity_1.EmailThirdparty)
|
|
31
|
+
], UserEmailRelation.prototype, "email", void 0);
|
|
32
|
+
exports.UserEmailRelation = UserEmailRelation = __decorate([
|
|
33
|
+
(0, typeorm_1.Entity)()
|
|
34
|
+
], UserEmailRelation);
|
|
35
|
+
//# sourceMappingURL=user-email-relation.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-email-relation.entity.js","sourceRoot":"","sources":["../../../src/entities/thirdparty/user-email-relation.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAmD;AACnD,qCAAwD;AACxD,gDAAsC;AACtC,iDAAiD;AAG1C,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,qBAAU;IAG/C,IAAI,CAAO;IAIX,KAAK,CAAkB;CACxB,CAAA;AARY,8CAAiB;AAG5B;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAClG,IAAA,oBAAU,GAAE;8BACP,kBAAI;+CAAC;AAIX;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,8BAAe,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC9G,IAAA,oBAAU,GAAE;8BACN,8BAAe;gDAAC;4BAPZ,iBAAiB;IAD7B,IAAA,gBAAM,GAAE;GACI,iBAAiB,CAQ7B"}
|
|
@@ -2,6 +2,7 @@ import { BaseEntity } from "../common/database";
|
|
|
2
2
|
import { Profile } from "./profile.entity";
|
|
3
3
|
import { Role } from "./role.entity";
|
|
4
4
|
import { Tag } from "./tag.entity";
|
|
5
|
+
import { UserEmailRelation } from "./thirdparty/user-email-relation.entity";
|
|
5
6
|
import { PushToken } from "./notifications/push-token.entity";
|
|
6
7
|
export declare class User extends BaseEntity {
|
|
7
8
|
username: string;
|
|
@@ -18,5 +19,6 @@ export declare class User extends BaseEntity {
|
|
|
18
19
|
roles?: Role[];
|
|
19
20
|
tags: Tag[];
|
|
20
21
|
pushTokens: PushToken[];
|
|
22
|
+
emailRelations: UserEmailRelation[];
|
|
21
23
|
get name(): string;
|
|
22
24
|
}
|
|
@@ -16,6 +16,7 @@ const class_transformer_1 = require("class-transformer");
|
|
|
16
16
|
const profile_entity_1 = require("./profile.entity");
|
|
17
17
|
const role_entity_1 = require("./role.entity");
|
|
18
18
|
const tag_entity_1 = require("./tag.entity");
|
|
19
|
+
const user_email_relation_entity_1 = require("./thirdparty/user-email-relation.entity");
|
|
19
20
|
const push_token_entity_1 = require("./notifications/push-token.entity");
|
|
20
21
|
let User = class User extends database_1.BaseEntity {
|
|
21
22
|
username;
|
|
@@ -32,6 +33,7 @@ let User = class User extends database_1.BaseEntity {
|
|
|
32
33
|
roles;
|
|
33
34
|
tags;
|
|
34
35
|
pushTokens;
|
|
36
|
+
emailRelations;
|
|
35
37
|
get name() {
|
|
36
38
|
return `${this.profile?.firstName ?? ''} ${this.profile?.lastName ?? ''}`.trim();
|
|
37
39
|
}
|
|
@@ -104,6 +106,10 @@ __decorate([
|
|
|
104
106
|
(0, typeorm_1.OneToMany)(() => push_token_entity_1.PushToken, (pushToken) => pushToken.user),
|
|
105
107
|
__metadata("design:type", Array)
|
|
106
108
|
], User.prototype, "pushTokens", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, typeorm_1.OneToMany)(() => user_email_relation_entity_1.UserEmailRelation, (relation) => relation.user),
|
|
111
|
+
__metadata("design:type", Array)
|
|
112
|
+
], User.prototype, "emailRelations", void 0);
|
|
107
113
|
exports.User = User = __decorate([
|
|
108
114
|
(0, typeorm_1.Entity)()
|
|
109
115
|
], User);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.entity.js","sourceRoot":"","sources":["../../src/entities/user.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAAgD;AAChD,qCAAiG;AACjG,yDAA4C;AAC5C,qDAA2C;AAC3C,+CAAqC;AACrC,6CAAmC;AACnC,yEAA8D;AAGvD,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,qBAAU;IAElC,QAAQ,CAAU;IAGlB,KAAK,CAAU;IAGf,GAAG,CAAU;IAGb,MAAM,CAAU;IAIhB,IAAI,CAAU;IAId,eAAe,CAAU;IAGzB,kBAAkB,CAAW;IAG7B,KAAK,CAAU;IAGf,UAAU,CAAW;IAGrB,SAAS,CAAQ;IAQjB,OAAO,CAAU;IAOjB,KAAK,CAAU;IAIf,IAAI,CAAO;IA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