stentor-guards 1.46.7 → 1.48.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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.48.0](https://github.com/stentorium/stentor/compare/v1.47.0...v1.48.0) (2021-10-28)
7
+
8
+
9
+ ### Features
10
+
11
+ * List Template ([#1200](https://github.com/stentorium/stentor/issues/1200)) ([6dc854a](https://github.com/stentorium/stentor/commit/6dc854ae810be1f752eea31160759427e768715e))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [1.46.7](https://github.com/stentorium/stentor/compare/v1.46.6...v1.46.7) (2021-10-25)
7
18
 
8
19
  **Note:** Version bump only for package stentor-guards
package/lib/index.d.ts CHANGED
@@ -15,4 +15,5 @@ export * from "./isLinkoutSuggestion";
15
15
  export * from "./isPreviousHandlerPath";
16
16
  export * from "./isSchedulableResponse";
17
17
  export * from "./isScheduled";
18
+ export * from "./isTemplatedList";
18
19
  export * from "./isTimeContextual";
package/lib/index.js CHANGED
@@ -27,5 +27,6 @@ __exportStar(require("./isLinkoutSuggestion"), exports);
27
27
  __exportStar(require("./isPreviousHandlerPath"), exports);
28
28
  __exportStar(require("./isSchedulableResponse"), exports);
29
29
  __exportStar(require("./isScheduled"), exports);
30
+ __exportStar(require("./isTemplatedList"), exports);
30
31
  __exportStar(require("./isTimeContextual"), exports);
31
32
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oCAAoC;AACpC,iDAA+B;AAC/B,mDAAiC;AACjC,qDAAmC;AACnC,qDAAmC;AACnC,gDAA8B;AAC9B,oDAAkC;AAClC,8CAA4B;AAC5B,wDAAsC;AACtC,qDAAmC;AACnC,6CAA2B;AAC3B,iDAA+B;AAC/B,yDAAuC;AACvC,wDAAsC;AACtC,0DAAwC;AACxC,0DAAwC;AACxC,gDAA8B;AAC9B,qDAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oCAAoC;AACpC,iDAA+B;AAC/B,mDAAiC;AACjC,qDAAmC;AACnC,qDAAmC;AACnC,gDAA8B;AAC9B,oDAAkC;AAClC,8CAA4B;AAC5B,wDAAsC;AACtC,qDAAmC;AACnC,6CAA2B;AAC3B,iDAA+B;AAC/B,yDAAuC;AACvC,wDAAsC;AACtC,0DAAwC;AACxC,0DAAwC;AACxC,gDAA8B;AAC9B,oDAAkC;AAClC,qDAAmC"}
@@ -0,0 +1,8 @@
1
+ /*! Copyright (c) 2021, XAPPmedia */
2
+ import { TemplatedList } from "stentor-models";
3
+ /**
4
+ * Guard to check if the provided object is a TemplatedList object for compilation.
5
+ * @param list
6
+ * @returns
7
+ */
8
+ export declare function isTemplatedList(list: object): list is TemplatedList;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isTemplatedList = void 0;
4
+ /**
5
+ * Guard to check if the provided object is a TemplatedList object for compilation.
6
+ * @param list
7
+ * @returns
8
+ */
9
+ function isTemplatedList(list) {
10
+ // We need itemsObject, itemsName & array of items for this to check out
11
+ return !!list
12
+ && typeof list.itemsObject === "string"
13
+ // Not required actually, we default it to "item"
14
+ // && typeof (list as TemplatedList).itemsName === "string"
15
+ && Array.isArray(list.items);
16
+ }
17
+ exports.isTemplatedList = isTemplatedList;
18
+ //# sourceMappingURL=isTemplatedList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isTemplatedList.js","sourceRoot":"","sources":["../src/isTemplatedList.ts"],"names":[],"mappings":";;;AAGA;;;;GAIG;AACH,SAAgB,eAAe,CAAC,IAAY;IACxC,wEAAwE;IACxE,OAAO,CAAC,CAAC,IAAI;WACN,OAAQ,IAAsB,CAAC,WAAW,KAAK,QAAQ;QAC1D,iDAAiD;QACjD,2DAA2D;WACxD,KAAK,CAAC,OAAO,CAAE,IAAsB,CAAC,KAAK,CAAC,CAAC;AACxD,CAAC;AAPD,0CAOC"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "1.46.7",
7
+ "version": "1.48.0",
8
8
  "description": "Common type guards for 📣 stentor",
9
9
  "types": "lib/index",
10
10
  "main": "lib/index",
@@ -23,12 +23,12 @@
23
23
  "mocha": "9.1.3",
24
24
  "sinon": "10.0.0",
25
25
  "sinon-chai": "3.7.0",
26
- "stentor-models": "1.46.7",
26
+ "stentor-models": "1.48.0",
27
27
  "ts-node": "9.1.1",
28
28
  "typescript": "4.4.4"
29
29
  },
30
30
  "dependencies": {
31
- "stentor-constants": "1.46.7"
31
+ "stentor-constants": "1.48.0"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "stentor-models": "1.x"
@@ -38,5 +38,5 @@
38
38
  "clean": "rm -rf ./lib/* ",
39
39
  "test": "mocha --recursive -r ts-node/register \"./src/**/*.test.ts\""
40
40
  },
41
- "gitHead": "2ca7cfb621a724c8a878cce30ba000b94c1ce1b6"
41
+ "gitHead": "ffc9d0c79778268a2e4a8609d8653666a9dde1ea"
42
42
  }