@bytexbyte/ike-app-api 1.0.82 → 1.0.84
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 +4 -4
- package/lib/App.js +3 -3
- package/lib/Auth/index.d.ts +2 -2
- package/lib/Auth/index.js +3 -3
- package/lib/Auth/type.d.ts +11 -11
- package/lib/Batch/index.d.ts +4 -4
- package/lib/Batch/index.js +3 -3
- package/lib/BleConnectionErrorLog/index.d.ts +2 -2
- package/lib/BleConnectionErrorLog/index.js +3 -3
- package/lib/Contract/index.js +3 -3
- package/lib/DigitalCustomization/index.d.ts +3 -3
- package/lib/DigitalCustomization/index.js +3 -3
- package/lib/File/UploadFileType.js +1 -1
- package/lib/File/index.d.ts +4 -4
- package/lib/File/index.js +8 -8
- package/lib/InAppNotification/index.js +3 -3
- package/lib/InAppNotification/type.d.ts +7 -7
- package/lib/Incode/index.js +15 -15
- package/lib/Incode/type.d.ts +2 -2
- package/lib/Mfa/index.d.ts +6 -6
- package/lib/Mfa/index.js +3 -3
- package/lib/Product/index.js +3 -3
- package/lib/Product/type.d.ts +6 -1
- package/lib/Redeem/index.d.ts +3 -3
- package/lib/Redeem/index.js +3 -3
- package/lib/RegisterDeviceCode/index.d.ts +2 -2
- package/lib/RegisterDeviceCode/index.js +3 -3
- package/lib/Rsa/index.js +3 -3
- package/lib/Scan/index.d.ts +4 -4
- package/lib/Scan/index.js +3 -3
- package/lib/Tags/index.d.ts +14 -14
- package/lib/Tags/index.js +3 -3
- package/lib/TouHistory/index.js +3 -3
- package/lib/User/index.d.ts +40 -18
- package/lib/User/index.js +77 -3
- package/lib/index.js +3 -3
- package/lib/types.d.ts +53 -53
- package/package.json +2 -2
package/lib/App.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import BxBApi from '@bytexbyte/bxb-api';
|
|
2
|
-
|
|
2
|
+
type GetVersionResult = {
|
|
3
3
|
version: string;
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
type GetMaintenanceVersionResult = {
|
|
6
6
|
version: string;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type GetCheckNetwork = {
|
|
9
9
|
message: string;
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
type GetConfig = {
|
|
12
12
|
isRewardEnabled: boolean;
|
|
13
13
|
};
|
|
14
14
|
declare class IKEAppApi extends BxBApi {
|
package/lib/App.js
CHANGED
|
@@ -35,12 +35,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
37
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
38
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
39
|
-
return g =
|
|
38
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
39
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
40
40
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
41
41
|
function step(op) {
|
|
42
42
|
if (f) throw new TypeError("Generator is already executing.");
|
|
43
|
-
while (_) try {
|
|
43
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
44
44
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
45
45
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
46
46
|
switch (op[0]) {
|
package/lib/Auth/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import BxBApi from '@bytexbyte/bxb-api';
|
|
2
2
|
import { SignInAppleMobile, SignInEmailBiometrics, SignInEmailPassword, SignInFacebookMobile, SignInGoogleAndroid, SignInGoogleIos, SignInKyc, SignInPhoneBiometrics, SignInPhoneOTP, SignInPhoneWebAuthn } from './type';
|
|
3
|
-
|
|
3
|
+
type User = {
|
|
4
4
|
id: string;
|
|
5
5
|
image: string | null;
|
|
6
6
|
email: string | null;
|
|
@@ -18,7 +18,7 @@ declare type User = {
|
|
|
18
18
|
isAgeVerified: boolean;
|
|
19
19
|
incodeId: string | null;
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
type Session = {
|
|
22
22
|
expires?: Date;
|
|
23
23
|
user?: User;
|
|
24
24
|
};
|
package/lib/Auth/index.js
CHANGED
|
@@ -35,12 +35,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
37
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
38
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
39
|
-
return g =
|
|
38
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
39
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
40
40
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
41
41
|
function step(op) {
|
|
42
42
|
if (f) throw new TypeError("Generator is already executing.");
|
|
43
|
-
while (_) try {
|
|
43
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
44
44
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
45
45
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
46
46
|
switch (op[0]) {
|
package/lib/Auth/type.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type SignInEmailPassword = (provider: 'email-password', form: {
|
|
2
2
|
email: string;
|
|
3
3
|
password: string;
|
|
4
4
|
csrfToken?: string;
|
|
@@ -9,7 +9,7 @@ export declare type SignInEmailPassword = (provider: 'email-password', form: {
|
|
|
9
9
|
id?: undefined;
|
|
10
10
|
error: 'Authentication error.' | 'Field(s) cannot be empty.' | 'Email not found.' | 'Email not verified.' | 'Email associated with third-party login.' | 'Password incorrect.' | 'URL not found.';
|
|
11
11
|
}>;
|
|
12
|
-
export
|
|
12
|
+
export type SignInGoogleIos = (provider: 'google-ios', form: {
|
|
13
13
|
scope: string;
|
|
14
14
|
token: string;
|
|
15
15
|
csrfToken?: string;
|
|
@@ -20,7 +20,7 @@ export declare type SignInGoogleIos = (provider: 'google-ios', form: {
|
|
|
20
20
|
id?: undefined;
|
|
21
21
|
error: 'Authentication error.' | 'Field(s) cannot be empty.' | 'URL not found.';
|
|
22
22
|
}>;
|
|
23
|
-
export
|
|
23
|
+
export type SignInGoogleAndroid = (provider: 'google-android', form: {
|
|
24
24
|
scope: string;
|
|
25
25
|
token: string;
|
|
26
26
|
csrfToken?: string;
|
|
@@ -31,7 +31,7 @@ export declare type SignInGoogleAndroid = (provider: 'google-android', form: {
|
|
|
31
31
|
id?: undefined;
|
|
32
32
|
error: 'Authentication error.' | 'Field(s) cannot be empty.' | 'URL not found.';
|
|
33
33
|
}>;
|
|
34
|
-
export
|
|
34
|
+
export type SignInFacebookMobile = (provider: 'facebook-mobile', form: {
|
|
35
35
|
scope: string;
|
|
36
36
|
token: string;
|
|
37
37
|
expires_at: string;
|
|
@@ -43,7 +43,7 @@ export declare type SignInFacebookMobile = (provider: 'facebook-mobile', form: {
|
|
|
43
43
|
id?: undefined;
|
|
44
44
|
error: 'Authentication error.' | 'Field(s) cannot be empty.' | 'payload error.' | 'URL not found.';
|
|
45
45
|
}>;
|
|
46
|
-
export
|
|
46
|
+
export type SignInAppleMobile = (provider: 'apple-mobile', form: {
|
|
47
47
|
token: string;
|
|
48
48
|
account_token: string;
|
|
49
49
|
providerAccountId: string;
|
|
@@ -58,7 +58,7 @@ export declare type SignInAppleMobile = (provider: 'apple-mobile', form: {
|
|
|
58
58
|
id?: undefined;
|
|
59
59
|
error: 'Authentication error.' | 'Field(s) cannot be empty.' | 'URL not found.';
|
|
60
60
|
}>;
|
|
61
|
-
export
|
|
61
|
+
export type SignInEmailBiometrics = (provider: 'email-biometrics', form: {
|
|
62
62
|
publicKey: string;
|
|
63
63
|
id: string;
|
|
64
64
|
signature: string;
|
|
@@ -70,7 +70,7 @@ export declare type SignInEmailBiometrics = (provider: 'email-biometrics', form:
|
|
|
70
70
|
id?: undefined;
|
|
71
71
|
error: 'Authentication error.' | 'Field(s) cannot be empty.' | 'id not found.' | 'Email not verified.' | 'Sign in to turn on biometrics.' | 'New device login requires password credentials.' | 'signature error.' | 'URL not found.';
|
|
72
72
|
}>;
|
|
73
|
-
export
|
|
73
|
+
export type SignInKyc = (provider: 'kyc', form: {
|
|
74
74
|
kycId: string;
|
|
75
75
|
firstName: string;
|
|
76
76
|
lastName: string;
|
|
@@ -82,7 +82,7 @@ export declare type SignInKyc = (provider: 'kyc', form: {
|
|
|
82
82
|
id?: undefined;
|
|
83
83
|
error: 'Authentication error.' | 'Field(s) cannot be empty.' | 'KYC ID not verified.' | 'signature error.' | 'URL not found.';
|
|
84
84
|
}>;
|
|
85
|
-
export
|
|
85
|
+
export type SignInPhoneOTP = (provider: 'phone-otp', form: {
|
|
86
86
|
phone: string;
|
|
87
87
|
code: string;
|
|
88
88
|
csrfToken?: string;
|
|
@@ -92,7 +92,7 @@ export declare type SignInPhoneOTP = (provider: 'phone-otp', form: {
|
|
|
92
92
|
} | {
|
|
93
93
|
error: 'Authentication error.' | 'Field(s) cannot be empty.' | 'OTP incorrect';
|
|
94
94
|
}>;
|
|
95
|
-
export
|
|
95
|
+
export type SignInPhoneBiometrics = (provider: 'phone-biometrics', form: {
|
|
96
96
|
publicKey: string;
|
|
97
97
|
id: string;
|
|
98
98
|
signature: string;
|
|
@@ -103,7 +103,7 @@ export declare type SignInPhoneBiometrics = (provider: 'phone-biometrics', form:
|
|
|
103
103
|
} | {
|
|
104
104
|
error: 'Authentication error.' | 'Field(s) cannot be empty.' | 'id not found.' | 'Sign in to turn on biometrics.' | 'New device login requires password credentials.' | 'signature error.' | 'URL not found.';
|
|
105
105
|
}>;
|
|
106
|
-
export
|
|
106
|
+
export type SignInPhoneWebAuthn = (provider: 'phone-webauthn', form: {
|
|
107
107
|
phone: string;
|
|
108
108
|
authResp: any;
|
|
109
109
|
expectedOrigin?: string;
|
|
@@ -115,4 +115,4 @@ export declare type SignInPhoneWebAuthn = (provider: 'phone-webauthn', form: {
|
|
|
115
115
|
} | {
|
|
116
116
|
error: 'Authentication error.' | 'Field(s) cannot be empty.' | 'User not found.' | 'Authenticator not found.' | 'Authentication verification failed.';
|
|
117
117
|
}>;
|
|
118
|
-
export
|
|
118
|
+
export type SignIn = SignInEmailPassword | SignInGoogleIos | SignInGoogleAndroid | SignInFacebookMobile | SignInAppleMobile | SignInEmailBiometrics | SignInKyc | SignInPhoneOTP | SignInPhoneBiometrics | SignInPhoneWebAuthn;
|
package/lib/Batch/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import BxBApi from '@bytexbyte/bxb-api';
|
|
2
2
|
import { ikeApi } from '../config';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
type PutBody = Parameters<typeof ikeApi.batch.assignToMember>[1];
|
|
4
|
+
type PutResult = Awaited<ReturnType<typeof ikeApi.batch.assignToMember>>;
|
|
5
|
+
type RenamePutBody = Parameters<typeof ikeApi.batch.rename>[1];
|
|
6
|
+
type RenamePutResult = Awaited<ReturnType<typeof ikeApi.batch.rename>>;
|
|
7
7
|
declare enum ScanningStatusType {
|
|
8
8
|
LOADING = 0,
|
|
9
9
|
EMPTY = 1,
|
package/lib/Batch/index.js
CHANGED
|
@@ -25,12 +25,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
27
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
28
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
29
|
-
return g =
|
|
28
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
29
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
30
30
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
31
31
|
function step(op) {
|
|
32
32
|
if (f) throw new TypeError("Generator is already executing.");
|
|
33
|
-
while (_) try {
|
|
33
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
34
34
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
35
35
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
36
36
|
switch (op[0]) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import BxBApi from '@bytexbyte/bxb-api';
|
|
2
2
|
import { BleConnectionErrorLog } from '../types';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type BleConnectionErrorLogBody = Pick<BleConnectionErrorLog, 'title' | 'detail'>;
|
|
4
|
+
type BleConnectionErrorLogResult = {
|
|
5
5
|
bleConnectionErrorLog: BleConnectionErrorLog;
|
|
6
6
|
error?: undefined;
|
|
7
7
|
} | {
|
|
@@ -24,12 +24,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
26
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
-
return g =
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
28
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
29
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
30
|
function step(op) {
|
|
31
31
|
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (_) try {
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
33
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
34
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
35
|
switch (op[0]) {
|
package/lib/Contract/index.js
CHANGED
|
@@ -25,12 +25,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
27
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
28
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
29
|
-
return g =
|
|
28
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
29
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
30
30
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
31
31
|
function step(op) {
|
|
32
32
|
if (f) throw new TypeError("Generator is already executing.");
|
|
33
|
-
while (_) try {
|
|
33
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
34
34
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
35
35
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
36
36
|
switch (op[0]) {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import BxBApi from '@bytexbyte/bxb-api';
|
|
2
2
|
import { ShopifyProductType } from './shopifyType';
|
|
3
|
-
|
|
3
|
+
type GetShopifyResult = {
|
|
4
4
|
shopifyStore: {
|
|
5
5
|
name: string;
|
|
6
6
|
};
|
|
7
7
|
shopifyProducts: ShopifyProductType[];
|
|
8
8
|
} | null;
|
|
9
|
-
|
|
9
|
+
type CreateDraftOrderResult = {
|
|
10
10
|
invoice_url?: string;
|
|
11
11
|
error?: 'Digital customization id is missing.' | 'Store access token not found.' | 'Draft order id not found.' | 'Unkown error.';
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
type PayReferralPointResult = {
|
|
14
14
|
success: boolean;
|
|
15
15
|
error?: 'pay point failed.' | 'Missing digitalCustomizationId.';
|
|
16
16
|
};
|
|
@@ -24,12 +24,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
26
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
-
return g =
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
28
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
29
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
30
|
function step(op) {
|
|
31
31
|
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (_) try {
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
33
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
34
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
35
|
switch (op[0]) {
|
|
@@ -4,7 +4,7 @@ exports.decodeBase64 = exports.getUploadFileStr = exports.UPLOAD_FILE_TYPE = voi
|
|
|
4
4
|
var UPLOAD_FILE_TYPE;
|
|
5
5
|
(function (UPLOAD_FILE_TYPE) {
|
|
6
6
|
UPLOAD_FILE_TYPE[UPLOAD_FILE_TYPE["GENERAL_USER_IMAGE"] = 0] = "GENERAL_USER_IMAGE";
|
|
7
|
-
})(UPLOAD_FILE_TYPE
|
|
7
|
+
})(UPLOAD_FILE_TYPE || (exports.UPLOAD_FILE_TYPE = UPLOAD_FILE_TYPE = {}));
|
|
8
8
|
var getUploadFileStr = function (type) {
|
|
9
9
|
var GENERAL_USER_IMAGE = UPLOAD_FILE_TYPE.GENERAL_USER_IMAGE;
|
|
10
10
|
switch (type) {
|
package/lib/File/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import BxBApi from '@bytexbyte/bxb-api';
|
|
2
|
-
|
|
2
|
+
type S3UploadBody = {
|
|
3
3
|
name: string;
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
type S3UploadResult = {
|
|
6
6
|
downloadUrl: string;
|
|
7
7
|
url: string;
|
|
8
8
|
error?: undefined;
|
|
@@ -11,10 +11,10 @@ declare type S3UploadResult = {
|
|
|
11
11
|
url?: undefined;
|
|
12
12
|
error: 'session not found.';
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
type UploadToS3Result = {
|
|
15
15
|
status: number;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
type UploadResult = {
|
|
18
18
|
url: string;
|
|
19
19
|
error?: undefined;
|
|
20
20
|
} | {
|
package/lib/File/index.js
CHANGED
|
@@ -24,12 +24,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
26
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
-
return g =
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
28
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
29
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
30
|
function step(op) {
|
|
31
31
|
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (_) try {
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
33
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
34
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
35
|
switch (op[0]) {
|
|
@@ -69,11 +69,11 @@ var IKEAppFileApi = /** @class */ (function (_super) {
|
|
|
69
69
|
}) || this;
|
|
70
70
|
}
|
|
71
71
|
IKEAppFileApi.prototype.getS3UploadUrl = function (_a) {
|
|
72
|
-
|
|
73
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
72
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
74
73
|
var response;
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
var name = _b.name;
|
|
75
|
+
return __generator(this, function (_c) {
|
|
76
|
+
switch (_c.label) {
|
|
77
77
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
78
78
|
method: 'POST',
|
|
79
79
|
headers: {
|
|
@@ -84,7 +84,7 @@ var IKEAppFileApi = /** @class */ (function (_super) {
|
|
|
84
84
|
}),
|
|
85
85
|
})];
|
|
86
86
|
case 1:
|
|
87
|
-
response =
|
|
87
|
+
response = _c.sent();
|
|
88
88
|
return [2 /*return*/, response.json()];
|
|
89
89
|
}
|
|
90
90
|
});
|
|
@@ -24,12 +24,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
26
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
-
return g =
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
28
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
29
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
30
|
function step(op) {
|
|
31
31
|
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (_) try {
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
33
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
34
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
35
|
switch (op[0]) {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type CreateInAppNotificationResult = {
|
|
2
2
|
success: 'ok';
|
|
3
3
|
} | {
|
|
4
4
|
error: 'You are not authorized to call this API.' | 'Type is required.' | 'UserId is required.' | 'PushNotificationId is required.';
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type PutInAppNotificationsResult = {
|
|
7
7
|
success: 'ok';
|
|
8
8
|
error?: undefined;
|
|
9
9
|
} | {
|
|
10
10
|
success?: undefined;
|
|
11
11
|
error: 'You are not authorized to call this API.';
|
|
12
12
|
};
|
|
13
|
-
export
|
|
14
|
-
export
|
|
13
|
+
export type DeleteInAppNotificationsResult = PutInAppNotificationsResult;
|
|
14
|
+
export type PutInAppNotificationResult = PutInAppNotificationsResult | {
|
|
15
15
|
error: 'Id is required.';
|
|
16
16
|
};
|
|
17
|
-
export
|
|
18
|
-
export
|
|
17
|
+
export type DeleteInAppNotificationResult = PutInAppNotificationResult;
|
|
18
|
+
export type CheckReadedInAppNotificationsResult = {
|
|
19
19
|
isAllRead: boolean;
|
|
20
20
|
error?: undefined;
|
|
21
21
|
} | {
|
|
22
22
|
isAllRead?: undefined;
|
|
23
23
|
error: 'You are not authorized to call this API.';
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type InAppNotificationType = 'pushNotification';
|
package/lib/Incode/index.js
CHANGED
|
@@ -24,12 +24,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
26
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
-
return g =
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
28
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
29
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
30
|
function step(op) {
|
|
31
31
|
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (_) try {
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
33
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
34
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
35
|
switch (op[0]) {
|
|
@@ -90,9 +90,9 @@ var IKEAppIncodeApi = /** @class */ (function (_super) {
|
|
|
90
90
|
* GET /api/incode/start — optional `flow` matches backend (`faceAgeEstimation`, `faceAgeCheck`, `faceAgeCapture`, …).
|
|
91
91
|
*/
|
|
92
92
|
IKEAppIncodeApi.prototype.start = function (options) {
|
|
93
|
-
var _a;
|
|
94
93
|
return __awaiter(this, void 0, void 0, function () {
|
|
95
94
|
var flow, path, response;
|
|
95
|
+
var _a;
|
|
96
96
|
return __generator(this, function (_b) {
|
|
97
97
|
switch (_b.label) {
|
|
98
98
|
case 0:
|
|
@@ -112,11 +112,11 @@ var IKEAppIncodeApi = /** @class */ (function (_super) {
|
|
|
112
112
|
});
|
|
113
113
|
};
|
|
114
114
|
IKEAppIncodeApi.prototype.finish = function (_a) {
|
|
115
|
-
|
|
116
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
115
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
117
116
|
var params, response;
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
var token = _b.token;
|
|
118
|
+
return __generator(this, function (_c) {
|
|
119
|
+
switch (_c.label) {
|
|
120
120
|
case 0:
|
|
121
121
|
params = new URLSearchParams({ token: token });
|
|
122
122
|
return [4 /*yield*/, this.bxbFetch({
|
|
@@ -126,7 +126,7 @@ var IKEAppIncodeApi = /** @class */ (function (_super) {
|
|
|
126
126
|
},
|
|
127
127
|
}, "finish?".concat(params.toString()))];
|
|
128
128
|
case 1:
|
|
129
|
-
response =
|
|
129
|
+
response = _c.sent();
|
|
130
130
|
return [2 /*return*/, response.json()];
|
|
131
131
|
}
|
|
132
132
|
});
|
|
@@ -136,9 +136,9 @@ var IKEAppIncodeApi = /** @class */ (function (_super) {
|
|
|
136
136
|
* GET /api/incode/score — proxies Incode `omni/get/score` (session `token` as query param).
|
|
137
137
|
*/
|
|
138
138
|
IKEAppIncodeApi.prototype.score = function (params) {
|
|
139
|
-
var _a;
|
|
140
139
|
return __awaiter(this, void 0, void 0, function () {
|
|
141
140
|
var search, iv, response;
|
|
141
|
+
var _a;
|
|
142
142
|
return __generator(this, function (_b) {
|
|
143
143
|
switch (_b.label) {
|
|
144
144
|
case 0:
|
|
@@ -161,11 +161,11 @@ var IKEAppIncodeApi = /** @class */ (function (_super) {
|
|
|
161
161
|
});
|
|
162
162
|
};
|
|
163
163
|
IKEAppIncodeApi.prototype.approve = function (_a) {
|
|
164
|
-
|
|
165
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
164
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
166
165
|
var params, iv, response;
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
var id = _b.id, token = _b.token, uniqueId = _b.uniqueId, interviewId = _b.interviewId;
|
|
167
|
+
return __generator(this, function (_c) {
|
|
168
|
+
switch (_c.label) {
|
|
169
169
|
case 0:
|
|
170
170
|
params = new URLSearchParams({ id: id, token: token, uniqueId: uniqueId });
|
|
171
171
|
iv = interviewId === null || interviewId === void 0 ? void 0 : interviewId.trim();
|
|
@@ -179,7 +179,7 @@ var IKEAppIncodeApi = /** @class */ (function (_super) {
|
|
|
179
179
|
},
|
|
180
180
|
}, "approve?".concat(params.toString()))];
|
|
181
181
|
case 1:
|
|
182
|
-
response =
|
|
182
|
+
response = _c.sent();
|
|
183
183
|
return [2 /*return*/, response.json()];
|
|
184
184
|
}
|
|
185
185
|
});
|
package/lib/Incode/type.d.ts
CHANGED
package/lib/Mfa/index.d.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import BxBApi from '@bytexbyte/bxb-api';
|
|
2
|
-
|
|
2
|
+
type SendBody = {
|
|
3
3
|
provider: 'email' | 'phone';
|
|
4
4
|
identifier: string;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
type SendResult = {
|
|
7
7
|
error?: 'You are not logged in.';
|
|
8
8
|
endTimeMilliseconds?: undefined;
|
|
9
9
|
} | {
|
|
10
10
|
error: 'Code already exists. Please check your email or messages.';
|
|
11
11
|
endTimeMilliseconds: number;
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
type VerifyBody = {
|
|
14
14
|
code: number;
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
type VerifyResult = {
|
|
17
17
|
error?: 'You are not logged in.' | 'invalid code' | 'Timeout.';
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
type RedeemBody = {
|
|
20
20
|
address: string;
|
|
21
21
|
tokenId: string;
|
|
22
22
|
digitalCustomizationId: number;
|
|
23
23
|
};
|
|
24
|
-
|
|
24
|
+
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 {
|
package/lib/Mfa/index.js
CHANGED
|
@@ -24,12 +24,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
26
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
-
return g =
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
28
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
29
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
30
|
function step(op) {
|
|
31
31
|
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (_) try {
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
33
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
34
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
35
|
switch (op[0]) {
|
package/lib/Product/index.js
CHANGED
|
@@ -24,12 +24,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
26
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
-
return g =
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
28
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
29
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
30
|
function step(op) {
|
|
31
31
|
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (_) try {
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
33
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
34
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
35
|
switch (op[0]) {
|
package/lib/Product/type.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Product = {
|
|
2
|
+
batchId?: string;
|
|
2
3
|
batchName: string;
|
|
3
4
|
tokenId: string;
|
|
4
5
|
name: string;
|
|
@@ -12,4 +13,8 @@ export declare type Product = {
|
|
|
12
13
|
deviceStandbyTime: number;
|
|
13
14
|
isScanningAllow: boolean;
|
|
14
15
|
vendor: string;
|
|
16
|
+
/** True if this tag/device has a row in `portfolio` (owned by someone). */
|
|
17
|
+
portfolioClaimed: boolean;
|
|
18
|
+
/** Present only when the request is authenticated; true if the owner is the current user. */
|
|
19
|
+
portfolioOwnedByCurrentUser?: boolean;
|
|
15
20
|
};
|
package/lib/Redeem/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import BxBApi from '@bytexbyte/bxb-api';
|
|
2
|
-
|
|
2
|
+
type FreeForm = {
|
|
3
3
|
id: number;
|
|
4
4
|
value: string;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
type RedeemBody = {
|
|
7
7
|
email: string;
|
|
8
8
|
goldenTicketId: number;
|
|
9
9
|
tokenId: string;
|
|
10
10
|
freeForm: FreeForm[];
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
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 {
|