@vived/app 3.6.0 → 3.8.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.
@@ -1,10 +1,10 @@
1
1
  import { AppHandler, RequestHandler } from "../../Entities";
2
- export declare type StartZSpaceAction = (device: string, session: any, emulate: boolean) => void;
2
+ export declare type StartZSpaceAction = (session: any, emulate: boolean) => void;
3
3
  export declare class StartZSpaceBase extends RequestHandler {
4
4
  readonly requestType = "START_ZSPACE";
5
- readonly payloadVersion = 2;
5
+ readonly payloadVersion = 3;
6
6
  action: StartZSpaceAction;
7
7
  handleRequest: (version: number, payload: unknown) => void;
8
- private castPayloadV2;
8
+ private castPayloadV3;
9
9
  constructor(handler: AppHandler);
10
10
  }
@@ -6,14 +6,14 @@ class StartZSpaceBase extends Entities_1.RequestHandler {
6
6
  constructor(handler) {
7
7
  super();
8
8
  this.requestType = "START_ZSPACE";
9
- this.payloadVersion = 2;
9
+ this.payloadVersion = 3;
10
10
  this.action = () => {
11
11
  throw new Entities_1.ActionNotImplemented(this.requestType);
12
12
  };
13
13
  this.handleRequest = (version, payload) => {
14
14
  if (version === this.payloadVersion) {
15
- const { device, session, emulate } = this.castPayloadV2(payload);
16
- this.action(device, session, emulate);
15
+ const { session, emulate } = this.castPayloadV3(payload);
16
+ this.action(session, emulate);
17
17
  }
18
18
  else {
19
19
  throw new Entities_1.UnsupportedRequestVerion(this.requestType, version);
@@ -21,9 +21,9 @@ class StartZSpaceBase extends Entities_1.RequestHandler {
21
21
  };
22
22
  handler.registerRequestHandler(this);
23
23
  }
24
- castPayloadV2(payload) {
24
+ castPayloadV3(payload) {
25
25
  const castPayload = payload;
26
- if (castPayload.device === undefined || castPayload.session === undefined) {
26
+ if (castPayload.session === undefined) {
27
27
  throw new Entities_1.UnableToParsePayload(this.requestType, 1, JSON.stringify(payload));
28
28
  }
29
29
  if (castPayload.emulate === undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vived/app",
3
- "version": "3.6.0",
3
+ "version": "3.8.0",
4
4
  "description": "Public package for the VIVED Learning App system",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",