@sipgate/integration-bridge 0.12.6 → 0.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IntegrationErrorType = void 0;
|
|
4
|
+
var IntegrationErrorType;
|
|
5
|
+
(function (IntegrationErrorType) {
|
|
6
|
+
IntegrationErrorType["INTEGRATION_REFRESH_ERROR"] = "integration/refresh-error";
|
|
7
|
+
})(IntegrationErrorType = exports.IntegrationErrorType || (exports.IntegrationErrorType = {}));
|
|
8
|
+
//# sourceMappingURL=integration-error.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-error.model.js","sourceRoot":"","sources":["../../src/models/integration-error.model.ts"],"names":[],"mappings":";;;AAAA,IAAY,oBAEX;AAFD,WAAY,oBAAoB;IAC9B,+EAAuD,CAAA;AACzD,CAAC,EAFW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAE/B"}
|
|
@@ -8,7 +8,8 @@ const normalizePhoneNumber = (phoneNumber) => phoneNumber.replace(/[^\d\w\+]/g,
|
|
|
8
8
|
exports.normalizePhoneNumber = normalizePhoneNumber;
|
|
9
9
|
const parsePhoneNumber = ({ label, phoneNumber }, locale) => {
|
|
10
10
|
var _a, _b, _c;
|
|
11
|
-
const
|
|
11
|
+
const isNumberDirectDial = (0, exports.isDirectDial)((0, exports.normalizePhoneNumber)(phoneNumber));
|
|
12
|
+
const type = isNumberDirectDial
|
|
12
13
|
? models_1.PhoneNumberType.DIRECT_DIAL
|
|
13
14
|
: models_1.PhoneNumberType.STANDARD;
|
|
14
15
|
try {
|
|
@@ -19,7 +20,7 @@ const parsePhoneNumber = ({ label, phoneNumber }, locale) => {
|
|
|
19
20
|
return {
|
|
20
21
|
label,
|
|
21
22
|
type,
|
|
22
|
-
e164,
|
|
23
|
+
e164: isNumberDirectDial ? phoneNumber : e164,
|
|
23
24
|
localized: region === phoneNumberRegion
|
|
24
25
|
? (_b = parsedPhoneNumber.getNumber("national")) !== null && _b !== void 0 ? _b : phoneNumber
|
|
25
26
|
: (_c = parsedPhoneNumber.getNumber("international")) !== null && _c !== void 0 ? _c : phoneNumber,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phone-number-utils.js","sourceRoot":"","sources":["../../src/util/phone-number-utils.ts"],"names":[],"mappings":";;;AAAA,6DAAgE;AAChE,sCAAyD;AAGzD,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAE3B,MAAM,oBAAoB,GAAG,CAAC,WAAmB,EAAE,EAAE,CAC1D,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;AAD3B,QAAA,oBAAoB,wBACO;AAEjC,MAAM,gBAAgB,GAAG,CAC9B,EAAE,KAAK,EAAE,WAAW,EAAe,EACnC,MAAc,EACE,EAAE;;IAClB,MAAM,
|
|
1
|
+
{"version":3,"file":"phone-number-utils.js","sourceRoot":"","sources":["../../src/util/phone-number-utils.ts"],"names":[],"mappings":";;;AAAA,6DAAgE;AAChE,sCAAyD;AAGzD,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAE3B,MAAM,oBAAoB,GAAG,CAAC,WAAmB,EAAE,EAAE,CAC1D,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;AAD3B,QAAA,oBAAoB,wBACO;AAEjC,MAAM,gBAAgB,GAAG,CAC9B,EAAE,KAAK,EAAE,WAAW,EAAe,EACnC,MAAc,EACE,EAAE;;IAClB,MAAM,kBAAkB,GAAG,IAAA,oBAAY,EAAC,IAAA,4BAAoB,EAAC,WAAW,CAAC,CAAC,CAAC;IAC3E,MAAM,IAAI,GAAG,kBAAkB;QAC7B,CAAC,CAAC,wBAAe,CAAC,WAAW;QAC7B,CAAC,CAAC,wBAAe,CAAC,QAAQ,CAAC;IAC7B,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;QACzE,MAAM,iBAAiB,GAAG,IAAA,sCAAK,EAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QACrD,MAAM,iBAAiB,GAAG,iBAAiB,CAAC,aAAa,EAAE,CAAC;QAC5D,MAAM,IAAI,GAAG,MAAA,iBAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,mCAAI,WAAW,CAAC;QAChE,OAAO;YACL,KAAK;YACL,IAAI;YACJ,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI;YAC7C,SAAS,EACP,MAAM,KAAK,iBAAiB;gBAC1B,CAAC,CAAC,MAAA,iBAAiB,CAAC,SAAS,CAAC,UAAU,CAAC,mCAAI,WAAW;gBACxD,CAAC,CAAC,MAAA,iBAAiB,CAAC,SAAS,CAAC,eAAe,CAAC,mCAAI,WAAW;YACjE,WAAW,EAAE,IAAI;SAClB,CAAC;KACH;IAAC,WAAM;QACN,OAAO;YACL,KAAK;YACL,IAAI;YACJ,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,WAAW;YACtB,WAAW,EAAE,WAAW;SACzB,CAAC;KACH;AACH,CAAC,CAAC;AAhCW,QAAA,gBAAgB,oBAgC3B;AAEK,MAAM,YAAY,GAAG,CAAC,WAAmB,EAAE,EAAE;IAClD,OAAO,WAAW,CAAC,MAAM,GAAG,uBAAuB,CAAC;AACtD,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sipgate/integration-bridge",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.7",
|
|
4
4
|
"description": "sipgate Integration Bridge Framework",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
"@types/express": "4.17.14",
|
|
63
63
|
"@types/jest": "28.1.8",
|
|
64
64
|
"@types/lru-cache": "7.10.9",
|
|
65
|
-
"@types/node": "18.11.
|
|
65
|
+
"@types/node": "18.11.10",
|
|
66
66
|
"@types/redis": "4.0.10",
|
|
67
67
|
"husky": "8.0.2",
|
|
68
68
|
"jest": "28.1.3",
|
|
69
|
-
"lint-staged": "13.0
|
|
69
|
+
"lint-staged": "13.1.0",
|
|
70
70
|
"node-mocks-http": "1.12.1",
|
|
71
71
|
"prettier": "2.8.0",
|
|
72
72
|
"rimraf": "3.0.2",
|