@vuu-ui/vuu-protocol-types 0.13.95-alpha.2 → 0.13.95-alpha.4

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.
Files changed (2) hide show
  1. package/index.d.ts +12 -11
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -8,6 +8,15 @@ export interface VuuUser {
8
8
  name: string;
9
9
  }
10
10
 
11
+ export type InvalidSessionReason =
12
+ | "Invalid session"
13
+ | "User session limit exceeded";
14
+ export type InvalidTokenReason = "Invalid token" | "Token has expired";
15
+
16
+ export declare type LoginErrorMessage =
17
+ | InvalidSessionReason
18
+ | InvalidTokenReason;
19
+
11
20
  /**
12
21
  * Vuu Protocol Message Envelope.
13
22
  *
@@ -43,17 +52,11 @@ export interface VuuLoginRequest {
43
52
  type: "LOGIN";
44
53
  }
45
54
 
46
- export declare type VuuLoginResponse =
47
- | VuuLoginSuccessResponse
48
- | VuuLoginFailResponse;
55
+ // There is no LOGIN_FAIL
49
56
  export interface VuuLoginSuccessResponse {
50
57
  type: "LOGIN_SUCCESS";
51
58
  vuuServerId: string;
52
59
  }
53
- export interface VuuLoginFailResponse {
54
- errorMsg: string;
55
- type: "LOGIN_FAIL";
56
- }
57
60
 
58
61
  /**
59
62
  * Metadata messages
@@ -417,7 +420,7 @@ export interface ServerToClientTableRows {
417
420
  }
418
421
  export declare type ServerMessageBody =
419
422
  | ServerToClientHeartBeat
420
- | VuuLoginResponse
423
+ | VuuLoginSuccessResponse
421
424
  | VuuViewportCreateResponse
422
425
  | VuuViewportChangeResponse
423
426
  | VuuViewportRangeResponse
@@ -566,14 +569,12 @@ export declare type RpcResultError = {
566
569
  type: "ERROR_RESULT";
567
570
  errorMessage: string;
568
571
  };
569
-
570
- export declare type RpcResult = RpcResultSuccess | RpcResultError;
571
572
  export interface VuuRpcServiceResponse {
572
573
  action: unknown;
573
574
  error: null | unknown;
574
575
  rpcName: TypeAheadMethod;
575
576
  type: "RPC_RESPONSE";
576
- result: RpcResult;
577
+ result: RpcResultSuccess | RpcResultError;
577
578
  }
578
579
 
579
580
  export interface VuuViewportRpcTypeaheadRequest extends VuuRpcServiceRequest {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuu-ui/vuu-protocol-types",
3
- "version": "0.13.95-alpha.2",
3
+ "version": "0.13.95-alpha.4",
4
4
  "author": "heswell",
5
5
  "license": "Apache-2.0",
6
6
  "dependencies": {},