easywork-common-lib 1.0.249 → 1.0.250
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/.github/workflows/npm-publish.yml +33 -0
- package/dist/common/enums/tools.enum.d.ts +7 -0
- package/dist/common/enums/tools.enum.js +9 -1
- package/dist/common/enums/tools.enum.js.map +1 -1
- package/dist/entities/tools/calendar/event.entity.d.ts +15 -0
- package/dist/entities/tools/calendar/event.entity.js +103 -0
- package/dist/entities/tools/calendar/event.entity.js.map +1 -0
- package/dist/entities/tools/calendar/index.d.ts +1 -0
- package/dist/entities/tools/calendar/index.js +18 -0
- package/dist/entities/tools/calendar/index.js.map +1 -0
- package/dist/entities/tools/index.d.ts +1 -0
- package/dist/entities/tools/index.js +1 -0
- package/dist/entities/tools/index.js.map +1 -1
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +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,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TaskCRMType = exports.TaskStatus = void 0;
|
|
3
|
+
exports.EventRepeatMode = exports.TaskCRMType = exports.TaskStatus = void 0;
|
|
4
4
|
var TaskStatus;
|
|
5
5
|
(function (TaskStatus) {
|
|
6
6
|
TaskStatus["PENDING"] = "pending";
|
|
@@ -13,4 +13,12 @@ var TaskCRMType;
|
|
|
13
13
|
TaskCRMType["CONTACT"] = "contact";
|
|
14
14
|
TaskCRMType["POLIZA"] = "poliza";
|
|
15
15
|
})(TaskCRMType || (exports.TaskCRMType = TaskCRMType = {}));
|
|
16
|
+
var EventRepeatMode;
|
|
17
|
+
(function (EventRepeatMode) {
|
|
18
|
+
EventRepeatMode["NONE"] = "none";
|
|
19
|
+
EventRepeatMode["DIARIO"] = "diario";
|
|
20
|
+
EventRepeatMode["SEMANAL"] = "semanal";
|
|
21
|
+
EventRepeatMode["MENSUAL"] = "mensual";
|
|
22
|
+
EventRepeatMode["ANUAL"] = "anual";
|
|
23
|
+
})(EventRepeatMode || (exports.EventRepeatMode = EventRepeatMode = {}));
|
|
16
24
|
//# sourceMappingURL=tools.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.enum.js","sourceRoot":"","sources":["../../../src/common/enums/tools.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAKX;AALD,WAAY,UAAU;IAClB,iCAAmB,CAAA;IACnB,iCAAmB,CAAA;IACnB,qCAAuB,CAAA;IACvB,+CAAiC,CAAA;AACrC,CAAC,EALW,UAAU,0BAAV,UAAU,QAKrB;AAED,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;AACrB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB"}
|
|
1
|
+
{"version":3,"file":"tools.enum.js","sourceRoot":"","sources":["../../../src/common/enums/tools.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAKX;AALD,WAAY,UAAU;IAClB,iCAAmB,CAAA;IACnB,iCAAmB,CAAA;IACnB,qCAAuB,CAAA;IACvB,+CAAiC,CAAA;AACrC,CAAC,EALW,UAAU,0BAAV,UAAU,QAKrB;AAED,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;AACrB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAED,IAAY,eAMX;AAND,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,kCAAe,CAAA;AACnB,CAAC,EANW,eAAe,+BAAf,eAAe,QAM1B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseEntityWithUser, EventRepeatMode } from "../../../common";
|
|
2
|
+
import { User } from "../../user.entity";
|
|
3
|
+
export declare class Event extends BaseEntityWithUser {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
startTime: Date;
|
|
7
|
+
endTime: Date;
|
|
8
|
+
repeat: EventRepeatMode;
|
|
9
|
+
participants?: User[];
|
|
10
|
+
reminder: Date;
|
|
11
|
+
color: string;
|
|
12
|
+
availability: string;
|
|
13
|
+
private: boolean;
|
|
14
|
+
important: boolean;
|
|
15
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
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.Event = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
16
|
+
const common_1 = require("../../../common");
|
|
17
|
+
const user_entity_1 = require("../../user.entity");
|
|
18
|
+
let Event = class Event extends common_1.BaseEntityWithUser {
|
|
19
|
+
name;
|
|
20
|
+
description;
|
|
21
|
+
startTime;
|
|
22
|
+
endTime;
|
|
23
|
+
repeat;
|
|
24
|
+
participants;
|
|
25
|
+
reminder;
|
|
26
|
+
color;
|
|
27
|
+
availability;
|
|
28
|
+
private;
|
|
29
|
+
important;
|
|
30
|
+
};
|
|
31
|
+
exports.Event = Event;
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Name of the event', minLength: 3 }),
|
|
34
|
+
(0, class_validator_1.MinLength)(3),
|
|
35
|
+
(0, typeorm_1.Column)({ unique: false, nullable: false }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], Event.prototype, "name", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Description of the event' }),
|
|
40
|
+
(0, typeorm_1.Column)({ type: "text" }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], Event.prototype, "description", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, swagger_1.ApiProperty)({ type: Date, description: 'Start time of the event', required: false }),
|
|
45
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
46
|
+
__metadata("design:type", Date)
|
|
47
|
+
], Event.prototype, "startTime", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, swagger_1.ApiProperty)({ type: Date, description: 'End time of the event', required: false }),
|
|
50
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
51
|
+
__metadata("design:type", Date)
|
|
52
|
+
], Event.prototype, "endTime", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, swagger_1.ApiProperty)({
|
|
55
|
+
enum: common_1.EventRepeatMode,
|
|
56
|
+
description: 'Retición',
|
|
57
|
+
default: common_1.EventRepeatMode.NONE
|
|
58
|
+
}),
|
|
59
|
+
(0, typeorm_1.Column)({
|
|
60
|
+
type: "enum",
|
|
61
|
+
enum: common_1.EventRepeatMode,
|
|
62
|
+
default: common_1.EventRepeatMode.NONE
|
|
63
|
+
}),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], Event.prototype, "repeat", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, swagger_1.ApiProperty)({ type: () => [user_entity_1.User], description: 'Participants in the event', required: false }),
|
|
68
|
+
(0, typeorm_1.ManyToMany)(() => user_entity_1.User, {
|
|
69
|
+
onDelete: "CASCADE",
|
|
70
|
+
onUpdate: "CASCADE",
|
|
71
|
+
}),
|
|
72
|
+
(0, typeorm_1.JoinTable)(),
|
|
73
|
+
__metadata("design:type", Array)
|
|
74
|
+
], Event.prototype, "participants", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, swagger_1.ApiProperty)({ type: Date, description: 'Reminder time', required: false }),
|
|
77
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
78
|
+
__metadata("design:type", Date)
|
|
79
|
+
], Event.prototype, "reminder", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Color of the event' }),
|
|
82
|
+
(0, typeorm_1.Column)({ type: String }),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], Event.prototype, "color", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'User availability during the event' }),
|
|
87
|
+
(0, typeorm_1.Column)({ type: String }),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], Event.prototype, "availability", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, swagger_1.ApiProperty)({ type: Boolean, description: '¿Private?', default: false }),
|
|
92
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
93
|
+
__metadata("design:type", Boolean)
|
|
94
|
+
], Event.prototype, "private", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, swagger_1.ApiProperty)({ type: Boolean, description: 'Important?', default: false }),
|
|
97
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
98
|
+
__metadata("design:type", Boolean)
|
|
99
|
+
], Event.prototype, "important", void 0);
|
|
100
|
+
exports.Event = Event = __decorate([
|
|
101
|
+
(0, typeorm_1.Entity)()
|
|
102
|
+
], Event);
|
|
103
|
+
//# sourceMappingURL=event.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.entity.js","sourceRoot":"","sources":["../../../../src/entities/tools/calendar/event.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA4C;AAC5C,qCAAgE;AAChE,6CAA8C;AAC9C,4CAAsE;AACtE,mDAAyC;AAGlC,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,2BAAkB;IAIzC,IAAI,CAAS;IAIb,WAAW,CAAS;IAIpB,SAAS,CAAO;IAIhB,OAAO,CAAO;IAYd,MAAM,CAAkB;IAQxB,YAAY,CAAU;IAItB,QAAQ,CAAO;IAIf,KAAK,CAAS;IAId,YAAY,CAAS;IAIrB,OAAO,CAAU;IAIjB,SAAS,CAAU;CACtB,CAAA;AAzDY,sBAAK;AAId;IAHC,IAAA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function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./event.entity"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/entities/tools/calendar/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B"}
|
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./task-comment.entity"), exports);
|
|
18
18
|
__exportStar(require("./task.entity"), exports);
|
|
19
19
|
__exportStar(require("./task-list-field"), exports);
|
|
20
|
+
__exportStar(require("./calendar"), exports);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/tools/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,gDAA8B;AAC9B,oDAAiC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/tools/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,gDAA8B;AAC9B,oDAAiC;AACjC,6CAA0B"}
|