@bytexbyte/ike-app-api 1.0.85 → 1.0.86
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 +15 -0
- package/lib/App.js +26 -0
- package/package.json +1 -1
package/lib/App.d.ts
CHANGED
|
@@ -11,6 +11,15 @@ type GetCheckNetwork = {
|
|
|
11
11
|
type GetConfig = {
|
|
12
12
|
isRewardEnabled: boolean;
|
|
13
13
|
};
|
|
14
|
+
type GetSupportUrls = {
|
|
15
|
+
faqs?: string;
|
|
16
|
+
glossary?: string;
|
|
17
|
+
instructions?: string;
|
|
18
|
+
aboutUs?: string;
|
|
19
|
+
};
|
|
20
|
+
type GetAgePolicy = {
|
|
21
|
+
minAge: number;
|
|
22
|
+
};
|
|
14
23
|
declare class IKEAppApi extends BxBApi {
|
|
15
24
|
constructor({ host, credentials, onSuccess, onError, }: {
|
|
16
25
|
host: string;
|
|
@@ -26,6 +35,12 @@ declare class IKEAppApi extends BxBApi {
|
|
|
26
35
|
getConfig(init?: {
|
|
27
36
|
signal?: AbortSignal;
|
|
28
37
|
}): Promise<GetConfig>;
|
|
38
|
+
getSupportUrls(init?: {
|
|
39
|
+
signal?: AbortSignal;
|
|
40
|
+
}): Promise<GetSupportUrls>;
|
|
41
|
+
getAgePolicy(init?: {
|
|
42
|
+
signal?: AbortSignal;
|
|
43
|
+
}): Promise<GetAgePolicy>;
|
|
29
44
|
isShowToU(deviceId: string): Promise<{
|
|
30
45
|
isShowToU: boolean;
|
|
31
46
|
}>;
|
package/lib/App.js
CHANGED
|
@@ -136,6 +136,32 @@ var IKEAppApi = /** @class */ (function (_super) {
|
|
|
136
136
|
});
|
|
137
137
|
});
|
|
138
138
|
};
|
|
139
|
+
IKEAppApi.prototype.getSupportUrls = function (init) {
|
|
140
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
141
|
+
var response;
|
|
142
|
+
return __generator(this, function (_a) {
|
|
143
|
+
switch (_a.label) {
|
|
144
|
+
case 0: return [4 /*yield*/, this.bxbFetch(__assign({ method: 'GET', headers: { 'Content-Type': 'application/json' } }, init), 'support-urls')];
|
|
145
|
+
case 1:
|
|
146
|
+
response = _a.sent();
|
|
147
|
+
return [2 /*return*/, response.json()];
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
};
|
|
152
|
+
IKEAppApi.prototype.getAgePolicy = function (init) {
|
|
153
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
154
|
+
var response;
|
|
155
|
+
return __generator(this, function (_a) {
|
|
156
|
+
switch (_a.label) {
|
|
157
|
+
case 0: return [4 /*yield*/, this.bxbFetch(__assign({ method: 'GET', headers: { 'Content-Type': 'application/json' } }, init), 'age-policy')];
|
|
158
|
+
case 1:
|
|
159
|
+
response = _a.sent();
|
|
160
|
+
return [2 /*return*/, response.json()];
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
};
|
|
139
165
|
IKEAppApi.prototype.isShowToU = function (deviceId) {
|
|
140
166
|
return __awaiter(this, void 0, void 0, function () {
|
|
141
167
|
var response;
|