@bytexbyte/ike-app-api 1.0.0 → 1.0.2
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.js +5 -4
- package/lib/Auth/index.d.ts +3 -3
- package/lib/Auth/index.js +32 -32
- package/lib/Batch/index.js +3 -3
- package/lib/Contract/index.js +2 -2
- package/lib/DigitalCustomization/index.js +6 -6
- package/lib/File/index.js +9 -6
- package/lib/InAppNotification/index.d.ts +3 -3
- package/lib/InAppNotification/index.js +1 -1
- package/lib/InAppNotification/type.d.ts +1 -1
- package/lib/Mfa/index.d.ts +1 -1
- package/lib/Mfa/index.js +7 -6
- package/lib/Redeem/index.js +5 -4
- package/lib/RegisterDeviceCode/index.js +4 -3
- package/lib/Scan/index.js +13 -10
- package/lib/Tags/index.d.ts +1 -1
- package/lib/Tags/index.js +63 -50
- package/lib/User/index.d.ts +1 -1
- package/lib/User/index.js +123 -95
- package/lib/config.js +2 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +0 -1
- package/lib/types.d.ts +11 -11
- package/lib/types.js +11 -11
- package/package.json +2 -2
package/lib/App.js
CHANGED
|
@@ -70,10 +70,11 @@ var IKEAppApi = /** @class */ (function (_super) {
|
|
|
70
70
|
var host = _a.host, onSuccess = _a.onSuccess, onError = _a.onError;
|
|
71
71
|
return _super.call(this, {
|
|
72
72
|
host: host,
|
|
73
|
-
secretKey: config_1.localSecretKey,
|
|
73
|
+
secretKey: config_1.localSecretKey,
|
|
74
|
+
secret: '',
|
|
74
75
|
moduleName: 'app',
|
|
75
76
|
onSuccess: onSuccess,
|
|
76
|
-
onError: onError
|
|
77
|
+
onError: onError,
|
|
77
78
|
}) || this;
|
|
78
79
|
}
|
|
79
80
|
IKEAppApi.prototype.getVersion = function () {
|
|
@@ -83,7 +84,7 @@ var IKEAppApi = /** @class */ (function (_super) {
|
|
|
83
84
|
switch (_a.label) {
|
|
84
85
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
85
86
|
method: 'GET',
|
|
86
|
-
headers: { 'Content-Type': 'application/json' }
|
|
87
|
+
headers: { 'Content-Type': 'application/json' },
|
|
87
88
|
}, 'version')];
|
|
88
89
|
case 1:
|
|
89
90
|
response = _a.sent();
|
|
@@ -99,7 +100,7 @@ var IKEAppApi = /** @class */ (function (_super) {
|
|
|
99
100
|
switch (_a.label) {
|
|
100
101
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
101
102
|
method: 'GET',
|
|
102
|
-
headers: { 'Content-Type': 'application/json' }
|
|
103
|
+
headers: { 'Content-Type': 'application/json' },
|
|
103
104
|
}, 'maintenance-version')];
|
|
104
105
|
case 1:
|
|
105
106
|
response = _a.sent();
|
package/lib/Auth/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ declare type Session = {
|
|
|
20
20
|
user: User;
|
|
21
21
|
} | null;
|
|
22
22
|
declare class IKEAppAuthApi extends BxBApi {
|
|
23
|
-
constructor({ host, secretKey, secret, onSuccess, onError }: {
|
|
23
|
+
constructor({ host, secretKey, secret, onSuccess, onError, }: {
|
|
24
24
|
host: string;
|
|
25
25
|
secretKey?: string;
|
|
26
26
|
secret?: string;
|
|
@@ -102,7 +102,7 @@ declare class IKEAppAuthApi extends BxBApi {
|
|
|
102
102
|
error?: undefined;
|
|
103
103
|
} | {
|
|
104
104
|
id?: undefined;
|
|
105
|
-
error: 'Field(s) cannot be empty.' | 'token not found.' | 'User not found.' | 'Request has expired.' |
|
|
105
|
+
error: 'Field(s) cannot be empty.' | 'token not found.' | 'User not found.' | 'Request has expired.' | 'Password requires at least 8 characters.' | 'Password requires at least one uppercase and one lowercase letter.' | 'Password must be in ASCII characters.' | 'Password requires at least one number.';
|
|
106
106
|
}>;
|
|
107
107
|
signIn(provider: Parameters<SignInEmailPassword>[0], form: Parameters<SignInEmailPassword>[1]): Promise<Awaited<ReturnType<SignInEmailPassword>>>;
|
|
108
108
|
signIn(provider: Parameters<SignInGoogleIos>[0], form: Parameters<SignInGoogleIos>[1]): Promise<Awaited<ReturnType<SignInGoogleIos>>>;
|
|
@@ -142,7 +142,7 @@ declare class IKEAppAuthApi extends BxBApi {
|
|
|
142
142
|
error?: undefined;
|
|
143
143
|
} | {
|
|
144
144
|
user?: undefined;
|
|
145
|
-
error: 'We couldn’t recognize a Facebook Login account with this email.' |
|
|
145
|
+
error: 'We couldn’t recognize a Facebook Login account with this email.' | 'Password requires at least 8 characters.' | 'Password requires at least one uppercase and one lowercase letter.' | 'Password must be in ASCII characters.' | 'Password requires at least one number.' | 'Email associated with other third-party logins.';
|
|
146
146
|
}>;
|
|
147
147
|
resetWalletPasscode(form: {
|
|
148
148
|
email: string;
|
package/lib/Auth/index.js
CHANGED
|
@@ -65,7 +65,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
65
65
|
var bxb_api_1 = require("@bytexbyte/bxb-api");
|
|
66
66
|
var config_1 = require("../config");
|
|
67
67
|
var toFormUrlencodedString = function (form) {
|
|
68
|
-
var searchParams = new URLSearchParams;
|
|
68
|
+
var searchParams = new URLSearchParams();
|
|
69
69
|
Object.keys(form).forEach(function (key) {
|
|
70
70
|
searchParams.append(key, form[key]);
|
|
71
71
|
});
|
|
@@ -81,7 +81,7 @@ var IKEAppAuthApi = /** @class */ (function (_super) {
|
|
|
81
81
|
secret: secret !== null && secret !== void 0 ? secret : '',
|
|
82
82
|
moduleName: 'auth',
|
|
83
83
|
onSuccess: onSuccess,
|
|
84
|
-
onError: onError
|
|
84
|
+
onError: onError,
|
|
85
85
|
}) || this;
|
|
86
86
|
}
|
|
87
87
|
IKEAppAuthApi.prototype.getCsrfToken = function () {
|
|
@@ -92,8 +92,8 @@ var IKEAppAuthApi = /** @class */ (function (_super) {
|
|
|
92
92
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
93
93
|
method: 'GET',
|
|
94
94
|
headers: {
|
|
95
|
-
'Content-Type': 'application/json'
|
|
96
|
-
}
|
|
95
|
+
'Content-Type': 'application/json',
|
|
96
|
+
},
|
|
97
97
|
}, 'csrf')];
|
|
98
98
|
case 1:
|
|
99
99
|
response = _a.sent();
|
|
@@ -110,9 +110,9 @@ var IKEAppAuthApi = /** @class */ (function (_super) {
|
|
|
110
110
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
111
111
|
method: 'POST',
|
|
112
112
|
headers: {
|
|
113
|
-
'Content-Type': 'application/json'
|
|
113
|
+
'Content-Type': 'application/json',
|
|
114
114
|
},
|
|
115
|
-
body: JSON.stringify(body)
|
|
115
|
+
body: JSON.stringify(body),
|
|
116
116
|
}, "verify/check")];
|
|
117
117
|
case 1:
|
|
118
118
|
response = _a.sent();
|
|
@@ -129,9 +129,9 @@ var IKEAppAuthApi = /** @class */ (function (_super) {
|
|
|
129
129
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
130
130
|
method: 'POST',
|
|
131
131
|
headers: {
|
|
132
|
-
'Content-Type': 'application/json'
|
|
132
|
+
'Content-Type': 'application/json',
|
|
133
133
|
},
|
|
134
|
-
body: JSON.stringify(form)
|
|
134
|
+
body: JSON.stringify(form),
|
|
135
135
|
}, "sign-up/".concat(provider))];
|
|
136
136
|
case 1:
|
|
137
137
|
response = _a.sent();
|
|
@@ -148,9 +148,9 @@ var IKEAppAuthApi = /** @class */ (function (_super) {
|
|
|
148
148
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
149
149
|
method: 'POST',
|
|
150
150
|
headers: {
|
|
151
|
-
'Content-Type': 'application/json'
|
|
151
|
+
'Content-Type': 'application/json',
|
|
152
152
|
},
|
|
153
|
-
body: JSON.stringify(form)
|
|
153
|
+
body: JSON.stringify(form),
|
|
154
154
|
}, "biometrics")];
|
|
155
155
|
case 1:
|
|
156
156
|
response = _a.sent();
|
|
@@ -167,7 +167,7 @@ var IKEAppAuthApi = /** @class */ (function (_super) {
|
|
|
167
167
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
168
168
|
method: 'DELETE',
|
|
169
169
|
headers: {
|
|
170
|
-
'Content-Type': 'application/json'
|
|
170
|
+
'Content-Type': 'application/json',
|
|
171
171
|
},
|
|
172
172
|
}, "biometrics")];
|
|
173
173
|
case 1:
|
|
@@ -185,9 +185,9 @@ var IKEAppAuthApi = /** @class */ (function (_super) {
|
|
|
185
185
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
186
186
|
method: 'POST',
|
|
187
187
|
headers: {
|
|
188
|
-
'Content-Type': 'application/json'
|
|
188
|
+
'Content-Type': 'application/json',
|
|
189
189
|
},
|
|
190
|
-
body: JSON.stringify(body)
|
|
190
|
+
body: JSON.stringify(body),
|
|
191
191
|
}, "send-verify/".concat(provider))];
|
|
192
192
|
case 1:
|
|
193
193
|
response = _a.sent();
|
|
@@ -204,9 +204,9 @@ var IKEAppAuthApi = /** @class */ (function (_super) {
|
|
|
204
204
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
205
205
|
method: 'POST',
|
|
206
206
|
headers: {
|
|
207
|
-
'Content-Type': 'application/json'
|
|
207
|
+
'Content-Type': 'application/json',
|
|
208
208
|
},
|
|
209
|
-
body: JSON.stringify(body)
|
|
209
|
+
body: JSON.stringify(body),
|
|
210
210
|
}, "verify/".concat(provider))];
|
|
211
211
|
case 1:
|
|
212
212
|
response = _a.sent();
|
|
@@ -223,9 +223,9 @@ var IKEAppAuthApi = /** @class */ (function (_super) {
|
|
|
223
223
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
224
224
|
method: 'POST',
|
|
225
225
|
headers: {
|
|
226
|
-
'Content-Type': 'application/json'
|
|
226
|
+
'Content-Type': 'application/json',
|
|
227
227
|
},
|
|
228
|
-
body: JSON.stringify(body)
|
|
228
|
+
body: JSON.stringify(body),
|
|
229
229
|
}, "forget-password/".concat(provider))];
|
|
230
230
|
case 1:
|
|
231
231
|
response = _a.sent();
|
|
@@ -242,9 +242,9 @@ var IKEAppAuthApi = /** @class */ (function (_super) {
|
|
|
242
242
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
243
243
|
method: 'POST',
|
|
244
244
|
headers: {
|
|
245
|
-
'Content-Type': 'application/json'
|
|
245
|
+
'Content-Type': 'application/json',
|
|
246
246
|
},
|
|
247
|
-
body: JSON.stringify(body)
|
|
247
|
+
body: JSON.stringify(body),
|
|
248
248
|
}, "reset-password/".concat(provider))];
|
|
249
249
|
case 1:
|
|
250
250
|
response = _a.sent();
|
|
@@ -264,9 +264,9 @@ var IKEAppAuthApi = /** @class */ (function (_super) {
|
|
|
264
264
|
return [4 /*yield*/, this.bxbFetch({
|
|
265
265
|
method: 'POST',
|
|
266
266
|
headers: {
|
|
267
|
-
'Content-Type': 'application/json'
|
|
267
|
+
'Content-Type': 'application/json',
|
|
268
268
|
},
|
|
269
|
-
body: JSON.stringify(__assign(__assign({ callbackUrl: this.host, json: true }, form), { csrfToken: csrfToken }))
|
|
269
|
+
body: JSON.stringify(__assign(__assign({ callbackUrl: this.host, json: true }, form), { csrfToken: csrfToken })),
|
|
270
270
|
}, "callback/".concat(provider))];
|
|
271
271
|
case 2:
|
|
272
272
|
response = _a.sent();
|
|
@@ -286,9 +286,9 @@ var IKEAppAuthApi = /** @class */ (function (_super) {
|
|
|
286
286
|
return [4 /*yield*/, this.bxbFetch({
|
|
287
287
|
method: 'POST',
|
|
288
288
|
headers: {
|
|
289
|
-
'Content-Type': 'application/x-www-form-urlencoded'
|
|
289
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
290
290
|
},
|
|
291
|
-
body: toFormUrlencodedString({ callbackUrl: this.host, json: true, csrfToken: csrfToken })
|
|
291
|
+
body: toFormUrlencodedString({ callbackUrl: this.host, json: true, csrfToken: csrfToken }),
|
|
292
292
|
}, 'signout')];
|
|
293
293
|
case 2:
|
|
294
294
|
response = _a.sent();
|
|
@@ -303,7 +303,7 @@ var IKEAppAuthApi = /** @class */ (function (_super) {
|
|
|
303
303
|
return __generator(this, function (_a) {
|
|
304
304
|
switch (_a.label) {
|
|
305
305
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
306
|
-
method: 'GET'
|
|
306
|
+
method: 'GET',
|
|
307
307
|
}, 'session')];
|
|
308
308
|
case 1:
|
|
309
309
|
response = _a.sent();
|
|
@@ -320,8 +320,8 @@ var IKEAppAuthApi = /** @class */ (function (_super) {
|
|
|
320
320
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
321
321
|
method: 'POST',
|
|
322
322
|
headers: {
|
|
323
|
-
'Content-Type': 'application/json'
|
|
324
|
-
}
|
|
323
|
+
'Content-Type': 'application/json',
|
|
324
|
+
},
|
|
325
325
|
}, 'token')];
|
|
326
326
|
case 1:
|
|
327
327
|
response = _a.sent();
|
|
@@ -338,9 +338,9 @@ var IKEAppAuthApi = /** @class */ (function (_super) {
|
|
|
338
338
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
339
339
|
method: 'DELETE',
|
|
340
340
|
headers: {
|
|
341
|
-
'Content-Type': 'application/json'
|
|
341
|
+
'Content-Type': 'application/json',
|
|
342
342
|
},
|
|
343
|
-
body: JSON.stringify(body)
|
|
343
|
+
body: JSON.stringify(body),
|
|
344
344
|
}, 'token')];
|
|
345
345
|
case 1:
|
|
346
346
|
response = _a.sent();
|
|
@@ -357,9 +357,9 @@ var IKEAppAuthApi = /** @class */ (function (_super) {
|
|
|
357
357
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
358
358
|
method: 'PUT',
|
|
359
359
|
headers: {
|
|
360
|
-
'Content-Type': 'application/json'
|
|
360
|
+
'Content-Type': 'application/json',
|
|
361
361
|
},
|
|
362
|
-
body: JSON.stringify(body)
|
|
362
|
+
body: JSON.stringify(body),
|
|
363
363
|
}, 'account-transition/facebook-to-email')];
|
|
364
364
|
case 1:
|
|
365
365
|
response = _a.sent();
|
|
@@ -376,9 +376,9 @@ var IKEAppAuthApi = /** @class */ (function (_super) {
|
|
|
376
376
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
377
377
|
method: 'POST',
|
|
378
378
|
headers: {
|
|
379
|
-
'Content-Type': 'application/json'
|
|
379
|
+
'Content-Type': 'application/json',
|
|
380
380
|
},
|
|
381
|
-
body: JSON.stringify(form)
|
|
381
|
+
body: JSON.stringify(form),
|
|
382
382
|
}, "reset-wallet/passcode")];
|
|
383
383
|
case 1:
|
|
384
384
|
response = _a.sent();
|
package/lib/Batch/index.js
CHANGED
|
@@ -72,7 +72,7 @@ var IKEAppBatchApi = /** @class */ (function (_super) {
|
|
|
72
72
|
secret: '',
|
|
73
73
|
moduleName: 'batch',
|
|
74
74
|
onSuccess: onSuccess,
|
|
75
|
-
onError: onError
|
|
75
|
+
onError: onError,
|
|
76
76
|
}) || this;
|
|
77
77
|
}
|
|
78
78
|
IKEAppBatchApi.prototype.assignToMember = function (batchId, form) {
|
|
@@ -83,9 +83,9 @@ var IKEAppBatchApi = /** @class */ (function (_super) {
|
|
|
83
83
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
84
84
|
method: 'PUT',
|
|
85
85
|
headers: {
|
|
86
|
-
'Content-Type': 'application/json'
|
|
86
|
+
'Content-Type': 'application/json',
|
|
87
87
|
},
|
|
88
|
-
body: JSON.stringify(form)
|
|
88
|
+
body: JSON.stringify(form),
|
|
89
89
|
}, "".concat(batchId, "/assign-to-member"))];
|
|
90
90
|
case 1:
|
|
91
91
|
response = _a.sent();
|
package/lib/Contract/index.js
CHANGED
|
@@ -64,7 +64,7 @@ var IKEAppContractApi = /** @class */ (function (_super) {
|
|
|
64
64
|
secret: '',
|
|
65
65
|
moduleName: 'contract',
|
|
66
66
|
onSuccess: onSuccess,
|
|
67
|
-
onError: onError
|
|
67
|
+
onError: onError,
|
|
68
68
|
}) || this;
|
|
69
69
|
}
|
|
70
70
|
IKEAppContractApi.prototype.getAddresses = function () {
|
|
@@ -95,7 +95,7 @@ var IKEAppContractApi = /** @class */ (function (_super) {
|
|
|
95
95
|
headers: {
|
|
96
96
|
'Content-Type': 'application/json',
|
|
97
97
|
},
|
|
98
|
-
body: JSON.stringify(form)
|
|
98
|
+
body: JSON.stringify(form),
|
|
99
99
|
}, 'nft')];
|
|
100
100
|
case 1:
|
|
101
101
|
response = _a.sent();
|
|
@@ -64,7 +64,7 @@ var IKEAppDigitalCustomizationApi = /** @class */ (function (_super) {
|
|
|
64
64
|
secret: '',
|
|
65
65
|
moduleName: 'digitalCustomizations',
|
|
66
66
|
onSuccess: onSuccess,
|
|
67
|
-
onError: onError
|
|
67
|
+
onError: onError,
|
|
68
68
|
}) || this;
|
|
69
69
|
}
|
|
70
70
|
IKEAppDigitalCustomizationApi.prototype.getShopifyProducts = function (digitalCustomizationId) {
|
|
@@ -75,7 +75,7 @@ var IKEAppDigitalCustomizationApi = /** @class */ (function (_super) {
|
|
|
75
75
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
76
76
|
method: 'GET',
|
|
77
77
|
headers: {
|
|
78
|
-
'Content-Type': 'application/json'
|
|
78
|
+
'Content-Type': 'application/json',
|
|
79
79
|
},
|
|
80
80
|
}, "".concat(digitalCustomizationId, "/shopify-product"))];
|
|
81
81
|
case 1:
|
|
@@ -93,9 +93,9 @@ var IKEAppDigitalCustomizationApi = /** @class */ (function (_super) {
|
|
|
93
93
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
94
94
|
method: 'POST',
|
|
95
95
|
headers: {
|
|
96
|
-
'Content-Type': 'application/json'
|
|
96
|
+
'Content-Type': 'application/json',
|
|
97
97
|
},
|
|
98
|
-
body: JSON.stringify(form)
|
|
98
|
+
body: JSON.stringify(form),
|
|
99
99
|
}, "".concat(form.digitalCustomizationId, "/shopify-order"))];
|
|
100
100
|
case 1:
|
|
101
101
|
response = _a.sent();
|
|
@@ -112,9 +112,9 @@ var IKEAppDigitalCustomizationApi = /** @class */ (function (_super) {
|
|
|
112
112
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
113
113
|
method: 'POST',
|
|
114
114
|
headers: {
|
|
115
|
-
'Content-Type': 'application/json'
|
|
115
|
+
'Content-Type': 'application/json',
|
|
116
116
|
},
|
|
117
|
-
body: JSON.stringify(form)
|
|
117
|
+
body: JSON.stringify(form),
|
|
118
118
|
}, "".concat(form.digitalCustomizationId, "/shopify-order/pay-referral-point"))];
|
|
119
119
|
case 1:
|
|
120
120
|
response = _a.sent();
|
package/lib/File/index.js
CHANGED
|
@@ -60,10 +60,11 @@ var IKEAppFileApi = /** @class */ (function (_super) {
|
|
|
60
60
|
var host = _a.host, onSuccess = _a.onSuccess, onError = _a.onError;
|
|
61
61
|
return _super.call(this, {
|
|
62
62
|
host: host,
|
|
63
|
-
secretKey: config_1.localSecretKey,
|
|
63
|
+
secretKey: config_1.localSecretKey,
|
|
64
|
+
secret: '',
|
|
64
65
|
moduleName: 'file',
|
|
65
66
|
onSuccess: onSuccess,
|
|
66
|
-
onError: onError
|
|
67
|
+
onError: onError,
|
|
67
68
|
}) || this;
|
|
68
69
|
}
|
|
69
70
|
IKEAppFileApi.prototype.getS3UploadUrl = function (_a) {
|
|
@@ -75,9 +76,11 @@ var IKEAppFileApi = /** @class */ (function (_super) {
|
|
|
75
76
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
76
77
|
method: 'POST',
|
|
77
78
|
headers: {
|
|
78
|
-
'Content-Type': 'application/json'
|
|
79
|
+
'Content-Type': 'application/json',
|
|
79
80
|
},
|
|
80
|
-
body: JSON.stringify({
|
|
81
|
+
body: JSON.stringify({
|
|
82
|
+
name: "".concat((0, UploadFileType_1.getUploadFileStr)(UploadFileType_1.default.GENERAL_USER_IMAGE), "/").concat(new Date().getTime(), "/").concat(name),
|
|
83
|
+
}),
|
|
81
84
|
})];
|
|
82
85
|
case 1:
|
|
83
86
|
response = _b.sent();
|
|
@@ -95,9 +98,9 @@ var IKEAppFileApi = /** @class */ (function (_super) {
|
|
|
95
98
|
method: 'PUT',
|
|
96
99
|
headers: {
|
|
97
100
|
'Content-Type': 'application/json',
|
|
98
|
-
'Access-Control-Allow-Origin': '*'
|
|
101
|
+
'Access-Control-Allow-Origin': '*',
|
|
99
102
|
},
|
|
100
|
-
body: { uri: uri, type: 'image/jpg' }
|
|
103
|
+
body: { uri: uri, type: 'image/jpg' },
|
|
101
104
|
})];
|
|
102
105
|
case 1:
|
|
103
106
|
result = _a.sent();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import BxBApi from
|
|
2
|
-
import { InAppNotificationType } from
|
|
1
|
+
import BxBApi from '@bytexbyte/bxb-api';
|
|
2
|
+
import { InAppNotificationType } from './type';
|
|
3
3
|
declare class IKEApInAppNotificationApi extends BxBApi {
|
|
4
|
-
constructor({ host, secretKey, secret, onSuccess, onError }: {
|
|
4
|
+
constructor({ host, secretKey, secret, onSuccess, onError, }: {
|
|
5
5
|
host: string;
|
|
6
6
|
secretKey?: string;
|
|
7
7
|
secret?: string;
|
|
@@ -62,7 +62,7 @@ var IKEApInAppNotificationApi = /** @class */ (function (_super) {
|
|
|
62
62
|
secret: secret !== null && secret !== void 0 ? secret : '',
|
|
63
63
|
moduleName: 'in-app-notification',
|
|
64
64
|
onSuccess: onSuccess,
|
|
65
|
-
onError: onError
|
|
65
|
+
onError: onError,
|
|
66
66
|
}) || this;
|
|
67
67
|
}
|
|
68
68
|
IKEApInAppNotificationApi.prototype.createInAppNotification = function (body) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare type InAppNotificationType =
|
|
1
|
+
export declare type InAppNotificationType = 'raffleStart' | 'raffleWinner';
|
package/lib/Mfa/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ declare type RedeemBody = {
|
|
|
22
22
|
digitalCustomizationId: number;
|
|
23
23
|
};
|
|
24
24
|
declare type RedeemResult = {
|
|
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.' |
|
|
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
28
|
constructor({ host, onSuccess, onError }: {
|
package/lib/Mfa/index.js
CHANGED
|
@@ -60,10 +60,11 @@ var IKEAppMfaApi = /** @class */ (function (_super) {
|
|
|
60
60
|
var host = _a.host, onSuccess = _a.onSuccess, onError = _a.onError;
|
|
61
61
|
return _super.call(this, {
|
|
62
62
|
host: host,
|
|
63
|
-
secretKey: config_1.localSecretKey,
|
|
63
|
+
secretKey: config_1.localSecretKey,
|
|
64
|
+
secret: '',
|
|
64
65
|
moduleName: 'redeem-nft',
|
|
65
66
|
onSuccess: onSuccess,
|
|
66
|
-
onError: onError
|
|
67
|
+
onError: onError,
|
|
67
68
|
}) || this;
|
|
68
69
|
}
|
|
69
70
|
IKEAppMfaApi.prototype.sendVerify = function (form) {
|
|
@@ -74,7 +75,7 @@ var IKEAppMfaApi = /** @class */ (function (_super) {
|
|
|
74
75
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
75
76
|
method: 'POST',
|
|
76
77
|
headers: { 'Content-Type': 'application/json' },
|
|
77
|
-
body: JSON.stringify(form)
|
|
78
|
+
body: JSON.stringify(form),
|
|
78
79
|
}, 'send-verify')];
|
|
79
80
|
case 1:
|
|
80
81
|
response = _a.sent();
|
|
@@ -91,7 +92,7 @@ var IKEAppMfaApi = /** @class */ (function (_super) {
|
|
|
91
92
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
92
93
|
method: 'POST',
|
|
93
94
|
headers: { 'Content-Type': 'application/json' },
|
|
94
|
-
body: JSON.stringify(form)
|
|
95
|
+
body: JSON.stringify(form),
|
|
95
96
|
}, 'verify')];
|
|
96
97
|
case 1:
|
|
97
98
|
response = _a.sent();
|
|
@@ -108,7 +109,7 @@ var IKEAppMfaApi = /** @class */ (function (_super) {
|
|
|
108
109
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
109
110
|
method: 'POST',
|
|
110
111
|
headers: { 'Content-Type': 'application/json' },
|
|
111
|
-
body: JSON.stringify(form)
|
|
112
|
+
body: JSON.stringify(form),
|
|
112
113
|
}, 'biometrics-verify')];
|
|
113
114
|
case 1:
|
|
114
115
|
response = _a.sent();
|
|
@@ -125,7 +126,7 @@ var IKEAppMfaApi = /** @class */ (function (_super) {
|
|
|
125
126
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
126
127
|
method: 'POST',
|
|
127
128
|
headers: { 'Content-Type': 'application/json' },
|
|
128
|
-
body: JSON.stringify(form)
|
|
129
|
+
body: JSON.stringify(form),
|
|
129
130
|
}, 'redeem')];
|
|
130
131
|
case 1:
|
|
131
132
|
response = _a.sent();
|
package/lib/Redeem/index.js
CHANGED
|
@@ -60,10 +60,11 @@ var IKEAppRedeemApi = /** @class */ (function (_super) {
|
|
|
60
60
|
var host = _a.host, onSuccess = _a.onSuccess, onError = _a.onError;
|
|
61
61
|
return _super.call(this, {
|
|
62
62
|
host: host,
|
|
63
|
-
secretKey: config_1.localSecretKey,
|
|
63
|
+
secretKey: config_1.localSecretKey,
|
|
64
|
+
secret: '',
|
|
64
65
|
moduleName: 'redeem-godenticket',
|
|
65
66
|
onSuccess: onSuccess,
|
|
66
|
-
onError: onError
|
|
67
|
+
onError: onError,
|
|
67
68
|
}) || this;
|
|
68
69
|
}
|
|
69
70
|
IKEAppRedeemApi.prototype.redeemGoldenTicket = function (form) {
|
|
@@ -74,9 +75,9 @@ var IKEAppRedeemApi = /** @class */ (function (_super) {
|
|
|
74
75
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
75
76
|
method: 'POST',
|
|
76
77
|
headers: {
|
|
77
|
-
'Content-Type': 'application/json'
|
|
78
|
+
'Content-Type': 'application/json',
|
|
78
79
|
},
|
|
79
|
-
body: JSON.stringify(form)
|
|
80
|
+
body: JSON.stringify(form),
|
|
80
81
|
}, 'redeem')];
|
|
81
82
|
case 1:
|
|
82
83
|
response = _a.sent();
|
|
@@ -60,10 +60,11 @@ var IKEAppRegisterDeviceCodeApi = /** @class */ (function (_super) {
|
|
|
60
60
|
var host = _a.host, onSuccess = _a.onSuccess, onError = _a.onError;
|
|
61
61
|
return _super.call(this, {
|
|
62
62
|
host: host,
|
|
63
|
-
secretKey: config_1.localSecretKey,
|
|
63
|
+
secretKey: config_1.localSecretKey,
|
|
64
|
+
secret: '',
|
|
64
65
|
moduleName: 'register-device-code',
|
|
65
66
|
onSuccess: onSuccess,
|
|
66
|
-
onError: onError
|
|
67
|
+
onError: onError,
|
|
67
68
|
}) || this;
|
|
68
69
|
}
|
|
69
70
|
IKEAppRegisterDeviceCodeApi.prototype.register = function (form) {
|
|
@@ -74,7 +75,7 @@ var IKEAppRegisterDeviceCodeApi = /** @class */ (function (_super) {
|
|
|
74
75
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
75
76
|
method: 'POST',
|
|
76
77
|
headers: { 'Content-Type': 'application/json' },
|
|
77
|
-
body: JSON.stringify(form)
|
|
78
|
+
body: JSON.stringify(form),
|
|
78
79
|
})];
|
|
79
80
|
case 1:
|
|
80
81
|
response = _a.sent();
|
package/lib/Scan/index.js
CHANGED
|
@@ -60,10 +60,11 @@ var IKEAppScanApi = /** @class */ (function (_super) {
|
|
|
60
60
|
var host = _a.host, onSuccess = _a.onSuccess, onError = _a.onError;
|
|
61
61
|
return _super.call(this, {
|
|
62
62
|
host: host,
|
|
63
|
-
secretKey: config_1.localSecretKey,
|
|
63
|
+
secretKey: config_1.localSecretKey,
|
|
64
|
+
secret: '',
|
|
64
65
|
moduleName: 'scan',
|
|
65
66
|
onSuccess: onSuccess,
|
|
66
|
-
onError: onError
|
|
67
|
+
onError: onError,
|
|
67
68
|
}) || this;
|
|
68
69
|
}
|
|
69
70
|
IKEAppScanApi.prototype.create = function (form, userId) {
|
|
@@ -79,14 +80,16 @@ var IKEAppScanApi = /** @class */ (function (_super) {
|
|
|
79
80
|
_a.trys.push([1, 3, , 4]);
|
|
80
81
|
return [4 /*yield*/, this.bxbFetch({
|
|
81
82
|
method: 'POST',
|
|
82
|
-
headers: userId
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
headers: userId
|
|
84
|
+
? {
|
|
85
|
+
'Content-Type': 'application/json',
|
|
86
|
+
'IKE-App-User-Id': userId,
|
|
87
|
+
}
|
|
88
|
+
: {
|
|
89
|
+
'Content-Type': 'application/json',
|
|
90
|
+
},
|
|
88
91
|
body: JSON.stringify(form),
|
|
89
|
-
signal: controller.signal
|
|
92
|
+
signal: controller.signal,
|
|
90
93
|
})];
|
|
91
94
|
case 2:
|
|
92
95
|
response = _a.sent();
|
|
@@ -107,7 +110,7 @@ var IKEAppScanApi = /** @class */ (function (_super) {
|
|
|
107
110
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
108
111
|
method: 'PUT',
|
|
109
112
|
headers: { 'Content-Type': 'application/json' },
|
|
110
|
-
body: JSON.stringify(form)
|
|
113
|
+
body: JSON.stringify(form),
|
|
111
114
|
}, scanId.toString())];
|
|
112
115
|
case 1:
|
|
113
116
|
response = _a.sent();
|
package/lib/Tags/index.d.ts
CHANGED
|
@@ -70,6 +70,6 @@ declare class IKEAppTagsApi extends BxBApi {
|
|
|
70
70
|
transferOwner(tokenId: string, form: TransferBody): Promise<PostResult>;
|
|
71
71
|
undoTransferOwner(tokenId: string, form: UndoTransferBody): Promise<PostResult>;
|
|
72
72
|
updateInfoVisible(tokenId: string, form: PutInfoVisible): Promise<PutInfoVisibleResult>;
|
|
73
|
-
updateDisplayName(tokenId: string,
|
|
73
|
+
updateDisplayName(tokenId: string, form: PutUpdateDisplayName): Promise<PutUpdateDisplayNameResult>;
|
|
74
74
|
}
|
|
75
75
|
export default IKEAppTagsApi;
|