@xapp/stentor-alexa 1.77.2 → 1.78.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.
@@ -0,0 +1,3 @@
1
+ /*! Copyright (c) 2022, XAPPmedia */
2
+ import { Card as AlexaCard } from "@xapp/stentor-alexa-lib";
3
+ export declare function createDirective(card: AlexaCard): any;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ /*! Copyright (c) 2022, XAPPmedia */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.createDirective = void 0;
5
+ function createDirective(card) {
6
+ if (card.type === "Standard") {
7
+ return {
8
+ type: "Alexa.Presentation.APL.RenderDocument",
9
+ token: "documentToken",
10
+ document: {
11
+ src: "doc://alexa/apl/documents/SentorLegacyStandardCard",
12
+ type: "Link"
13
+ },
14
+ datasources: {
15
+ detailImageLeftData: {
16
+ type: "object",
17
+ objectId: "detailImageLeftSample",
18
+ image: {
19
+ sources: [
20
+ {
21
+ url: card.image.smallImageUrl,
22
+ size: "large"
23
+ }
24
+ ]
25
+ },
26
+ textContent: {
27
+ locationText: {
28
+ type: "PlainText",
29
+ text: card.title
30
+ },
31
+ secondaryText: {
32
+ type: "PlainText",
33
+ text: card.text
34
+ }
35
+ }
36
+ }
37
+ }
38
+ };
39
+ }
40
+ else {
41
+ throw new Error("We only render STANDARD cards for now");
42
+ }
43
+ }
44
+ exports.createDirective = createDirective;
45
+ //# sourceMappingURL=AplSentorLegacyStandardCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AplSentorLegacyStandardCard.js","sourceRoot":"","sources":["../../src/APLDirectives/AplSentorLegacyStandardCard.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;AAIpC,SAAgB,eAAe,CAAC,IAAe;IAC3C,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,EAAE;QAC1B,OAAO;YACH,IAAI,EAAE,uCAAuC;YAC7C,KAAK,EAAE,eAAe;YACtB,QAAQ,EAAE;gBACN,GAAG,EAAE,oDAAoD;gBACzD,IAAI,EAAE,MAAM;aACf;YACD,WAAW,EAAE;gBACT,mBAAmB,EAAE;oBACjB,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,uBAAuB;oBACjC,KAAK,EAAE;wBACH,OAAO,EAAE;4BACL;gCACI,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa;gCAC7B,IAAI,EAAE,OAAO;6BAChB;yBACJ;qBACJ;oBACD,WAAW,EAAE;wBACT,YAAY,EAAE;4BACV,IAAI,EAAE,WAAW;4BACjB,IAAI,EAAE,IAAI,CAAC,KAAK;yBACnB;wBACD,aAAa,EAAE;4BACX,IAAI,EAAE,WAAW;4BACjB,IAAI,EAAE,IAAI,CAAC,IAAI;yBAClB;qBACJ;iBACJ;aACJ;SACJ,CAAC;KACL;SAAM;QACH,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;KAC5D;AACL,CAAC;AArCD,0CAqCC"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "1.77.2",
7
+ "version": "1.78.0",
8
8
  "description": "Alexa channel for stentor",
9
9
  "types": "lib/index",
10
10
  "main": "lib/index",
@@ -29,7 +29,7 @@
29
29
  "stentor-locales": "1.71.0",
30
30
  "stentor-logger": "1.71.0",
31
31
  "stentor-media": "1.71.0",
32
- "stentor-models": "1.71.0",
32
+ "stentor-models": "1.72.0",
33
33
  "stentor-request": "1.71.0",
34
34
  "stentor-response": "1.71.0",
35
35
  "stentor-utils": "1.71.0",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@xapp/patterns": "2.0.3",
41
- "@xapp/stentor-alexa-lib": "1.77.2",
41
+ "@xapp/stentor-alexa-lib": "1.78.0",
42
42
  "alexa-verifier": "2.0.2",
43
43
  "amazon-date-parser": "0.3.0",
44
44
  "ask-sdk-model": "1.86.0",
@@ -61,5 +61,5 @@
61
61
  "clean": "rm -rf ./lib/*",
62
62
  "test": "mocha --recursive -r ts-node/register \"./src/**/*.test.ts\""
63
63
  },
64
- "gitHead": "2ad66e5027dcf0a1aae780792cd30c7a5f284c76"
64
+ "gitHead": "7ad5a86334ecb7ae383da1aef801375cb9af71af"
65
65
  }