@bytexbyte/ike-app-api 1.0.72 → 1.0.74
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 +1 -1
- package/lib/Auth/index.d.ts +5 -3
- package/lib/Batch/index.d.ts +1 -1
- package/lib/BleConnectionErrorLog/index.d.ts +1 -1
- package/lib/Contract/index.d.ts +1 -1
- package/lib/DigitalCustomization/index.d.ts +1 -1
- package/lib/File/index.d.ts +1 -1
- package/lib/Mfa/index.d.ts +1 -1
- package/lib/Product/index.d.ts +1 -1
- package/lib/Redeem/index.d.ts +1 -1
- package/lib/RegisterDeviceCode/index.d.ts +1 -1
- package/lib/Rsa/index.d.ts +1 -1
- package/lib/Scan/index.d.ts +1 -1
- package/lib/Tags/index.d.ts +1 -1
- package/lib/User/index.d.ts +10 -2
- package/lib/User/index.js +23 -0
- package/lib/index.js +8 -1
- package/package.json +1 -1
package/lib/App.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ declare type GetConfig = {
|
|
|
12
12
|
isRewardEnabled: boolean;
|
|
13
13
|
};
|
|
14
14
|
declare class IKEAppApi extends BxBApi {
|
|
15
|
-
constructor({ host, credentials, onSuccess, onError }: {
|
|
15
|
+
constructor({ host, credentials, onSuccess, onError, }: {
|
|
16
16
|
host: string;
|
|
17
17
|
credentials?: RequestCredentials;
|
|
18
18
|
onSuccess?: () => void;
|
package/lib/Auth/index.d.ts
CHANGED
|
@@ -156,14 +156,16 @@ declare class IKEAppAuthApi extends BxBApi {
|
|
|
156
156
|
error: 'Phone number is required.' | 'OTP already exists. Please check your messages.';
|
|
157
157
|
}>;
|
|
158
158
|
verifyIdentity(body: {
|
|
159
|
-
phone
|
|
159
|
+
phone?: string;
|
|
160
|
+
incodeId?: string;
|
|
160
161
|
}): Promise<{
|
|
161
162
|
success: 'ok';
|
|
162
163
|
} | {
|
|
163
|
-
error: '
|
|
164
|
+
error: 'Field(s) cannot be empty.' | 'User not found.';
|
|
164
165
|
}>;
|
|
165
166
|
verifyAge(body: {
|
|
166
|
-
phone
|
|
167
|
+
phone?: string;
|
|
168
|
+
incodeId?: string;
|
|
167
169
|
birthDate: string;
|
|
168
170
|
}): Promise<{
|
|
169
171
|
isVerified: boolean;
|
package/lib/Batch/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ declare enum ScanningStatusType {
|
|
|
12
12
|
MIXED = 4
|
|
13
13
|
}
|
|
14
14
|
declare class IKEAppBatchApi extends BxBApi {
|
|
15
|
-
constructor({ host, credentials, onSuccess, onError }: {
|
|
15
|
+
constructor({ host, credentials, onSuccess, onError, }: {
|
|
16
16
|
host: string;
|
|
17
17
|
credentials?: RequestCredentials;
|
|
18
18
|
onSuccess?: () => void;
|
|
@@ -9,7 +9,7 @@ declare type BleConnectionErrorLogResult = {
|
|
|
9
9
|
error: 'You are not logged in.' | 'Missing title.' | 'Missing detail.' | 'Server timeout.';
|
|
10
10
|
};
|
|
11
11
|
declare class IKEAppBleConnectionErrorLogApi extends BxBApi {
|
|
12
|
-
constructor({ host, credentials, onSuccess, onError }: {
|
|
12
|
+
constructor({ host, credentials, onSuccess, onError, }: {
|
|
13
13
|
host: string;
|
|
14
14
|
credentials?: RequestCredentials;
|
|
15
15
|
onSuccess?: () => void;
|
package/lib/Contract/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import BxBApi from '@bytexbyte/bxb-api';
|
|
2
2
|
declare class IKEAppContractApi extends BxBApi {
|
|
3
|
-
constructor({ host, credentials, onSuccess, onError }: {
|
|
3
|
+
constructor({ host, credentials, onSuccess, onError, }: {
|
|
4
4
|
host: string;
|
|
5
5
|
credentials?: RequestCredentials;
|
|
6
6
|
onSuccess?: () => void;
|
|
@@ -15,7 +15,7 @@ declare type PayReferralPointResult = {
|
|
|
15
15
|
error?: 'pay point failed.' | 'Missing digitalCustomizationId.';
|
|
16
16
|
};
|
|
17
17
|
declare class IKEAppDigitalCustomizationApi extends BxBApi {
|
|
18
|
-
constructor({ host, credentials, onSuccess, onError }: {
|
|
18
|
+
constructor({ host, credentials, onSuccess, onError, }: {
|
|
19
19
|
host: string;
|
|
20
20
|
credentials?: RequestCredentials;
|
|
21
21
|
onSuccess?: () => void;
|
package/lib/File/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ declare type UploadResult = {
|
|
|
22
22
|
error: 'fail to upload';
|
|
23
23
|
};
|
|
24
24
|
declare class IKEAppFileApi extends BxBApi {
|
|
25
|
-
constructor({ host, credentials, onSuccess, onError }: {
|
|
25
|
+
constructor({ host, credentials, onSuccess, onError, }: {
|
|
26
26
|
host: string;
|
|
27
27
|
credentials?: RequestCredentials;
|
|
28
28
|
onSuccess?: () => void;
|
package/lib/Mfa/index.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ declare type RedeemResult = {
|
|
|
25
25
|
error?: 'Invalid tag.' | 'Missing blockChainTokenId.' | 'Status error.' | 'NFT submission not found.' | 'Contract not found.' | 'Unknown error.' | 'This is not your tag.' | 'You are not logged in.' | 'Transfer failed: no transaction hash returned.';
|
|
26
26
|
};
|
|
27
27
|
declare class IKEAppMfaApi extends BxBApi {
|
|
28
|
-
constructor({ host, credentials, onSuccess, onError }: {
|
|
28
|
+
constructor({ host, credentials, onSuccess, onError, }: {
|
|
29
29
|
host: string;
|
|
30
30
|
credentials?: RequestCredentials;
|
|
31
31
|
onSuccess?: () => void;
|
package/lib/Product/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import BxBApi from '@bytexbyte/bxb-api';
|
|
2
2
|
import { Product } from './type';
|
|
3
3
|
declare class IKEAppProductApi extends BxBApi {
|
|
4
|
-
constructor({ host, credentials, onSuccess, onError }: {
|
|
4
|
+
constructor({ host, credentials, onSuccess, onError, }: {
|
|
5
5
|
host: string;
|
|
6
6
|
credentials?: RequestCredentials;
|
|
7
7
|
onSuccess?: () => void;
|
package/lib/Redeem/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ declare type RedeemResult = {
|
|
|
13
13
|
error?: 'You are not logged in.' | 'Contact email not found.' | 'batch not found.' | 'company not found.' | 'This is not your tag.';
|
|
14
14
|
};
|
|
15
15
|
declare class IKEAppRedeemApi extends BxBApi {
|
|
16
|
-
constructor({ host, credentials, onSuccess, onError }: {
|
|
16
|
+
constructor({ host, credentials, onSuccess, onError, }: {
|
|
17
17
|
host: string;
|
|
18
18
|
credentials?: RequestCredentials;
|
|
19
19
|
onSuccess?: () => void;
|
|
@@ -9,7 +9,7 @@ declare type RegisterResult = {
|
|
|
9
9
|
error?: 'You are not logged in.' | 'Invalid request';
|
|
10
10
|
};
|
|
11
11
|
declare class IKEAppRegisterDeviceCodeApi extends BxBApi {
|
|
12
|
-
constructor({ host, credentials, onSuccess, onError }: {
|
|
12
|
+
constructor({ host, credentials, onSuccess, onError, }: {
|
|
13
13
|
host: string;
|
|
14
14
|
credentials?: RequestCredentials;
|
|
15
15
|
onSuccess?: () => void;
|
package/lib/Rsa/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import BxBApi from '@bytexbyte/bxb-api';
|
|
2
2
|
declare class IKEAppRsaApi extends BxBApi {
|
|
3
|
-
constructor({ host, credentials, onSuccess, onError }: {
|
|
3
|
+
constructor({ host, credentials, onSuccess, onError, }: {
|
|
4
4
|
host: string;
|
|
5
5
|
credentials?: RequestCredentials;
|
|
6
6
|
onSuccess?: () => void;
|
package/lib/Scan/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ declare type UpdateResult = {
|
|
|
26
26
|
error?: 'scanId type error.' | 'scanId not found.' | 'This is a IKE tag, You are not authorized to call this API.' | 'Scan not found.';
|
|
27
27
|
};
|
|
28
28
|
declare class IKEAppScanApi extends BxBApi {
|
|
29
|
-
constructor({ host, credentials, onSuccess, onError }: {
|
|
29
|
+
constructor({ host, credentials, onSuccess, onError, }: {
|
|
30
30
|
host: string;
|
|
31
31
|
credentials?: RequestCredentials;
|
|
32
32
|
onSuccess?: () => void;
|
package/lib/Tags/index.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ declare type PutUpdateDisplayNameResult = {
|
|
|
54
54
|
};
|
|
55
55
|
declare type TagCheckListStatus = 'pass' | 'fail' | 'none';
|
|
56
56
|
declare class IKEAppTagsApi extends BxBApi {
|
|
57
|
-
constructor({ host, credentials, onSuccess, onError }: {
|
|
57
|
+
constructor({ host, credentials, onSuccess, onError, }: {
|
|
58
58
|
host: string;
|
|
59
59
|
credentials?: RequestCredentials;
|
|
60
60
|
onSuccess?: () => void;
|
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;
|
|
@@ -190,10 +197,11 @@ declare class IKEAppUserApi extends BxBApi {
|
|
|
190
197
|
token?: string;
|
|
191
198
|
interviewId?: string;
|
|
192
199
|
incodeId?: string;
|
|
193
|
-
}): Promise<UpdateResult & {
|
|
200
|
+
}): Promise<(UpdateResult & {
|
|
194
201
|
incodeId: string | null;
|
|
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/lib/index.js
CHANGED
|
@@ -96,7 +96,14 @@ var IKEAppApi = /** @class */ (function () {
|
|
|
96
96
|
this.contract = new Contract_1.default({ host: host, credentials: credentials, onSuccess: onSuccess, onError: onError });
|
|
97
97
|
this.rsa = new Rsa_1.default({ host: host, credentials: credentials, onSuccess: onSuccess, onError: onError });
|
|
98
98
|
this.product = new Product_1.default({ host: host, credentials: credentials, onSuccess: onSuccess, onError: onError });
|
|
99
|
-
this.inAppNotification = new InAppNotification_1.default({
|
|
99
|
+
this.inAppNotification = new InAppNotification_1.default({
|
|
100
|
+
host: host,
|
|
101
|
+
secretKey: secretKey,
|
|
102
|
+
secret: secret,
|
|
103
|
+
credentials: credentials,
|
|
104
|
+
onSuccess: onSuccess,
|
|
105
|
+
onError: onError,
|
|
106
|
+
});
|
|
100
107
|
this.incode = new Incode_1.default({ host: host, secretKey: secretKey, secret: secret, credentials: credentials, onSuccess: onSuccess, onError: onError });
|
|
101
108
|
this.bleConnectionErrorLog = new BleConnectionErrorLog_1.default({ host: host, credentials: credentials, onSuccess: onSuccess, onError: onError });
|
|
102
109
|
}
|