@lazycatcloud/sdk 0.1.52 → 0.1.53

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.
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.HPortalSysChangeRoleDesc = exports.HPortalSysQueryRoleDesc = exports.HPortalSysListUsersDesc = exports.HPortalSysPairDevicesDesc = exports.HPortalSysFreeVirtualExternalIPDesc = exports.HPortalSysAllocVirtualExternalIPDesc = exports.HPortalSysGetAppCertDesc = exports.HPortalSysGetDomainCertDesc = exports.HPortalSysQueryBoxInfoDesc = exports.HPortalSysQueryDeviceByIDDesc = exports.HPortalSysListDevicesDesc = exports.HPortalSysQueryLoginDesc = exports.HPortalSysDesc = exports.HPortalSysClientImpl = exports.LogoutRequest = exports.ForceResetPasswordRequest = exports.CreateUserRequest = exports.DeleteUserRequest = exports.ResetPasswordRequest = exports.QueryRoleReply = exports.ChangeRoleReqeust = exports.UserID = exports.ListDeviceReply = exports.ListDeviceRequest = exports.Device = exports.DomainCertReply = exports.DomainCertRequest = exports.BoxInfo = exports.DeviceID = exports.LoginInfo = exports.AuthToken = exports.AppCertReply = exports.AppCertRequest = exports.FreeVEIPReply = exports.FreeVEIPRequest = exports.AllocVEIPReply = exports.AllocVEIPRequest = exports.PairDevicesRequest = exports.ListUsersReply = exports.UserInvitation = exports.GenUserInvitationRequest = exports.logoutRequest_ReasonToJSON = exports.logoutRequest_ReasonFromJSON = exports.LogoutRequest_Reason = exports.authToken_TokenTypeToJSON = exports.authToken_TokenTypeFromJSON = exports.AuthToken_TokenType = exports.roleToJSON = exports.roleFromJSON = exports.Role = void 0;
7
- exports.GrpcWebError = exports.GrpcWebImpl = exports.HPortalSysLogoutDesc = exports.HPortalSysGenUserInvitationDesc = exports.HPortalSysForceResetPasswordDesc = exports.HPortalSysCreateUserDesc = exports.HPortalSysDeleteUserDesc = exports.HPortalSysResetPasswordDesc = void 0;
6
+ exports.HPortalSysGetDomainCertDesc = exports.HPortalSysSetBoxStatusDesc = exports.HPortalSysQueryBoxInfoDesc = exports.HPortalSysQueryDeviceByIDDesc = exports.HPortalSysListDevicesDesc = exports.HPortalSysQueryLoginDesc = exports.HPortalSysDesc = exports.HPortalSysClientImpl = exports.CheckPasswordReply = exports.CheckPasswordRequest = exports.LogoutRequest = exports.ForceResetPasswordRequest = exports.CreateUserRequest = exports.DeleteUserRequest = exports.ResetPasswordRequest = exports.QueryRoleReply = exports.ChangeRoleReqeust = exports.UserID = exports.ListDeviceReply = exports.ListDeviceRequest = exports.Device = exports.DomainCertReply = exports.DomainCertRequest = exports.BoxStatus = exports.BoxInfo = exports.DeviceID = exports.LoginInfo = exports.AuthToken = exports.AppCertReply = exports.AppCertRequest = exports.FreeVEIPReply = exports.FreeVEIPRequest = exports.AllocVEIPReply = exports.AllocVEIPRequest = exports.PairDevicesRequest = exports.ListUsersReply = exports.UserInvitation = exports.GenUserInvitationRequest = exports.logoutRequest_ReasonToJSON = exports.logoutRequest_ReasonFromJSON = exports.LogoutRequest_Reason = exports.boxStatus_StatusToJSON = exports.boxStatus_StatusFromJSON = exports.BoxStatus_Status = exports.authToken_TokenTypeToJSON = exports.authToken_TokenTypeFromJSON = exports.AuthToken_TokenType = exports.roleToJSON = exports.roleFromJSON = exports.Role = void 0;
7
+ exports.GrpcWebError = exports.GrpcWebImpl = exports.HPortalSysCheckPasswordDesc = exports.HPortalSysLogoutDesc = exports.HPortalSysGenUserInvitationDesc = exports.HPortalSysForceResetPasswordDesc = exports.HPortalSysCreateUserDesc = exports.HPortalSysDeleteUserDesc = exports.HPortalSysResetPasswordDesc = exports.HPortalSysChangeRoleDesc = exports.HPortalSysQueryRoleDesc = exports.HPortalSysListUsersDesc = exports.HPortalSysPairDevicesDesc = exports.HPortalSysFreeVirtualExternalIPDesc = exports.HPortalSysAllocVirtualExternalIPDesc = exports.HPortalSysGetAppCertDesc = void 0;
8
8
  /* eslint-disable */
