@xapp/stentor-dialogflow-telephony 1.58.31 → 1.59.0

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/lib/Channel.js CHANGED
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DialogflowTelephony = exports.DIALOGFLOW_TELEPHONY_CHANNEL = exports.capabilities = void 0;
3
+ exports.DIALOGFLOW_TELEPHONY_CHANNEL = void 0;
4
+ exports.capabilities = capabilities;
5
+ exports.DialogflowTelephony = DialogflowTelephony;
4
6
  const Constants_1 = require("./Constants");
5
7
  const Guards_1 = require("./Guards");
6
8
  const Translators_1 = require("./Translators");
@@ -26,7 +28,6 @@ function capabilities(body) {
26
28
  hasWebBrowser: false
27
29
  };
28
30
  }
29
- exports.capabilities = capabilities;
30
31
  exports.DIALOGFLOW_TELEPHONY_CHANNEL = {
31
32
  name: Constants_1.DIALOGFLOW_TELEPHONY_PLATFORM,
32
33
  test: Guards_1.isDialogflowTelephonyRequest,
@@ -37,5 +38,4 @@ exports.DIALOGFLOW_TELEPHONY_CHANNEL = {
37
38
  function DialogflowTelephony() {
38
39
  return Object.assign({}, exports.DIALOGFLOW_TELEPHONY_CHANNEL);
39
40
  }
40
- exports.DialogflowTelephony = DialogflowTelephony;
41
41
  //# sourceMappingURL=Channel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Channel.js","sourceRoot":"","sources":["../src/Channel.ts"],"names":[],"mappings":";;;AAEA,2CAA4D;AAE5D,qCAAwD;AACxD,+CAGuB;AAEvB,SAAgB,YAAY,CAAC,IAAY;IACrC,MAAM,OAAO,GAAW,yCAA6B,CAAC;IAEtD,IAAI,QAAQ,GAAY,KAAK,CAAC;IAC9B,IAAI,eAAe,GAAY,KAAK,CAAC;IAErC,qDAAqD;IACrD,IAAI,IAAA,qCAA4B,EAAC,IAAI,CAAC,EAAE,CAAC;QACrC,QAAQ,GAAG,IAAI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QAAA,4BAA4B,GAAY;IACjD,IAAI,EAAE,yCAA6B;IACnC,IAAI,EAAE,qCAA4B;IAClC,OAAO,EAAE,IAAI,iDAAmC,EAAE;IAClD,QAAQ,EAAE,IAAI,oDAAsC,EAAE;IACtD,YAAY;CACf,CAAC;AAEF,SAAgB,mBAAmB;IAC/B,yBACO,oCAA4B,EACjC;AACN,CAAC"}
package/lib/Guards.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*! Copyright (c) 2019, XAPPmedia */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.isDialogflowTelephonyRequest = void 0;
4
+ exports.isDialogflowTelephonyRequest = isDialogflowTelephonyRequest;
5
5
  const stentor_dialogflow_1 = require("@xapp/stentor-dialogflow");
6
6
  /**
7
7
  * Determine if the request is for this channel
@@ -14,5 +14,4 @@ function isDialogflowTelephonyRequest(request) {
14
14
  return (0, stentor_dialogflow_1.isDialogflowV2WithIntegrationRequest)(request)
15
15
  && request.originalDetectIntentRequest.source === "GOOGLE_TELEPHONY";
16
16
  }
17
- exports.isDialogflowTelephonyRequest = isDialogflowTelephonyRequest;
18
17
  //# sourceMappingURL=Guards.js.map
package/lib/Guards.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Guards.js","sourceRoot":"","sources":["../src/Guards.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;AAEpC,iEAAgF;AAEhF;;;;;;GAMG;AACH,SAAgB,4BAA4B,CAAC,OAAY;IACrD,OAAO,IAAA,yDAAoC,EAAC,OAAO,CAAC;WAC7C,OAAO,CAAC,2BAA2B,CAAC,MAAM,KAAK,kBAAkB,CAAC;AAC7E,CAAC;AAHD,oEAGC"}
1
+ {"version":3,"file":"Guards.js","sourceRoot":"","sources":["../src/Guards.ts"],"names":[],"mappings":";AAAA,oCAAoC;;AAWpC,oEAGC;AAZD,iEAAgF;AAEhF;;;;;;GAMG;AACH,SAAgB,4BAA4B,CAAC,OAAY;IACrD,OAAO,IAAA,yDAAoC,EAAC,OAAO,CAAC;WAC7C,OAAO,CAAC,2BAA2B,CAAC,MAAM,KAAK,kBAAkB,CAAC;AAC7E,CAAC"}
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getLocale = exports.isLaunchRequest = exports.getNewSession = exports.getUserId = exports.translateDialogflowTelephonyIntentToIntent = void 0;
3
+ exports.translateDialogflowTelephonyIntentToIntent = translateDialogflowTelephonyIntentToIntent;
4
+ exports.getUserId = getUserId;
5
+ exports.getNewSession = getNewSession;
6
+ exports.isLaunchRequest = isLaunchRequest;
7
+ exports.getLocale = getLocale;
4
8
  /*! Copyright (c) 2019, XAPPmedia */
5
9
  const stentor_utils_1 = require("stentor-utils");
6
10
  const stentor_locales_1 = require("stentor-locales");
@@ -8,7 +12,6 @@ const Constants_1 = require("../../Constants");
8
12
  function translateDialogflowTelephonyIntentToIntent(intent) {
9
13
  return Constants_1.INTENT_TRANSLATION[intent] ? Constants_1.INTENT_TRANSLATION[intent] : intent;
10
14
  }
11
- exports.translateDialogflowTelephonyIntentToIntent = translateDialogflowTelephonyIntentToIntent;
12
15
  function getUserId(requestBody) {
13
16
  let userId;
14
17
  // Find the phone number (caller id actually)
@@ -27,7 +30,6 @@ function getUserId(requestBody) {
27
30
  }
28
31
  return userId;
29
32
  }
30
- exports.getUserId = getUserId;
31
33
  function getNewSession(request) {
32
34
  let newSession = false;
33
35
  if (request.queryResult) {
@@ -35,17 +37,14 @@ function getNewSession(request) {
35
37
  }
36
38
  return newSession;
37
39
  }
38
- exports.getNewSession = getNewSession;
39
40
  function isLaunchRequest(request) {
40
41
  // It is the same
41
42
  return getNewSession(request);
42
43
  }
43
- exports.isLaunchRequest = isLaunchRequest;
44
44
  function getLocale(request) {
45
45
  var _a;
46
46
  // This only has an "en" language code. TODO: Parse the phone number to see if there are in the US.
47
47
  const code = ((_a = request === null || request === void 0 ? void 0 : request.queryResult) === null || _a === void 0 ? void 0 : _a.languageCode) === "en" ? "en-US" : undefined;
48
48
  return (0, stentor_locales_1.updateToRecommendedCase)(code);
49
49
  }
50
- exports.getLocale = getLocale;
51
50
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/Translators/TranslateDialogflowTelephonyRequest/helpers.ts"],"names":[],"mappings":";;;AAAA,oCAAoC;AACpC,iDAAqC;AAIrC,qDAA0D;AAC1D,+CAAqD;AAErD,SAAgB,0CAA0C,CAAC,MAAc;IACrE,OAAO,8BAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,8BAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AAC5E,CAAC;AAFD,gGAEC;AAED,SAAgB,SAAS,CAAC,WAAkD;IACxE,IAAI,MAAc,CAAC;IAEnB,6CAA6C;IAE7C,IAAI,WAAW,IAAI,WAAW,CAAC,2BAA2B,EAAE,CAAC;QACzD,MAAM,OAAO,GAAQ,WAAW,CAAC,2BAA2B,CAAC,OAAO,CAAC;QAErE,IAAI,OAAO,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;YAC/B,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,aAAa;QACvD,CAAC;QAED,gBAAgB;QAChB,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC9B,MAAM,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc;QAChE,CAAC;IACL,CAAC;IAED,IAAI,CAAC,MAAM,EAAE,CAAC;QACV,MAAM,GAAG,IAAA,oBAAI,GAAE,CAAC;IACpB,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC;AAvBD,8BAuBC;AAED,SAAgB,aAAa,CAAC,OAA8C;IACxE,IAAI,UAAU,GAAY,KAAK,CAAC;IAEhC,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;QACtB,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,KAAK,eAAe,CAAC;IAChE,CAAC;IAED,OAAO,UAAU,CAAC;AACtB,CAAC;AARD,sCAQC;AAED,SAAgB,eAAe,CAAC,OAA8C;IAC1E,iBAAiB;IACjB,OAAO,aAAa,CAAC,OAAO,CAAC,CAAC;AAClC,CAAC;AAHD,0CAGC;AAED,SAAgB,SAAS,CAAC,OAA8C;;IACpE,mGAAmG;IACnG,MAAM,IAAI,GAAG,CAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,0CAAE,YAAY,MAAK,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IAE/E,OAAO,IAAA,yCAAuB,EAAC,IAAI,CAAC,CAAC;AACzC,CAAC;AALD,8BAKC"}
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/Translators/TranslateDialogflowTelephonyRequest/helpers.ts"],"names":[],"mappings":";;AAQA,gGAEC;AAED,8BAuBC;AAED,sCAQC;AAED,0CAGC;AAED,8BAKC;AAzDD,oCAAoC;AACpC,iDAAqC;AAIrC,qDAA0D;AAC1D,+CAAqD;AAErD,SAAgB,0CAA0C,CAAC,MAAc;IACrE,OAAO,8BAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,8BAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AAC5E,CAAC;AAED,SAAgB,SAAS,CAAC,WAAkD;IACxE,IAAI,MAAc,CAAC;IAEnB,6CAA6C;IAE7C,IAAI,WAAW,IAAI,WAAW,CAAC,2BAA2B,EAAE,CAAC;QACzD,MAAM,OAAO,GAAQ,WAAW,CAAC,2BAA2B,CAAC,OAAO,CAAC;QAErE,IAAI,OAAO,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;YAC/B,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,aAAa;QACvD,CAAC;QAED,gBAAgB;QAChB,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC9B,MAAM,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc;QAChE,CAAC;IACL,CAAC;IAED,IAAI,CAAC,MAAM,EAAE,CAAC;QACV,MAAM,GAAG,IAAA,oBAAI,GAAE,CAAC;IACpB,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,SAAgB,aAAa,CAAC,OAA8C;IACxE,IAAI,UAAU,GAAY,KAAK,CAAC;IAEhC,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;QACtB,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,KAAK,eAAe,CAAC;IAChE,CAAC;IAED,OAAO,UAAU,CAAC;AACtB,CAAC;AAED,SAAgB,eAAe,CAAC,OAA8C;IAC1E,iBAAiB;IACjB,OAAO,aAAa,CAAC,OAAO,CAAC,CAAC;AAClC,CAAC;AAED,SAAgB,SAAS,CAAC,OAA8C;;IACpE,mGAAmG;IACnG,MAAM,IAAI,GAAG,CAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,0CAAE,YAAY,MAAK,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IAE/E,OAAO,IAAA,yCAAuB,EAAC,IAAI,CAAC,CAAC;AACzC,CAAC"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "1.58.31",
7
+ "version": "1.59.0",
8
8
  "description": "Stentor Dialogflow Telephony channel for stentor",
9
9
  "types": "lib/index",
10
10
  "main": "lib/index",
@@ -30,12 +30,12 @@
30
30
  "stentor-response": "1.59.70",
31
31
  "stentor-utils": "1.59.70",
32
32
  "ts-node": "10.9.2",
33
- "typescript": "5.4.5"
33
+ "typescript": "5.5.2"
34
34
  },
35
35
  "dependencies": {
36
36
  "@types/sinon-chai": "3.2.12",
37
37
  "@xapp/patterns": "2.0.2",
38
- "@xapp/stentor-dialogflow": "1.58.31",
38
+ "@xapp/stentor-dialogflow": "1.59.0",
39
39
  "actions-on-google": "2.14.0"
40
40
  },
41
41
  "peerDependencies": {
@@ -52,5 +52,5 @@
52
52
  "clean": "rm -rf ./lib/*",
53
53
  "test": "mocha --recursive -r ts-node/register \"./src/**/*.test.ts\""
54
54
  },
55
- "gitHead": "ae40aa5e72ea070018882190abfef2f8b181a3d0"
55
+ "gitHead": "8675831565d23ea748dbba9423e5f0d8cc42771f"
56
56
  }