easywork-common-lib 1.0.109 → 1.0.111

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.
@@ -0,0 +1 @@
1
+ export * from "./regex.constant";
@@ -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("./regex.constant"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC"}
@@ -0,0 +1,6 @@
1
+ export declare const JWT_EXPIRY_REGEX: RegExp;
2
+ export declare const SENTRY_DSN_REGEX: RegExp;
3
+ export declare const RABBIT_MQ_URI_REGEX: RegExp;
4
+ export declare const REDIS_URI_REGEX: RegExp;
5
+ export declare const USERNAME_REGEX: RegExp;
6
+ export declare const PASSWORD_REGEX: RegExp;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PASSWORD_REGEX = exports.USERNAME_REGEX = exports.REDIS_URI_REGEX = exports.RABBIT_MQ_URI_REGEX = exports.SENTRY_DSN_REGEX = exports.JWT_EXPIRY_REGEX = void 0;
4
+ exports.JWT_EXPIRY_REGEX = /\b(\d+)\s*(ms|s|m|h|d)\b/;
5
+ exports.SENTRY_DSN_REGEX = /https:\/\/[\da-f]{32}@o\d+\.ingest\.sentry\.io\/\d+/;
6
+ exports.RABBIT_MQ_URI_REGEX = /^(amqps?):\/\/(?:[^:@]+:[^:@]+@)?[^/:?]+(?::\d+)?(?:\/[^/?]+)?(?:\?.*)?$/;
7
+ exports.REDIS_URI_REGEX = /^redis:\/\/(?:([^:@]+):([^:@]+)@)?([^/:]+)(?::(\d+))?(?:\/(\d+))?$/;
8
+ exports.USERNAME_REGEX = /^(?![\d._-])[\w-.]+$/;
9
+ exports.PASSWORD_REGEX = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*\W).*$/;
10
+ //# sourceMappingURL=regex.constant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"regex.constant.js","sourceRoot":"","sources":["../../../src/common/constants/regex.constant.ts"],"names":[],"mappings":";;;AACa,QAAA,gBAAgB,GAAG,0BAA0B,CAAC;AAC9C,QAAA,gBAAgB,GACzB,qDAAqD,CAAC;AAC7C,QAAA,mBAAmB,GAC5B,0EAA0E,CAAC;AAClE,QAAA,eAAe,GACxB,oEAAoE,CAAC;AAC5D,QAAA,cAAc,GAAG,sBAAsB,CAAC;AACxC,QAAA,cAAc,GAAG,4CAA4C,CAAC"}
@@ -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,8 @@
1
+ import { NotificationCategory, NotificationChannel } from "../../common";
2
+ export declare class SendNotificationDto {
3
+ title: string;
4
+ recipientsId: string[];
5
+ content: string;
6
+ channel?: NotificationChannel;
7
+ category?: NotificationCategory;
8
+ }
@@ -0,0 +1,43 @@
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
+ content;
19
+ channel;
20
+ category;
21
+ }
22
+ exports.SendNotificationDto = SendNotificationDto;
23
+ __decorate([
24
+ (0, class_validator_1.IsString)(),
25
+ __metadata("design:type", String)
26
+ ], SendNotificationDto.prototype, "title", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsUUID)("all", { each: true }),
29
+ __metadata("design:type", Array)
30
+ ], SendNotificationDto.prototype, "recipientsId", void 0);
31
+ __decorate([
32
+ (0, class_validator_1.IsString)(),
33
+ __metadata("design:type", String)
34
+ ], SendNotificationDto.prototype, "content", void 0);
35
+ __decorate([
36
+ (0, class_validator_1.IsEnum)(common_1.NotificationChannel),
37
+ __metadata("design:type", String)
38
+ ], SendNotificationDto.prototype, "channel", void 0);
39
+ __decorate([
40
+ (0, class_validator_1.IsEnum)(common_1.NotificationCategory),
41
+ __metadata("design:type", String)
42
+ ], SendNotificationDto.prototype, "category", void 0);
43
+ //# 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,yCAAyE;AAEzE,MAAa,mBAAmB;IAE5B,KAAK,CAAS;IAGd,YAAY,CAAW;IAGvB,OAAO,CAAS;IAGhB,OAAO,CAAuB;IAG9B,QAAQ,CAAwB;CACnC;AAfD,kDAeC;AAbG;IADC,IAAA,0BAAQ,GAAE;;kDACG;AAGd;IADC,IAAA,wBAAM,EAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;yDACP;AAGvB;IADC,IAAA,0BAAQ,GAAE;;oDACK;AAGhB;IADC,IAAA,wBAAM,EAAC,4BAAmB,CAAC;;oDACE;AAG9B;IADC,IAAA,wBAAM,EAAC,6BAAoB,CAAC;;qDACG"}
@@ -2,3 +2,5 @@ export * from "./enums";
2
2
  export * from "./database";
3
3
  export * from "./interceptors";
4
4
  export * from "./helpers";
5
+ export * from "./constants";
6
+ export * from "./dtos";
@@ -18,4 +18,6 @@ __exportStar(require("./enums"), exports);
18
18
  __exportStar(require("./database"), exports);
19
19
  __exportStar(require("./interceptors"), exports);
20
20
  __exportStar(require("./helpers"), exports);
21
+ __exportStar(require("./constants"), exports);
22
+ __exportStar(require("./dtos"), exports);
21
23
  //# sourceMappingURL=index.js.map
@@ -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"}
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easywork-common-lib",
3
- "version": "1.0.109",
3
+ "version": "1.0.111",
4
4
  "description": "Librería común de Easywork",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
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
+ )