chatbot-nc 2.0.38 → 2.0.40
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/cjs/hashing/idObfuscation.d.ts +4 -4
- package/dist/cjs/hashing/idObfuscation.js +4 -4
- package/dist/cjs/hashing/index.d.ts +29 -4
- package/dist/cjs/hashing/index.js +179 -15
- package/dist/cjs/hashing/index.js.map +1 -1
- package/dist/esm/hashing/idObfuscation.d.ts +4 -4
- package/dist/esm/hashing/idObfuscation.js +4 -4
- package/dist/esm/hashing/index.d.ts +29 -4
- package/dist/esm/hashing/index.js +179 -12
- package/dist/esm/hashing/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,14 +5,14 @@ declare class idObfuscationService {
|
|
|
5
5
|
private getHashIds;
|
|
6
6
|
/**
|
|
7
7
|
* This used to encode the id
|
|
8
|
-
* @param id
|
|
9
|
-
* @returns
|
|
8
|
+
* @param id pass id in string format only
|
|
9
|
+
* @returns this will return id is encoded format
|
|
10
10
|
*/
|
|
11
11
|
encode(id: string): Promise<string>;
|
|
12
12
|
/**
|
|
13
13
|
* This is used to decode the id
|
|
14
|
-
* @param id
|
|
15
|
-
* @returns
|
|
14
|
+
* @param id pass encoded id is string format only
|
|
15
|
+
* @returns this will return the id in number
|
|
16
16
|
*/
|
|
17
17
|
decode(id: string): Promise<import("hashids/cjs/util").NumberLike>;
|
|
18
18
|
}
|
|
@@ -43,8 +43,8 @@ class idObfuscationService {
|
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
45
|
* This used to encode the id
|
|
46
|
-
* @param id
|
|
47
|
-
* @returns
|
|
46
|
+
* @param id pass id in string format only
|
|
47
|
+
* @returns this will return id is encoded format
|
|
48
48
|
*/
|
|
49
49
|
encode(id) {
|
|
50
50
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -58,8 +58,8 @@ class idObfuscationService {
|
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
60
|
* This is used to decode the id
|
|
61
|
-
* @param id
|
|
62
|
-
* @returns
|
|
61
|
+
* @param id pass encoded id is string format only
|
|
62
|
+
* @returns this will return the id in number
|
|
63
63
|
*/
|
|
64
64
|
decode(id) {
|
|
65
65
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1,8 +1,33 @@
|
|
|
1
|
-
import Hashids from 'hashids';
|
|
2
1
|
export declare class HashService {
|
|
3
|
-
|
|
4
|
-
private config;
|
|
2
|
+
private hashids;
|
|
5
3
|
constructor();
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @param value
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
6
9
|
getHashedDataString(value: string): Promise<string>;
|
|
7
|
-
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @param hashConfig
|
|
13
|
+
* @param response
|
|
14
|
+
* @param properties
|
|
15
|
+
* @param dateproperties
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
hashResponse(hashConfig: any, response: any, properties: any, dateproperties?: any): Promise<any>;
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @param hashConfig
|
|
22
|
+
* @param request
|
|
23
|
+
* @param properties
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
unHashRequest(hashConfig: any, request: any, properties: any): Promise<any>;
|
|
27
|
+
private unHash;
|
|
28
|
+
private hash;
|
|
29
|
+
private deepUnHashedObject;
|
|
30
|
+
private deepUnHashedArray;
|
|
31
|
+
private deepHashedObject;
|
|
32
|
+
private deepHashedArray;
|
|
8
33
|
}
|
|
@@ -8,37 +8,201 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
12
|
exports.HashService = void 0;
|
|
16
13
|
const node_crypto_1 = require("node:crypto");
|
|
17
|
-
const AWSSSM_1 = require("../aws/services/AWSSSM");
|
|
18
|
-
const SSMParameters_1 = require("../config/SSMParameters");
|
|
19
|
-
const hashids_1 = __importDefault(require("hashids"));
|
|
20
14
|
class HashService {
|
|
21
15
|
constructor() {
|
|
22
|
-
this.hashIds = new hashids_1.default();
|
|
23
|
-
(() => __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
yield this.getHashIds();
|
|
25
|
-
}))();
|
|
26
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @param value
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
27
22
|
getHashedDataString(value) {
|
|
28
23
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
24
|
return (0, node_crypto_1.createHash)('sha256').update(value, 'utf8').digest('base64');
|
|
30
25
|
;
|
|
31
26
|
});
|
|
32
27
|
}
|
|
33
|
-
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @param hashConfig
|
|
31
|
+
* @param response
|
|
32
|
+
* @param properties
|
|
33
|
+
* @param dateproperties
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
36
|
+
hashResponse(hashConfig, response, properties, dateproperties) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
try {
|
|
39
|
+
this.hashids = hashConfig;
|
|
40
|
+
if (properties === undefined || response === undefined) {
|
|
41
|
+
// log.error('No properties to unhash');
|
|
42
|
+
console.error('No properties to unhash');
|
|
43
|
+
}
|
|
44
|
+
response = yield this.hash(response, properties, dateproperties);
|
|
45
|
+
return response;
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
console.error(error);
|
|
49
|
+
throw error;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @param hashConfig
|
|
56
|
+
* @param request
|
|
57
|
+
* @param properties
|
|
58
|
+
* @returns
|
|
59
|
+
*/
|
|
60
|
+
unHashRequest(hashConfig, request, properties) {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
try {
|
|
63
|
+
this.hashids = hashConfig;
|
|
64
|
+
if (properties === undefined || request === undefined) {
|
|
65
|
+
// log.error('No properties to unhash');
|
|
66
|
+
console.error('No properties to unhash');
|
|
67
|
+
}
|
|
68
|
+
request = yield this.unHash(request, properties);
|
|
69
|
+
return request;
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
console.error(error);
|
|
73
|
+
throw error;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
unHash(request, properties) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
try {
|
|
80
|
+
if (typeof request !== 'object' || request === null) {
|
|
81
|
+
return request;
|
|
82
|
+
}
|
|
83
|
+
if (Array.isArray(request)) {
|
|
84
|
+
return yield this.deepUnHashedArray(request, properties);
|
|
85
|
+
}
|
|
86
|
+
return yield this.deepUnHashedObject(request, properties);
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
console.error(error);
|
|
90
|
+
throw error;
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
hash(response, properties, dateproperties) {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
try {
|
|
97
|
+
if (typeof response !== 'object' || response === null) {
|
|
98
|
+
return response;
|
|
99
|
+
}
|
|
100
|
+
if (Array.isArray(response)) {
|
|
101
|
+
return yield this.deepHashedArray(response, properties, dateproperties);
|
|
102
|
+
}
|
|
103
|
+
return yield this.deepHashedObject(response, properties, dateproperties);
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
console.error(error);
|
|
107
|
+
throw error;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
deepUnHashedObject(request, properties) {
|
|
112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
+
try {
|
|
114
|
+
const result = {};
|
|
115
|
+
Object.keys(request).forEach((key) => __awaiter(this, void 0, void 0, function* () {
|
|
116
|
+
let requestKey = request[key];
|
|
117
|
+
// let timeZone = httpContext.get("TimeZone");
|
|
118
|
+
if (properties.includes(key) && (typeof requestKey === "string")) {
|
|
119
|
+
const hashedValue = requestKey;
|
|
120
|
+
result[key] = yield this.hashids.decode(hashedValue);
|
|
121
|
+
}
|
|
122
|
+
// else if (CoreUtils.isInputDateTime(requestKey)) {
|
|
123
|
+
// result[key] = CoreUtils.getUTCDate(requestKey, timeZone);
|
|
124
|
+
// } else if (CoreUtils.isInputDate(requestKey)) {
|
|
125
|
+
// let dateProperty = `${requestKey} 00:00:00`
|
|
126
|
+
// result[key] = CoreUtils.getUTCDate(dateProperty, timeZone);
|
|
127
|
+
// }
|
|
128
|
+
else {
|
|
129
|
+
// const value = requestKey;
|
|
130
|
+
result[key] = yield this.unHash(requestKey, properties);
|
|
131
|
+
}
|
|
132
|
+
}), {});
|
|
133
|
+
return result;
|
|
134
|
+
}
|
|
135
|
+
catch (error) {
|
|
136
|
+
console.error(error);
|
|
137
|
+
throw error;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
deepUnHashedArray(collection, properties) {
|
|
142
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
143
|
+
try {
|
|
144
|
+
return Promise.all(collection.map((value) => __awaiter(this, void 0, void 0, function* () {
|
|
145
|
+
return yield this.unHash(value, properties);
|
|
146
|
+
})));
|
|
147
|
+
}
|
|
148
|
+
catch (error) {
|
|
149
|
+
console.error(error);
|
|
150
|
+
throw error;
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
deepHashedObject(response, properties, dateproperties) {
|
|
155
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
156
|
+
try {
|
|
157
|
+
const result = {};
|
|
158
|
+
Object.keys(response).forEach((key) => __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
if (properties.includes(key)) {
|
|
160
|
+
const unHashedValue = response[key];
|
|
161
|
+
if (unHashedValue !== null && unHashedValue !== "" && unHashedValue != 0 && (typeof (unHashedValue) === 'number')) {
|
|
162
|
+
result[key] = yield this.hashids.encode("" + unHashedValue);
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
result[key] = unHashedValue;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
const value = response[key];
|
|
170
|
+
// if (value instanceof Date && value != null) {
|
|
171
|
+
// let timezone = 0;
|
|
172
|
+
// if (httpContext.get("TimeZone")) {
|
|
173
|
+
// timezone = parseInt(httpContext.get("TimeZone"))
|
|
174
|
+
// }
|
|
175
|
+
// let toMerchantTimeZone = TimeZoneConvertor.timeZoneConvert(timezone, moment(value).utc(true));
|
|
176
|
+
// if (!toMerchantTimeZone) {
|
|
177
|
+
// toMerchantTimeZone = moment(value).utc(true).format('MM-DD-YYYY HH:mm:ss')
|
|
178
|
+
// }
|
|
179
|
+
// if (dateproperties != undefined && Array.isArray(dateproperties) && dateproperties.includes(key)) {
|
|
180
|
+
// toMerchantTimeZone = toMerchantTimeZone.substring(0, 10);
|
|
181
|
+
// }
|
|
182
|
+
// result[key] = toMerchantTimeZone;
|
|
183
|
+
// } else
|
|
184
|
+
result[key] = yield this.hash(response[key], properties);
|
|
185
|
+
// }
|
|
186
|
+
}
|
|
187
|
+
}), {});
|
|
188
|
+
return result;
|
|
189
|
+
// return camelcaseKeys(result);
|
|
190
|
+
}
|
|
191
|
+
catch (error) {
|
|
192
|
+
console.error(error);
|
|
193
|
+
throw error;
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
deepHashedArray(collection, properties, dateproperties) {
|
|
34
198
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
199
|
try {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return;
|
|
200
|
+
return Promise.all(collection.map((value) => __awaiter(this, void 0, void 0, function* () {
|
|
201
|
+
return yield this.hash(value, properties, dateproperties);
|
|
202
|
+
})));
|
|
40
203
|
}
|
|
41
204
|
catch (error) {
|
|
205
|
+
console.error(error);
|
|
42
206
|
throw error;
|
|
43
207
|
}
|
|
44
208
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../hashing/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../hashing/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAyC;AAEzC,MAAa,WAAW;IAGpB;IACA,CAAC;IAED;;;;OAIG;IACG,mBAAmB,CAAC,KAAa;;YACnC,OAAO,IAAA,wBAAU,EAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAAA,CAAC;QACxE,CAAC;KAAA;IAED;;;;;;;OAOG;IACG,YAAY,CAAC,UAAe,EAAE,QAAa,EAAE,UAAe,EAAE,cAAoB;;YACpF,IAAI;gBACA,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC;gBAC1B,IAAI,UAAU,KAAK,SAAS,IAAI,QAAQ,KAAK,SAAS,EAAE;oBACpD,wCAAwC;oBACxC,OAAO,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;iBAC5C;gBACD,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;gBACjE,OAAO,QAAQ,CAAC;aACnB;YAAC,OAAO,KAAK,EAAE;gBACZ,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBACrB,MAAM,KAAK,CAAC;aACf;QACL,CAAC;KAAA;IAED;;;;;;OAMG;I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AM,CAAC,GAAG,CAAC,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,CAAC;wBACzD,IAAI;qBACP;gBACL,CAAC,CAAA,EAAE,EAAE,CAAC,CAAC;gBACP,OAAO,MAAM,CAAC;gBACd,gCAAgC;aAKnC;YAAC,OAAO,KAAK,EAAE;gBACZ,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBACrB,MAAM,KAAK,CAAC;aACf;QAEL,CAAC;KAAA;IAEa,eAAe,CAAC,UAAe,EAAE,UAAe,EAAE,cAAmB;;YAC/E,IAAI;gBACA,OAAO,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAO,KAAU,EAAE,EAAE;oBACnD,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;gBAC9D,CAAC,CAAA,CAAC,CAAC,CAAC;aACP;YAAC,OAAO,KAAK,EAAE;gBACZ,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBACrB,MAAM,KAAK,CAAC;aACf;QACL,CAAC;KAAA;CACJ;AAlMD,kCAkMC"}
|
|
@@ -5,14 +5,14 @@ declare class idObfuscationService {
|
|
|
5
5
|
private getHashIds;
|
|
6
6
|
/**
|
|
7
7
|
* This used to encode the id
|
|
8
|
-
* @param id
|
|
9
|
-
* @returns
|
|
8
|
+
* @param id pass id in string format only
|
|
9
|
+
* @returns this will return id is encoded format
|
|
10
10
|
*/
|
|
11
11
|
encode(id: string): Promise<string>;
|
|
12
12
|
/**
|
|
13
13
|
* This is used to decode the id
|
|
14
|
-
* @param id
|
|
15
|
-
* @returns
|
|
14
|
+
* @param id pass encoded id is string format only
|
|
15
|
+
* @returns this will return the id in number
|
|
16
16
|
*/
|
|
17
17
|
decode(id: string): Promise<import("hashids/cjs/util").NumberLike>;
|
|
18
18
|
}
|
|
@@ -38,8 +38,8 @@ class idObfuscationService {
|
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* This used to encode the id
|
|
41
|
-
* @param id
|
|
42
|
-
* @returns
|
|
41
|
+
* @param id pass id in string format only
|
|
42
|
+
* @returns this will return id is encoded format
|
|
43
43
|
*/
|
|
44
44
|
encode(id) {
|
|
45
45
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -53,8 +53,8 @@ class idObfuscationService {
|
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
55
|
* This is used to decode the id
|
|
56
|
-
* @param id
|
|
57
|
-
* @returns
|
|
56
|
+
* @param id pass encoded id is string format only
|
|
57
|
+
* @returns this will return the id in number
|
|
58
58
|
*/
|
|
59
59
|
decode(id) {
|
|
60
60
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1,8 +1,33 @@
|
|
|
1
|
-
import Hashids from 'hashids';
|
|
2
1
|
export declare class HashService {
|
|
3
|
-
|
|
4
|
-
private config;
|
|
2
|
+
private hashids;
|
|
5
3
|
constructor();
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @param value
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
6
9
|
getHashedDataString(value: string): Promise<string>;
|
|
7
|
-
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @param hashConfig
|
|
13
|
+
* @param response
|
|
14
|
+
* @param properties
|
|
15
|
+
* @param dateproperties
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
hashResponse(hashConfig: any, response: any, properties: any, dateproperties?: any): Promise<any>;
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @param hashConfig
|
|
22
|
+
* @param request
|
|
23
|
+
* @param properties
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
unHashRequest(hashConfig: any, request: any, properties: any): Promise<any>;
|
|
27
|
+
private unHash;
|
|
28
|
+
private hash;
|
|
29
|
+
private deepUnHashedObject;
|
|
30
|
+
private deepUnHashedArray;
|
|
31
|
+
private deepHashedObject;
|
|
32
|
+
private deepHashedArray;
|
|
8
33
|
}
|
|
@@ -8,31 +8,198 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { createHash } from 'node:crypto';
|
|
11
|
-
import { SSM } from "../aws/services/AWSSSM";
|
|
12
|
-
import { ssmParameter } from '../config/SSMParameters';
|
|
13
|
-
import Hashids from 'hashids';
|
|
14
11
|
export class HashService {
|
|
15
12
|
constructor() {
|
|
16
|
-
this.hashIds = new Hashids();
|
|
17
|
-
(() => __awaiter(this, void 0, void 0, function* () {
|
|
18
|
-
yield this.getHashIds();
|
|
19
|
-
}))();
|
|
20
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @param value
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
21
19
|
getHashedDataString(value) {
|
|
22
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23
21
|
return createHash('sha256').update(value, 'utf8').digest('base64');
|
|
24
22
|
;
|
|
25
23
|
});
|
|
26
24
|
}
|
|
27
|
-
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @param hashConfig
|
|
28
|
+
* @param response
|
|
29
|
+
* @param properties
|
|
30
|
+
* @param dateproperties
|
|
31
|
+
* @returns
|
|
32
|
+
*/
|
|
33
|
+
hashResponse(hashConfig, response, properties, dateproperties) {
|
|
28
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
35
|
try {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
this.hashids = hashConfig;
|
|
37
|
+
if (properties === undefined || response === undefined) {
|
|
38
|
+
// log.error('No properties to unhash');
|
|
39
|
+
console.error('No properties to unhash');
|
|
40
|
+
}
|
|
41
|
+
response = yield this.hash(response, properties, dateproperties);
|
|
42
|
+
return response;
|
|
34
43
|
}
|
|
35
44
|
catch (error) {
|
|
45
|
+
console.error(error);
|
|
46
|
+
throw error;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @param hashConfig
|
|
53
|
+
* @param request
|
|
54
|
+
* @param properties
|
|
55
|
+
* @returns
|
|
56
|
+
*/
|
|
57
|
+
unHashRequest(hashConfig, request, properties) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
try {
|
|
60
|
+
this.hashids = hashConfig;
|
|
61
|
+
if (properties === undefined || request === undefined) {
|
|
62
|
+
// log.error('No properties to unhash');
|
|
63
|
+
console.error('No properties to unhash');
|
|
64
|
+
}
|
|
65
|
+
request = yield this.unHash(request, properties);
|
|
66
|
+
return request;
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
console.error(error);
|
|
70
|
+
throw error;
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
unHash(request, properties) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
try {
|
|
77
|
+
if (typeof request !== 'object' || request === null) {
|
|
78
|
+
return request;
|
|
79
|
+
}
|
|
80
|
+
if (Array.isArray(request)) {
|
|
81
|
+
return yield this.deepUnHashedArray(request, properties);
|
|
82
|
+
}
|
|
83
|
+
return yield this.deepUnHashedObject(request, properties);
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
console.error(error);
|
|
87
|
+
throw error;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
hash(response, properties, dateproperties) {
|
|
92
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
+
try {
|
|
94
|
+
if (typeof response !== 'object' || response === null) {
|
|
95
|
+
return response;
|
|
96
|
+
}
|
|
97
|
+
if (Array.isArray(response)) {
|
|
98
|
+
return yield this.deepHashedArray(response, properties, dateproperties);
|
|
99
|
+
}
|
|
100
|
+
return yield this.deepHashedObject(response, properties, dateproperties);
|
|
101
|
+
}
|
|
102
|
+
catch (error) {
|
|
103
|
+
console.error(error);
|
|
104
|
+
throw error;
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
deepUnHashedObject(request, properties) {
|
|
109
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
try {
|
|
111
|
+
const result = {};
|
|
112
|
+
Object.keys(request).forEach((key) => __awaiter(this, void 0, void 0, function* () {
|
|
113
|
+
let requestKey = request[key];
|
|
114
|
+
// let timeZone = httpContext.get("TimeZone");
|
|
115
|
+
if (properties.includes(key) && (typeof requestKey === "string")) {
|
|
116
|
+
const hashedValue = requestKey;
|
|
117
|
+
result[key] = yield this.hashids.decode(hashedValue);
|
|
118
|
+
}
|
|
119
|
+
// else if (CoreUtils.isInputDateTime(requestKey)) {
|
|
120
|
+
// result[key] = CoreUtils.getUTCDate(requestKey, timeZone);
|
|
121
|
+
// } else if (CoreUtils.isInputDate(requestKey)) {
|
|
122
|
+
// let dateProperty = `${requestKey} 00:00:00`
|
|
123
|
+
// result[key] = CoreUtils.getUTCDate(dateProperty, timeZone);
|
|
124
|
+
// }
|
|
125
|
+
else {
|
|
126
|
+
// const value = requestKey;
|
|
127
|
+
result[key] = yield this.unHash(requestKey, properties);
|
|
128
|
+
}
|
|
129
|
+
}), {});
|
|
130
|
+
return result;
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
console.error(error);
|
|
134
|
+
throw error;
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
deepUnHashedArray(collection, properties) {
|
|
139
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
140
|
+
try {
|
|
141
|
+
return Promise.all(collection.map((value) => __awaiter(this, void 0, void 0, function* () {
|
|
142
|
+
return yield this.unHash(value, properties);
|
|
143
|
+
})));
|
|
144
|
+
}
|
|
145
|
+
catch (error) {
|
|
146
|
+
console.error(error);
|
|
147
|
+
throw error;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
deepHashedObject(response, properties, dateproperties) {
|
|
152
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
try {
|
|
154
|
+
const result = {};
|
|
155
|
+
Object.keys(response).forEach((key) => __awaiter(this, void 0, void 0, function* () {
|
|
156
|
+
if (properties.includes(key)) {
|
|
157
|
+
const unHashedValue = response[key];
|
|
158
|
+
if (unHashedValue !== null && unHashedValue !== "" && unHashedValue != 0 && (typeof (unHashedValue) === 'number')) {
|
|
159
|
+
result[key] = yield this.hashids.encode("" + unHashedValue);
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
result[key] = unHashedValue;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
const value = response[key];
|
|
167
|
+
// if (value instanceof Date && value != null) {
|
|
168
|
+
// let timezone = 0;
|
|
169
|
+
// if (httpContext.get("TimeZone")) {
|
|
170
|
+
// timezone = parseInt(httpContext.get("TimeZone"))
|
|
171
|
+
// }
|
|
172
|
+
// let toMerchantTimeZone = TimeZoneConvertor.timeZoneConvert(timezone, moment(value).utc(true));
|
|
173
|
+
// if (!toMerchantTimeZone) {
|
|
174
|
+
// toMerchantTimeZone = moment(value).utc(true).format('MM-DD-YYYY HH:mm:ss')
|
|
175
|
+
// }
|
|
176
|
+
// if (dateproperties != undefined && Array.isArray(dateproperties) && dateproperties.includes(key)) {
|
|
177
|
+
// toMerchantTimeZone = toMerchantTimeZone.substring(0, 10);
|
|
178
|
+
// }
|
|
179
|
+
// result[key] = toMerchantTimeZone;
|
|
180
|
+
// } else
|
|
181
|
+
result[key] = yield this.hash(response[key], properties);
|
|
182
|
+
// }
|
|
183
|
+
}
|
|
184
|
+
}), {});
|
|
185
|
+
return result;
|
|
186
|
+
// return camelcaseKeys(result);
|
|
187
|
+
}
|
|
188
|
+
catch (error) {
|
|
189
|
+
console.error(error);
|
|
190
|
+
throw error;
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
deepHashedArray(collection, properties, dateproperties) {
|
|
195
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
196
|
+
try {
|
|
197
|
+
return Promise.all(collection.map((value) => __awaiter(this, void 0, void 0, function* () {
|
|
198
|
+
return yield this.hash(value, properties, dateproperties);
|
|
199
|
+
})));
|
|
200
|
+
}
|
|
201
|
+
catch (error) {
|
|
202
|
+
console.error(error);
|
|
36
203
|
throw error;
|
|
37
204
|
}
|
|
38
205
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../hashing/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../hashing/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,OAAO,WAAW;IAGpB;IACA,CAAC;IAED;;;;OAIG;IACG,mBAAmB,CAAC,KAAa;;YACnC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAAA,CAAC;QACxE,CAAC;KAAA;IAED;;;;;;;OAOG;IACG,YAAY,CAAC,UAAe,EAAE,QAAa,EAAE,UAAe,EAAE,cAAoB;;YACpF,IAAI;gBACA,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC;gBAC1B,IAAI,UAAU,KAAK,SAAS,IAAI,QAAQ,KAAK,SAAS,EAAE;oBACpD,wCAAwC;oBACxC,OAAO,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;iBAC5C;gBACD,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;gBACjE,OAAO,QAAQ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