@bytexbyte/ike-app-api 1.0.78 → 1.0.80

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/App.d.ts CHANGED
@@ -29,5 +29,6 @@ declare class IKEAppApi extends BxBApi {
29
29
  isShowToU(deviceId: string): Promise<{
30
30
  isShowToU: boolean;
31
31
  }>;
32
+ getLinkAppVersion(): Promise<GetVersionResult>;
32
33
  }
33
34
  export default IKEAppApi;
package/lib/App.js CHANGED
@@ -153,6 +153,22 @@ var IKEAppApi = /** @class */ (function (_super) {
153
153
  });
154
154
  });
155
155
  };
156
+ IKEAppApi.prototype.getLinkAppVersion = function () {
157
+ return __awaiter(this, void 0, void 0, function () {
158
+ var response;
159
+ return __generator(this, function (_a) {
160
+ switch (_a.label) {
161
+ case 0: return [4 /*yield*/, this.bxbFetch({
162
+ method: 'GET',
163
+ headers: { 'Content-Type': 'application/json' },
164
+ }, 'link-app-version')];
165
+ case 1:
166
+ response = _a.sent();
167
+ return [2 /*return*/, response.json()];
168
+ }
169
+ });
170
+ });
171
+ };
156
172
  return IKEAppApi;
157
173
  }(bxb_api_1.default));
158
174
  exports.default = IKEAppApi;
@@ -19,9 +19,9 @@ declare type User = {
19
19
  incodeId: string | null;
20
20
  };
21
21
  declare type Session = {
22
- expires: Date;
23
- user: User;
24
- } | null;
22
+ expires?: Date;
23
+ user?: User;
24
+ };
25
25
  declare class IKEAppAuthApi extends BxBApi {
26
26
  constructor({ host, secretKey, secret, credentials, onSuccess, onError, }: {
27
27
  host: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytexbyte/ike-app-api",
3
- "version": "1.0.78",
3
+ "version": "1.0.80",
4
4
  "description": "app api",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",