@sipgate/integration-bridge 0.9.2 → 0.9.4

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/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  import { Server } from "http";
3
3
  import { Adapter } from "./models";
4
- import { CustomRouter } from "./models/custom-routers.model";
4
+ import { CustomRouter } from "./models/custom-router.model";
5
5
  export declare function start(adapter: Adapter, customRouters?: CustomRouter[]): Server;
6
6
  export declare const deleteCacheItem: (key: string) => Promise<void>;
7
7
  export declare const getCacheItem: (key: string) => Promise<import("./models").Contact[] | import("./models/cache-item-state.model").CacheItemState>;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=custom-routers.model.js.map
3
+ //# sourceMappingURL=custom-router.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-router.model.js","sourceRoot":"","sources":["../../src/models/custom-router.model.ts"],"names":[],"mappings":""}
@@ -8,5 +8,6 @@ export * from "./config.model";
8
8
  export * from "./contact-cache.model";
9
9
  export * from "./contact.model";
10
10
  export * from "./controller.model";
11
+ export * from "./custom-router.model";
11
12
  export * from "./server-error.model";
12
13
  export * from "./user.model";
@@ -24,6 +24,7 @@ __exportStar(require("./config.model"), exports);
24
24
  __exportStar(require("./contact-cache.model"), exports);
25
25
  __exportStar(require("./contact.model"), exports);
26
26
  __exportStar(require("./controller.model"), exports);
27
+ __exportStar(require("./custom-router.model"), exports);
27
28
  __exportStar(require("./server-error.model"), exports);
28
29
  __exportStar(require("./user.model"), exports);
29
30
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,yDAAuC;AACvC,yDAAuC;AACvC,kEAAgD;AAChD,wDAAsC;AACtC,qDAAmC;AACnC,iDAA+B;AAC/B,wDAAsC;AACtC,kDAAgC;AAChC,qDAAmC;AACnC,uDAAqC;AACrC,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,yDAAuC;AACvC,yDAAuC;AACvC,kEAAgD;AAChD,wDAAsC;AACtC,qDAAmC;AACnC,iDAA+B;AAC/B,wDAAsC;AACtC,kDAAgC;AAChC,qDAAmC;AACnC,wDAAsC;AACtC,uDAAqC;AACrC,+CAA6B"}
@@ -4,7 +4,7 @@ exports.isDirectDial = exports.convertPhoneNumberToE164 = void 0;
4
4
  const awesome_phonenumber_1 = require("awesome-phonenumber");
5
5
  const MIN_PHONE_NUMBER_LENGTH = 5;
6
6
  function convertPhoneNumberToE164(phoneNumber, locale) {
7
- const region = locale.replace(/.+_/, "").toUpperCase();
7
+ const region = locale.replace("_", "-").replace(/.+-/, "").toUpperCase();
8
8
  try {
9
9
  const parsedPhoneNumber = (0, awesome_phonenumber_1.parsePhoneNumber)(phoneNumber, region);
10
10
  const e164 = parsedPhoneNumber.getNumber("e164");
@@ -1 +1 @@
1
- {"version":3,"file":"phone-number-utils.js","sourceRoot":"","sources":["../../src/util/phone-number-utils.ts"],"names":[],"mappings":";;;AAAA,6DAAuD;AAGvD,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAElC,SAAgB,wBAAwB,CACtC,WAAmB,EACnB,MAAc;IAEd,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IAEvD,IAAI;QACF,MAAM,iBAAiB,GAAG,IAAA,sCAAgB,EAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAChE,MAAM,IAAI,GAAG,iBAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACjD,OAAO,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,WAAW,CAAC;KAC5B;IAAC,WAAM;QACN,OAAO,WAAW,CAAC;KACpB;AACH,CAAC;AAbD,4DAaC;AAEM,MAAM,YAAY,GAAG,CAAC,WAAwB,EAAE,EAAE;IACvD,OAAO,WAAW,CAAC,WAAW,CAAC,MAAM,GAAG,uBAAuB,CAAC;AAClE,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB"}
1
+ {"version":3,"file":"phone-number-utils.js","sourceRoot":"","sources":["../../src/util/phone-number-utils.ts"],"names":[],"mappings":";;;AAAA,6DAAuD;AAGvD,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAElC,SAAgB,wBAAwB,CACtC,WAAmB,EACnB,MAAc;IAEd,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IAEzE,IAAI;QACF,MAAM,iBAAiB,GAAG,IAAA,sCAAgB,EAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAChE,MAAM,IAAI,GAAG,iBAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACjD,OAAO,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,WAAW,CAAC;KAC5B;IAAC,WAAM;QACN,OAAO,WAAW,CAAC;KACpB;AACH,CAAC;AAbD,4DAaC;AAEM,MAAM,YAAY,GAAG,CAAC,WAAwB,EAAE,EAAE;IACvD,OAAO,WAAW,CAAC,WAAW,CAAC,MAAM,GAAG,uBAAuB,CAAC;AAClE,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.9.2",
3
+ "version": "0.9.4",
4
4
  "description": "sipgate Integration Bridge Framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -71,7 +71,7 @@
71
71
  "prettier": "2.7.1",
72
72
  "rimraf": "3.0.2",
73
73
  "ts-jest": "28.0.8",
74
- "typescript": "4.8.3"
74
+ "typescript": "4.8.4"
75
75
  },
76
76
  "dependencies": {
77
77
  "ajv": "^8.11.0",
@@ -1 +0,0 @@
1
- {"version":3,"file":"custom-routers.model.js","sourceRoot":"","sources":["../../src/models/custom-routers.model.ts"],"names":[],"mappings":""}