stentor-guards 1.59.68 → 1.59.73
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/isActionable.js +1 -2
- package/lib/isActionable.js.map +1 -1
- package/lib/isActiveWithin.js +1 -2
- package/lib/isActiveWithin.js.map +1 -1
- package/lib/isChannelable.js +1 -2
- package/lib/isChannelable.js.map +1 -1
- package/lib/isCompilablePath.js +1 -2
- package/lib/isCompilablePath.js.map +1 -1
- package/lib/isConditional.js +1 -2
- package/lib/isConditional.js.map +1 -1
- package/lib/isExecutablePath.js +1 -2
- package/lib/isExecutablePath.js.map +1 -1
- package/lib/isFirstTime.js +1 -2
- package/lib/isFirstTime.js.map +1 -1
- package/lib/isGlobalHandler.js +1 -2
- package/lib/isGlobalHandler.js.map +1 -1
- package/lib/isHandler.js +1 -2
- package/lib/isHandler.js.map +1 -1
- package/lib/isHaveNotSeenWithin.js +1 -2
- package/lib/isHaveNotSeenWithin.js.map +1 -1
- package/lib/isHistoricalPath.js +1 -2
- package/lib/isHistoricalPath.js.map +1 -1
- package/lib/isIntent.js +2 -3
- package/lib/isIntent.js.map +1 -1
- package/lib/isJSONDependable.js +1 -2
- package/lib/isJSONDependable.js.map +1 -1
- package/lib/isLastActive.js +1 -2
- package/lib/isLastActive.js.map +1 -1
- package/lib/isLastActiveResponse.js +1 -2
- package/lib/isLastActiveResponse.js.map +1 -1
- package/lib/isLinkoutSuggestion.js +1 -2
- package/lib/isLinkoutSuggestion.js.map +1 -1
- package/lib/isPreviousHandlerPath.js +1 -2
- package/lib/isPreviousHandlerPath.js.map +1 -1
- package/lib/isSchedulableResponse.js +1 -2
- package/lib/isSchedulableResponse.js.map +1 -1
- package/lib/isScheduled.js +1 -2
- package/lib/isScheduled.js.map +1 -1
- package/lib/isTemplatedList.js +1 -2
- package/lib/isTemplatedList.js.map +1 -1
- package/lib/isTimeContextual.js +1 -2
- package/lib/isTimeContextual.js.map +1 -1
- package/lib/request/guards.js +23 -24
- package/lib/request/guards.js.map +1 -1
- package/package.json +5 -5
package/lib/isActionable.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isActionable =
|
|
3
|
+
exports.isActionable = isActionable;
|
|
4
4
|
/**
|
|
5
5
|
* Guard to check if the object is actionable.
|
|
6
6
|
*
|
|
@@ -10,5 +10,4 @@ exports.isActionable = void 0;
|
|
|
10
10
|
function isActionable(potential) {
|
|
11
11
|
return !!potential && Array.isArray(potential.actions);
|
|
12
12
|
}
|
|
13
|
-
exports.isActionable = isActionable;
|
|
14
13
|
//# sourceMappingURL=isActionable.js.map
|
package/lib/isActionable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isActionable.js","sourceRoot":"","sources":["../src/isActionable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isActionable.js","sourceRoot":"","sources":["../src/isActionable.ts"],"names":[],"mappings":";;AASA,oCAEC;AARD;;;;;GAKG;AACH,SAAgB,YAAY,CAAC,SAA8B;IACvD,OAAO,CAAC,CAAC,SAAS,IAAI,KAAK,CAAC,OAAO,CAAE,SAAwB,CAAC,OAAO,CAAC,CAAC;AAC3E,CAAC"}
|
package/lib/isActiveWithin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isActiveWithin =
|
|
3
|
+
exports.isActiveWithin = isActiveWithin;
|
|
4
4
|
/**
|
|
5
5
|
* Type guard to check if the object implements ActiveWithinable
|
|
6
6
|
*
|
|
@@ -9,5 +9,4 @@ exports.isActiveWithin = void 0;
|
|
|
9
9
|
function isActiveWithin(item) {
|
|
10
10
|
return !!item && item.activeWithin !== undefined;
|
|
11
11
|
}
|
|
12
|
-
exports.isActiveWithin = isActiveWithin;
|
|
13
12
|
//# sourceMappingURL=isActiveWithin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isActiveWithin.js","sourceRoot":"","sources":["../src/isActiveWithin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isActiveWithin.js","sourceRoot":"","sources":["../src/isActiveWithin.ts"],"names":[],"mappings":";;AAWA,wCAEC;AAPD;;;;GAIG;AACH,SAAgB,cAAc,CAAI,IAAY;IAC1C,OAAO,CAAC,CAAC,IAAI,IAAK,IAAyB,CAAC,YAAY,KAAK,SAAS,CAAC;AAC3E,CAAC"}
|
package/lib/isChannelable.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isChannelable =
|
|
3
|
+
exports.isChannelable = isChannelable;
|
|
4
4
|
/**
|
|
5
5
|
* Type guard to check if the object implements Channeled.
|
|
6
6
|
*
|
|
@@ -10,5 +10,4 @@ exports.isChannelable = void 0;
|
|
|
10
10
|
function isChannelable(item) {
|
|
11
11
|
return !!item && (typeof item.channel === "object");
|
|
12
12
|
}
|
|
13
|
-
exports.isChannelable = isChannelable;
|
|
14
13
|
//# sourceMappingURL=isChannelable.js.map
|
package/lib/isChannelable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isChannelable.js","sourceRoot":"","sources":["../src/isChannelable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isChannelable.js","sourceRoot":"","sources":["../src/isChannelable.ts"],"names":[],"mappings":";;AASA,sCAEC;AARD;;;;;GAKG;AACH,SAAgB,aAAa,CAAI,IAAY;IACzC,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,OAAQ,IAAuB,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC;AAC5E,CAAC"}
|
package/lib/isCompilablePath.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isCompilablePath =
|
|
3
|
+
exports.isCompilablePath = isCompilablePath;
|
|
4
4
|
const isPreviousHandlerPath_1 = require("./isPreviousHandlerPath");
|
|
5
5
|
const isHistoricalPath_1 = require("./isHistoricalPath");
|
|
6
6
|
/**
|
|
@@ -9,5 +9,4 @@ const isHistoricalPath_1 = require("./isHistoricalPath");
|
|
|
9
9
|
function isCompilablePath(path) {
|
|
10
10
|
return (0, isPreviousHandlerPath_1.isPreviousHandlerPath)(path) || (0, isHistoricalPath_1.isHistoricalPath)(path);
|
|
11
11
|
}
|
|
12
|
-
exports.isCompilablePath = isCompilablePath;
|
|
13
12
|
//# sourceMappingURL=isCompilablePath.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isCompilablePath.js","sourceRoot":"","sources":["../src/isCompilablePath.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isCompilablePath.js","sourceRoot":"","sources":["../src/isCompilablePath.ts"],"names":[],"mappings":";;AAQA,4CAEC;AARD,mEAAgE;AAChE,yDAAsD;AAEtD;;GAEG;AACH,SAAgB,gBAAgB,CAAC,IAAU;IACvC,OAAO,IAAA,6CAAqB,EAAC,IAAI,CAAC,IAAI,IAAA,mCAAgB,EAAC,IAAI,CAAC,CAAC;AACjE,CAAC"}
|
package/lib/isConditional.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isConditional =
|
|
3
|
+
exports.isConditional = isConditional;
|
|
4
4
|
/**
|
|
5
5
|
* Type guard to check if the object implements Conditional
|
|
6
6
|
*
|
|
@@ -10,5 +10,4 @@ exports.isConditional = void 0;
|
|
|
10
10
|
function isConditional(item) {
|
|
11
11
|
return !!item && (typeof item.conditions === "object" || typeof item.conditions === "string");
|
|
12
12
|
}
|
|
13
|
-
exports.isConditional = isConditional;
|
|
14
13
|
//# sourceMappingURL=isConditional.js.map
|
package/lib/isConditional.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isConditional.js","sourceRoot":"","sources":["../src/isConditional.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isConditional.js","sourceRoot":"","sources":["../src/isConditional.ts"],"names":[],"mappings":";;AASA,sCAEC;AARD;;;;;GAKG;AACH,SAAgB,aAAa,CAAI,IAAY;IACzC,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,OAAQ,IAAuB,CAAC,UAAU,KAAK,QAAQ,IAAI,OAAQ,IAAuB,CAAC,UAAU,KAAK,QAAQ,CAAC,CAAC;AAC1I,CAAC"}
|
package/lib/isExecutablePath.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isExecutablePath =
|
|
3
|
+
exports.isExecutablePath = isExecutablePath;
|
|
4
4
|
/**
|
|
5
5
|
* Guard to determine if the path is executable
|
|
6
6
|
*/
|
|
7
7
|
function isExecutablePath(path) {
|
|
8
8
|
return !!path && path.intentId !== undefined;
|
|
9
9
|
}
|
|
10
|
-
exports.isExecutablePath = isExecutablePath;
|
|
11
10
|
//# sourceMappingURL=isExecutablePath.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isExecutablePath.js","sourceRoot":"","sources":["../src/isExecutablePath.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isExecutablePath.js","sourceRoot":"","sources":["../src/isExecutablePath.ts"],"names":[],"mappings":";;AAMA,4CAEC;AALD;;GAEG;AACH,SAAgB,gBAAgB,CAAC,IAAU;IACvC,OAAO,CAAC,CAAC,IAAI,IAAK,IAAuB,CAAC,QAAQ,KAAK,SAAS,CAAC;AACrE,CAAC"}
|
package/lib/isFirstTime.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isFirstTime =
|
|
3
|
+
exports.isFirstTime = isFirstTime;
|
|
4
4
|
/**
|
|
5
5
|
* Type guard to check if the object implements FirstTimeable
|
|
6
6
|
*
|
|
@@ -9,5 +9,4 @@ exports.isFirstTime = void 0;
|
|
|
9
9
|
function isFirstTime(item) {
|
|
10
10
|
return !!item && item.firstTime !== undefined;
|
|
11
11
|
}
|
|
12
|
-
exports.isFirstTime = isFirstTime;
|
|
13
12
|
//# sourceMappingURL=isFirstTime.js.map
|
package/lib/isFirstTime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isFirstTime.js","sourceRoot":"","sources":["../src/isFirstTime.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isFirstTime.js","sourceRoot":"","sources":["../src/isFirstTime.ts"],"names":[],"mappings":";;AAWA,kCAEC;AAPD;;;;GAIG;AACH,SAAgB,WAAW,CAAI,IAAY;IACvC,OAAO,CAAC,CAAC,IAAI,IAAK,IAAsB,CAAC,SAAS,KAAK,SAAS,CAAC;AACrE,CAAC"}
|
package/lib/isGlobalHandler.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isGlobalHandler =
|
|
3
|
+
exports.isGlobalHandler = isGlobalHandler;
|
|
4
4
|
/*! Copyright (c) 2020, XAPPmedia */
|
|
5
5
|
const stentor_constants_1 = require("stentor-constants");
|
|
6
6
|
const isHandler_1 = require("./isHandler");
|
|
@@ -23,5 +23,4 @@ function isGlobalHandler(handler) {
|
|
|
23
23
|
const hasUtterances = Array.isArray(handler.utterancePatterns) && handler.utterancePatterns.length > 0;
|
|
24
24
|
return isActualHandler && hasUtterances;
|
|
25
25
|
}
|
|
26
|
-
exports.isGlobalHandler = isGlobalHandler;
|
|
27
26
|
//# sourceMappingURL=isGlobalHandler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isGlobalHandler.js","sourceRoot":"","sources":["../src/isGlobalHandler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isGlobalHandler.js","sourceRoot":"","sources":["../src/isGlobalHandler.ts"],"names":[],"mappings":";;AAYA,0CAaC;AAzBD,oCAAoC;AACpC,yDAAwE;AAExE,2CAAwC;AAExC;;;;;;GAMG;AACH,SAAgB,eAAe,CAAC,OAAyB;IACrD,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,iDAAiD;IACjD,IAAI,OAAO,CAAC,QAAQ,KAAK,qCAAiB,IAAI,OAAO,CAAC,QAAQ,KAAK,oCAAgB,EAAE,CAAC;QAClF,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,eAAe,GAAY,IAAA,qBAAS,EAAC,OAAO,CAAC,CAAC;IACpD,MAAM,aAAa,GAAY,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,OAAO,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC;IAChH,OAAO,eAAe,IAAI,aAAa,CAAC;AAC5C,CAAC"}
|
package/lib/isHandler.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isHandler =
|
|
3
|
+
exports.isHandler = isHandler;
|
|
4
4
|
/**
|
|
5
5
|
* Determine if the request handler props are for a handler.
|
|
6
6
|
*
|
|
@@ -9,5 +9,4 @@ exports.isHandler = void 0;
|
|
|
9
9
|
function isHandler(props) {
|
|
10
10
|
return !!props && props.type !== undefined && props.type !== null;
|
|
11
11
|
}
|
|
12
|
-
exports.isHandler = isHandler;
|
|
13
12
|
//# sourceMappingURL=isHandler.js.map
|
package/lib/isHandler.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isHandler.js","sourceRoot":"","sources":["../src/isHandler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isHandler.js","sourceRoot":"","sources":["../src/isHandler.ts"],"names":[],"mappings":";;AAQA,8BAEC;AAPD;;;;GAIG;AACH,SAAgB,SAAS,CAAC,KAAmD;IACzE,OAAO,CAAC,CAAC,KAAK,IAAK,KAAiB,CAAC,IAAI,KAAK,SAAS,IAAK,KAAiB,CAAC,IAAI,KAAK,IAAI,CAAC;AAChG,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isHaveNotSeenWithin =
|
|
3
|
+
exports.isHaveNotSeenWithin = isHaveNotSeenWithin;
|
|
4
4
|
/**
|
|
5
5
|
* Type guard to check if the object implements HaveNotSeenWithinable.
|
|
6
6
|
*
|
|
@@ -9,5 +9,4 @@ exports.isHaveNotSeenWithin = void 0;
|
|
|
9
9
|
function isHaveNotSeenWithin(item) {
|
|
10
10
|
return !!item && item.haveNotSeenWithin !== undefined;
|
|
11
11
|
}
|
|
12
|
-
exports.isHaveNotSeenWithin = isHaveNotSeenWithin;
|
|
13
12
|
//# sourceMappingURL=isHaveNotSeenWithin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isHaveNotSeenWithin.js","sourceRoot":"","sources":["../src/isHaveNotSeenWithin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isHaveNotSeenWithin.js","sourceRoot":"","sources":["../src/isHaveNotSeenWithin.ts"],"names":[],"mappings":";;AAWA,kDAEC;AAPD;;;;GAIG;AACH,SAAgB,mBAAmB,CAAI,IAAY;IAC/C,OAAO,CAAC,CAAC,IAAI,IAAK,IAA8B,CAAC,iBAAiB,KAAK,SAAS,CAAC;AACrF,CAAC"}
|
package/lib/isHistoricalPath.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isHistoricalPath =
|
|
3
|
+
exports.isHistoricalPath = isHistoricalPath;
|
|
4
4
|
/**
|
|
5
5
|
* Guard to determine if the path is a historical path.
|
|
6
6
|
*/
|
|
7
7
|
function isHistoricalPath(path) {
|
|
8
8
|
return !!path && path.historicalIndex !== undefined;
|
|
9
9
|
}
|
|
10
|
-
exports.isHistoricalPath = isHistoricalPath;
|
|
11
10
|
//# sourceMappingURL=isHistoricalPath.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isHistoricalPath.js","sourceRoot":"","sources":["../src/isHistoricalPath.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isHistoricalPath.js","sourceRoot":"","sources":["../src/isHistoricalPath.ts"],"names":[],"mappings":";;AAMA,4CAEC;AALD;;GAEG;AACH,SAAgB,gBAAgB,CAAC,IAAU;IACvC,OAAO,CAAC,CAAC,IAAI,IAAK,IAAuB,CAAC,eAAe,KAAK,SAAS,CAAC;AAC5E,CAAC"}
|
package/lib/isIntent.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isBuiltInIntent = isBuiltInIntent;
|
|
4
|
+
exports.isIntent = isIntent;
|
|
4
5
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
5
6
|
const stentor_constants_1 = require("stentor-constants");
|
|
6
7
|
const isHandler_1 = require("./isHandler");
|
|
@@ -49,7 +50,6 @@ function isBuiltInIntent(props) {
|
|
|
49
50
|
}
|
|
50
51
|
return false;
|
|
51
52
|
}
|
|
52
|
-
exports.isBuiltInIntent = isBuiltInIntent;
|
|
53
53
|
/**
|
|
54
54
|
* Determine if the props are for an Intent
|
|
55
55
|
*
|
|
@@ -77,5 +77,4 @@ function isIntent(props) {
|
|
|
77
77
|
}
|
|
78
78
|
return false;
|
|
79
79
|
}
|
|
80
|
-
exports.isIntent = isIntent;
|
|
81
80
|
//# sourceMappingURL=isIntent.js.map
|
package/lib/isIntent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isIntent.js","sourceRoot":"","sources":["../src/isIntent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isIntent.js","sourceRoot":"","sources":["../src/isIntent.ts"],"names":[],"mappings":";;AAUA,0CAgDC;AAOD,4BA2BC;AA5FD,oCAAoC;AACpC,yDAAoT;AAEpT,2CAAwC;AAExC;;;;GAIG;AACH,SAAgB,eAAe,CAAC,KAAuB;;IAEnD,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;IAEhC,MAAM,SAAS,GAAa;QACxB,iCAAa;QACb,gCAAY;QACZ,+BAAW;QACX,iCAAa;QACb,mCAAe;QACf,kCAAc;QACd,+BAAW;QACX,6BAAS;QACT,gCAAY;QACZ,mCAAe;QACf,iCAAa;QACb,iCAAa;QACb,sCAAkB;QAClB,qCAAiB;QACjB,qCAAiB;QACjB,+BAAW;QACX,8BAAU;QACV,4BAA4B;QAC5B,iCAAa;KAChB,CAAC;IAEF,IAAI,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,0BAA0B;IAC1B,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,IAAI,OAAO,KAAK,CAAC,GAAG,KAAK,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAEpF,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAE/E,IAAI,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,0CAAE,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YACnC,OAAO,IAAI,CAAC;QAChB,CAAC;QAGD,MAAM,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAE3C,IAAI,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,0CAAE,UAAU,CAAC,gBAAgB,CAAC,EAAE,CAAC;YACjD,OAAO,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;IAED,OAAO,KAAK,CAAA;AAChB,CAAC;AAED;;;;GAIG;AACH,SAAgB,QAAQ,CAAC,KAAuB;IAE5C,IAAI,CAAC,KAAK,EAAE,CAAC;QACT,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,iCAAiC;IACjC,IAAI,CAAC,IAAA,qBAAS,EAAC,KAAK,CAAC,EAAE,CAAC;QACpB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,mEAAmE;IACnE,IAAI,KAAK,CAAC,OAAO,CAAE,KAAgB,CAAC,iBAAiB,CAAC,EAAE,CAAC;QACrD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,sCAAsC;IACtC,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,6DAA6D;IAC7D,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,IAAI,OAAO,KAAK,CAAC,GAAG,KAAK,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpF,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,KAAK,CAAC;AACjB,CAAC"}
|
package/lib/isJSONDependable.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isJSONDependable =
|
|
3
|
+
exports.isJSONDependable = isJSONDependable;
|
|
4
4
|
/**
|
|
5
5
|
* Guard to determine if the object implements JSONDependable.
|
|
6
6
|
*
|
|
@@ -10,5 +10,4 @@ exports.isJSONDependable = void 0;
|
|
|
10
10
|
function isJSONDependable(item) {
|
|
11
11
|
return !!item && !!item.JSONPathMatch;
|
|
12
12
|
}
|
|
13
|
-
exports.isJSONDependable = isJSONDependable;
|
|
14
13
|
//# sourceMappingURL=isJSONDependable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isJSONDependable.js","sourceRoot":"","sources":["../src/isJSONDependable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isJSONDependable.js","sourceRoot":"","sources":["../src/isJSONDependable.ts"],"names":[],"mappings":";;AASA,4CAEC;AARD;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAI,IAAY;IAC5C,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,CAAE,IAAsB,CAAC,aAAa,CAAC;AAC7D,CAAC"}
|
package/lib/isLastActive.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isLastActive =
|
|
3
|
+
exports.isLastActive = isLastActive;
|
|
4
4
|
const isActiveWithin_1 = require("./isActiveWithin");
|
|
5
5
|
const isFirstTime_1 = require("./isFirstTime");
|
|
6
6
|
const isHaveNotSeenWithin_1 = require("./isHaveNotSeenWithin");
|
|
@@ -11,5 +11,4 @@ const isHaveNotSeenWithin_1 = require("./isHaveNotSeenWithin");
|
|
|
11
11
|
function isLastActive(item) {
|
|
12
12
|
return (0, isActiveWithin_1.isActiveWithin)(item) || (0, isFirstTime_1.isFirstTime)(item) || (0, isHaveNotSeenWithin_1.isHaveNotSeenWithin)(item);
|
|
13
13
|
}
|
|
14
|
-
exports.isLastActive = isLastActive;
|
|
15
14
|
//# sourceMappingURL=isLastActive.js.map
|
package/lib/isLastActive.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isLastActive.js","sourceRoot":"","sources":["../src/isLastActive.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isLastActive.js","sourceRoot":"","sources":["../src/isLastActive.ts"],"names":[],"mappings":";;AAUA,oCAEC;AAVD,qDAAkD;AAClD,+CAA4C;AAC5C,+DAA2D;AAE3D;;;GAGG;AACH,SAAgB,YAAY,CAAI,IAAY;IACxC,OAAO,IAAA,+BAAc,EAAC,IAAI,CAAC,IAAI,IAAA,yBAAW,EAAC,IAAI,CAAC,IAAI,IAAA,yCAAmB,EAAC,IAAI,CAAC,CAAC;AAClF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isLastActiveResponse =
|
|
3
|
+
exports.isLastActiveResponse = isLastActiveResponse;
|
|
4
4
|
const isLastActive_1 = require("./isLastActive");
|
|
5
5
|
/**
|
|
6
6
|
* Type guard to determine if the Response is a LastActiveResponse.
|
|
@@ -11,5 +11,4 @@ const isLastActive_1 = require("./isLastActive");
|
|
|
11
11
|
function isLastActiveResponse(response) {
|
|
12
12
|
return !!response && (0, isLastActive_1.isLastActive)(response);
|
|
13
13
|
}
|
|
14
|
-
exports.isLastActiveResponse = isLastActiveResponse;
|
|
15
14
|
//# sourceMappingURL=isLastActiveResponse.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isLastActiveResponse.js","sourceRoot":"","sources":["../src/isLastActiveResponse.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isLastActiveResponse.js","sourceRoot":"","sources":["../src/isLastActiveResponse.ts"],"names":[],"mappings":";;AAUA,oDAEC;AAVD,iDAA8C;AAE9C;;;;;GAKG;AACH,SAAgB,oBAAoB,CAAC,QAAkB;IACnD,OAAO,CAAC,CAAC,QAAQ,IAAI,IAAA,2BAAY,EAAC,QAAQ,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isLinkoutSuggestion =
|
|
3
|
+
exports.isLinkoutSuggestion = isLinkoutSuggestion;
|
|
4
4
|
/**
|
|
5
5
|
* Determines if the suggestion is a LinkOutSuggestion
|
|
6
6
|
*
|
|
@@ -13,5 +13,4 @@ function isLinkoutSuggestion(suggestion) {
|
|
|
13
13
|
}
|
|
14
14
|
return suggestion.url !== undefined;
|
|
15
15
|
}
|
|
16
|
-
exports.isLinkoutSuggestion = isLinkoutSuggestion;
|
|
17
16
|
//# sourceMappingURL=isLinkoutSuggestion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isLinkoutSuggestion.js","sourceRoot":"","sources":["../src/isLinkoutSuggestion.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isLinkoutSuggestion.js","sourceRoot":"","sources":["../src/isLinkoutSuggestion.ts"],"names":[],"mappings":";;AASA,kDAMC;AAZD;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAC,UAA2B;IAC3D,IAAI,CAAC,UAAU,EAAE,CAAC;QACd,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,OAAQ,UAAgC,CAAC,GAAG,KAAK,SAAS,CAAC;AAC/D,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isPreviousHandlerPath =
|
|
3
|
+
exports.isPreviousHandlerPath = isPreviousHandlerPath;
|
|
4
4
|
/**
|
|
5
5
|
* Guard to determine if the path is a previous handler path.
|
|
6
6
|
*/
|
|
7
7
|
function isPreviousHandlerPath(path) {
|
|
8
8
|
return !!path && path.previousHandler === true;
|
|
9
9
|
}
|
|
10
|
-
exports.isPreviousHandlerPath = isPreviousHandlerPath;
|
|
11
10
|
//# sourceMappingURL=isPreviousHandlerPath.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isPreviousHandlerPath.js","sourceRoot":"","sources":["../src/isPreviousHandlerPath.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isPreviousHandlerPath.js","sourceRoot":"","sources":["../src/isPreviousHandlerPath.ts"],"names":[],"mappings":";;AAMA,sDAEC;AALD;;GAEG;AACH,SAAgB,qBAAqB,CAAC,IAAU;IAC5C,OAAO,CAAC,CAAC,IAAI,IAAK,IAA4B,CAAC,eAAe,KAAK,IAAI,CAAC;AAC5E,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isSchedulableResponse =
|
|
3
|
+
exports.isSchedulableResponse = isSchedulableResponse;
|
|
4
4
|
const isScheduled_1 = require("./isScheduled");
|
|
5
5
|
/**
|
|
6
6
|
* Type guard to determine if the Response is a SchedulableResponse
|
|
@@ -11,5 +11,4 @@ const isScheduled_1 = require("./isScheduled");
|
|
|
11
11
|
function isSchedulableResponse(response) {
|
|
12
12
|
return !!response && (0, isScheduled_1.isScheduled)(response);
|
|
13
13
|
}
|
|
14
|
-
exports.isSchedulableResponse = isSchedulableResponse;
|
|
15
14
|
//# sourceMappingURL=isSchedulableResponse.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isSchedulableResponse.js","sourceRoot":"","sources":["../src/isSchedulableResponse.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isSchedulableResponse.js","sourceRoot":"","sources":["../src/isSchedulableResponse.ts"],"names":[],"mappings":";;AAUA,sDAEC;AAVD,+CAA4C;AAE5C;;;;;GAKG;AACH,SAAgB,qBAAqB,CAAC,QAAkB;IACpD,OAAO,CAAC,CAAC,QAAQ,IAAI,IAAA,yBAAW,EAAC,QAAQ,CAAC,CAAC;AAC/C,CAAC"}
|
package/lib/isScheduled.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isScheduled =
|
|
3
|
+
exports.isScheduled = isScheduled;
|
|
4
4
|
/**
|
|
5
5
|
* Determines if the item has a schedule.
|
|
6
6
|
*/
|
|
7
7
|
function isScheduled(item) {
|
|
8
8
|
return !!item && item.schedule !== undefined;
|
|
9
9
|
}
|
|
10
|
-
exports.isScheduled = isScheduled;
|
|
11
10
|
//# sourceMappingURL=isScheduled.js.map
|
package/lib/isScheduled.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isScheduled.js","sourceRoot":"","sources":["../src/isScheduled.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isScheduled.js","sourceRoot":"","sources":["../src/isScheduled.ts"],"names":[],"mappings":";;AAUA,kCAEC;AALD;;GAEG;AACH,SAAgB,WAAW,CAAI,IAAY;IACvC,OAAO,CAAC,CAAC,IAAI,IAAK,IAAoB,CAAC,QAAQ,KAAK,SAAS,CAAC;AAClE,CAAC"}
|
package/lib/isTemplatedList.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isTemplatedList =
|
|
3
|
+
exports.isTemplatedList = isTemplatedList;
|
|
4
4
|
/**
|
|
5
5
|
* Guard to check if the provided object is a TemplatedList object for compilation.
|
|
6
6
|
* @param list
|
|
@@ -14,5 +14,4 @@ function isTemplatedList(list) {
|
|
|
14
14
|
// && typeof (list as TemplatedList).itemsName === "string"
|
|
15
15
|
&& Array.isArray(list.items);
|
|
16
16
|
}
|
|
17
|
-
exports.isTemplatedList = isTemplatedList;
|
|
18
17
|
//# sourceMappingURL=isTemplatedList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isTemplatedList.js","sourceRoot":"","sources":["../src/isTemplatedList.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isTemplatedList.js","sourceRoot":"","sources":["../src/isTemplatedList.ts"],"names":[],"mappings":";;AAQA,0CAOC;AAZD;;;;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"}
|
package/lib/isTimeContextual.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isTimeContextual =
|
|
3
|
+
exports.isTimeContextual = isTimeContextual;
|
|
4
4
|
const isLastActive_1 = require("./isLastActive");
|
|
5
5
|
const isScheduled_1 = require("./isScheduled");
|
|
6
6
|
/**
|
|
@@ -12,5 +12,4 @@ const isScheduled_1 = require("./isScheduled");
|
|
|
12
12
|
function isTimeContextual(item) {
|
|
13
13
|
return (0, isLastActive_1.isLastActive)(item) || (0, isScheduled_1.isScheduled)(item);
|
|
14
14
|
}
|
|
15
|
-
exports.isTimeContextual = isTimeContextual;
|
|
16
15
|
//# sourceMappingURL=isTimeContextual.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isTimeContextual.js","sourceRoot":"","sources":["../src/isTimeContextual.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isTimeContextual.js","sourceRoot":"","sources":["../src/isTimeContextual.ts"],"names":[],"mappings":";;AAUA,4CAEC;AAVD,iDAA8C;AAC9C,+CAA4C;AAC5C;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAI,IAAY;IAC5C,OAAO,IAAA,2BAAY,EAAC,IAAI,CAAC,IAAI,IAAA,yBAAW,EAAC,IAAI,CAAC,CAAC;AACnD,CAAC"}
|
package/lib/request/guards.js
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isLaunchRequest = isLaunchRequest;
|
|
4
|
+
exports.isChannelActionRequest = isChannelActionRequest;
|
|
5
|
+
exports.isInputUnknownRequest = isInputUnknownRequest;
|
|
6
|
+
exports.isSessionEndedRequest = isSessionEndedRequest;
|
|
7
|
+
exports.isRawQueryRequest = isRawQueryRequest;
|
|
8
|
+
exports.isIntentRequest = isIntentRequest;
|
|
9
|
+
exports.isPermissionRequest = isPermissionRequest;
|
|
10
|
+
exports.isNotificationPermissionRequest = isNotificationPermissionRequest;
|
|
11
|
+
exports.isSurfaceRequest = isSurfaceRequest;
|
|
12
|
+
exports.isSurfaceChangeRequest = isSurfaceChangeRequest;
|
|
13
|
+
exports.isSignInRequest = isSignInRequest;
|
|
14
|
+
exports.isOptionSelectRequest = isOptionSelectRequest;
|
|
15
|
+
exports.isAudioPlayerRequest = isAudioPlayerRequest;
|
|
16
|
+
exports.isPlaybackControlRequest = isPlaybackControlRequest;
|
|
17
|
+
exports.isDeliveryAddressRequest = isDeliveryAddressRequest;
|
|
18
|
+
exports.isTransactionDecisionRequest = isTransactionDecisionRequest;
|
|
19
|
+
exports.isTransactionRequirementCheckRequest = isTransactionRequirementCheckRequest;
|
|
20
|
+
exports.isAnonymousUser = isAnonymousUser;
|
|
21
|
+
exports.isNewSession = isNewSession;
|
|
22
|
+
exports.hasSessionId = hasSessionId;
|
|
23
|
+
exports.hasIntentId = hasIntentId;
|
|
24
|
+
exports.isRequestDependable = isRequestDependable;
|
|
25
|
+
exports.isSystemDependable = isSystemDependable;
|
|
4
26
|
const stentor_constants_1 = require("stentor-constants");
|
|
5
27
|
/**
|
|
6
28
|
* Check if the request is a LaunchRequest
|
|
@@ -11,7 +33,6 @@ const stentor_constants_1 = require("stentor-constants");
|
|
|
11
33
|
function isLaunchRequest(request) {
|
|
12
34
|
return !!request && request.type === stentor_constants_1.LAUNCH_REQUEST_TYPE;
|
|
13
35
|
}
|
|
14
|
-
exports.isLaunchRequest = isLaunchRequest;
|
|
15
36
|
/**
|
|
16
37
|
* Check if the request is a ChannelActionRequest
|
|
17
38
|
*
|
|
@@ -21,7 +42,6 @@ exports.isLaunchRequest = isLaunchRequest;
|
|
|
21
42
|
function isChannelActionRequest(request) {
|
|
22
43
|
return !!request && request.type === stentor_constants_1.CHANNEL_ACTION_REQUEST_TYPE;
|
|
23
44
|
}
|
|
24
|
-
exports.isChannelActionRequest = isChannelActionRequest;
|
|
25
45
|
/**
|
|
26
46
|
* Check if the request is an InputUnknownRequest
|
|
27
47
|
*
|
|
@@ -31,7 +51,6 @@ exports.isChannelActionRequest = isChannelActionRequest;
|
|
|
31
51
|
function isInputUnknownRequest(request) {
|
|
32
52
|
return !!request && request.type === stentor_constants_1.INPUT_UNKNOWN_REQUEST_TYPE;
|
|
33
53
|
}
|
|
34
|
-
exports.isInputUnknownRequest = isInputUnknownRequest;
|
|
35
54
|
/**
|
|
36
55
|
* Check if the request is a SessionEndedRequest
|
|
37
56
|
*
|
|
@@ -41,7 +60,6 @@ exports.isInputUnknownRequest = isInputUnknownRequest;
|
|
|
41
60
|
function isSessionEndedRequest(request) {
|
|
42
61
|
return !!request && request.type === stentor_constants_1.SESSION_ENDED_REQUEST_TYPE;
|
|
43
62
|
}
|
|
44
|
-
exports.isSessionEndedRequest = isSessionEndedRequest;
|
|
45
63
|
/**
|
|
46
64
|
* A request that requires resolution to a defined intentId, it is the raw query only (with other metadata);
|
|
47
65
|
* @param request
|
|
@@ -50,7 +68,6 @@ exports.isSessionEndedRequest = isSessionEndedRequest;
|
|
|
50
68
|
function isRawQueryRequest(request) {
|
|
51
69
|
return !!request && request.type === stentor_constants_1.RAW_QUERY_REQUEST_TYPE;
|
|
52
70
|
}
|
|
53
|
-
exports.isRawQueryRequest = isRawQueryRequest;
|
|
54
71
|
/**
|
|
55
72
|
* Check if the request is a IntentRequest
|
|
56
73
|
*
|
|
@@ -60,7 +77,6 @@ exports.isRawQueryRequest = isRawQueryRequest;
|
|
|
60
77
|
function isIntentRequest(request) {
|
|
61
78
|
return !!request && request.type === stentor_constants_1.INTENT_REQUEST_TYPE;
|
|
62
79
|
}
|
|
63
|
-
exports.isIntentRequest = isIntentRequest;
|
|
64
80
|
/**
|
|
65
81
|
* Check if it is a PermissionGrant
|
|
66
82
|
*
|
|
@@ -70,7 +86,6 @@ exports.isIntentRequest = isIntentRequest;
|
|
|
70
86
|
function isPermissionRequest(request) {
|
|
71
87
|
return !!request && request.type === stentor_constants_1.PERMISSION_REQUEST_TYPE;
|
|
72
88
|
}
|
|
73
|
-
exports.isPermissionRequest = isPermissionRequest;
|
|
74
89
|
/**
|
|
75
90
|
* Check if it is a NotificationPermissionGrant
|
|
76
91
|
*
|
|
@@ -80,7 +95,6 @@ exports.isPermissionRequest = isPermissionRequest;
|
|
|
80
95
|
function isNotificationPermissionRequest(request) {
|
|
81
96
|
return !!request && request.type === stentor_constants_1.NOTIFICATION_PERMISSION_REQUEST_TYPE;
|
|
82
97
|
}
|
|
83
|
-
exports.isNotificationPermissionRequest = isNotificationPermissionRequest;
|
|
84
98
|
/**
|
|
85
99
|
* Check if it is a SurfaceChange
|
|
86
100
|
*
|
|
@@ -91,7 +105,6 @@ exports.isNotificationPermissionRequest = isNotificationPermissionRequest;
|
|
|
91
105
|
function isSurfaceRequest(request) {
|
|
92
106
|
return !!request && request.type === stentor_constants_1.SURFACE_CHANGE_REQUEST_TYPE;
|
|
93
107
|
}
|
|
94
|
-
exports.isSurfaceRequest = isSurfaceRequest;
|
|
95
108
|
/**
|
|
96
109
|
* Is the request a SurfaceChangeRequest
|
|
97
110
|
* @param request
|
|
@@ -100,7 +113,6 @@ exports.isSurfaceRequest = isSurfaceRequest;
|
|
|
100
113
|
function isSurfaceChangeRequest(request) {
|
|
101
114
|
return !!request && request.type === stentor_constants_1.SURFACE_CHANGE_REQUEST_TYPE;
|
|
102
115
|
}
|
|
103
|
-
exports.isSurfaceChangeRequest = isSurfaceChangeRequest;
|
|
104
116
|
/**
|
|
105
117
|
* Check if it is a Sign
|
|
106
118
|
*
|
|
@@ -110,7 +122,6 @@ exports.isSurfaceChangeRequest = isSurfaceChangeRequest;
|
|
|
110
122
|
function isSignInRequest(request) {
|
|
111
123
|
return !!request && request.type === stentor_constants_1.SIGN_IN_REQUEST_TYPE;
|
|
112
124
|
}
|
|
113
|
-
exports.isSignInRequest = isSignInRequest;
|
|
114
125
|
/**
|
|
115
126
|
* Check if it is a Option Select
|
|
116
127
|
*
|
|
@@ -120,7 +131,6 @@ exports.isSignInRequest = isSignInRequest;
|
|
|
120
131
|
function isOptionSelectRequest(request) {
|
|
121
132
|
return !!request && request.type === stentor_constants_1.OPTION_SELECT_REQUEST_TYPE;
|
|
122
133
|
}
|
|
123
|
-
exports.isOptionSelectRequest = isOptionSelectRequest;
|
|
124
134
|
/**
|
|
125
135
|
* Check if the request is a AudioPlayerRequest
|
|
126
136
|
*
|
|
@@ -130,7 +140,6 @@ exports.isOptionSelectRequest = isOptionSelectRequest;
|
|
|
130
140
|
function isAudioPlayerRequest(request) {
|
|
131
141
|
return !!request && request.type === stentor_constants_1.AUDIO_PLAYER_REQUEST_TYPE;
|
|
132
142
|
}
|
|
133
|
-
exports.isAudioPlayerRequest = isAudioPlayerRequest;
|
|
134
143
|
/**
|
|
135
144
|
* Check if the request is a PlaybackControlRequest
|
|
136
145
|
*
|
|
@@ -140,7 +149,6 @@ exports.isAudioPlayerRequest = isAudioPlayerRequest;
|
|
|
140
149
|
function isPlaybackControlRequest(request) {
|
|
141
150
|
return !!request && request.type === stentor_constants_1.PLAYBACK_CONTROL_REQUEST_TYPE;
|
|
142
151
|
}
|
|
143
|
-
exports.isPlaybackControlRequest = isPlaybackControlRequest;
|
|
144
152
|
/**
|
|
145
153
|
* Check if it is a DeliveryAddress
|
|
146
154
|
*
|
|
@@ -150,7 +158,6 @@ exports.isPlaybackControlRequest = isPlaybackControlRequest;
|
|
|
150
158
|
function isDeliveryAddressRequest(request) {
|
|
151
159
|
return !!request && request.type === stentor_constants_1.TRANSACTION_DELIVERY_ADDRESS_REQUEST_TYPE;
|
|
152
160
|
}
|
|
153
|
-
exports.isDeliveryAddressRequest = isDeliveryAddressRequest;
|
|
154
161
|
/**
|
|
155
162
|
* Check if it is a Transaction Decision
|
|
156
163
|
*
|
|
@@ -160,7 +167,6 @@ exports.isDeliveryAddressRequest = isDeliveryAddressRequest;
|
|
|
160
167
|
function isTransactionDecisionRequest(request) {
|
|
161
168
|
return !!request && request.type === "TRANSACTION_DECISION_REQUEST";
|
|
162
169
|
}
|
|
163
|
-
exports.isTransactionDecisionRequest = isTransactionDecisionRequest;
|
|
164
170
|
/**
|
|
165
171
|
* Check if it is a Transaction Requirement Check
|
|
166
172
|
*
|
|
@@ -170,7 +176,6 @@ exports.isTransactionDecisionRequest = isTransactionDecisionRequest;
|
|
|
170
176
|
function isTransactionRequirementCheckRequest(request) {
|
|
171
177
|
return !!request && request.type === "TRANSACTION_REQUIREMENT_CHECK_REQUEST";
|
|
172
178
|
}
|
|
173
|
-
exports.isTransactionRequirementCheckRequest = isTransactionRequirementCheckRequest;
|
|
174
179
|
const EPOCH_ID_BUG_LIMIT_MS = 5000;
|
|
175
180
|
const EPOCH_LENGTH = 13;
|
|
176
181
|
/**
|
|
@@ -196,7 +201,6 @@ function isAnonymousUser(request) {
|
|
|
196
201
|
}
|
|
197
202
|
return isAnonymousUser;
|
|
198
203
|
}
|
|
199
|
-
exports.isAnonymousUser = isAnonymousUser;
|
|
200
204
|
/**
|
|
201
205
|
* Is the request a new session.
|
|
202
206
|
*
|
|
@@ -205,7 +209,6 @@ exports.isAnonymousUser = isAnonymousUser;
|
|
|
205
209
|
function isNewSession(request) {
|
|
206
210
|
return request.isNewSession;
|
|
207
211
|
}
|
|
208
|
-
exports.isNewSession = isNewSession;
|
|
209
212
|
/**
|
|
210
213
|
* Helper function to determine if the request has a sessionID.
|
|
211
214
|
*
|
|
@@ -220,7 +223,6 @@ function hasSessionId(request) {
|
|
|
220
223
|
isPermissionRequest(request) ||
|
|
221
224
|
isRawQueryRequest(request));
|
|
222
225
|
}
|
|
223
|
-
exports.hasSessionId = hasSessionId;
|
|
224
226
|
/**
|
|
225
227
|
* Determines if the request has an intentId.
|
|
226
228
|
* @param request
|
|
@@ -229,7 +231,6 @@ exports.hasSessionId = hasSessionId;
|
|
|
229
231
|
function hasIntentId(request) {
|
|
230
232
|
return isIntentRequest(request) || isInputUnknownRequest(request) || isOptionSelectRequest(request) || isSignInRequest(request) || isPermissionRequest(request);
|
|
231
233
|
}
|
|
232
|
-
exports.hasIntentId = hasIntentId;
|
|
233
234
|
/**
|
|
234
235
|
* Guard to check if an object is RequestDependable
|
|
235
236
|
*
|
|
@@ -239,7 +240,6 @@ exports.hasIntentId = hasIntentId;
|
|
|
239
240
|
function isRequestDependable(item) {
|
|
240
241
|
return !!item && item.requestMatch !== undefined;
|
|
241
242
|
}
|
|
242
|
-
exports.isRequestDependable = isRequestDependable;
|
|
243
243
|
/**
|
|
244
244
|
* Guard to check if an object is SystemDependable
|
|
245
245
|
*
|
|
@@ -249,5 +249,4 @@ exports.isRequestDependable = isRequestDependable;
|
|
|
249
249
|
function isSystemDependable(item) {
|
|
250
250
|
return !!item && item.systemCondition !== undefined;
|
|
251
251
|
}
|
|
252
|
-
exports.isSystemDependable = isSystemDependable;
|
|
253
252
|
//# sourceMappingURL=guards.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guards.js","sourceRoot":"","sources":["../../src/request/guards.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"guards.js","sourceRoot":"","sources":["../../src/request/guards.ts"],"names":[],"mappings":";;AAgDA,0CAEC;AAQD,wDAEC;AAQD,sDAEC;AAOD,sDAEC;AAOD,8CAEC;AAQD,0CAEC;AAO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AC,OAAgB;IACxC,OAAO,eAAe,CAAC,OAAO,CAAC,IAAI,qBAAqB,CAAC,OAAO,CAAC,IAAI,qBAAqB,CAAC,OAAO,CAAC,IAAI,eAAe,CAAC,OAAO,CAAC,IAAI,mBAAmB,CAAC,OAAO,CAAC,CAAC;AACpK,CAAC;AAED;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAmB,IAAY;IAC9D,OAAO,CAAC,CAAC,IAAI,IAAK,IAAyB,CAAC,YAAY,KAAK,SAAS,CAAC;AAC3E,CAAC;AACD;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAmB,IAAY;IAC7D,OAAO,CAAC,CAAC,IAAI,IAAK,IAAwB,CAAC,eAAe,KAAK,SAAS,CAAC;AAC7E,CAAC"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.59.
|
|
7
|
+
"version": "1.59.73",
|
|
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.2.2",
|
|
24
24
|
"sinon": "18.0.0",
|
|
25
25
|
"sinon-chai": "3.7.0",
|
|
26
|
-
"stentor-models": "1.59.
|
|
26
|
+
"stentor-models": "1.59.73",
|
|
27
27
|
"ts-node": "10.9.2",
|
|
28
|
-
"typescript": "5.
|
|
28
|
+
"typescript": "5.5.2"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"stentor-constants": "1.59.
|
|
31
|
+
"stentor-constants": "1.59.73"
|
|
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": "
|
|
41
|
+
"gitHead": "2d5f7c2a1d94441cf83adf159e525b0e68a74027"
|
|
42
42
|
}
|