easywork-common-lib 1.0.843 → 1.0.845
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/oauth-v2.entity.d.ts +23 -0
- package/dist/entities/thirdparty/oauth-v2.entity.js +80 -0
- package/dist/entities/thirdparty/oauth-v2.entity.js.map +1 -0
- package/dist/entities/tools/calendar/event-list-calendars.entity.d.ts +2 -2
- package/dist/entities/tools/calendar/event-list-calendars.entity.js +2 -2
- package/dist/entities/tools/calendar/event-list-calendars.entity.js.map +1 -1
- package/dist/entities/tools/mail/mailbox.entity.d.ts +14 -8
- package/dist/entities/tools/mail/mailbox.entity.js +6 -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/helpers/user/access_history.entity.d.ts +0 -9
- package/dist/entities/helpers/user/access_history.entity.js +0 -58
- package/dist/entities/helpers/user/access_history.entity.js.map +0 -1
- package/dist/entities/policy/policy-details.entity.d.ts +0 -42
- package/dist/entities/policy/policy-details.entity.js +0 -380
- package/dist/entities/policy/policy-details.entity.js.map +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BaseEntityOnlyEssential } from '../../common/database/base.entity';
|
|
2
|
+
import { User } from '../user.entity';
|
|
3
|
+
export declare enum OAuthProvider {
|
|
4
|
+
Google = "google",
|
|
5
|
+
Microsoft = "microsoft",
|
|
6
|
+
Apple = "apple"
|
|
7
|
+
}
|
|
8
|
+
export declare enum OAuthServiceType {
|
|
9
|
+
Profile = "profile",
|
|
10
|
+
Calendar = "calendar",
|
|
11
|
+
Mail = "mail"
|
|
12
|
+
}
|
|
13
|
+
export declare class OauthV2 extends BaseEntityOnlyEssential {
|
|
14
|
+
email: string;
|
|
15
|
+
provider: OAuthProvider;
|
|
16
|
+
service: OAuthServiceType;
|
|
17
|
+
refreshToken: string;
|
|
18
|
+
accessToken: string;
|
|
19
|
+
expiresIn: number;
|
|
20
|
+
scope?: string;
|
|
21
|
+
additionalData?: string;
|
|
22
|
+
user: User;
|
|
23
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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.OauthV2 = exports.OAuthServiceType = exports.OAuthProvider = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const base_entity_1 = require("../../common/database/base.entity");
|
|
15
|
+
const user_entity_1 = require("../user.entity");
|
|
16
|
+
var OAuthProvider;
|
|
17
|
+
(function (OAuthProvider) {
|
|
18
|
+
OAuthProvider["Google"] = "google";
|
|
19
|
+
OAuthProvider["Microsoft"] = "microsoft";
|
|
20
|
+
OAuthProvider["Apple"] = "apple";
|
|
21
|
+
})(OAuthProvider || (exports.OAuthProvider = OAuthProvider = {}));
|
|
22
|
+
var OAuthServiceType;
|
|
23
|
+
(function (OAuthServiceType) {
|
|
24
|
+
OAuthServiceType["Profile"] = "profile";
|
|
25
|
+
OAuthServiceType["Calendar"] = "calendar";
|
|
26
|
+
OAuthServiceType["Mail"] = "mail";
|
|
27
|
+
})(OAuthServiceType || (exports.OAuthServiceType = OAuthServiceType = {}));
|
|
28
|
+
let OauthV2 = class OauthV2 extends base_entity_1.BaseEntityOnlyEssential {
|
|
29
|
+
email;
|
|
30
|
+
provider;
|
|
31
|
+
service;
|
|
32
|
+
refreshToken;
|
|
33
|
+
accessToken;
|
|
34
|
+
expiresIn;
|
|
35
|
+
scope;
|
|
36
|
+
additionalData;
|
|
37
|
+
user;
|
|
38
|
+
};
|
|
39
|
+
exports.OauthV2 = OauthV2;
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], OauthV2.prototype, "email", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: OAuthProvider }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], OauthV2.prototype, "provider", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: OAuthServiceType }),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], OauthV2.prototype, "service", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], OauthV2.prototype, "refreshToken", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], OauthV2.prototype, "accessToken", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
62
|
+
__metadata("design:type", Number)
|
|
63
|
+
], OauthV2.prototype, "expiresIn", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], OauthV2.prototype, "scope", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
70
|
+
__metadata("design:type", String)
|
|
71
|
+
], OauthV2.prototype, "additionalData", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, { nullable: false, onDelete: 'CASCADE' }),
|
|
74
|
+
__metadata("design:type", user_entity_1.User)
|
|
75
|
+
], OauthV2.prototype, "user", void 0);
|
|
76
|
+
exports.OauthV2 = OauthV2 = __decorate([
|
|
77
|
+
(0, typeorm_1.Entity)(),
|
|
78
|
+
(0, typeorm_1.Unique)(['user', 'email', 'service', 'provider'])
|
|
79
|
+
], OauthV2);
|
|
80
|
+
//# sourceMappingURL=oauth-v2.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-v2.entity.js","sourceRoot":"","sources":["../../../src/entities/thirdparty/oauth-v2.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA4D;AAC5D,mEAA4E;AAC5E,gDAAsC;AAEtC,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,kCAAiB,CAAA;IACjB,wCAAuB,CAAA;IACvB,gCAAe,CAAA;AACjB,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAED,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,yCAAqB,CAAA;IACrB,iCAAa,CAAA;AACf,CAAC,EAJW,gBAAgB,gCAAhB,gBAAgB,QAI3B;AAIM,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,qCAAuB;IAElD,KAAK,CAAS;IAGd,QAAQ,CAAgB;IAGxB,OAAO,CAAmB;IAG1B,YAAY,CAAS;IAGrB,WAAW,CAAS;IAGpB,SAAS,CAAS;IAGlB,KAAK,CAAU;IAGf,cAAc,CAAU;IAGxB,IAAI,CAAO;CACZ,CAAA;AA3BY,0BAAO;AAElB;IADC,IAAA,gBAAM,GAAE;;sCACK;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;;yCACtB;AAGxB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;;wCACvB;AAG1B;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACN;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACP;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACzB;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCAC1B;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACjB;AAGxB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;8BAC1D,kBAAI;qCAAC;kBA1BA,OAAO;IAFnB,IAAA,gBAAM,GAAE;IACR,IAAA,gBAAM,EAAC,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;GACpC,OAAO,CA2BnB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EntityBase } from
|
|
2
|
-
import { Oauth } from
|
|
1
|
+
import { EntityBase } from '../../../common/database/base.entity';
|
|
2
|
+
import { Oauth } from '../../thirdparty/oauth.entity';
|
|
3
3
|
export declare class EventListCalendars extends EntityBase {
|
|
4
4
|
calendars: object[];
|
|
5
5
|
oAuth: Oauth;
|
|
@@ -19,11 +19,11 @@ let EventListCalendars = class EventListCalendars extends base_entity_1.EntityBa
|
|
|
19
19
|
};
|
|
20
20
|
exports.EventListCalendars = EventListCalendars;
|
|
21
21
|
__decorate([
|
|
22
|
-
(0, typeorm_1.Column)({ type:
|
|
22
|
+
(0, typeorm_1.Column)({ type: 'jsonb' }),
|
|
23
23
|
__metadata("design:type", Array)
|
|
24
24
|
], EventListCalendars.prototype, "calendars", void 0);
|
|
25
25
|
__decorate([
|
|
26
|
-
(0, typeorm_1.OneToOne)(() => oauth_entity_1.Oauth,
|
|
26
|
+
(0, typeorm_1.OneToOne)(() => oauth_entity_1.Oauth, oauth => oauth.calendarsList),
|
|
27
27
|
__metadata("design:type", oauth_entity_1.Oauth)
|
|
28
28
|
], EventListCalendars.prototype, "oAuth", void 0);
|
|
29
29
|
exports.EventListCalendars = EventListCalendars = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-list-calendars.entity.js","sourceRoot":"","sources":["../../../../src/entities/tools/calendar/event-list-calendars.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sEAAkE;AAClE,gEAAsD;AACtD,qCAAmD;AAG5C,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,wBAAU;IAEhD,SAAS,CAAW;IAGpB,KAAK,CAAQ;CACd,CAAA;AANY,gDAAkB;AAE7B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;qDACN;AAGpB;IADC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"event-list-calendars.entity.js","sourceRoot":"","sources":["../../../../src/entities/tools/calendar/event-list-calendars.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sEAAkE;AAClE,gEAAsD;AACtD,qCAAmD;AAG5C,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,wBAAU;IAEhD,SAAS,CAAW;IAGpB,KAAK,CAAQ;CACd,CAAA;AANY,gDAAkB;AAE7B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;qDACN;AAGpB;IADC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC;8BAC7C,oBAAK;iDAAC;6BALF,kBAAkB;IAD9B,IAAA,gBAAM,GAAE;GACI,kBAAkB,CAM9B"}
|
|
@@ -15,27 +15,33 @@ export type MailboxRules = {
|
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
export type MailboxSender = {
|
|
18
|
+
active: boolean;
|
|
18
19
|
name: string;
|
|
19
|
-
limit:
|
|
20
|
+
limit: {
|
|
21
|
+
active: boolean;
|
|
22
|
+
number: number;
|
|
23
|
+
};
|
|
20
24
|
};
|
|
21
25
|
export type MailboxCrmIntegrationRules = {
|
|
22
26
|
active: boolean;
|
|
23
27
|
queueDistribution: string[];
|
|
24
|
-
importation:
|
|
28
|
+
importation: {
|
|
29
|
+
active: boolean;
|
|
30
|
+
time: string;
|
|
31
|
+
};
|
|
25
32
|
routing: boolean;
|
|
26
33
|
onIncomingMail: {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
createTask: boolean;
|
|
34
|
+
active: boolean;
|
|
35
|
+
type: string;
|
|
30
36
|
};
|
|
31
37
|
onOutgoingMail: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
createTask: boolean;
|
|
38
|
+
active: boolean;
|
|
39
|
+
type: string;
|
|
35
40
|
};
|
|
36
41
|
exceptionAddresses: string[];
|
|
37
42
|
};
|
|
38
43
|
export declare class Mailbox extends BaseEntityOnlyEssential {
|
|
44
|
+
configured: boolean;
|
|
39
45
|
name?: string;
|
|
40
46
|
sender?: MailboxSender | null;
|
|
41
47
|
email: string;
|
|
@@ -22,6 +22,7 @@ var MailboxProvider;
|
|
|
22
22
|
MailboxProvider["MICROSOFT"] = "microsoft";
|
|
23
23
|
})(MailboxProvider || (exports.MailboxProvider = MailboxProvider = {}));
|
|
24
24
|
let Mailbox = class Mailbox extends base_entity_1.BaseEntityOnlyEssential {
|
|
25
|
+
configured;
|
|
25
26
|
name;
|
|
26
27
|
sender;
|
|
27
28
|
email;
|
|
@@ -32,6 +33,11 @@ let Mailbox = class Mailbox extends base_entity_1.BaseEntityOnlyEssential {
|
|
|
32
33
|
user;
|
|
33
34
|
};
|
|
34
35
|
exports.Mailbox = Mailbox;
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, swagger_1.ApiProperty)({ description: 'Mailbox is configured', required: true }),
|
|
38
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
39
|
+
__metadata("design:type", Boolean)
|
|
40
|
+
], Mailbox.prototype, "configured", void 0);
|
|
35
41
|
__decorate([
|
|
36
42
|
(0, swagger_1.ApiProperty)({ description: 'Mailbox name', required: false }),
|
|
37
43
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
@@ -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,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;AA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