@bytexbyte/ike-app-api 1.0.72 → 1.0.73

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.
@@ -102,6 +102,13 @@ declare enum RuleType {
102
102
  redeemNFT = "redeemNFT",
103
103
  redeemGoldenTicket = "redeemGoldenTicket"
104
104
  }
105
+ declare type GetConnectDeviceAtResult = {
106
+ connectDeviceAt: Date;
107
+ error?: undefined;
108
+ } | {
109
+ connectDeviceAt?: undefined;
110
+ error: 'You are not logged in.' | 'Incorrect userID.' | 'You cannot access to this user.' | 'Missing userId.';
111
+ };
105
112
  declare class IKEAppUserApi extends BxBApi {
106
113
  constructor({ host, secretKey, secret, credentials, onSuccess, onError, }: {
107
114
  host: string;
@@ -195,5 +202,6 @@ declare class IKEAppUserApi extends BxBApi {
195
202
  } | {
196
203
  error: 'Missing incodeId or token and interviewId';
197
204
  }>;
205
+ getConnectDeviceAt(userId: string): Promise<GetConnectDeviceAtResult>;
198
206
  }
199
207
  export default IKEAppUserApi;
package/lib/User/index.js CHANGED
@@ -611,6 +611,29 @@ var IKEAppUserApi = /** @class */ (function (_super) {
611
611
  });
612
612
  });
613
613
  };
614
+ IKEAppUserApi.prototype.getConnectDeviceAt = function (userId) {
615
+ return __awaiter(this, void 0, void 0, function () {
616
+ var response;
617
+ return __generator(this, function (_a) {
618
+ switch (_a.label) {
619
+ case 0: return [4 /*yield*/, this.bxbFetch({
620
+ method: 'GET',
621
+ headers: userId
622
+ ? {
623
+ 'Content-Type': 'application/json',
624
+ 'IKE-App-User-Id': userId,
625
+ }
626
+ : {
627
+ 'Content-Type': 'application/json',
628
+ },
629
+ }, userId)];
630
+ case 1:
631
+ response = _a.sent();
632
+ return [2 /*return*/, response.json()];
633
+ }
634
+ });
635
+ });
636
+ };
614
637
  return IKEAppUserApi;
615
638
  }(bxb_api_1.default));
616
639
  exports.default = IKEAppUserApi;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytexbyte/ike-app-api",
3
- "version": "1.0.72",
3
+ "version": "1.0.73",
4
4
  "description": "app api",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -76,4 +76,4 @@
76
76
  "tsutils": "^2.29.0",
77
77
  "wrappy": "^1.0.2"
78
78
  }
79
- }
79
+ }