@bytexbyte/ike-app-api 1.0.71 → 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.
- package/lib/Product/type.d.ts +1 -0
- package/lib/User/index.d.ts +8 -0
- package/lib/User/index.js +23 -0
- package/package.json +2 -2
package/lib/Product/type.d.ts
CHANGED
package/lib/User/index.d.ts
CHANGED
|
@@ -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