easywork-common-lib 1.0.110 → 1.0.112
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/common/dtos/index.d.ts +1 -0
- package/dist/common/dtos/index.js +18 -0
- package/dist/common/dtos/index.js.map +1 -0
- package/dist/common/dtos/send-notification.dto.d.ts +10 -0
- package/dist/common/dtos/send-notification.dto.js +53 -0
- package/dist/common/dtos/send-notification.dto.js.map +1 -0
- package/dist/common/enums/notification.enum.d.ts +10 -0
- package/dist/common/enums/notification.enum.js +12 -1
- package/dist/common/enums/notification.enum.js.map +1 -1
- package/dist/common/index.d.ts +1 -0
- package/dist/common/index.js +1 -0
- package/dist/common/index.js.map +1 -1
- package/package.json +1 -1
- package/test.bat +16 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./send-notification.dto";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (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("./send-notification.dto"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NotificationCategory, NotificationChannel, NotificationSubcategory } from "../../common";
|
|
2
|
+
export declare class SendNotificationDto {
|
|
3
|
+
title: string;
|
|
4
|
+
recipientsId: string[];
|
|
5
|
+
entityId: string;
|
|
6
|
+
content: string;
|
|
7
|
+
channels: NotificationChannel[];
|
|
8
|
+
category?: NotificationCategory;
|
|
9
|
+
subCategory?: NotificationSubcategory;
|
|
10
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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.SendNotificationDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const common_1 = require("../../common");
|
|
15
|
+
class SendNotificationDto {
|
|
16
|
+
title;
|
|
17
|
+
recipientsId;
|
|
18
|
+
entityId;
|
|
19
|
+
content;
|
|
20
|
+
channels;
|
|
21
|
+
category;
|
|
22
|
+
subCategory;
|
|
23
|
+
}
|
|
24
|
+
exports.SendNotificationDto = SendNotificationDto;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], SendNotificationDto.prototype, "title", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsUUID)("all", { each: true }),
|
|
31
|
+
__metadata("design:type", Array)
|
|
32
|
+
], SendNotificationDto.prototype, "recipientsId", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsUUID)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], SendNotificationDto.prototype, "entityId", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsString)(),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], SendNotificationDto.prototype, "content", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, class_validator_1.IsEnum)(common_1.NotificationChannel, { each: true }),
|
|
43
|
+
__metadata("design:type", Array)
|
|
44
|
+
], SendNotificationDto.prototype, "channels", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_validator_1.IsEnum)(common_1.NotificationCategory),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], SendNotificationDto.prototype, "category", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_validator_1.IsEnum)(common_1.NotificationSubcategory),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], SendNotificationDto.prototype, "subCategory", void 0);
|
|
53
|
+
//# sourceMappingURL=send-notification.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-notification.dto.js","sourceRoot":"","sources":["../../../src/common/dtos/send-notification.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2D;AAC3D,yCAAkG;AAElG,MAAa,mBAAmB;IAE5B,KAAK,CAAS;IAGd,YAAY,CAAW;IAGvB,QAAQ,CAAS;IAGjB,OAAO,CAAS;IAGhB,QAAQ,CAAwB;IAGhC,QAAQ,CAAwB;IAGhC,WAAW,CAA2B;CACzC;AArBD,kDAqBC;AAnBG;IADC,IAAA,0BAAQ,GAAE;;kDACG;AAGd;IADC,IAAA,wBAAM,EAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;yDACP;AAGvB;IADC,IAAA,wBAAM,GAAE;;qDACQ;AAGjB;IADC,IAAA,0BAAQ,GAAE;;oDACK;AAGhB;IADC,IAAA,wBAAM,EAAC,4BAAmB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;qDACZ;AAGhC;IADC,IAAA,wBAAM,EAAC,6BAAoB,CAAC;;qDACG;AAGhC;IADC,IAAA,wBAAM,EAAC,gCAAuB,CAAC;;wDACM"}
|
|
@@ -4,6 +4,16 @@ export declare enum NotificationChannel {
|
|
|
4
4
|
PUSH = "push",
|
|
5
5
|
APP = "app"
|
|
6
6
|
}
|
|
7
|
+
export declare enum NotificationSubcategory {
|
|
8
|
+
NEW_TASK = "new-task",
|
|
9
|
+
TASK_COMPLETED = "task-complete",
|
|
10
|
+
TASK_OVERDUE = "task-overdue",
|
|
11
|
+
TASK_REMINDER = "task-reminder",
|
|
12
|
+
TASK_NEW_COMMNET = "task-new-comment",
|
|
13
|
+
TASK_APPROVED = "task-approved",
|
|
14
|
+
TASK_REJECTED = "task-rejected",
|
|
15
|
+
TASK_UPDATED = "task-updated"
|
|
16
|
+
}
|
|
7
17
|
export declare enum NotificationCategory {
|
|
8
18
|
TASK = "task",
|
|
9
19
|
CRM = "crm",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NotificationCategory = exports.NotificationChannel = void 0;
|
|
3
|
+
exports.NotificationCategory = exports.NotificationSubcategory = exports.NotificationChannel = void 0;
|
|
4
4
|
var NotificationChannel;
|
|
5
5
|
(function (NotificationChannel) {
|
|
6
6
|
NotificationChannel["EMAIL"] = "email";
|
|
@@ -8,6 +8,17 @@ var NotificationChannel;
|
|
|
8
8
|
NotificationChannel["PUSH"] = "push";
|
|
9
9
|
NotificationChannel["APP"] = "app";
|
|
10
10
|
})(NotificationChannel || (exports.NotificationChannel = NotificationChannel = {}));
|
|
11
|
+
var NotificationSubcategory;
|
|
12
|
+
(function (NotificationSubcategory) {
|
|
13
|
+
NotificationSubcategory["NEW_TASK"] = "new-task";
|
|
14
|
+
NotificationSubcategory["TASK_COMPLETED"] = "task-complete";
|
|
15
|
+
NotificationSubcategory["TASK_OVERDUE"] = "task-overdue";
|
|
16
|
+
NotificationSubcategory["TASK_REMINDER"] = "task-reminder";
|
|
17
|
+
NotificationSubcategory["TASK_NEW_COMMNET"] = "task-new-comment";
|
|
18
|
+
NotificationSubcategory["TASK_APPROVED"] = "task-approved";
|
|
19
|
+
NotificationSubcategory["TASK_REJECTED"] = "task-rejected";
|
|
20
|
+
NotificationSubcategory["TASK_UPDATED"] = "task-updated";
|
|
21
|
+
})(NotificationSubcategory || (exports.NotificationSubcategory = NotificationSubcategory = {}));
|
|
11
22
|
var NotificationCategory;
|
|
12
23
|
(function (NotificationCategory) {
|
|
13
24
|
NotificationCategory["TASK"] = "task";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.enum.js","sourceRoot":"","sources":["../../../src/common/enums/notification.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC3B,sCAAe,CAAA;IACf,kCAAW,CAAA;IACX,oCAAa,CAAA;IACb,kCAAW,CAAA;AACf,CAAC,EALW,mBAAmB,mCAAnB,mBAAmB,QAK9B;AAED,IAAY,oBAUX;AAVD,WAAY,oBAAoB;IAC5B,qCAAa,CAAA;IACb,mCAAW,CAAA;IACX,uCAAe,CAAA;IACf,uCAAe,CAAA;IACf,uCAAe,CAAA;IACf,6CAAqB,CAAA;IACrB,uCAAe,CAAA;IACf,qCAAa,CAAA;IACb,2CAAmB,CAAA;AACvB,CAAC,EAVW,oBAAoB,oCAApB,oBAAoB,QAU/B"}
|
|
1
|
+
{"version":3,"file":"notification.enum.js","sourceRoot":"","sources":["../../../src/common/enums/notification.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC3B,sCAAe,CAAA;IACf,kCAAW,CAAA;IACX,oCAAa,CAAA;IACb,kCAAW,CAAA;AACf,CAAC,EALW,mBAAmB,mCAAnB,mBAAmB,QAK9B;AAED,IAAY,uBASX;AATD,WAAY,uBAAuB;IAC/B,gDAAqB,CAAA;IACrB,2DAAgC,CAAA;IAChC,wDAA6B,CAAA;IAC7B,0DAA+B,CAAA;IAC/B,gEAAqC,CAAA;IACrC,0DAA+B,CAAA;IAC/B,0DAA+B,CAAA;IAC/B,wDAA6B,CAAA;AACjC,CAAC,EATW,uBAAuB,uCAAvB,uBAAuB,QASlC;AAED,IAAY,oBAUX;AAVD,WAAY,oBAAoB;IAC5B,qCAAa,CAAA;IACb,mCAAW,CAAA;IACX,uCAAe,CAAA;IACf,uCAAe,CAAA;IACf,uCAAe,CAAA;IACf,6CAAqB,CAAA;IACrB,uCAAe,CAAA;IACf,qCAAa,CAAA;IACb,2CAAmB,CAAA;AACvB,CAAC,EAVW,oBAAoB,oCAApB,oBAAoB,QAU/B"}
|
package/dist/common/index.d.ts
CHANGED
package/dist/common/index.js
CHANGED
|
@@ -19,4 +19,5 @@ __exportStar(require("./database"), exports);
|
|
|
19
19
|
__exportStar(require("./interceptors"), exports);
|
|
20
20
|
__exportStar(require("./helpers"), exports);
|
|
21
21
|
__exportStar(require("./constants"), exports);
|
|
22
|
+
__exportStar(require("./dtos"), exports);
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
package/dist/common/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,6CAA2B;AAC3B,iDAA+B;AAC/B,4CAA0B;AAC1B,8CAA4B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,6CAA2B;AAC3B,iDAA+B;AAC/B,4CAA0B;AAC1B,8CAA4B;AAC5B,yCAAuB"}
|
package/package.json
CHANGED
package/test.bat
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@echo off
|
|
2
|
+
setlocal enabledelayedexpansion
|
|
3
|
+
|
|
4
|
+
rem Define the root directory
|
|
5
|
+
set "root=C:\Users\ROSME\Documents\GitHub\easywork-common-lib"
|
|
6
|
+
|
|
7
|
+
rem Iterate through all directories and subdirectories
|
|
8
|
+
for /f "delims=" %%d in ('dir "%root%" /ad /b /s') do (
|
|
9
|
+
rem Check if the directory name contains node_modules
|
|
10
|
+
echo %%d | findstr /i /c:"\node_modules" >nul
|
|
11
|
+
echo %%d | findstr /i /c:"\.git" >nul
|
|
12
|
+
if errorlevel 1 (
|
|
13
|
+
rem If not, list the directory contents
|
|
14
|
+
dir "%%d"
|
|
15
|
+
)
|
|
16
|
+
)
|