9
9
  const grpc_web_1 = require("@improbable-eng/grpc-web");
10
10
  const browser_headers_1 = require("browser-headers");
@@ -81,6 +81,39 @@ function authToken_TokenTypeToJSON(object) {
81
81
  }
82
82
  }
83
83
  exports.authToken_TokenTypeToJSON = authToken_TokenTypeToJSON;
84
+ var BoxStatus_Status;
85
+ (function (BoxStatus_Status) {
86
+ BoxStatus_Status[BoxStatus_Status["OK"] = 0] = "OK";
87
+ BoxStatus_Status[BoxStatus_Status["Error"] = 1] = "Error";
88
+ BoxStatus_Status[BoxStatus_Status["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
89
+ })(BoxStatus_Status = exports.BoxStatus_Status || (exports.BoxStatus_Status = {}));
90
+ function boxStatus_StatusFromJSON(object) {
91
+ switch (object) {
92
+ case 0:
93
+ case "OK":
94
+ return BoxStatus_Status.OK;
95
+ case 1:
96
+ case "Error":
97
+ return BoxStatus_Status.Error;
98
+ case -1:
99
+ case "UNRECOGNIZED":
100
+ default:
101
+ return BoxStatus_Status.UNRECOGNIZED;
102
+ }
103
+ }
104
+ exports.boxStatus_StatusFromJSON = boxStatus_StatusFromJSON;
105
+ function boxStatus_StatusToJSON(object) {
106
+ switch (object) {
107
+ case BoxStatus_Status.OK:
108
+ return "OK";
109
+ case BoxStatus_Status.Error:
110
+ return "Error";
111
+ case BoxStatus_Status.UNRECOGNIZED:
112
+ default:
113
+ return "UNRECOGNIZED";
114
+ }
115
+ }
116
+ exports.boxStatus_StatusToJSON = boxStatus_StatusToJSON;
84
117
  var LogoutRequest_Reason;
85
118
  (function (LogoutRequest_Reason) {
86
119
  LogoutRequest_Reason[LogoutRequest_Reason["LogoutByDeleting"] = 0] = "LogoutByDeleting";
@@ -932,6 +965,59 @@ exports.BoxInfo = {
932
965
  return message;
933
966
  },
934
967
  };
968
+ function createBaseBoxStatus() {
969
+ return { status: 0, url: "" };
970
+ }
971
+ exports.BoxStatus = {
972
+ encode(message, writer = minimal_1.default.Writer.create()) {
973
+ if (message.status !== 0) {
974
+ writer.uint32(8).int32(message.status);
975
+ }
976
+ if (message.url !== "") {
977
+ writer.uint32(18).string(message.url);
978
+ }
979
+ return writer;
980
+ },
981
+ decode(input, length) {
982
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
983
+ let end = length === undefined ? reader.len : reader.pos + length;
984
+ const message = createBaseBoxStatus();
985
+ while (reader.pos < end) {
986
+ const tag = reader.uint32();
987
+ switch (tag >>> 3) {
988
+ case 1:
989
+ message.status = reader.int32();
990
+ break;
991
+ case 2:
992
+ message.url = reader.string();
993
+ break;
994
+ default:
995
+ reader.skipType(tag & 7);
996
+ break;
997
+ }
998
+ }
999
+ return message;
1000
+ },
1001
+ fromJSON(object) {
1002
+ return {
1003
+ status: isSet(object.status) ? boxStatus_StatusFromJSON(object.status) : 0,
1004
+ url: isSet(object.url) ? String(object.url) : "",
1005
+ };
1006
+ },
1007
+ toJSON(message) {
1008
+ const obj = {};
1009
+ message.status !== undefined && (obj.status = boxStatus_StatusToJSON(message.status));
1010
+ message.url !== undefined && (obj.url = message.url);
1011
+ return obj;
1012
+ },
1013
+ fromPartial(object) {
1014
+ var _a, _b;
1015
+ const message = createBaseBoxStatus();
1016
+ message.status = (_a = object.status) !== null && _a !== void 0 ? _a : 0;
1017
+ message.url = (_b = object.url) !== null && _b !== void 0 ? _b : "";
1018
+ return message;
1019
+ },
1020
+ };
935
1021
  function createBaseDomainCertRequest() {
936
1022
  return { domain: "" };
937
1023
  }
@@ -1653,6 +1739,92 @@ exports.LogoutRequest = {
1653
1739
  return message;
1654
1740
  },
1655
1741
  };
1742
+ function createBaseCheckPasswordRequest() {
1743
+ return { uid: "", password: "" };
1744
+ }
1745
+ exports.CheckPasswordRequest = {
1746
+ encode(message, writer = minimal_1.default.Writer.create()) {
1747
+ if (message.uid !== "") {
1748
+ writer.uint32(10).string(message.uid);
1749
+ }
1750
+ if (message.password !== "") {
1751
+ writer.uint32(18).string(message.password);
1752
+ }
1753
+ return writer;
1754
+ },
1755
+ decode(input, length) {
1756
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
1757
+ let end = length === undefined ? reader.len : reader.pos + length;
1758
+ const message = createBaseCheckPasswordRequest();
1759
+ while (reader.pos < end) {
1760
+ const tag = reader.uint32();
1761
+ switch (tag >>> 3) {
1762
+ case 1:
1763
+ message.uid = reader.string();
1764
+ break;
1765
+ case 2:
1766
+ message.password = reader.string();
1767
+ break;
1768
+ default:
1769
+ reader.skipType(tag & 7);
1770
+ break;
1771
+ }
1772
+ }
1773
+ return message;
1774
+ },
1775
+ fromJSON(object) {
1776
+ return {
1777
+ uid: isSet(object.uid) ? String(object.uid) : "",
1778
+ password: isSet(object.password) ? String(object.password) : "",
1779
+ };
1780
+ },
1781
+ toJSON(message) {
1782
+ const obj = {};
1783
+ message.uid !== undefined && (obj.uid = message.uid);
1784
+ message.password !== undefined && (obj.password = message.password);
1785
+ return obj;
1786
+ },
1787
+ fromPartial(object) {
1788
+ var _a, _b;
1789
+ const message = createBaseCheckPasswordRequest();
1790
+ message.uid = (_a = object.uid) !== null && _a !== void 0 ? _a : "";
1791
+ message.password = (_b = object.password) !== null && _b !== void 0 ? _b : "";
1792
+ return message;
1793
+ },
1794
+ };
1795
+ function createBaseCheckPasswordReply() {
1796
+ return {};
1797
+ }
1798
+ exports.CheckPasswordReply = {
1799
+ encode(_, writer = minimal_1.default.Writer.create()) {
1800
+ return writer;
1801
+ },
1802
+ decode(input, length) {
1803
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
1804
+ let end = length === undefined ? reader.len : reader.pos + length;
1805
+ const message = createBaseCheckPasswordReply();
1806
+ while (reader.pos < end) {
1807
+ const tag = reader.uint32();
1808
+ switch (tag >>> 3) {
1809
+ default:
1810
+ reader.skipType(tag & 7);
1811
+ break;
1812
+ }
1813
+ }
1814
+ return message;
1815
+ },
1816
+ fromJSON(_) {
1817
+ return {};
1818
+ },
1819
+ toJSON(_) {
1820
+ const obj = {};
1821
+ return obj;
1822
+ },
1823
+ fromPartial(_) {
1824
+ const message = createBaseCheckPasswordReply();
1825
+ return message;
1826
+ },
1827
+ };
1656
1828
  class HPortalSysClientImpl {
1657
1829
  constructor(rpc) {
1658
1830
  this.rpc = rpc;
@@ -1660,6 +1832,7 @@ class HPortalSysClientImpl {
1660
1832
  this.ListDevices = this.ListDevices.bind(this);
1661
1833
  this.QueryDeviceByID = this.QueryDeviceByID.bind(this);
1662
1834
  this.QueryBoxInfo = this.QueryBoxInfo.bind(this);
1835
+ this.SetBoxStatus = this.SetBoxStatus.bind(this);
1663
1836
  this.GetDomainCert = this.GetDomainCert.bind(this);
1664
1837
  this.GetAppCert = this.GetAppCert.bind(this);
1665
1838
  this.AllocVirtualExternalIP = this.AllocVirtualExternalIP.bind(this);
@@ -1674,6 +1847,7 @@ class HPortalSysClientImpl {
1674
1847
  this.ForceResetPassword = this.ForceResetPassword.bind(this);
1675
1848
  this.GenUserInvitation = this.GenUserInvitation.bind(this);
1676
1849
  this.Logout = this.Logout.bind(this);
1850
+ this.CheckPassword = this.CheckPassword.bind(this);
1677
1851
  }
1678
1852
  QueryLogin(request, metadata) {
1679
1853
  return this.rpc.unary(exports.HPortalSysQueryLoginDesc, exports.AuthToken.fromPartial(request), metadata);
@@ -1687,6 +1861,9 @@ class HPortalSysClientImpl {
1687
1861
  QueryBoxInfo(request, metadata) {
1688
1862
  return this.rpc.unary(exports.HPortalSysQueryBoxInfoDesc, empty_1.Empty.fromPartial(request), metadata);
1689
1863
  }
1864
+ SetBoxStatus(request, metadata) {
1865
+ return this.rpc.unary(exports.HPortalSysSetBoxStatusDesc, exports.BoxStatus.fromPartial(request), metadata);
1866
+ }
1690
1867
  GetDomainCert(request, metadata) {
1691
1868
  return this.rpc.unary(exports.HPortalSysGetDomainCertDesc, exports.DomainCertRequest.fromPartial(request), metadata);
1692
1869
  }
@@ -1729,6 +1906,9 @@ class HPortalSysClientImpl {
1729
1906
  Logout(request, metadata) {
1730
1907
  return this.rpc.unary(exports.HPortalSysLogoutDesc, exports.LogoutRequest.fromPartial(request), metadata);
1731
1908
  }
1909
+ CheckPassword(request, metadata) {
1910
+ return this.rpc.unary(exports.HPortalSysCheckPasswordDesc, exports.CheckPasswordRequest.fromPartial(request), metadata);
1911
+ }
1732
1912
  }
1733
1913
  exports.HPortalSysClientImpl = HPortalSysClientImpl;
1734
1914
  exports.HPortalSysDesc = { serviceName: "cloud.lazycat.apis.sys.HPortalSys" };
@@ -1804,6 +1984,24 @@ exports.HPortalSysQueryBoxInfoDesc = {
1804
1984
  },
1805
1985
  },
1806
1986
  };
1987
+ exports.HPortalSysSetBoxStatusDesc = {
1988
+ methodName: "SetBoxStatus",
1989
+ service: exports.HPortalSysDesc,
1990
+ requestStream: false,
1991
+ responseStream: false,
1992
+ requestType: {
1993
+ serializeBinary() {
1994
+ return exports.BoxStatus.encode(this).finish();
1995
+ },
1996
+ },
1997
+ responseType: {
1998
+ deserializeBinary(data) {
1999
+ return Object.assign(Object.assign({}, empty_1.Empty.decode(data)), { toObject() {
2000
+ return this;
2001
+ } });
2002
+ },
2003
+ },
2004
+ };
1807
2005
  exports.HPortalSysGetDomainCertDesc = {
1808
2006
  methodName: "GetDomainCert",
1809
2007
  service: exports.HPortalSysDesc,
@@ -2056,6 +2254,24 @@ exports.HPortalSysLogoutDesc = {
2056
2254
  },
2057
2255
  },
2058
2256
  };
2257
+ exports.HPortalSysCheckPasswordDesc = {
2258
+ methodName: "CheckPassword",
2259
+ service: exports.HPortalSysDesc,
2260
+ requestStream: false,
2261
+ responseStream: false,
2262
+ requestType: {
2263
+ serializeBinary() {
2264
+ return exports.CheckPasswordRequest.encode(this).finish();
2265
+ },
2266
+ },
2267
+ responseType: {
2268
+ deserializeBinary(data) {
2269
+ return Object.assign(Object.assign({}, exports.CheckPasswordReply.decode(data)), { toObject() {
2270
+ return this;
2271
+ } });
2272
+ },
2273
+ },
2274
+ };
2059
2275
  class GrpcWebImpl {
2060
2276
  constructor(host, options) {
2061
2277
  this.host = host;