chatbot-nc 2.0.38 → 2.0.39

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.
@@ -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
- hashIds: Hashids;
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
- private getHashIds;
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,226 @@ 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
- getHashIds() {
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
+ let result = Object.keys(request).reduce((acc, key) => __awaiter(this, void 0, void 0, function* () {
115
+ const hashedValue = request[key];
116
+ if (properties.includes(key) && (typeof hashedValue === "string")) {
117
+ acc[key] = yield this.hashids.decode(hashedValue);
118
+ }
119
+ else
120
+ acc[key] = yield this.unHash(hashedValue, properties);
121
+ return acc;
122
+ }), {});
123
+ yield Promise.all(result);
124
+ //const result: Record<string, any> = {};
125
+ // Object.keys(request).forEach(async (key) => {
126
+ // let requestKey = request[key]
127
+ // // let timeZone = httpContext.get("TimeZone");
128
+ // if (properties.includes(key) && (typeof requestKey === "string")) {
129
+ // const hashedValue = requestKey;
130
+ // result[key] = await this.hashids.decode(hashedValue);
131
+ // }
132
+ // // else if (CoreUtils.isInputDateTime(requestKey)) {
133
+ // // result[key] = CoreUtils.getUTCDate(requestKey, timeZone);
134
+ // // } else if (CoreUtils.isInputDate(requestKey)) {
135
+ // // let dateProperty = `${requestKey} 00:00:00`
136
+ // // result[key] = CoreUtils.getUTCDate(dateProperty, timeZone);
137
+ // // }
138
+ // else {
139
+ // // const value = requestKey;
140
+ // result[key] = await this.unHash(requestKey, properties);
141
+ // }
142
+ // }, {});
143
+ return result;
144
+ }
145
+ catch (error) {
146
+ console.error(error);
147
+ throw error;
148
+ }
149
+ });
150
+ }
151
+ deepUnHashedArray(collection, properties) {
152
+ return __awaiter(this, void 0, void 0, function* () {
153
+ try {
154
+ return Promise.all(collection.map((value) => __awaiter(this, void 0, void 0, function* () {
155
+ return yield this.unHash(value, properties);
156
+ })));
157
+ }
158
+ catch (error) {
159
+ console.error(error);
160
+ throw error;
161
+ }
162
+ });
163
+ }
164
+ deepHashedObject(response, properties, dateproperties) {
165
+ return __awaiter(this, void 0, void 0, function* () {
166
+ try {
167
+ // const result: Record<string, any> = {};
168
+ // Object.keys(response).forEach(async (key) => {
169
+ // if (properties.includes(key)) {
170
+ // const unHashedValue = response[key];
171
+ // if (unHashedValue !== null && unHashedValue !== "" && unHashedValue != 0 && (typeof (unHashedValue) === 'number')) {
172
+ // result[key] = await this.hashids.encode("" + unHashedValue);
173
+ // } else {
174
+ // result[key] = unHashedValue;
175
+ // }
176
+ // } else {
177
+ // const value = response[key];
178
+ // // if (value instanceof Date && value != null) {
179
+ // // let timezone = 0;
180
+ // // if (httpContext.get("TimeZone")) {
181
+ // // timezone = parseInt(httpContext.get("TimeZone"))
182
+ // // }
183
+ // // let toMerchantTimeZone = TimeZoneConvertor.timeZoneConvert(timezone, moment(value).utc(true));
184
+ // // if (!toMerchantTimeZone) {
185
+ // // toMerchantTimeZone = moment(value).utc(true).format('MM-DD-YYYY HH:mm:ss')
186
+ // // }
187
+ // // if (dateproperties != undefined && Array.isArray(dateproperties) && dateproperties.includes(key)) {
188
+ // // toMerchantTimeZone = toMerchantTimeZone.substring(0, 10);
189
+ // // }
190
+ // // result[key] = toMerchantTimeZone;
191
+ // // } else
192
+ // result[key] = await this.hash(response[key], properties);
193
+ // // }
194
+ // }
195
+ // }, {});
196
+ // return result;
197
+ // // return camelcaseKeys(result);
198
+ let result = Object.keys(response).reduce((acc, key) => __awaiter(this, void 0, void 0, function* () {
199
+ const unHashedValue = response[key];
200
+ if (properties.includes(key)) {
201
+ if (unHashedValue !== null && unHashedValue !== "" && unHashedValue != 0 && (typeof (unHashedValue) === 'number')) {
202
+ acc[key] = yield this.hashids.encode("" + unHashedValue);
203
+ }
204
+ else {
205
+ acc[key] = unHashedValue;
206
+ }
207
+ }
208
+ else
209
+ acc[key] = yield this.unHash(unHashedValue, properties);
210
+ return acc;
211
+ }), {});
212
+ yield Promise.all(result);
213
+ // return camelcaseKeys(result);
214
+ return result;
215
+ }
216
+ catch (error) {
217
+ console.error(error);
218
+ throw error;
219
+ }
220
+ });
221
+ }
222
+ deepHashedArray(collection, properties, dateproperties) {
34
223
  return __awaiter(this, void 0, void 0, function* () {
35
224
  try {
36
- if (!this.config)
37
- this.config = yield AWSSSM_1.SSM.getSSMParameter(SSMParameters_1.ssmParameter.idObfuscationSSM);
38
- this.hashIds = yield new hashids_1.default(this.config.Salt, +this.config.MinHashLength);
39
- return;
225
+ return Promise.all(collection.map((value) => __awaiter(this, void 0, void 0, function* () {
226
+ return yield this.hash(value, properties, dateproperties);
227
+ })));
40
228
  }
41
229
  catch (error) {
230
+ console.error(error);
42
231
  throw error;
43
232
  }
44
233
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../hashing/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAAyC;AACzC,mDAA4C;AAC5C,2DAAuD;AACvD,sDAA8B;AAE9B,MAAc,WAAW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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;AAjOD,kCAiOC"}
@@ -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
- hashIds: Hashids;
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
- private getHashIds;
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,223 @@ 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
- getHashIds() {
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
- if (!this.config)
31
- this.config = yield SSM.getSSMParameter(ssmParameter.idObfuscationSSM);
32
- this.hashIds = yield new Hashids(this.config.Salt, +this.config.MinHashLength);
33
- return;
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
+ let result = Object.keys(request).reduce((acc, key) => __awaiter(this, void 0, void 0, function* () {
112
+ const hashedValue = request[key];
113
+ if (properties.includes(key) && (typeof hashedValue === "string")) {
114
+ acc[key] = yield this.hashids.decode(hashedValue);
115
+ }
116
+ else
117
+ acc[key] = yield this.unHash(hashedValue, properties);
118
+ return acc;
119
+ }), {});
120
+ yield Promise.all(result);
121
+ //const result: Record<string, any> = {};
122
+ // Object.keys(request).forEach(async (key) => {
123
+ // let requestKey = request[key]
124
+ // // let timeZone = httpContext.get("TimeZone");
125
+ // if (properties.includes(key) && (typeof requestKey === "string")) {
126
+ // const hashedValue = requestKey;
127
+ // result[key] = await this.hashids.decode(hashedValue);
128
+ // }
129
+ // // else if (CoreUtils.isInputDateTime(requestKey)) {
130
+ // // result[key] = CoreUtils.getUTCDate(requestKey, timeZone);
131
+ // // } else if (CoreUtils.isInputDate(requestKey)) {
132
+ // // let dateProperty = `${requestKey} 00:00:00`
133
+ // // result[key] = CoreUtils.getUTCDate(dateProperty, timeZone);
134
+ // // }
135
+ // else {
136
+ // // const value = requestKey;
137
+ // result[key] = await this.unHash(requestKey, properties);
138
+ // }
139
+ // }, {});
140
+ return result;
141
+ }
142
+ catch (error) {
143
+ console.error(error);
144
+ throw error;
145
+ }
146
+ });
147
+ }
148
+ deepUnHashedArray(collection, properties) {
149
+ return __awaiter(this, void 0, void 0, function* () {
150
+ try {
151
+ return Promise.all(collection.map((value) => __awaiter(this, void 0, void 0, function* () {
152
+ return yield this.unHash(value, properties);
153
+ })));
154
+ }
155
+ catch (error) {
156
+ console.error(error);
157
+ throw error;
158
+ }
159
+ });
160
+ }
161
+ deepHashedObject(response, properties, dateproperties) {
162
+ return __awaiter(this, void 0, void 0, function* () {
163
+ try {
164
+ // const result: Record<string, any> = {};
165
+ // Object.keys(response).forEach(async (key) => {
166
+ // if (properties.includes(key)) {
167
+ // const unHashedValue = response[key];
168
+ // if (unHashedValue !== null && unHashedValue !== "" && unHashedValue != 0 && (typeof (unHashedValue) === 'number')) {
169
+ // result[key] = await this.hashids.encode("" + unHashedValue);
170
+ // } else {
171
+ // result[key] = unHashedValue;
172
+ // }
173
+ // } else {
174
+ // const value = response[key];
175
+ // // if (value instanceof Date && value != null) {
176
+ // // let timezone = 0;
177
+ // // if (httpContext.get("TimeZone")) {
178
+ // // timezone = parseInt(httpContext.get("TimeZone"))
179
+ // // }
180
+ // // let toMerchantTimeZone = TimeZoneConvertor.timeZoneConvert(timezone, moment(value).utc(true));
181
+ // // if (!toMerchantTimeZone) {
182
+ // // toMerchantTimeZone = moment(value).utc(true).format('MM-DD-YYYY HH:mm:ss')
183
+ // // }
184
+ // // if (dateproperties != undefined && Array.isArray(dateproperties) && dateproperties.includes(key)) {
185
+ // // toMerchantTimeZone = toMerchantTimeZone.substring(0, 10);
186
+ // // }
187
+ // // result[key] = toMerchantTimeZone;
188
+ // // } else
189
+ // result[key] = await this.hash(response[key], properties);
190
+ // // }
191
+ // }
192
+ // }, {});
193
+ // return result;
194
+ // // return camelcaseKeys(result);
195
+ let result = Object.keys(response).reduce((acc, key) => __awaiter(this, void 0, void 0, function* () {
196
+ const unHashedValue = response[key];
197
+ if (properties.includes(key)) {
198
+ if (unHashedValue !== null && unHashedValue !== "" && unHashedValue != 0 && (typeof (unHashedValue) === 'number')) {
199
+ acc[key] = yield this.hashids.encode("" + unHashedValue);
200
+ }
201
+ else {
202
+ acc[key] = unHashedValue;
203
+ }
204
+ }
205
+ else
206
+ acc[key] = yield this.unHash(unHashedValue, properties);
207
+ return acc;
208
+ }), {});
209
+ yield Promise.all(result);
210
+ // return camelcaseKeys(result);
211
+ return result;
212
+ }
213
+ catch (error) {
214
+ console.error(error);
215
+ throw error;
216
+ }
217
+ });
218
+ }
219
+ deepHashedArray(collection, properties, dateproperties) {
220
+ return __awaiter(this, void 0, void 0, function* () {
221
+ try {
222
+ return Promise.all(collection.map((value) => __awaiter(this, void 0, void 0, function* () {
223
+ return yield this.hash(value, properties, dateproperties);
224
+ })));
225
+ }
226
+ catch (error) {
227
+ console.error(error);
36
228
  throw error;
37
229
  }
38
230
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../hashing/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,GAAG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,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chatbot-nc",
3
- "version": "2.0.38",
3
+ "version": "2.0.39",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",