chatbot-nc 2.0.7 → 2.0.9
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/hashids.d.ts +3 -0
- package/dist/cjs/hashing/hashids.js +29 -0
- package/dist/cjs/hashing/hashids.js.map +1 -0
- package/dist/cjs/hashing/index.d.ts +3 -2
- package/dist/cjs/hashing/index.js +5 -18
- package/dist/cjs/hashing/index.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +4 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/hashing/hashids.d.ts +3 -0
- package/dist/esm/hashing/hashids.js +24 -0
- package/dist/esm/hashing/hashids.js.map +1 -0
- package/dist/esm/hashing/index.d.ts +3 -2
- package/dist/esm/hashing/index.js +3 -17
- package/dist/esm/hashing/index.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const AWSSSM_1 = require("../aws/services/AWSSSM");
|
|
16
|
+
const SSMParameters_1 = require("../config/SSMParameters");
|
|
17
|
+
const hashids_1 = __importDefault(require("hashids"));
|
|
18
|
+
const HashIdsService = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
19
|
+
try {
|
|
20
|
+
let config = yield AWSSSM_1.SSM.getSSMParameter(SSMParameters_1.ssmParameter.idObfuscationSSM);
|
|
21
|
+
console.log("config", config);
|
|
22
|
+
return new hashids_1.default(config.Salt, config.MinHashLength);
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
throw error;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
exports.default = await HashIdsService();
|
|
29
|
+
//# sourceMappingURL=hashids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hashids.js","sourceRoot":"","sources":["../../../hashing/hashids.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,mDAA4C;AAC5C,2DAAuD;AACvD,sDAA8B;AAE9B,MAAM,cAAc,GAAG,GAAS,EAAE;IAC9B,IAAI;QACA,IAAI,MAAM,GAAG,MAAM,YAAG,CAAC,eAAe,CAAC,4BAAY,CAAC,gBAAgB,CAAC,CAAC;QACtE,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAC,MAAM,CAAC,CAAC;QAC7B,OAAO,IAAI,iBAAO,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;KACzD;IAAC,OAAO,KAAK,EAAE;QACZ,MAAM,KAAK,CAAC;KACf;AACL,CAAC,CAAA,CAAA;AAED,kBAAe,MAAM,cAAc,EAAE,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import HashIdsService from "./hashids";
|
|
2
|
+
declare class HashService {
|
|
3
3
|
constructor();
|
|
4
4
|
getHashedDataString(value: string): Promise<string>;
|
|
5
5
|
}
|
|
6
|
+
export { HashService, HashIdsService };
|
|
@@ -12,25 +12,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.HashIdsService = exports.HashService = void 0;
|
|
15
16
|
const node_crypto_1 = require("node:crypto");
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class SSMParam {
|
|
17
|
+
const hashids_1 = __importDefault(require("./hashids"));
|
|
18
|
+
exports.HashIdsService = hashids_1.default;
|
|
19
|
+
class HashService {
|
|
20
20
|
constructor() {
|
|
21
|
-
(() => __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
let config = yield AWSSSM_1.SSM.getSSMParameter(SSMParameters_1.ssmParameter.idObfuscationSSM);
|
|
23
|
-
this.Salt = config.Salt;
|
|
24
|
-
this.MinHashLength = config.MinHashLength;
|
|
25
|
-
}))();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
class HashService extends hashids_1.default {
|
|
29
|
-
constructor() {
|
|
30
|
-
let ssmParam = new SSMParam();
|
|
31
|
-
console.log(ssmParam.Salt);
|
|
32
|
-
console.log("Called Super");
|
|
33
|
-
super(ssmParam.Salt, ssmParam.MinHashLength);
|
|
34
21
|
}
|
|
35
22
|
getHashedDataString(value) {
|
|
36
23
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -39,5 +26,5 @@ class HashService extends hashids_1.default {
|
|
|
39
26
|
});
|
|
40
27
|
}
|
|
41
28
|
}
|
|
42
|
-
exports.
|
|
29
|
+
exports.HashService = HashService;
|
|
43
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -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;AACzC,wDAAuC;AAgBnC,yBAhBG,iBAAc,CAgBH;AAdlB,MAAM,WAAW;IAEb;IACA,CAAC;IAEK,mBAAmB,CAAC,KAAa;;YAEnC,OAAO,IAAA,wBAAU,EAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAAA,CAAC;QACxE,CAAC;KAAA;CAEJ;AAGG,kCAAW"}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as ENUM from "./enum";
|
|
|
4
4
|
import WebHookEvent from "./webbookEvent";
|
|
5
5
|
import BaseDynamoDBRepository from "./repository/dynamodb";
|
|
6
6
|
import BaseCommunicationService from "./communication";
|
|
7
|
-
import HashService from "./hashing";
|
|
7
|
+
import { HashService, HashIdsService } from "./hashing";
|
|
8
8
|
import UrlService from "./shortner";
|
|
9
9
|
import { Utils } from "./utils";
|
|
10
|
-
export { AWS, axios, ENUM, Utils, BaseCommunicationService, WebHookEvent, BaseDynamoDBRepository, HashService, UrlService };
|
|
10
|
+
export { AWS, axios, ENUM, Utils, BaseCommunicationService, WebHookEvent, BaseDynamoDBRepository, HashService, HashIdsService, UrlService };
|
package/dist/cjs/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.UrlService = exports.HashService = exports.BaseDynamoDBRepository = exports.WebHookEvent = exports.BaseCommunicationService = exports.Utils = exports.ENUM = exports.axios = exports.AWS = void 0;
|
|
29
|
+
exports.UrlService = exports.HashIdsService = exports.HashService = exports.BaseDynamoDBRepository = exports.WebHookEvent = exports.BaseCommunicationService = exports.Utils = exports.ENUM = exports.axios = exports.AWS = void 0;
|
|
30
30
|
const aws_1 = require("./aws");
|
|
31
31
|
Object.defineProperty(exports, "AWS", { enumerable: true, get: function () { return aws_1.AWS; } });
|
|
32
32
|
const axios_1 = __importDefault(require("axios"));
|
|
@@ -39,8 +39,9 @@ const dynamodb_1 = __importDefault(require("./repository/dynamodb"));
|
|
|
39
39
|
exports.BaseDynamoDBRepository = dynamodb_1.default;
|
|
40
40
|
const communication_1 = __importDefault(require("./communication"));
|
|
41
41
|
exports.BaseCommunicationService = communication_1.default;
|
|
42
|
-
const hashing_1 =
|
|
43
|
-
exports
|
|
42
|
+
const hashing_1 = require("./hashing");
|
|
43
|
+
Object.defineProperty(exports, "HashService", { enumerable: true, get: function () { return hashing_1.HashService; } });
|
|
44
|
+
Object.defineProperty(exports, "HashIdsService", { enumerable: true, get: function () { return hashing_1.HashIdsService; } });
|
|
44
45
|
const shortner_1 = __importDefault(require("./shortner"));
|
|
45
46
|
exports.UrlService = shortner_1.default;
|
|
46
47
|
const utils_1 = require("./utils");
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA4B;AAWzB,oFAXM,SAAG,OAWN;AAVN,kDAAyB;AAWtB,gBAXI,eAAK,CAWJ;AAVR,6CAA+B;AAW5B,oBAAI;AAVP,kEAA0C;AAavC,uBAbI,sBAAY,CAaJ;AAZf,qEAA2D;AAaxD,iCAbI,kBAAsB,CAaJ;AAZzB,oEAAuD;AAUpD,mCAVI,uBAAwB,CAUJ;AAT3B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA4B;AAWzB,oFAXM,SAAG,OAWN;AAVN,kDAAyB;AAWtB,gBAXI,eAAK,CAWJ;AAVR,6CAA+B;AAW5B,oBAAI;AAVP,kEAA0C;AAavC,uBAbI,sBAAY,CAaJ;AAZf,qEAA2D;AAaxD,iCAbI,kBAAsB,CAaJ;AAZzB,oEAAuD;AAUpD,mCAVI,uBAAwB,CAUJ;AAT3B,uCAAwD;AAYrD,4FAZM,qBAAW,OAYN;AACX,+FAbmB,wBAAc,OAanB;AAZjB,0DAAoC;AAajC,qBAbI,kBAAU,CAaJ;AAZb,mCAAgC;AAM7B,sFANM,aAAK,OAMN"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { SSM } from "../aws/services/AWSSSM";
|
|
11
|
+
import { ssmParameter } from '../config/SSMParameters';
|
|
12
|
+
import Hashids from 'hashids';
|
|
13
|
+
const HashIdsService = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
14
|
+
try {
|
|
15
|
+
let config = yield SSM.getSSMParameter(ssmParameter.idObfuscationSSM);
|
|
16
|
+
console.log("config", config);
|
|
17
|
+
return new Hashids(config.Salt, config.MinHashLength);
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
throw error;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export default await HashIdsService();
|
|
24
|
+
//# sourceMappingURL=hashids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hashids.js","sourceRoot":"","sources":["../../../hashing/hashids.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,MAAM,cAAc,GAAG,GAAS,EAAE;IAC9B,IAAI;QACA,IAAI,MAAM,GAAG,MAAM,GAAG,CAAC,eAAe,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;QACtE,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAC,MAAM,CAAC,CAAC;QAC7B,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;KACzD;IAAC,OAAO,KAAK,EAAE;QACZ,MAAM,KAAK,CAAC;KACf;AACL,CAAC,CAAA,CAAA;AAED,eAAe,MAAM,cAAc,EAAE,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import HashIdsService from "./hashids";
|
|
2
|
+
declare class HashService {
|
|
3
3
|
constructor();
|
|
4
4
|
getHashedDataString(value: string): Promise<string>;
|
|
5
5
|
}
|
|
6
|
+
export { HashService, HashIdsService };
|
|
@@ -8,24 +8,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { createHash } from 'node:crypto';
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
import Hashids from 'hashids';
|
|
14
|
-
class SSMParam {
|
|
11
|
+
import HashIdsService from "./hashids";
|
|
12
|
+
class HashService {
|
|
15
13
|
constructor() {
|
|
16
|
-
(() => __awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
let config = yield SSM.getSSMParameter(ssmParameter.idObfuscationSSM);
|
|
18
|
-
this.Salt = config.Salt;
|
|
19
|
-
this.MinHashLength = config.MinHashLength;
|
|
20
|
-
}))();
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export default class HashService extends Hashids {
|
|
24
|
-
constructor() {
|
|
25
|
-
let ssmParam = new SSMParam();
|
|
26
|
-
console.log(ssmParam.Salt);
|
|
27
|
-
console.log("Called Super");
|
|
28
|
-
super(ssmParam.Salt, ssmParam.MinHashLength);
|
|
29
14
|
}
|
|
30
15
|
getHashedDataString(value) {
|
|
31
16
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -34,4 +19,5 @@ export default class HashService extends Hashids {
|
|
|
34
19
|
});
|
|
35
20
|
}
|
|
36
21
|
}
|
|
22
|
+
export { HashService, HashIdsService };
|
|
37
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../hashing/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,cAAc,MAAM,WAAW,CAAC;AAEvC,MAAM,WAAW;IAEb;IACA,CAAC;IAEK,mBAAmB,CAAC,KAAa;;YAEnC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAAA,CAAC;QACxE,CAAC;KAAA;CAEJ;AAED,OAAO,EACH,WAAW,EACX,cAAc,EACjB,CAAA"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as ENUM from "./enum";
|
|
|
4
4
|
import WebHookEvent from "./webbookEvent";
|
|
5
5
|
import BaseDynamoDBRepository from "./repository/dynamodb";
|
|
6
6
|
import BaseCommunicationService from "./communication";
|
|
7
|
-
import HashService from "./hashing";
|
|
7
|
+
import { HashService, HashIdsService } from "./hashing";
|
|
8
8
|
import UrlService from "./shortner";
|
|
9
9
|
import { Utils } from "./utils";
|
|
10
|
-
export { AWS, axios, ENUM, Utils, BaseCommunicationService, WebHookEvent, BaseDynamoDBRepository, HashService, UrlService };
|
|
10
|
+
export { AWS, axios, ENUM, Utils, BaseCommunicationService, WebHookEvent, BaseDynamoDBRepository, HashService, HashIdsService, UrlService };
|
package/dist/esm/index.js
CHANGED
|
@@ -4,8 +4,8 @@ import * as ENUM from "./enum";
|
|
|
4
4
|
import WebHookEvent from "./webbookEvent";
|
|
5
5
|
import BaseDynamoDBRepository from "./repository/dynamodb";
|
|
6
6
|
import BaseCommunicationService from "./communication";
|
|
7
|
-
import HashService from "./hashing";
|
|
7
|
+
import { HashService, HashIdsService } from "./hashing";
|
|
8
8
|
import UrlService from "./shortner";
|
|
9
9
|
import { Utils } from "./utils";
|
|
10
|
-
export { AWS, axios, ENUM, Utils, BaseCommunicationService, WebHookEvent, BaseDynamoDBRepository, HashService, UrlService };
|
|
10
|
+
export { AWS, axios, ENUM, Utils, BaseCommunicationService, WebHookEvent, BaseDynamoDBRepository, HashService, HashIdsService, UrlService };
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,sBAAsB,MAAM,uBAAuB,CAAC;AAC3D,OAAO,wBAAwB,MAAM,iBAAiB,CAAC;AACvD,OAAO,WAAW,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,sBAAsB,MAAM,uBAAuB,CAAC;AAC3D,OAAO,wBAAwB,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EACJ,GAAG,EACH,KAAK,EACL,IAAI,EACJ,KAAK,EACL,wBAAwB,EACxB,YAAY,EACZ,sBAAsB,EACtB,WAAW,EACX,cAAc,EACd,UAAU,EACZ,CAAA"}
|