stentor-guards 1.65.11 → 1.66.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/request/guards.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
|
-
import { AudioPlayerRequest, InputUnknownRequest, IntentRequest, LaunchRequest, OptionSelectRequest, PermissionRequest, PlaybackControlRequest, Request, RequestDependable, SessionEndedRequest, SignInRequest, SurfaceChangeRequest, SystemDependable
|
|
2
|
+
import { AudioPlayerRequest, ChannelActionRequest, EventRequest, InputUnknownRequest, IntentRequest, LaunchRequest, NotificationPermissionRequest, OptionSelectRequest, PermissionRequest, PlaybackControlRequest, Request, RequestDependable, SessionEndedRequest, SignInRequest, SurfaceChangeRequest, SystemDependable } from "stentor-models";
|
|
3
3
|
import { DeliveryAddressRequest } from "stentor-models/lib/Request/DeliveryAddressRequest";
|
|
4
4
|
import { TransactionDecisionRequest } from "stentor-models/lib/Request/TransactionDecisionRequest";
|
|
5
5
|
import { TransactionRequirementCheckRequest } from "stentor-models/lib/Request/TransactionRequirementCheckRequest";
|
|
@@ -18,6 +18,13 @@ export declare function isLaunchRequest(request: Request): request is LaunchRequ
|
|
|
18
18
|
* @returns
|
|
19
19
|
*/
|
|
20
20
|
export declare function isChannelActionRequest(request: Request): request is ChannelActionRequest;
|
|
21
|
+
/**
|
|
22
|
+
* Check if the request is an EventRequest
|
|
23
|
+
*
|
|
24
|
+
* @param request
|
|
25
|
+
* @returns
|
|
26
|
+
*/
|
|
27
|
+
export declare function isEventRequest(request: Request): request is EventRequest;
|
|
21
28
|
/**
|
|
22
29
|
* Check if the request is an InputUnknownRequest
|
|
23
30
|
*
|
package/lib/request/guards.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isLaunchRequest = isLaunchRequest;
|
|
4
4
|
exports.isChannelActionRequest = isChannelActionRequest;
|
|
5
|
+
exports.isEventRequest = isEventRequest;
|
|
5
6
|
exports.isInputUnknownRequest = isInputUnknownRequest;
|
|
6
7
|
exports.isSessionEndedRequest = isSessionEndedRequest;
|
|
7
8
|
exports.isRawQueryRequest = isRawQueryRequest;
|
|
@@ -42,6 +43,15 @@ function isLaunchRequest(request) {
|
|
|
42
43
|
function isChannelActionRequest(request) {
|
|
43
44
|
return !!request && request.type === stentor_constants_1.CHANNEL_ACTION_REQUEST_TYPE;
|
|
44
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Check if the request is an EventRequest
|
|
48
|
+
*
|
|
49
|
+
* @param request
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
52
|
+
function isEventRequest(request) {
|
|
53
|
+
return !!request && request.type === stentor_constants_1.EVENT_REQUEST_TYPE;
|
|
54
|
+
}
|
|
45
55
|
/**
|
|
46
56
|
* Check if the request is an InputUnknownRequest
|
|
47
57
|
*
|
|
@@ -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":";;AAkDA,0CAEC;AAQD,wDAEC;AAQD,wCAEC;AAQD,sDAEC;AAOD,sDAEC;AAOD,8CAEC;AAQD,0CAEC;AAOD,kDAEC;AAOD,0EAEC;AAQD,4CAEC;AAOD,wDAEC;AAOD,0CAEC;AAOD,sDAEC;AAOD,oDAEC;AAOD,4DAEC;AAQD,4DAEC;AAQD,oEAEC;AAQD,oFAEC;AAaD,0CAkBC;AAOD,oCAEC;AAKD,oCAYC;AAOD,kCAEC;AAQD,kDAEC;AAOD,gDAEC;AApRD,yDAgB2B;AAM3B;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,OAAgB;IAC5C,OAAO,CAAC,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,KAAK,uCA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AAC;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.
|
|
7
|
+
"version": "1.66.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": "11.7.4",
|
|
24
24
|
"sinon": "20.0.0",
|
|
25
25
|
"sinon-chai": "3.7.0",
|
|
26
|
-
"stentor-models": "1.
|
|
26
|
+
"stentor-models": "1.66.0",
|
|
27
27
|
"ts-node": "10.9.2",
|
|
28
28
|
"typescript": "5.9.3"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"stentor-constants": "1.
|
|
31
|
+
"stentor-constants": "1.66.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": "
|
|
41
|
+
"gitHead": "c316424dd34c83ea115fa5ca7f5711d43acc03f7"
|
|
42
42
|
}
|