@bwi-mentorspaces/application-utils-npm 0.0.78 → 0.0.83
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/calendar/cronofy/cronofy.api.d.ts +26 -14
- package/calendar/cronofy/cronofy.api.js +28 -16
- package/calendar/cronofy/cronofy.api.js.map +1 -1
- package/calendar/cronofy/models/_/cronofy.data.d.ts +6 -2
- package/calendar/index.d.ts +3 -0
- package/calendar/index.js +3 -0
- package/calendar/index.js.map +1 -1
- package/chat/index.d.ts +3 -0
- package/chat/index.js +3 -0
- package/chat/index.js.map +1 -1
- package/chat/stream/enum/index.d.ts +2 -1
- package/chat/stream/enum/index.js +1 -0
- package/chat/stream/enum/index.js.map +1 -1
- package/chat/stream/models/_/job.response.d.ts +8 -0
- package/chat/stream/models/_/job.response.js +8 -0
- package/chat/stream/models/_/job.response.js.map +1 -1
- package/chat/stream/stream.api.d.ts +6 -0
- package/chat/stream/stream.api.js +6 -0
- package/chat/stream/stream.api.js.map +1 -1
- package/chat/stream/stream.auth.d.ts +7 -0
- package/chat/stream/stream.auth.js +4 -0
- package/chat/stream/stream.auth.js.map +1 -1
- package/chat/stream/stream.base.d.ts +7 -0
- package/chat/stream/stream.base.js +9 -2
- package/chat/stream/stream.base.js.map +1 -1
- package/chat/stream/stream.channel.d.ts +19 -0
- package/chat/stream/stream.channel.js +50 -0
- package/chat/stream/stream.channel.js.map +1 -1
- package/chat/stream/stream.error.d.ts +1 -0
- package/chat/stream/stream.error.js +1 -0
- package/chat/stream/stream.error.js.map +1 -1
- package/chat/stream/stream.member.d.ts +6 -0
- package/chat/stream/stream.member.js +6 -0
- package/chat/stream/stream.member.js.map +1 -1
- package/chat/stream/stream.message.d.ts +4 -0
- package/chat/stream/stream.message.js +4 -0
- package/chat/stream/stream.message.js.map +1 -1
- package/chat/stream/stream.user.d.ts +7 -0
- package/chat/stream/stream.user.js +7 -0
- package/chat/stream/stream.user.js.map +1 -1
- package/core/_/api-error.d.ts +1 -0
- package/core/_/api-error.js +1 -0
- package/core/_/api-error.js.map +1 -1
- package/core/_/api-response.d.ts +1 -0
- package/core/_/api-response.js +1 -0
- package/core/_/api-response.js.map +1 -1
- package/core/_/cors-headers.d.ts +1 -0
- package/core/_/cors-headers.js +10 -9
- package/core/_/cors-headers.js.map +1 -1
- package/core/_/service-request.d.ts +2 -0
- package/core/_/service-request.js +7 -5
- package/core/_/service-request.js.map +1 -1
- package/deployment/_/serverless.d.ts +2 -0
- package/deployment/_/serverless.js +2 -0
- package/deployment/_/serverless.js.map +1 -1
- package/endpoint-test-factory/_/test-factory.d.ts +4 -0
- package/endpoint-test-factory/_/test-factory.js +9 -5
- package/endpoint-test-factory/_/test-factory.js.map +1 -1
- package/enums/index.d.ts +2 -1
- package/meet/index.d.ts +3 -0
- package/meet/index.js +3 -0
- package/meet/index.js.map +1 -1
- package/meet/twilio/twilio.api.d.ts +3 -0
- package/meet/twilio/twilio.api.js +3 -0
- package/meet/twilio/twilio.api.js.map +1 -1
- package/meet/twilio/twilio.auth.d.ts +5 -0
- package/meet/twilio/twilio.auth.js +4 -5
- package/meet/twilio/twilio.auth.js.map +1 -1
- package/meet/twilio/twilio.base.d.ts +5 -0
- package/meet/twilio/twilio.base.js +5 -0
- package/meet/twilio/twilio.base.js.map +1 -1
- package/meet/twilio/twilio.room.d.ts +4 -0
- package/meet/twilio/twilio.room.js +4 -0
- package/meet/twilio/twilio.room.js.map +1 -1
- package/package.json +1 -1
- package/session/index.d.ts +3 -0
- package/session/index.js +3 -0
- package/session/index.js.map +1 -1
- package/session/ms.live/models/_/room.data.d.ts +16 -2
- package/session/ms.live/ms.live.api.d.ts +12 -0
- package/session/ms.live/ms.live.api.js +16 -4
- package/session/ms.live/ms.live.api.js.map +1 -1
- package/session/ms.live/ms.live.auth.d.ts +21 -0
- package/session/ms.live/ms.live.auth.js +20 -4
- package/session/ms.live/ms.live.auth.js.map +1 -1
- package/session/ms.live/ms.live.base.d.ts +4 -0
- package/session/ms.live/ms.live.base.js +4 -0
- package/session/ms.live/ms.live.base.js.map +1 -1
- package/session/ms.live/ms.live.room.d.ts +16 -4
- package/session/ms.live/ms.live.room.js +15 -3
- package/session/ms.live/ms.live.room.js.map +1 -1
- package/swagger/_/swagger.d.ts +2 -0
- package/swagger/_/swagger.js +3 -5
- package/swagger/_/swagger.js.map +1 -1
- package/utils/_/encoder.d.ts +2 -0
- package/utils/_/encoder.js +2 -0
- package/utils/_/encoder.js.map +1 -1
- package/utils/_/encryptor.d.ts +2 -0
- package/utils/_/encryptor.js +5 -7
- package/utils/_/encryptor.js.map +1 -1
- package/utils/_/hasher.d.ts +3 -0
- package/utils/_/hasher.js +4 -5
- package/utils/_/hasher.js.map +1 -1
- package/utils/_/object-mapper.d.ts +1 -0
- package/utils/_/object-mapper.js +1 -0
- package/utils/_/object-mapper.js.map +1 -1
- package/utils/_/string-formatter.d.ts +4 -0
- package/utils/_/string-formatter.js +4 -0
- package/utils/_/string-formatter.js.map +1 -1
- package/utils/_/utc-date.d.ts +4 -0
- package/utils/_/utc-date.js +12 -8
- package/utils/_/utc-date.js.map +1 -1
- package/validators/_/checker.d.ts +7 -0
- package/validators/_/checker.js +7 -0
- package/validators/_/checker.js.map +1 -1
- package/validators/_/regex.d.ts +15 -0
- package/validators/_/regex.js +15 -0
- package/validators/_/regex.js.map +1 -1
|
@@ -27,6 +27,7 @@ const ms_live_base_1 = require("./ms.live.base");
|
|
|
27
27
|
let MSLiveRoom = class MSLiveRoom extends ms_live_base_1.MSLiveBase {
|
|
28
28
|
/**
|
|
29
29
|
* MSLive room constructor
|
|
30
|
+
*
|
|
30
31
|
* @param { AxiosInstance } server Axios instance
|
|
31
32
|
*/
|
|
32
33
|
constructor(server) {
|
|
@@ -35,6 +36,7 @@ let MSLiveRoom = class MSLiveRoom extends ms_live_base_1.MSLiveBase {
|
|
|
35
36
|
}
|
|
36
37
|
/**
|
|
37
38
|
* Create a new room in MSLive
|
|
39
|
+
*
|
|
38
40
|
* @param {string} name room name
|
|
39
41
|
* @param {string} description room description
|
|
40
42
|
* @param {string} templateId 100ms template id
|
|
@@ -46,7 +48,7 @@ let MSLiveRoom = class MSLiveRoom extends ms_live_base_1.MSLiveBase {
|
|
|
46
48
|
name: name,
|
|
47
49
|
description: description,
|
|
48
50
|
template_id: templateId,
|
|
49
|
-
region: "us"
|
|
51
|
+
region: "us"
|
|
50
52
|
};
|
|
51
53
|
const roomData = yield this.server.post("/rooms", payload);
|
|
52
54
|
return roomData.data;
|
|
@@ -54,6 +56,7 @@ let MSLiveRoom = class MSLiveRoom extends ms_live_base_1.MSLiveBase {
|
|
|
54
56
|
}
|
|
55
57
|
/**
|
|
56
58
|
* Get 100ms room by id
|
|
59
|
+
*
|
|
57
60
|
* @param {string} roomId 100ms room id
|
|
58
61
|
* @returns {Promise<IMSRoomData>} promise of the result to get a room
|
|
59
62
|
*/
|
|
@@ -65,6 +68,7 @@ let MSLiveRoom = class MSLiveRoom extends ms_live_base_1.MSLiveBase {
|
|
|
65
68
|
}
|
|
66
69
|
/**
|
|
67
70
|
* Get all rooms
|
|
71
|
+
*
|
|
68
72
|
* @returns {Promise<IMSRoomCode[]>} promise of the result to get room codes
|
|
69
73
|
*/
|
|
70
74
|
getAllRooms() {
|
|
@@ -75,6 +79,7 @@ let MSLiveRoom = class MSLiveRoom extends ms_live_base_1.MSLiveBase {
|
|
|
75
79
|
}
|
|
76
80
|
/**
|
|
77
81
|
* Create room codes
|
|
82
|
+
*
|
|
78
83
|
* @param {string} roomId 100ms room id
|
|
79
84
|
* @returns {Promise<IMSRoomCode[]>} promise of the result to create room codes
|
|
80
85
|
*/
|
|
@@ -86,6 +91,7 @@ let MSLiveRoom = class MSLiveRoom extends ms_live_base_1.MSLiveBase {
|
|
|
86
91
|
}
|
|
87
92
|
/**
|
|
88
93
|
* Get room codes
|
|
94
|
+
*
|
|
89
95
|
* @param {string} roomId 100ms room id
|
|
90
96
|
* @returns {Promise<IMSRoomCode[]>} promise of the result to get room codes
|
|
91
97
|
*/
|
|
@@ -97,6 +103,7 @@ let MSLiveRoom = class MSLiveRoom extends ms_live_base_1.MSLiveBase {
|
|
|
97
103
|
}
|
|
98
104
|
/**
|
|
99
105
|
* Enables 100ms room by roomId
|
|
106
|
+
*
|
|
100
107
|
* @param {string} roomId 100ms room id
|
|
101
108
|
* @returns {Promise<IMSRoomData>} promise of the result to enable room
|
|
102
109
|
*/
|
|
@@ -108,6 +115,7 @@ let MSLiveRoom = class MSLiveRoom extends ms_live_base_1.MSLiveBase {
|
|
|
108
115
|
}
|
|
109
116
|
/**
|
|
110
117
|
* Disables 100ms room by roomId
|
|
118
|
+
*
|
|
111
119
|
* @param {string} roomId 100ms room id
|
|
112
120
|
* @returns {Promise<IMSRoomData>} promise of the result to disable room
|
|
113
121
|
*/
|
|
@@ -119,6 +127,7 @@ let MSLiveRoom = class MSLiveRoom extends ms_live_base_1.MSLiveBase {
|
|
|
119
127
|
}
|
|
120
128
|
/**
|
|
121
129
|
* Remove all peers from the room by roomId
|
|
130
|
+
*
|
|
122
131
|
* @param {string} roomId 100ms room id
|
|
123
132
|
* @returns {Promise<IEndRoom>} returns string about room ending
|
|
124
133
|
*/
|
|
@@ -130,6 +139,7 @@ let MSLiveRoom = class MSLiveRoom extends ms_live_base_1.MSLiveBase {
|
|
|
130
139
|
}
|
|
131
140
|
/**
|
|
132
141
|
* Get recording by recording Id
|
|
142
|
+
*
|
|
133
143
|
* @param {string} recordingId recording Id
|
|
134
144
|
* @returns {Promise<IEndRoom>} returns data about session recording
|
|
135
145
|
*/
|
|
@@ -141,9 +151,10 @@ let MSLiveRoom = class MSLiveRoom extends ms_live_base_1.MSLiveBase {
|
|
|
141
151
|
}
|
|
142
152
|
/**
|
|
143
153
|
* Start session recording by roomId
|
|
144
|
-
*
|
|
154
|
+
*
|
|
145
155
|
* @param {string} subdomain template's subdomain
|
|
146
|
-
* @
|
|
156
|
+
* @param {string} roomId 100ms room id
|
|
157
|
+
* @returns {Promise<ISessionRecordingData>} returns data about session recording
|
|
147
158
|
*/
|
|
148
159
|
startRecording(subdomain, roomId) {
|
|
149
160
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -156,6 +167,7 @@ let MSLiveRoom = class MSLiveRoom extends ms_live_base_1.MSLiveBase {
|
|
|
156
167
|
}
|
|
157
168
|
/**
|
|
158
169
|
* Stop session recording by roomId
|
|
170
|
+
*
|
|
159
171
|
* @param {string} roomId 100ms room id
|
|
160
172
|
* @returns {Promise<IMSRoomData>} returns data about session recording
|
|
161
173
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ms.live.room.js","sourceRoot":"","sources":["../../../session/ms.live/ms.live.room.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,uCAAsC;AAEtC,iDAA4C;
|
|
1
|
+
{"version":3,"file":"ms.live.room.js","sourceRoot":"","sources":["../../../session/ms.live/ms.live.room.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,uCAAsC;AAEtC,iDAA4C;AAgD5C;;GAEG;AAEH,IAAa,UAAU,GAAvB,MAAa,UAAW,SAAQ,yBAAU;IACtC;;;;OAIG;IACH,YAAY,MAAqB;QAC7B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED;;;;;;;OAOG;IACG,UAAU,CAAC,IAAY,EAAE,WAAmB,EAAE,UAAkB;;YAClE,MAAM,OAAO,GAAG;gBACZ,IAAI,EAAE,IAAI;gBACV,WAAW,EAAE,WAAW;gBACxB,WAAW,EAAE,UAAU;gBACvB,MAAM,EAAE,IAAI;aACf,CAAC;YAEF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YAC3D,OAAO,QAAQ,CAAC,IAAI,CAAC;QACzB,CAAC;KAAA;IAED;;;;;OAKG;IACG,QAAQ,CAAC,MAAc;;YACzB,M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CAAC,MAAc;;YAC9B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,MAAM,WAAW,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;YAC7F,OAAO,QAAQ,CAAC,IAAI,CAAC;QACzB,CAAC;KAAA;IAED;;;;;OAKG;IACG,YAAY,CAAC,WAAmB;;YAClC,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,eAAe,WAAW,EAAE,CAAC,CAAC;YAC1E,OAAO,aAAa,CAAC,IAAI,CAAC;QAC9B,CAAC;KAAA;IAED;;;;;;OAMG;IACG,cAAc,CAAC,SAAiB,EAAE,MAAc;;YAClD,MAAM,kBAAkB,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,MAAM,QAAQ,EAAE;gBAClF,WAAW,EAAE,WAAW,SAAS,2BAA2B,MAAM;SACrE;aACA,CAAC,CAAC;YACH,OAAO,kBAAkB,CAAC,IAAI,CAAC;QACnC,CAAC;KAAA;IAED;;;;;OAKG;IACG,aAAa,CAAC,MAAc;;YAC9B,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,MAAM,OAAO,CAAC,CAAC;YACpF,OAAO,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC;QACvC,CAAC;KAAA;CACJ,CAAA;AA/IY,UAAU;IADtB,IAAA,qBAAU,GAAE;;GACA,UAAU,CA+ItB;AA/IY,gCAAU"}
|
package/swagger/_/swagger.d.ts
CHANGED
|
@@ -18,12 +18,14 @@ export declare class Swagger implements ISwagger {
|
|
|
18
18
|
private _config;
|
|
19
19
|
/**
|
|
20
20
|
* Swagger constructor
|
|
21
|
+
*
|
|
21
22
|
* @param {Express.Application} app express instance
|
|
22
23
|
* @param {ISwaggerConfig} config swagger configuration
|
|
23
24
|
*/
|
|
24
25
|
constructor(app: Express.Application, config: ISwaggerConfig);
|
|
25
26
|
/**
|
|
26
27
|
* getter for swagger config
|
|
28
|
+
*
|
|
27
29
|
* @returns {ISwaggerConfig} swagger config
|
|
28
30
|
*/
|
|
29
31
|
get config(): ISwaggerConfig;
|
package/swagger/_/swagger.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
|
|
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);
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
9
5
|
}) : (function(o, m, k, k2) {
|
|
10
6
|
if (k2 === undefined) k2 = k;
|
|
11
7
|
o[k2] = m[k];
|
|
@@ -35,6 +31,7 @@ const swagger_jsdoc_1 = __importDefault(require("swagger-jsdoc"));
|
|
|
35
31
|
class Swagger {
|
|
36
32
|
/**
|
|
37
33
|
* Swagger constructor
|
|
34
|
+
*
|
|
38
35
|
* @param {Express.Application} app express instance
|
|
39
36
|
* @param {ISwaggerConfig} config swagger configuration
|
|
40
37
|
*/
|
|
@@ -45,6 +42,7 @@ class Swagger {
|
|
|
45
42
|
// getters / setters
|
|
46
43
|
/**
|
|
47
44
|
* getter for swagger config
|
|
45
|
+
*
|
|
48
46
|
* @returns {ISwaggerConfig} swagger config
|
|
49
47
|
*/
|
|
50
48
|
get config() {
|
package/swagger/_/swagger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swagger.js","sourceRoot":"","sources":["../../../swagger/_/swagger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"swagger.js","sourceRoot":"","sources":["../../../swagger/_/swagger.ts"],"names":[],"mappings":";;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O,EAAE,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IACrG,CAAC;CACJ;AApDD,0BAoDC"}
|
package/utils/_/encoder.d.ts
CHANGED
|
@@ -4,12 +4,14 @@
|
|
|
4
4
|
export declare abstract class Encoder {
|
|
5
5
|
/**
|
|
6
6
|
* Method to encode value to Base64
|
|
7
|
+
*
|
|
7
8
|
* @param {string} value value to be encoded
|
|
8
9
|
* @returns {string} base64 encoded value
|
|
9
10
|
*/
|
|
10
11
|
static toBase64(value: string): string;
|
|
11
12
|
/**
|
|
12
13
|
* Method to decode base64 value
|
|
14
|
+
*
|
|
13
15
|
* @param {string} encodedValue encoded base64 value
|
|
14
16
|
* @returns {string} decoded value
|
|
15
17
|
*/
|
package/utils/_/encoder.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.Encoder = void 0;
|
|
|
7
7
|
class Encoder {
|
|
8
8
|
/**
|
|
9
9
|
* Method to encode value to Base64
|
|
10
|
+
*
|
|
10
11
|
* @param {string} value value to be encoded
|
|
11
12
|
* @returns {string} base64 encoded value
|
|
12
13
|
*/
|
|
@@ -15,6 +16,7 @@ class Encoder {
|
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
18
|
* Method to decode base64 value
|
|
19
|
+
*
|
|
18
20
|
* @param {string} encodedValue encoded base64 value
|
|
19
21
|
* @returns {string} decoded value
|
|
20
22
|
*/
|
package/utils/_/encoder.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encoder.js","sourceRoot":"","sources":["../../../utils/_/encoder.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAsB,OAAO;IACzB
|
|
1
|
+
{"version":3,"file":"encoder.js","sourceRoot":"","sources":["../../../utils/_/encoder.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAsB,OAAO;IACzB;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CAAC,KAAa;QACzB,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACjD,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,UAAU,CAAC,YAAoB;QAClC,OAAO,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC1D,CAAC;CACJ;AApBD,0BAoBC"}
|
package/utils/_/encryptor.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { EncryptionType } from "../../enums";
|
|
|
7
7
|
export declare abstract class Encryptor {
|
|
8
8
|
/**
|
|
9
9
|
* Method that encrypts a value
|
|
10
|
+
*
|
|
10
11
|
* @param {EncryptionType} type encryption type
|
|
11
12
|
* @param {string} value a value to encrypt
|
|
12
13
|
* @param {string} key encryption key
|
|
@@ -15,6 +16,7 @@ export declare abstract class Encryptor {
|
|
|
15
16
|
static encrypt(type: EncryptionType, value: string, key: string): string;
|
|
16
17
|
/**
|
|
17
18
|
* Method that decrypts a value
|
|
19
|
+
*
|
|
18
20
|
* @param {EncryptionType} type encryption type
|
|
19
21
|
* @param {string} cipher encrypted value / cipher
|
|
20
22
|
* @param {string} key decryption key
|
package/utils/_/encryptor.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
|
|
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);
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
9
5
|
}) : (function(o, m, k, k2) {
|
|
10
6
|
if (k2 === undefined) k2 = k;
|
|
11
7
|
o[k2] = m[k];
|
|
@@ -33,26 +29,28 @@ const Crypto = __importStar(require("crypto-js"));
|
|
|
33
29
|
class Encryptor {
|
|
34
30
|
/**
|
|
35
31
|
* Method that encrypts a value
|
|
32
|
+
*
|
|
36
33
|
* @param {EncryptionType} type encryption type
|
|
37
34
|
* @param {string} value a value to encrypt
|
|
38
35
|
* @param {string} key encryption key
|
|
39
36
|
* @returns {string} encrypted value
|
|
40
37
|
*/
|
|
41
38
|
static encrypt(type, value, key) {
|
|
42
|
-
if (type === 0 /*
|
|
39
|
+
if (type === 0 /* AES */) {
|
|
43
40
|
return Crypto.AES.encrypt(value, key).toString();
|
|
44
41
|
}
|
|
45
42
|
return Crypto.AES.encrypt(value, key).toString();
|
|
46
43
|
}
|
|
47
44
|
/**
|
|
48
45
|
* Method that decrypts a value
|
|
46
|
+
*
|
|
49
47
|
* @param {EncryptionType} type encryption type
|
|
50
48
|
* @param {string} cipher encrypted value / cipher
|
|
51
49
|
* @param {string} key decryption key
|
|
52
50
|
* @returns {string} decrypted value
|
|
53
51
|
*/
|
|
54
52
|
static decrypt(type, cipher, key) {
|
|
55
|
-
if (type === 0 /*
|
|
53
|
+
if (type === 0 /* AES */) {
|
|
56
54
|
return Crypto.AES.decrypt(cipher, key).toString(Crypto.enc.Utf8);
|
|
57
55
|
}
|
|
58
56
|
return Crypto.AES.decrypt(cipher, key).toString(Crypto.enc.Utf8);
|
package/utils/_/encryptor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encryptor.js","sourceRoot":"","sources":["../../../utils/_/encryptor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"encryptor.js","sourceRoot":"","sources":["../../../utils/_/encryptor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAoC;AAGpC;;;;GAIG;AACH,MAAsB,SAAS;IAC3B;;;;;;;OAOG;IACH,MAAM,CAAC,OAAO,CAAC,IAAoB,EAAE,KAAa,EAAE,GAAW;QAC3D,IAAI,IAAI,gBAAuB,EAAE;YAC7B,OAAO,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC;SACpD;QACD,OAAO,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC;IACrD,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,OAAO,CAAC,IAAoB,EAAE,MAAc,EAAE,GAAW;QAC5D,IAAI,IAAI,gBAAuB,EAAE;YAC7B,OAAO,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;SACpE;QACD,OAAO,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACrE,CAAC;CACJ;AA9BD,8BA8BC"}
|
package/utils/_/hasher.d.ts
CHANGED
|
@@ -4,17 +4,20 @@
|
|
|
4
4
|
export declare abstract class Hasher {
|
|
5
5
|
/**
|
|
6
6
|
* Generate hash with/without base64 encoding
|
|
7
|
+
*
|
|
7
8
|
* @param {boolean?} encoded optional flag for encoded hash
|
|
8
9
|
* @returns {string} randomly generated hash value
|
|
9
10
|
*/
|
|
10
11
|
static generate(encoded?: boolean): string;
|
|
11
12
|
/**
|
|
12
13
|
* Generate guid type
|
|
14
|
+
*
|
|
13
15
|
* @returns {string} Guid as string
|
|
14
16
|
*/
|
|
15
17
|
static guid(): string;
|
|
16
18
|
/**
|
|
17
19
|
* Validate if string is a guid type
|
|
20
|
+
*
|
|
18
21
|
* @param {string} value optional flag for encoded hash
|
|
19
22
|
* @returns {boolean} is Guid
|
|
20
23
|
*/
|
package/utils/_/hasher.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
|
|
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);
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
9
5
|
}) : (function(o, m, k, k2) {
|
|
10
6
|
if (k2 === undefined) k2 = k;
|
|
11
7
|
o[k2] = m[k];
|
|
@@ -33,6 +29,7 @@ const encoder_1 = require("./encoder");
|
|
|
33
29
|
class Hasher {
|
|
34
30
|
/**
|
|
35
31
|
* Generate hash with/without base64 encoding
|
|
32
|
+
*
|
|
36
33
|
* @param {boolean?} encoded optional flag for encoded hash
|
|
37
34
|
* @returns {string} randomly generated hash value
|
|
38
35
|
*/
|
|
@@ -47,6 +44,7 @@ class Hasher {
|
|
|
47
44
|
}
|
|
48
45
|
/**
|
|
49
46
|
* Generate guid type
|
|
47
|
+
*
|
|
50
48
|
* @returns {string} Guid as string
|
|
51
49
|
*/
|
|
52
50
|
static guid() {
|
|
@@ -54,6 +52,7 @@ class Hasher {
|
|
|
54
52
|
}
|
|
55
53
|
/**
|
|
56
54
|
* Validate if string is a guid type
|
|
55
|
+
*
|
|
57
56
|
* @param {string} value optional flag for encoded hash
|
|
58
57
|
* @returns {boolean} is Guid
|
|
59
58
|
*/
|
package/utils/_/hasher.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hasher.js","sourceRoot":"","sources":["../../../utils/_/hasher.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hasher.js","sourceRoot":"","sources":["../../../utils/_/hasher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,qDAAuC;AACvC,uCAAoC;AAEpC;;GAEG;AACH,MAAsB,MAAM;IACxB;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CAAC,OAAiB;QAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACzC,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,EAAE;YAClC,OAAO,iBAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;SACjC;aAAM;YACH,OAAO,IAAI,CAAC;SACf;IACL,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,IAAI;QACP,OAAO,sBAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC;IACpC,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,KAAa;QACvB,OAAO,sBAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;CACJ;AAlCD,wBAkCC"}
|
package/utils/_/object-mapper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-mapper.js","sourceRoot":"","sources":["../../../utils/_/object-mapper.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAsB,YAAY;IAC9B
|
|
1
|
+
{"version":3,"file":"object-mapper.js","sourceRoot":"","sources":["../../../utils/_/object-mapper.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAsB,YAAY;IAC9B;;;;;OAKG;IACH,MAAM,CAAC,cAAc,CAAI,MAAc;QACnC,IAAI,GAAG,GAAG,EAAE,CAAC;QAEb,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,GAAW,EAAE,EAAE;YACxC,GAAG,mCAAQ,GAAG,KAAE,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,GAAE,CAAC;QACzC,CAAC,CAAC,CAAC;QAEH,OAAO,GAAmB,CAAC;IAC/B,CAAC;CACJ;AAhBD,oCAgBC"}
|
|
@@ -4,24 +4,28 @@
|
|
|
4
4
|
export declare abstract class StringFormatter {
|
|
5
5
|
/**
|
|
6
6
|
* Convert first char to lower case
|
|
7
|
+
*
|
|
7
8
|
* @param {string} value value to be converted
|
|
8
9
|
* @returns {string} converted value
|
|
9
10
|
*/
|
|
10
11
|
static firstCharToLower(value: string): string;
|
|
11
12
|
/**
|
|
12
13
|
* Convert first char to upper case
|
|
14
|
+
*
|
|
13
15
|
* @param {string} value value to be converted
|
|
14
16
|
* @returns {string} converted value
|
|
15
17
|
*/
|
|
16
18
|
static firstCharToUpper(value: string): string;
|
|
17
19
|
/**
|
|
18
20
|
* Capitalize all words on sentence
|
|
21
|
+
*
|
|
19
22
|
* @param {string} value value to be converted
|
|
20
23
|
* @returns {string} converted value
|
|
21
24
|
*/
|
|
22
25
|
static capitalizeSentence(value: string): string;
|
|
23
26
|
/**
|
|
24
27
|
* Function that put quotes to params for stored procedure
|
|
28
|
+
*
|
|
25
29
|
* @param {string} text text to add quote
|
|
26
30
|
* @param {boolean} removeComma remove final comma if is a concat of values
|
|
27
31
|
* @returns {string} return formatted string
|
|
@@ -7,6 +7,7 @@ exports.StringFormatter = void 0;
|
|
|
7
7
|
class StringFormatter {
|
|
8
8
|
/**
|
|
9
9
|
* Convert first char to lower case
|
|
10
|
+
*
|
|
10
11
|
* @param {string} value value to be converted
|
|
11
12
|
* @returns {string} converted value
|
|
12
13
|
*/
|
|
@@ -15,6 +16,7 @@ class StringFormatter {
|
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
18
|
* Convert first char to upper case
|
|
19
|
+
*
|
|
18
20
|
* @param {string} value value to be converted
|
|
19
21
|
* @returns {string} converted value
|
|
20
22
|
*/
|
|
@@ -23,6 +25,7 @@ class StringFormatter {
|
|
|
23
25
|
}
|
|
24
26
|
/**
|
|
25
27
|
* Capitalize all words on sentence
|
|
28
|
+
*
|
|
26
29
|
* @param {string} value value to be converted
|
|
27
30
|
* @returns {string} converted value
|
|
28
31
|
*/
|
|
@@ -31,6 +34,7 @@ class StringFormatter {
|
|
|
31
34
|
}
|
|
32
35
|
/**
|
|
33
36
|
* Function that put quotes to params for stored procedure
|
|
37
|
+
*
|
|
34
38
|
* @param {string} text text to add quote
|
|
35
39
|
* @param {boolean} removeComma remove final comma if is a concat of values
|
|
36
40
|
* @returns {string} return formatted string
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string-formatter.js","sourceRoot":"","sources":["../../../utils/_/string-formatter.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAsB,eAAe;IACjC
|
|
1
|
+
{"version":3,"file":"string-formatter.js","sourceRoot":"","sources":["../../../utils/_/string-formatter.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAsB,eAAe;IACjC;;;;;OAKG;IACH,MAAM,CAAC,gBAAgB,CAAC,KAAa;QACjC,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,gBAAgB,CAAC,KAAa;QACjC,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,kBAAkB,CAAC,KAAa;QACnC,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;IAC/F,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,QAAQ,CAAC,IAAY,EAAE,cAAuB,KAAK;QACtD,IAAI,WAAW;YAAE,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;;YACtD,OAAO,IAAI,IAAI,GAAG,CAAC;IAC5B,CAAC;CACJ;AA1CD,0CA0CC"}
|
package/utils/_/utc-date.d.ts
CHANGED
|
@@ -5,23 +5,27 @@ import { Interval } from "../../enums";
|
|
|
5
5
|
export declare abstract class UtcDate {
|
|
6
6
|
/**
|
|
7
7
|
* Get Utc Date Time from date value
|
|
8
|
+
*
|
|
8
9
|
* @param {string | number} dtm Date to be parsed to Utc
|
|
9
10
|
* @returns {Date} Utc Date Time
|
|
10
11
|
*/
|
|
11
12
|
static convert(dtm: string | number): Date;
|
|
12
13
|
/**
|
|
13
14
|
* Get current Utc Date Time
|
|
15
|
+
*
|
|
14
16
|
* @returns {Date} Current Utc Date Time
|
|
15
17
|
*/
|
|
16
18
|
static now(): Date;
|
|
17
19
|
/**
|
|
18
20
|
* Get current Utc Date Time as a Timestamp
|
|
21
|
+
*
|
|
19
22
|
* @param {number?} min optional number of min to add to the current datetime
|
|
20
23
|
* @returns {number} Utc Timestamp
|
|
21
24
|
*/
|
|
22
25
|
static timestamp(min?: number): number;
|
|
23
26
|
/**
|
|
24
27
|
* Add or subtract days to specific date
|
|
28
|
+
*
|
|
25
29
|
* @param {Date} date date to start with
|
|
26
30
|
* @param {Interval} interval one of: year, quarter, month, week, day, hour, minute, second
|
|
27
31
|
* @param {number} units number of units of given interval to add
|
package/utils/_/utc-date.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.UtcDate = void 0;
|
|
|
7
7
|
class UtcDate {
|
|
8
8
|
/**
|
|
9
9
|
* Get Utc Date Time from date value
|
|
10
|
+
*
|
|
10
11
|
* @param {string | number} dtm Date to be parsed to Utc
|
|
11
12
|
* @returns {Date} Utc Date Time
|
|
12
13
|
*/
|
|
@@ -15,6 +16,7 @@ class UtcDate {
|
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
18
|
* Get current Utc Date Time
|
|
19
|
+
*
|
|
18
20
|
* @returns {Date} Current Utc Date Time
|
|
19
21
|
*/
|
|
20
22
|
static now() {
|
|
@@ -22,6 +24,7 @@ class UtcDate {
|
|
|
22
24
|
}
|
|
23
25
|
/**
|
|
24
26
|
* Get current Utc Date Time as a Timestamp
|
|
27
|
+
*
|
|
25
28
|
* @param {number?} min optional number of min to add to the current datetime
|
|
26
29
|
* @returns {number} Utc Timestamp
|
|
27
30
|
*/
|
|
@@ -36,6 +39,7 @@ class UtcDate {
|
|
|
36
39
|
}
|
|
37
40
|
/**
|
|
38
41
|
* Add or subtract days to specific date
|
|
42
|
+
*
|
|
39
43
|
* @param {Date} date date to start with
|
|
40
44
|
* @param {Interval} interval one of: year, quarter, month, week, day, hour, minute, second
|
|
41
45
|
* @param {number} units number of units of given interval to add
|
|
@@ -46,28 +50,28 @@ class UtcDate {
|
|
|
46
50
|
return undefined;
|
|
47
51
|
let newDate;
|
|
48
52
|
switch (interval) {
|
|
49
|
-
case "year" /*
|
|
53
|
+
case "year" /* Year */:
|
|
50
54
|
newDate = new Date(date.setFullYear(date.getFullYear() + units));
|
|
51
55
|
break;
|
|
52
|
-
case "quarter" /*
|
|
56
|
+
case "quarter" /* Quarter */:
|
|
53
57
|
newDate = new Date(date.setMonth(date.getMonth() + 3 * units));
|
|
54
58
|
break;
|
|
55
|
-
case "month" /*
|
|
59
|
+
case "month" /* Month */:
|
|
56
60
|
newDate = new Date(date.setMonth(date.getMonth() + units));
|
|
57
61
|
break;
|
|
58
|
-
case "week" /*
|
|
62
|
+
case "week" /* Week */:
|
|
59
63
|
newDate = new Date(date.setDate(date.getDate() + 7 * units));
|
|
60
64
|
break;
|
|
61
|
-
case "day" /*
|
|
65
|
+
case "day" /* Day */:
|
|
62
66
|
newDate = new Date(date.setDate(date.getDate() + units));
|
|
63
67
|
break;
|
|
64
|
-
case "hour" /*
|
|
68
|
+
case "hour" /* Hour */:
|
|
65
69
|
newDate = new Date(date.setTime(date.getTime() + units * 3600000));
|
|
66
70
|
break;
|
|
67
|
-
case "minute" /*
|
|
71
|
+
case "minute" /* Minute */:
|
|
68
72
|
newDate = new Date(date.setTime(date.getTime() + units * 60000));
|
|
69
73
|
break;
|
|
70
|
-
case "second" /*
|
|
74
|
+
case "second" /* Second */:
|
|
71
75
|
newDate = new Date(date.setTime(date.getTime() + units * 1000));
|
|
72
76
|
break;
|
|
73
77
|
default:
|
package/utils/_/utc-date.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utc-date.js","sourceRoot":"","sources":["../../../utils/_/utc-date.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAsB,OAAO;IACzB
|
|
1
|
+
{"version":3,"file":"utc-date.js","sourceRoot":"","sources":["../../../utils/_/utc-date.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAsB,OAAO;IACzB;;;;;OAKG;IACH,MAAM,CAAC,OAAO,CAAC,GAAoB;QAC/B,OAAO,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IACjD,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,GAAG;QACN,OAAO,IAAI,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;IAC9C,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,SAAS,CAAC,GAAY;QACzB,MAAM,GAAG,GAAS,IAAI,IAAI,EAAE,CAAC;QAC7B,IAAI,GAAG,IAAI,GAAG,GAAG,CAAC,EAAE;YAChB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,GAAG,GAAG,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;SAC1E;aAAM;YACH,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;SACxC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,OAAO,CAAC,IAAU,EAAE,QAAkB,EAAE,KAAa;QACxD,IAAI,CAAC,IAAI;Y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AAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;gBACjD,MAAM;SACb;QACD,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ;AA7ED,0BA6EC"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
export declare abstract class Checker {
|
|
5
5
|
/**
|
|
6
6
|
* Method to match value against the Regular Expression
|
|
7
|
+
*
|
|
7
8
|
* @param {RegExp} regex regular expression to match the value format
|
|
8
9
|
* @param {string} value value to match
|
|
9
10
|
* @returns {boolean} is matched
|
|
@@ -11,12 +12,14 @@ export declare abstract class Checker {
|
|
|
11
12
|
static isMatch(regex: RegExp, value: string): boolean;
|
|
12
13
|
/**
|
|
13
14
|
* Method to check if value is null or empty
|
|
15
|
+
*
|
|
14
16
|
* @param {string | undefined | null} value a value to validate
|
|
15
17
|
* @returns {boolean} is null or empty
|
|
16
18
|
*/
|
|
17
19
|
static isNullOrEmpty(value: string | undefined | null): boolean;
|
|
18
20
|
/**
|
|
19
21
|
* Method to check if the number is modular (returns 0)
|
|
22
|
+
*
|
|
20
23
|
* @param {number} mod mod factor
|
|
21
24
|
* @param {number} value number to run mod function on
|
|
22
25
|
* @returns {boolean} is modular number
|
|
@@ -24,6 +27,7 @@ export declare abstract class Checker {
|
|
|
24
27
|
static isModularBy(mod: number, value: number): boolean;
|
|
25
28
|
/**
|
|
26
29
|
* Method to check min length of a value
|
|
30
|
+
*
|
|
27
31
|
* @param {number} length min length
|
|
28
32
|
* @param {string} value value to check
|
|
29
33
|
* @returns {boolean} if value's length is greater or equal to the length param
|
|
@@ -31,6 +35,7 @@ export declare abstract class Checker {
|
|
|
31
35
|
static hasMinLength(length: number, value: string): boolean;
|
|
32
36
|
/**
|
|
33
37
|
* Method to check max length of a value
|
|
38
|
+
*
|
|
34
39
|
* @param {number} length max length
|
|
35
40
|
* @param {string} value value to check
|
|
36
41
|
* @returns {boolean} if value's length is less or equal to the length param
|
|
@@ -38,6 +43,7 @@ export declare abstract class Checker {
|
|
|
38
43
|
static hasMaxLength(length: number, value: string): boolean;
|
|
39
44
|
/**
|
|
40
45
|
* Method to check exact length of a value
|
|
46
|
+
*
|
|
41
47
|
* @param {number} length exact length
|
|
42
48
|
* @param {string} value value to check
|
|
43
49
|
* @returns {boolean} if value's length is exact length as the length param
|
|
@@ -45,6 +51,7 @@ export declare abstract class Checker {
|
|
|
45
51
|
static hasExactLength(length: number, value: string): boolean;
|
|
46
52
|
/**
|
|
47
53
|
* Check a specific name or string
|
|
54
|
+
*
|
|
48
55
|
* @param {number} min minimum length
|
|
49
56
|
* @param {number} max maximum length
|
|
50
57
|
* @param {string} value string value to check
|
package/validators/_/checker.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.Checker = void 0;
|
|
|
7
7
|
class Checker {
|
|
8
8
|
/**
|
|
9
9
|
* Method to match value against the Regular Expression
|
|
10
|
+
*
|
|
10
11
|
* @param {RegExp} regex regular expression to match the value format
|
|
11
12
|
* @param {string} value value to match
|
|
12
13
|
* @returns {boolean} is matched
|
|
@@ -16,6 +17,7 @@ class Checker {
|
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
18
19
|
* Method to check if value is null or empty
|
|
20
|
+
*
|
|
19
21
|
* @param {string | undefined | null} value a value to validate
|
|
20
22
|
* @returns {boolean} is null or empty
|
|
21
23
|
*/
|
|
@@ -30,6 +32,7 @@ class Checker {
|
|
|
30
32
|
}
|
|
31
33
|
/**
|
|
32
34
|
* Method to check if the number is modular (returns 0)
|
|
35
|
+
*
|
|
33
36
|
* @param {number} mod mod factor
|
|
34
37
|
* @param {number} value number to run mod function on
|
|
35
38
|
* @returns {boolean} is modular number
|
|
@@ -39,6 +42,7 @@ class Checker {
|
|
|
39
42
|
}
|
|
40
43
|
/**
|
|
41
44
|
* Method to check min length of a value
|
|
45
|
+
*
|
|
42
46
|
* @param {number} length min length
|
|
43
47
|
* @param {string} value value to check
|
|
44
48
|
* @returns {boolean} if value's length is greater or equal to the length param
|
|
@@ -48,6 +52,7 @@ class Checker {
|
|
|
48
52
|
}
|
|
49
53
|
/**
|
|
50
54
|
* Method to check max length of a value
|
|
55
|
+
*
|
|
51
56
|
* @param {number} length max length
|
|
52
57
|
* @param {string} value value to check
|
|
53
58
|
* @returns {boolean} if value's length is less or equal to the length param
|
|
@@ -57,6 +62,7 @@ class Checker {
|
|
|
57
62
|
}
|
|
58
63
|
/**
|
|
59
64
|
* Method to check exact length of a value
|
|
65
|
+
*
|
|
60
66
|
* @param {number} length exact length
|
|
61
67
|
* @param {string} value value to check
|
|
62
68
|
* @returns {boolean} if value's length is exact length as the length param
|
|
@@ -66,6 +72,7 @@ class Checker {
|
|
|
66
72
|
}
|
|
67
73
|
/**
|
|
68
74
|
* Check a specific name or string
|
|
75
|
+
*
|
|
69
76
|
* @param {number} min minimum length
|
|
70
77
|
* @param {number} max maximum length
|
|
71
78
|
* @param {string} value string value to check
|