easywork-common-lib 1.0.952 → 1.0.954
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/.gitattributes +2 -2
- package/.github/workflows/npm-publish.yml +33 -33
- package/.vscode/settings.json +12 -12
- package/dist/entities/tools/mail/mail-queue-distribution.d.ts +8 -0
- package/dist/entities/tools/mail/mail-queue-distribution.js +38 -0
- package/dist/entities/tools/mail/mail-queue-distribution.js.map +1 -0
- package/dist/entities/tools/mail/mail-queue-entities-assigned.d.ts +9 -0
- package/dist/entities/tools/mail/mail-queue-entities-assigned.js +39 -0
- package/dist/entities/tools/mail/mail-queue-entities-assigned.js.map +1 -0
- package/dist/entities/tools/mail/mail-queue-status.d.ts +9 -0
- package/dist/entities/tools/mail/mail-queue-status.js +44 -0
- package/dist/entities/tools/mail/mail-queue-status.js.map +1 -0
- package/dist/entities/tools/mail/mailbox-user-access.entity.d.ts +3 -9
- package/dist/entities/tools/mail/mailbox-user-access.entity.js +8 -21
- package/dist/entities/tools/mail/mailbox-user-access.entity.js.map +1 -1
- package/dist/entities/tools/mail/mailbox.entity.d.ts +1 -0
- package/dist/entities/tools/mail/mailbox.entity.js +15 -6
- package/dist/entities/tools/mail/mailbox.entity.js.map +1 -1
- package/dist/grpc/drive/drive.proto +290 -290
- package/dist/grpc/drive/leads.proto +114 -114
- package/justfile +8 -8
- package/package.json +46 -46
- package/scripts/bump.sh +8 -8
- package/test.bat +15 -15
- package/tsconfig.build.json +4 -4
- package/tsconfig.json +25 -25
- package/tsconfig.tsbuildinfo +1 -1
package/.gitattributes
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
# Auto detect text files and perform LF normalization
|
|
2
|
-
* text=auto
|
|
1
|
+
# Auto detect text files and perform LF normalization
|
|
2
|
+
* text=auto
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
-
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
-
|
|
4
|
-
name: Node.js Package
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
release:
|
|
8
|
-
types: [created]
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
build:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v4
|
|
15
|
-
- uses: actions/setup-node@v4
|
|
16
|
-
with:
|
|
17
|
-
node-version: 20
|
|
18
|
-
- run: npm ci
|
|
19
|
-
- run: npm test
|
|
20
|
-
|
|
21
|
-
publish-npm:
|
|
22
|
-
needs: build
|
|
23
|
-
runs-on: ubuntu-latest
|
|
24
|
-
steps:
|
|
25
|
-
- uses: actions/checkout@v4
|
|
26
|
-
- uses: actions/setup-node@v4
|
|
27
|
-
with:
|
|
28
|
-
node-version: 20
|
|
29
|
-
registry-url: https://registry.npmjs.org/
|
|
30
|
-
- run: npm ci
|
|
31
|
-
- run: npm publish
|
|
32
|
-
env:
|
|
33
|
-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
|
1
|
+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
+
|
|
4
|
+
name: Node.js Package
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
release:
|
|
8
|
+
types: [created]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: actions/setup-node@v4
|
|
16
|
+
with:
|
|
17
|
+
node-version: 20
|
|
18
|
+
- run: npm ci
|
|
19
|
+
- run: npm test
|
|
20
|
+
|
|
21
|
+
publish-npm:
|
|
22
|
+
needs: build
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
- uses: actions/setup-node@v4
|
|
27
|
+
with:
|
|
28
|
+
node-version: 20
|
|
29
|
+
registry-url: https://registry.npmjs.org/
|
|
30
|
+
- run: npm ci
|
|
31
|
+
- run: npm publish
|
|
32
|
+
env:
|
|
33
|
+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
package/.vscode/settings.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
{
|
|
2
|
-
"autoBarrel.language.defaultLanguage": "TypeScript",
|
|
3
|
-
"autoBarrel.files.disableRecursiveBarrelling": false,
|
|
4
|
-
"autoBarrel.files.includeExtensionOnExport": ["ts", "tsx", "vue"],
|
|
5
|
-
"autoBarrel.files.ignoreFilePathPatternOnExport": ["**/*.spec.*", "**/*.test.*"],
|
|
6
|
-
"autoBarrel.files.keepExtensionOnExport": false,
|
|
7
|
-
"autoBarrel.files.detectExportsInFiles": false,
|
|
8
|
-
"autoBarrel.files.exportDefaultFilename": "filename",
|
|
9
|
-
"autoBarrel.formatting.excludeSemiColonAtEndOfLine": false,
|
|
10
|
-
"autoBarrel.formatting.useSingleQuotes": true,
|
|
11
|
-
"autoBarrel.formatting.endOfLine": "lf",
|
|
12
|
-
"autoBarrel.formatting.insertFinalNewline": true,
|
|
1
|
+
{
|
|
2
|
+
"autoBarrel.language.defaultLanguage": "TypeScript",
|
|
3
|
+
"autoBarrel.files.disableRecursiveBarrelling": false,
|
|
4
|
+
"autoBarrel.files.includeExtensionOnExport": ["ts", "tsx", "vue"],
|
|
5
|
+
"autoBarrel.files.ignoreFilePathPatternOnExport": ["**/*.spec.*", "**/*.test.*"],
|
|
6
|
+
"autoBarrel.files.keepExtensionOnExport": false,
|
|
7
|
+
"autoBarrel.files.detectExportsInFiles": false,
|
|
8
|
+
"autoBarrel.files.exportDefaultFilename": "filename",
|
|
9
|
+
"autoBarrel.formatting.excludeSemiColonAtEndOfLine": false,
|
|
10
|
+
"autoBarrel.formatting.useSingleQuotes": true,
|
|
11
|
+
"autoBarrel.formatting.endOfLine": "lf",
|
|
12
|
+
"autoBarrel.formatting.insertFinalNewline": true,
|
|
13
13
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Mailbox } from './mailbox.entity';
|
|
2
|
+
import { BaseEntityOnlyEssential } from 'common';
|
|
3
|
+
import { User } from 'entities/user.entity';
|
|
4
|
+
export declare class MailQueueDistribution extends BaseEntityOnlyEssential {
|
|
5
|
+
orderInQueue: number;
|
|
6
|
+
mailbox: Mailbox;
|
|
7
|
+
userInvited: User;
|
|
8
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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.MailQueueDistribution = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const mailbox_entity_1 = require("./mailbox.entity");
|
|
15
|
+
const common_1 = require("common");
|
|
16
|
+
const user_entity_1 = require("entities/user.entity");
|
|
17
|
+
let MailQueueDistribution = class MailQueueDistribution extends common_1.BaseEntityOnlyEssential {
|
|
18
|
+
orderInQueue;
|
|
19
|
+
mailbox;
|
|
20
|
+
userInvited;
|
|
21
|
+
};
|
|
22
|
+
exports.MailQueueDistribution = MailQueueDistribution;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)(),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], MailQueueDistribution.prototype, "orderInQueue", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.ManyToOne)(() => mailbox_entity_1.Mailbox, { nullable: true, onDelete: 'SET NULL' }),
|
|
29
|
+
__metadata("design:type", mailbox_entity_1.Mailbox)
|
|
30
|
+
], MailQueueDistribution.prototype, "mailbox", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, { nullable: false, onDelete: 'CASCADE' }),
|
|
33
|
+
__metadata("design:type", user_entity_1.User)
|
|
34
|
+
], MailQueueDistribution.prototype, "userInvited", void 0);
|
|
35
|
+
exports.MailQueueDistribution = MailQueueDistribution = __decorate([
|
|
36
|
+
(0, typeorm_1.Entity)()
|
|
37
|
+
], MailQueueDistribution);
|
|
38
|
+
//# sourceMappingURL=mail-queue-distribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mail-queue-distribution.js","sourceRoot":"","sources":["../../../../src/entities/tools/mail/mail-queue-distribution.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAoD;AAEpD,qDAA2C;AAC3C,mCAAiD;AACjD,sDAA4C;AAGrC,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,gCAAuB;IAEhE,YAAY,CAAS;IAGrB,OAAO,CAAU;IAGjB,WAAW,CAAO;CACnB,CAAA;AATY,sDAAqB;AAEhC;IADC,IAAA,gBAAM,GAAE;;2DACY;AAGrB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;8BAC1D,wBAAO;sDAAC;AAGjB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;8BACnD,kBAAI;0DAAC;gCARP,qBAAqB;IADjC,IAAA,gBAAM,GAAE;GACI,qBAAqB,CASjC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Mailbox } from './mailbox.entity';
|
|
2
|
+
import { BaseEntityOnlyEssential } from 'common';
|
|
3
|
+
import { User } from 'entities/user.entity';
|
|
4
|
+
import { MailMessageCRMLink } from './mail.entity';
|
|
5
|
+
export declare class MailQueueEntitiesAssigned extends BaseEntityOnlyEssential {
|
|
6
|
+
crm: MailMessageCRMLink;
|
|
7
|
+
mailbox: Mailbox;
|
|
8
|
+
userAssigned: User;
|
|
9
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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.MailQueueEntitiesAssigned = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const mailbox_entity_1 = require("./mailbox.entity");
|
|
15
|
+
const common_1 = require("common");
|
|
16
|
+
const user_entity_1 = require("entities/user.entity");
|
|
17
|
+
let MailQueueEntitiesAssigned = class MailQueueEntitiesAssigned extends common_1.BaseEntityOnlyEssential {
|
|
18
|
+
crm;
|
|
19
|
+
mailbox;
|
|
20
|
+
userAssigned;
|
|
21
|
+
};
|
|
22
|
+
exports.MailQueueEntitiesAssigned = MailQueueEntitiesAssigned;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
|
|
25
|
+
__metadata("design:type", Object)
|
|
26
|
+
], MailQueueEntitiesAssigned.prototype, "crm", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Unique)(['mailbox']),
|
|
29
|
+
(0, typeorm_1.ManyToOne)(() => mailbox_entity_1.Mailbox, { nullable: true, onDelete: 'CASCADE' }),
|
|
30
|
+
__metadata("design:type", mailbox_entity_1.Mailbox)
|
|
31
|
+
], MailQueueEntitiesAssigned.prototype, "mailbox", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, { nullable: true, onDelete: 'SET NULL' }),
|
|
34
|
+
__metadata("design:type", user_entity_1.User)
|
|
35
|
+
], MailQueueEntitiesAssigned.prototype, "userAssigned", void 0);
|
|
36
|
+
exports.MailQueueEntitiesAssigned = MailQueueEntitiesAssigned = __decorate([
|
|
37
|
+
(0, typeorm_1.Entity)()
|
|
38
|
+
], MailQueueEntitiesAssigned);
|
|
39
|
+
//# sourceMappingURL=mail-queue-entities-assigned.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mail-queue-entities-assigned.js","sourceRoot":"","sources":["../../../../src/entities/tools/mail/mail-queue-entities-assigned.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA4D;AAE5D,qDAA2C;AAC3C,mCAAiD;AACjD,sDAA4C;AAIrC,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,gCAAuB;IAEpE,GAAG,CAAqB;IAIxB,OAAO,CAAU;IAGjB,YAAY,CAAO;CACpB,CAAA;AAVY,8DAAyB;AAEpC;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDAClB;AAIxB;IAFC,IAAA,gBAAM,EAAC,CAAC,SAAS,CAAC,CAAC;IACnB,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;8BACzD,wBAAO;0DAAC;AAGjB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;8BAClD,kBAAI;+DAAC;oCATR,yBAAyB;IADrC,IAAA,gBAAM,GAAE;GACI,yBAAyB,CAUrC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Mailbox } from './mailbox.entity';
|
|
2
|
+
import { BaseEntityOnlyEssential } from 'common';
|
|
3
|
+
import { User } from 'entities/user.entity';
|
|
4
|
+
export declare class MailQueueStatus extends BaseEntityOnlyEssential {
|
|
5
|
+
lastAssignedOrder: number;
|
|
6
|
+
lastAssignmentTimestamp: string;
|
|
7
|
+
mailbox: Mailbox;
|
|
8
|
+
lastAssignedUser: User;
|
|
9
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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.MailQueueStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const mailbox_entity_1 = require("./mailbox.entity");
|
|
15
|
+
const common_1 = require("common");
|
|
16
|
+
const user_entity_1 = require("entities/user.entity");
|
|
17
|
+
let MailQueueStatus = class MailQueueStatus extends common_1.BaseEntityOnlyEssential {
|
|
18
|
+
lastAssignedOrder;
|
|
19
|
+
lastAssignmentTimestamp;
|
|
20
|
+
mailbox;
|
|
21
|
+
lastAssignedUser;
|
|
22
|
+
};
|
|
23
|
+
exports.MailQueueStatus = MailQueueStatus;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)(),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], MailQueueStatus.prototype, "lastAssignedOrder", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'timestamp' }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], MailQueueStatus.prototype, "lastAssignmentTimestamp", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Unique)(['mailbox']),
|
|
34
|
+
(0, typeorm_1.ManyToOne)(() => mailbox_entity_1.Mailbox, { nullable: true, onDelete: 'CASCADE' }),
|
|
35
|
+
__metadata("design:type", mailbox_entity_1.Mailbox)
|
|
36
|
+
], MailQueueStatus.prototype, "mailbox", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, { nullable: true, onDelete: 'SET NULL' }),
|
|
39
|
+
__metadata("design:type", user_entity_1.User)
|
|
40
|
+
], MailQueueStatus.prototype, "lastAssignedUser", void 0);
|
|
41
|
+
exports.MailQueueStatus = MailQueueStatus = __decorate([
|
|
42
|
+
(0, typeorm_1.Entity)()
|
|
43
|
+
], MailQueueStatus);
|
|
44
|
+
//# sourceMappingURL=mail-queue-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mail-queue-status.js","sourceRoot":"","sources":["../../../../src/entities/tools/mail/mail-queue-status.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA4D;AAE5D,qDAA2C;AAC3C,mCAAiD;AACjD,sDAA4C;AAGrC,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,gCAAuB;IAE1D,iBAAiB,CAAS;IAG1B,uBAAuB,CAAS;IAIhC,OAAO,CAAU;IAGjB,gBAAgB,CAAO;CACxB,CAAA;AAbY,0CAAe;AAE1B;IADC,IAAA,gBAAM,GAAE;;0DACiB;AAG1B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;;gEACE;AAIhC;IAFC,IAAA,gBAAM,EAAC,CAAC,SAAS,CAAC,CAAC;IACnB,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;8BACzD,wBAAO;gDAAC;AAGjB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;8BAC9C,kBAAI;yDAAC;0BAZZ,eAAe;IAD3B,IAAA,gBAAM,GAAE;GACI,eAAe,CAa3B"}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { BaseEntityOnlyEssential } from '../../../common/database/base.entity';
|
|
2
2
|
import { User } from '../../user.entity';
|
|
3
|
-
|
|
4
|
-
ACCESS_DENIED = "access-denied",
|
|
5
|
-
READ_ONLY = "read-only",
|
|
6
|
-
EDIT_CALENDAR_EVENTS = "edit-calendar-events",
|
|
7
|
-
FULL_ACCESS = "full-access"
|
|
8
|
-
}
|
|
3
|
+
import { Mailbox } from './mailbox.entity';
|
|
9
4
|
export declare class MailboxUserAccess extends BaseEntityOnlyEssential {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
userInvited: User;
|
|
5
|
+
mailbox: Mailbox;
|
|
6
|
+
user: User;
|
|
13
7
|
}
|
|
@@ -9,37 +9,24 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.MailboxUserAccess =
|
|
12
|
+
exports.MailboxUserAccess = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
15
14
|
const base_entity_1 = require("../../../common/database/base.entity");
|
|
16
15
|
const user_entity_1 = require("../../user.entity");
|
|
17
|
-
|
|
18
|
-
(function (MailboxUserPermissionAccess) {
|
|
19
|
-
MailboxUserPermissionAccess["ACCESS_DENIED"] = "access-denied";
|
|
20
|
-
MailboxUserPermissionAccess["READ_ONLY"] = "read-only";
|
|
21
|
-
MailboxUserPermissionAccess["EDIT_CALENDAR_EVENTS"] = "edit-calendar-events";
|
|
22
|
-
MailboxUserPermissionAccess["FULL_ACCESS"] = "full-access";
|
|
23
|
-
})(MailboxUserPermissionAccess || (exports.MailboxUserPermissionAccess = MailboxUserPermissionAccess = {}));
|
|
16
|
+
const mailbox_entity_1 = require("./mailbox.entity");
|
|
24
17
|
let MailboxUserAccess = class MailboxUserAccess extends base_entity_1.BaseEntityOnlyEssential {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
userInvited;
|
|
18
|
+
mailbox;
|
|
19
|
+
user;
|
|
28
20
|
};
|
|
29
21
|
exports.MailboxUserAccess = MailboxUserAccess;
|
|
30
22
|
__decorate([
|
|
31
|
-
(0,
|
|
32
|
-
(
|
|
33
|
-
|
|
34
|
-
], MailboxUserAccess.prototype, "permissions", void 0);
|
|
23
|
+
(0, typeorm_1.ManyToOne)(() => mailbox_entity_1.Mailbox, { nullable: false, onDelete: 'CASCADE' }),
|
|
24
|
+
__metadata("design:type", mailbox_entity_1.Mailbox)
|
|
25
|
+
], MailboxUserAccess.prototype, "mailbox", void 0);
|
|
35
26
|
__decorate([
|
|
36
27
|
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, { nullable: false, onDelete: 'CASCADE' }),
|
|
37
28
|
__metadata("design:type", user_entity_1.User)
|
|
38
|
-
], MailboxUserAccess.prototype, "
|
|
39
|
-
__decorate([
|
|
40
|
-
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, { nullable: false, onDelete: 'CASCADE' }),
|
|
41
|
-
__metadata("design:type", user_entity_1.User)
|
|
42
|
-
], MailboxUserAccess.prototype, "userInvited", void 0);
|
|
29
|
+
], MailboxUserAccess.prototype, "user", void 0);
|
|
43
30
|
exports.MailboxUserAccess = MailboxUserAccess = __decorate([
|
|
44
31
|
(0, typeorm_1.Entity)()
|
|
45
32
|
], MailboxUserAccess);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mailbox-user-access.entity.js","sourceRoot":"","sources":["../../../../src/entities/tools/mail/mailbox-user-access.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"mailbox-user-access.entity.js","sourceRoot":"","sources":["../../../../src/entities/tools/mail/mailbox-user-access.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA4C;AAE5C,sEAA+E;AAC/E,mDAAyC;AACzC,qDAA2C;AAGpC,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,qCAAuB;IAE5D,OAAO,CAAU;IAGjB,IAAI,CAAO;CACZ,CAAA;AANY,8CAAiB;AAE5B;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;8BAC1D,wBAAO;kDAAC;AAGjB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;8BAC1D,kBAAI;+CAAC;4BALA,iBAAiB;IAD7B,IAAA,gBAAM,GAAE;GACI,iBAAiB,CAM7B"}
|
|
@@ -34,6 +34,7 @@ let Mailbox = class Mailbox extends base_entity_1.BaseEntityOnlyEssential {
|
|
|
34
34
|
user;
|
|
35
35
|
signatureId;
|
|
36
36
|
signature;
|
|
37
|
+
teamAccess;
|
|
37
38
|
};
|
|
38
39
|
exports.Mailbox = Mailbox;
|
|
39
40
|
__decorate([
|
|
@@ -81,22 +82,30 @@ __decorate([
|
|
|
81
82
|
], Mailbox.prototype, "user", void 0);
|
|
82
83
|
__decorate([
|
|
83
84
|
(0, swagger_1.ApiPropertyOptional)({
|
|
84
|
-
description:
|
|
85
|
+
description: 'ID de la firma de email seleccionada para este buzón',
|
|
85
86
|
type: () => String,
|
|
86
|
-
format:
|
|
87
|
+
format: 'uuid',
|
|
87
88
|
nullable: true,
|
|
88
89
|
}),
|
|
89
|
-
(0, typeorm_1.Column)({ type:
|
|
90
|
+
(0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
|
|
90
91
|
__metadata("design:type", String)
|
|
91
92
|
], Mailbox.prototype, "signatureId", void 0);
|
|
92
93
|
__decorate([
|
|
93
|
-
(0, typeorm_1.ManyToOne)(() => email_signature_entity_1.EmailSignature,
|
|
94
|
+
(0, typeorm_1.ManyToOne)(() => email_signature_entity_1.EmailSignature, signature => signature.mailboxes, {
|
|
94
95
|
nullable: true,
|
|
95
|
-
onDelete:
|
|
96
|
+
onDelete: 'SET NULL',
|
|
96
97
|
}),
|
|
97
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
98
|
+
(0, typeorm_1.JoinColumn)({ name: 'signatureId' }),
|
|
98
99
|
__metadata("design:type", email_signature_entity_1.EmailSignature)
|
|
99
100
|
], Mailbox.prototype, "signature", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, typeorm_1.ManyToMany)(() => user_entity_1.User, {
|
|
103
|
+
onDelete: 'CASCADE',
|
|
104
|
+
onUpdate: 'CASCADE',
|
|
105
|
+
}),
|
|
106
|
+
(0, typeorm_1.JoinTable)(),
|
|
107
|
+
__metadata("design:type", Array)
|
|
108
|
+
], Mailbox.prototype, "teamAccess", void 0);
|
|
100
109
|
exports.Mailbox = Mailbox = __decorate([
|
|
101
110
|
(0, typeorm_1.Entity)(),
|
|
102
111
|
(0, typeorm_1.Unique)(['user', 'email', 'oauth', 'provider'])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mailbox.entity.js","sourceRoot":"","sources":["../../../../src/entities/tools/mail/mailbox.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"mailbox.entity.js","sourceRoot":"","sources":["../../../../src/entities/tools/mail/mailbox.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA+F;AAC/F,6CAAmE;AAEnE,sEAA+E;AAC/E,mDAAyC;AACzC,gEAAsD;AACtD,qEAA0D;AAE1D,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,0CAAuB,CAAA;AACzB,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B;AA0CM,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,qCAAuB;IAGlD,UAAU,CAAU;IAIpB,IAAI,CAAU;IAId,MAAM,CAAwB;IAI9B,KAAK,CAAS;IAId,KAAK,CAAuB;IAI5B,GAAG,CAAqC;IAIxC,QAAQ,CAAkB;IAG1B,KAAK,CAAS;IAGd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