@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/Tags/index.js
CHANGED
|
@@ -60,10 +60,11 @@ var IKEAppTagsApi = /** @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: 'tags',
|
|
65
66
|
onSuccess: onSuccess,
|
|
66
|
-
onError: onError
|
|
67
|
+
onError: onError,
|
|
67
68
|
}) || this;
|
|
68
69
|
}
|
|
69
70
|
IKEAppTagsApi.prototype.get = function (tokenId) {
|
|
@@ -74,8 +75,8 @@ var IKEAppTagsApi = /** @class */ (function (_super) {
|
|
|
74
75
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
75
76
|
method: 'GET',
|
|
76
77
|
headers: {
|
|
77
|
-
'Content-Type': 'application/json'
|
|
78
|
-
}
|
|
78
|
+
'Content-Type': 'application/json',
|
|
79
|
+
},
|
|
79
80
|
}, tokenId)];
|
|
80
81
|
case 1:
|
|
81
82
|
response = _a.sent();
|
|
@@ -98,12 +99,14 @@ var IKEAppTagsApi = /** @class */ (function (_super) {
|
|
|
98
99
|
searchParams.append('batchSerialNumberLte', query.batchSerialNumberLte);
|
|
99
100
|
return [4 /*yield*/, this.bxbFetch({
|
|
100
101
|
method: 'GET',
|
|
101
|
-
headers: userId
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
102
|
+
headers: userId
|
|
103
|
+
? {
|
|
104
|
+
'Content-Type': 'application/json',
|
|
105
|
+
'IKE-App-User-Id': userId,
|
|
106
|
+
}
|
|
107
|
+
: {
|
|
108
|
+
'Content-Type': 'application/json',
|
|
109
|
+
},
|
|
107
110
|
}, "?".concat(searchParams.toString()))];
|
|
108
111
|
case 1:
|
|
109
112
|
response = _a.sent();
|
|
@@ -120,8 +123,8 @@ var IKEAppTagsApi = /** @class */ (function (_super) {
|
|
|
120
123
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
121
124
|
method: 'GET',
|
|
122
125
|
headers: {
|
|
123
|
-
'Content-Type': 'application/json'
|
|
124
|
-
}
|
|
126
|
+
'Content-Type': 'application/json',
|
|
127
|
+
},
|
|
125
128
|
}, "".concat(tokenId, "/blockchainStatus"))];
|
|
126
129
|
case 1:
|
|
127
130
|
response = _a.sent();
|
|
@@ -137,13 +140,15 @@ var IKEAppTagsApi = /** @class */ (function (_super) {
|
|
|
137
140
|
switch (_a.label) {
|
|
138
141
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
139
142
|
method: 'POST',
|
|
140
|
-
headers: form.ownerId
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
143
|
+
headers: form.ownerId
|
|
144
|
+
? {
|
|
145
|
+
'Content-Type': 'application/json',
|
|
146
|
+
'IKE-App-User-Id': form.ownerId,
|
|
147
|
+
}
|
|
148
|
+
: {
|
|
149
|
+
'Content-Type': 'application/json',
|
|
150
|
+
},
|
|
151
|
+
body: JSON.stringify(form),
|
|
147
152
|
}, tokenId)];
|
|
148
153
|
case 1:
|
|
149
154
|
response = _a.sent();
|
|
@@ -159,13 +164,15 @@ var IKEAppTagsApi = /** @class */ (function (_super) {
|
|
|
159
164
|
switch (_a.label) {
|
|
160
165
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
161
166
|
method: 'PUT',
|
|
162
|
-
headers: userId
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
headers: userId
|
|
168
|
+
? {
|
|
169
|
+
'Content-Type': 'application/json',
|
|
170
|
+
'IKE-App-User-Id': userId,
|
|
171
|
+
}
|
|
172
|
+
: {
|
|
173
|
+
'Content-Type': 'application/json',
|
|
174
|
+
},
|
|
175
|
+
body: JSON.stringify(form),
|
|
169
176
|
})];
|
|
170
177
|
case 1:
|
|
171
178
|
response = _a.sent();
|
|
@@ -181,13 +188,15 @@ var IKEAppTagsApi = /** @class */ (function (_super) {
|
|
|
181
188
|
switch (_a.label) {
|
|
182
189
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
183
190
|
method: 'POST',
|
|
184
|
-
headers: form.ownerId
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
+
headers: form.ownerId
|
|
192
|
+
? {
|
|
193
|
+
'Content-Type': 'application/json',
|
|
194
|
+
'IKE-App-User-Id': form.ownerId,
|
|
195
|
+
}
|
|
196
|
+
: {
|
|
197
|
+
'Content-Type': 'application/json',
|
|
198
|
+
},
|
|
199
|
+
body: JSON.stringify(form),
|
|
191
200
|
}, "".concat(tokenId, "/transfer"))];
|
|
192
201
|
case 1:
|
|
193
202
|
response = _a.sent();
|
|
@@ -203,13 +212,15 @@ var IKEAppTagsApi = /** @class */ (function (_super) {
|
|
|
203
212
|
switch (_a.label) {
|
|
204
213
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
205
214
|
method: 'DELETE',
|
|
206
|
-
headers: form.ownerId
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
215
|
+
headers: form.ownerId
|
|
216
|
+
? {
|
|
217
|
+
'Content-Type': 'application/json',
|
|
218
|
+
'IKE-App-User-Id': form.ownerId,
|
|
219
|
+
}
|
|
220
|
+
: {
|
|
221
|
+
'Content-Type': 'application/json',
|
|
222
|
+
},
|
|
223
|
+
body: JSON.stringify(form),
|
|
213
224
|
}, "".concat(tokenId, "/transfer"))];
|
|
214
225
|
case 1:
|
|
215
226
|
response = _a.sent();
|
|
@@ -225,13 +236,15 @@ var IKEAppTagsApi = /** @class */ (function (_super) {
|
|
|
225
236
|
switch (_a.label) {
|
|
226
237
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
227
238
|
method: 'PUT',
|
|
228
|
-
headers: form.ownerId
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
239
|
+
headers: form.ownerId
|
|
240
|
+
? {
|
|
241
|
+
'Content-Type': 'application/json',
|
|
242
|
+
'IKE-App-User-Id': form.ownerId,
|
|
243
|
+
}
|
|
244
|
+
: {
|
|
245
|
+
'Content-Type': 'application/json',
|
|
246
|
+
},
|
|
247
|
+
body: JSON.stringify(form),
|
|
235
248
|
}, "".concat(tokenId, "/infoVisible"))];
|
|
236
249
|
case 1:
|
|
237
250
|
response = _a.sent();
|
|
@@ -240,7 +253,7 @@ var IKEAppTagsApi = /** @class */ (function (_super) {
|
|
|
240
253
|
});
|
|
241
254
|
});
|
|
242
255
|
};
|
|
243
|
-
IKEAppTagsApi.prototype.updateDisplayName = function (tokenId,
|
|
256
|
+
IKEAppTagsApi.prototype.updateDisplayName = function (tokenId, form) {
|
|
244
257
|
return __awaiter(this, void 0, void 0, function () {
|
|
245
258
|
var response;
|
|
246
259
|
return __generator(this, function (_a) {
|
|
@@ -248,9 +261,9 @@ var IKEAppTagsApi = /** @class */ (function (_super) {
|
|
|
248
261
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
249
262
|
method: 'PUT',
|
|
250
263
|
headers: {
|
|
251
|
-
'Content-Type': 'application/json'
|
|
264
|
+
'Content-Type': 'application/json',
|
|
252
265
|
},
|
|
253
|
-
body: JSON.stringify(
|
|
266
|
+
body: JSON.stringify(form),
|
|
254
267
|
}, "".concat(tokenId, "/updateDisplayName"))];
|
|
255
268
|
case 1:
|
|
256
269
|
response = _a.sent();
|
package/lib/User/index.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ declare enum RuleType {
|
|
|
74
74
|
redeemGoldenTicket = "redeemGoldenTicket"
|
|
75
75
|
}
|
|
76
76
|
declare class IKEAppUserApi extends BxBApi {
|
|
77
|
-
constructor({ host, secretKey, secret, onSuccess, onError }: {
|
|
77
|
+
constructor({ host, secretKey, secret, onSuccess, onError, }: {
|
|
78
78
|
host: string;
|
|
79
79
|
secretKey?: string;
|
|
80
80
|
secret?: string;
|
package/lib/User/index.js
CHANGED
|
@@ -71,7 +71,7 @@ var IKEAppUserApi = /** @class */ (function (_super) {
|
|
|
71
71
|
secret: secret !== null && secret !== void 0 ? secret : '',
|
|
72
72
|
moduleName: 'user',
|
|
73
73
|
onSuccess: onSuccess,
|
|
74
|
-
onError: onError
|
|
74
|
+
onError: onError,
|
|
75
75
|
}) || this;
|
|
76
76
|
}
|
|
77
77
|
IKEAppUserApi.prototype.get = function (userId) {
|
|
@@ -81,12 +81,14 @@ var IKEAppUserApi = /** @class */ (function (_super) {
|
|
|
81
81
|
switch (_a.label) {
|
|
82
82
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
83
83
|
method: 'GET',
|
|
84
|
-
headers: userId
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
headers: userId
|
|
85
|
+
? {
|
|
86
|
+
'Content-Type': 'application/json',
|
|
87
|
+
'IKE-App-User-Id': userId,
|
|
88
|
+
}
|
|
89
|
+
: {
|
|
90
|
+
'Content-Type': 'application/json',
|
|
91
|
+
},
|
|
90
92
|
}, userId)];
|
|
91
93
|
case 1:
|
|
92
94
|
response = _a.sent();
|
|
@@ -102,13 +104,15 @@ var IKEAppUserApi = /** @class */ (function (_super) {
|
|
|
102
104
|
switch (_a.label) {
|
|
103
105
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
104
106
|
method: 'PUT',
|
|
105
|
-
headers: userId
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
107
|
+
headers: userId
|
|
108
|
+
? {
|
|
109
|
+
'Content-Type': 'application/json',
|
|
110
|
+
'IKE-App-User-Id': userId,
|
|
111
|
+
}
|
|
112
|
+
: {
|
|
113
|
+
'Content-Type': 'application/json',
|
|
114
|
+
},
|
|
115
|
+
body: JSON.stringify(form),
|
|
112
116
|
}, userId)];
|
|
113
117
|
case 1:
|
|
114
118
|
response = _a.sent();
|
|
@@ -124,12 +128,14 @@ var IKEAppUserApi = /** @class */ (function (_super) {
|
|
|
124
128
|
switch (_a.label) {
|
|
125
129
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
126
130
|
method: 'DELETE',
|
|
127
|
-
headers: userId
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
headers: userId
|
|
132
|
+
? {
|
|
133
|
+
'Content-Type': 'application/json',
|
|
134
|
+
'IKE-App-User-Id': userId,
|
|
135
|
+
}
|
|
136
|
+
: {
|
|
137
|
+
'Content-Type': 'application/json',
|
|
138
|
+
},
|
|
133
139
|
}, userId)];
|
|
134
140
|
case 1:
|
|
135
141
|
response = _a.sent();
|
|
@@ -145,12 +151,14 @@ var IKEAppUserApi = /** @class */ (function (_super) {
|
|
|
145
151
|
switch (_a.label) {
|
|
146
152
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
147
153
|
method: 'GET',
|
|
148
|
-
headers: userId
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
+
headers: userId
|
|
155
|
+
? {
|
|
156
|
+
'Content-Type': 'application/json',
|
|
157
|
+
'IKE-App-User-Id': userId,
|
|
158
|
+
}
|
|
159
|
+
: {
|
|
160
|
+
'Content-Type': 'application/json',
|
|
161
|
+
},
|
|
154
162
|
}, "".concat(userId, "/wallet"))];
|
|
155
163
|
case 1:
|
|
156
164
|
response = _a.sent();
|
|
@@ -183,12 +191,14 @@ var IKEAppUserApi = /** @class */ (function (_super) {
|
|
|
183
191
|
switch (_a.label) {
|
|
184
192
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
185
193
|
method: 'DELETE',
|
|
186
|
-
headers: userId
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
194
|
+
headers: userId
|
|
195
|
+
? {
|
|
196
|
+
'Content-Type': 'application/json',
|
|
197
|
+
'IKE-App-User-Id': userId,
|
|
198
|
+
}
|
|
199
|
+
: {
|
|
200
|
+
'Content-Type': 'application/json',
|
|
201
|
+
},
|
|
192
202
|
}, "".concat(userId, "/scan-history/").concat(id))];
|
|
193
203
|
case 1:
|
|
194
204
|
response = _a.sent();
|
|
@@ -204,12 +214,14 @@ var IKEAppUserApi = /** @class */ (function (_super) {
|
|
|
204
214
|
switch (_a.label) {
|
|
205
215
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
206
216
|
method: 'DELETE',
|
|
207
|
-
headers: userId
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
217
|
+
headers: userId
|
|
218
|
+
? {
|
|
219
|
+
'Content-Type': 'application/json',
|
|
220
|
+
'IKE-App-User-Id': userId,
|
|
221
|
+
}
|
|
222
|
+
: {
|
|
223
|
+
'Content-Type': 'application/json',
|
|
224
|
+
},
|
|
213
225
|
}, "".concat(userId, "/scan-history"))];
|
|
214
226
|
case 1:
|
|
215
227
|
response = _a.sent();
|
|
@@ -225,12 +237,14 @@ var IKEAppUserApi = /** @class */ (function (_super) {
|
|
|
225
237
|
switch (_a.label) {
|
|
226
238
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
227
239
|
method: 'POST',
|
|
228
|
-
headers: userId
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
240
|
+
headers: userId
|
|
241
|
+
? {
|
|
242
|
+
'Content-Type': 'application/json',
|
|
243
|
+
'IKE-App-User-Id': userId,
|
|
244
|
+
}
|
|
245
|
+
: {
|
|
246
|
+
'Content-Type': 'application/json',
|
|
247
|
+
},
|
|
234
248
|
}, "".concat(userId, "/save-product/").concat(batchId))];
|
|
235
249
|
case 1:
|
|
236
250
|
response = _a.sent();
|
|
@@ -246,12 +260,14 @@ var IKEAppUserApi = /** @class */ (function (_super) {
|
|
|
246
260
|
switch (_a.label) {
|
|
247
261
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
248
262
|
method: 'DELETE',
|
|
249
|
-
headers: userId
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
263
|
+
headers: userId
|
|
264
|
+
? {
|
|
265
|
+
'Content-Type': 'application/json',
|
|
266
|
+
'IKE-App-User-Id': userId,
|
|
267
|
+
}
|
|
268
|
+
: {
|
|
269
|
+
'Content-Type': 'application/json',
|
|
270
|
+
},
|
|
255
271
|
}, "".concat(userId, "/save-product/").concat(batchId))];
|
|
256
272
|
case 1:
|
|
257
273
|
response = _a.sent();
|
|
@@ -268,7 +284,7 @@ var IKEAppUserApi = /** @class */ (function (_super) {
|
|
|
268
284
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
269
285
|
method: 'POST',
|
|
270
286
|
headers: { 'Content-Type': 'application/json' },
|
|
271
|
-
body: JSON.stringify(form)
|
|
287
|
+
body: JSON.stringify(form),
|
|
272
288
|
}, "".concat(userId, "/logout"))];
|
|
273
289
|
case 1:
|
|
274
290
|
response = _a.sent();
|
|
@@ -284,7 +300,7 @@ var IKEAppUserApi = /** @class */ (function (_super) {
|
|
|
284
300
|
switch (_a.label) {
|
|
285
301
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
286
302
|
method: 'POST',
|
|
287
|
-
headers: { 'Content-Type': 'application/json' }
|
|
303
|
+
headers: { 'Content-Type': 'application/json' },
|
|
288
304
|
}, "".concat(userId, "/").concat(digitalCustomizationId, "/notifications"))];
|
|
289
305
|
case 1:
|
|
290
306
|
response = _a.sent();
|
|
@@ -300,7 +316,7 @@ var IKEAppUserApi = /** @class */ (function (_super) {
|
|
|
300
316
|
switch (_a.label) {
|
|
301
317
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
302
318
|
method: 'DELETE',
|
|
303
|
-
headers: { 'Content-Type': 'application/json' }
|
|
319
|
+
headers: { 'Content-Type': 'application/json' },
|
|
304
320
|
}, "".concat(userId, "/").concat(digitalCustomizationId, "/notifications"))];
|
|
305
321
|
case 1:
|
|
306
322
|
response = _a.sent();
|
|
@@ -317,7 +333,7 @@ var IKEAppUserApi = /** @class */ (function (_super) {
|
|
|
317
333
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
318
334
|
method: 'PUT',
|
|
319
335
|
headers: { 'Content-Type': 'application/json' },
|
|
320
|
-
body: JSON.stringify(body)
|
|
336
|
+
body: JSON.stringify(body),
|
|
321
337
|
}, "".concat(userId, "/").concat(digitalCustomizationId, "/notifications"))];
|
|
322
338
|
case 1:
|
|
323
339
|
response = _a.sent();
|
|
@@ -334,7 +350,7 @@ var IKEAppUserApi = /** @class */ (function (_super) {
|
|
|
334
350
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
335
351
|
method: 'POST',
|
|
336
352
|
headers: { 'Content-Type': 'application/json' },
|
|
337
|
-
body: JSON.stringify(form)
|
|
353
|
+
body: JSON.stringify(form),
|
|
338
354
|
}, "/".concat(userId, "/biometrics/status-check"))];
|
|
339
355
|
case 1:
|
|
340
356
|
response = _a.sent();
|
|
@@ -350,12 +366,14 @@ var IKEAppUserApi = /** @class */ (function (_super) {
|
|
|
350
366
|
switch (_a.label) {
|
|
351
367
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
352
368
|
method: 'PUT',
|
|
353
|
-
headers: userId
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
369
|
+
headers: userId
|
|
370
|
+
? {
|
|
371
|
+
'Content-Type': 'application/json',
|
|
372
|
+
'IKE-App-User-Id': userId,
|
|
373
|
+
}
|
|
374
|
+
: {
|
|
375
|
+
'Content-Type': 'application/json',
|
|
376
|
+
},
|
|
359
377
|
}, "".concat(userId, "/isIKEToolTutorialReaded"))];
|
|
360
378
|
case 1:
|
|
361
379
|
response = _a.sent();
|
|
@@ -371,13 +389,15 @@ var IKEAppUserApi = /** @class */ (function (_super) {
|
|
|
371
389
|
switch (_a.label) {
|
|
372
390
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
373
391
|
method: 'PUT',
|
|
374
|
-
headers: userId
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
392
|
+
headers: userId
|
|
393
|
+
? {
|
|
394
|
+
'Content-Type': 'application/json',
|
|
395
|
+
'IKE-App-User-Id': userId,
|
|
396
|
+
}
|
|
397
|
+
: {
|
|
398
|
+
'Content-Type': 'application/json',
|
|
399
|
+
},
|
|
400
|
+
body: JSON.stringify(form),
|
|
381
401
|
}, "".concat(userId, "/ikeTool/connect"))];
|
|
382
402
|
case 1:
|
|
383
403
|
response = _a.sent();
|
|
@@ -393,13 +413,15 @@ var IKEAppUserApi = /** @class */ (function (_super) {
|
|
|
393
413
|
switch (_a.label) {
|
|
394
414
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
395
415
|
method: 'PUT',
|
|
396
|
-
headers: userId
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
416
|
+
headers: userId
|
|
417
|
+
? {
|
|
418
|
+
'Content-Type': 'application/json',
|
|
419
|
+
'IKE-App-User-Id': userId,
|
|
420
|
+
}
|
|
421
|
+
: {
|
|
422
|
+
'Content-Type': 'application/json',
|
|
423
|
+
},
|
|
424
|
+
body: JSON.stringify(form),
|
|
403
425
|
}, "".concat(userId, "/ikeTool/disconnect"))];
|
|
404
426
|
case 1:
|
|
405
427
|
response = _a.sent();
|
|
@@ -415,13 +437,15 @@ var IKEAppUserApi = /** @class */ (function (_super) {
|
|
|
415
437
|
switch (_a.label) {
|
|
416
438
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
417
439
|
method: 'POST',
|
|
418
|
-
headers: userId
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
440
|
+
headers: userId
|
|
441
|
+
? {
|
|
442
|
+
'Content-Type': 'application/json',
|
|
443
|
+
'IKE-App-User-Id': userId,
|
|
444
|
+
}
|
|
445
|
+
: {
|
|
446
|
+
'Content-Type': 'application/json',
|
|
447
|
+
},
|
|
448
|
+
body: JSON.stringify(form),
|
|
425
449
|
}, "".concat(userId, "/reward/points"))];
|
|
426
450
|
case 1:
|
|
427
451
|
response = _a.sent();
|
|
@@ -437,13 +461,15 @@ var IKEAppUserApi = /** @class */ (function (_super) {
|
|
|
437
461
|
switch (_a.label) {
|
|
438
462
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
439
463
|
method: 'POST',
|
|
440
|
-
headers: userId
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
464
|
+
headers: userId
|
|
465
|
+
? {
|
|
466
|
+
'Content-Type': 'application/json',
|
|
467
|
+
'IKE-App-User-Id': userId,
|
|
468
|
+
}
|
|
469
|
+
: {
|
|
470
|
+
'Content-Type': 'application/json',
|
|
471
|
+
},
|
|
472
|
+
body: JSON.stringify(form),
|
|
447
473
|
}, "".concat(userId, "/reward/discount"))];
|
|
448
474
|
case 1:
|
|
449
475
|
response = _a.sent();
|
|
@@ -459,12 +485,14 @@ var IKEAppUserApi = /** @class */ (function (_super) {
|
|
|
459
485
|
switch (_a.label) {
|
|
460
486
|
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
461
487
|
method: 'GET',
|
|
462
|
-
headers: userId
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
488
|
+
headers: userId
|
|
489
|
+
? {
|
|
490
|
+
'Content-Type': 'application/json',
|
|
491
|
+
'IKE-App-User-Id': userId,
|
|
492
|
+
}
|
|
493
|
+
: {
|
|
494
|
+
'Content-Type': 'application/json',
|
|
495
|
+
},
|
|
468
496
|
}, "".concat(userId, "/getUserIdByEmail/").concat(email))];
|
|
469
497
|
case 1:
|
|
470
498
|
response = _a.sent();
|
package/lib/config.js
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ declare class IKEAppApi {
|
|
|
27
27
|
digitalCustomization: IKEAppDigitalCustomizationApi;
|
|
28
28
|
contract: IKEAppContractApi;
|
|
29
29
|
inAppNotification: IKEApInAppNotificationApi;
|
|
30
|
-
constructor({ host, env, secretKey, secret, onSuccess, onError }: {
|
|
30
|
+
constructor({ host, env, secretKey, secret, onSuccess, onError, }: {
|
|
31
31
|
host: string;
|
|
32
32
|
env: string;
|
|
33
33
|
secretKey?: string;
|