@smartico/public-api 0.0.237 → 0.0.239
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/dist/Base/ClassId.d.ts +2 -0
- package/dist/CustomSections/UICustomSection.d.ts +2 -1
- package/dist/Raffle/RaffleClaimPrizeRequest.d.ts +4 -0
- package/dist/Raffle/RaffleClaimPrizeResponse.d.ts +3 -0
- package/dist/Raffle/index.d.ts +2 -0
- package/dist/WSAPI/WSAPITypes.d.ts +2 -0
- package/dist/index.js +29 -22
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +29 -18
- package/dist/index.modern.mjs.map +1 -1
- package/docs/README.md +2 -0
- package/docs/interfaces/RaffleClaimPrizeRequest.md +43 -0
- package/docs/interfaces/RaffleClaimPrizeResponse.md +57 -0
- package/package.json +1 -1
- package/src/Base/ClassId.ts +2 -0
- package/src/CustomSections/UICustomSection.ts +16 -6
- package/src/Raffle/GetRaffleDrawRunsHistoryRequest.ts +1 -1
- package/src/Raffle/RaffleClaimPrizeRequest.ts +5 -0
- package/src/Raffle/RaffleClaimPrizeResponse.ts +3 -0
- package/src/Raffle/index.ts +2 -0
- package/src/SmarticoAPI.ts +5 -4
- package/src/WSAPI/WSAPITypes.ts +2 -0
package/dist/index.modern.mjs
CHANGED
|
@@ -129,6 +129,8 @@ var ClassId;
|
|
|
129
129
|
ClassId[ClassId["RAF_GET_DRAW_RUN_RESPONSE"] = 905] = "RAF_GET_DRAW_RUN_RESPONSE";
|
|
130
130
|
ClassId[ClassId["RAF_GET_DRAW_HISTORY_REQUEST"] = 906] = "RAF_GET_DRAW_HISTORY_REQUEST";
|
|
131
131
|
ClassId[ClassId["RAF_GET_DRAW_HISTORY_RESPONSE"] = 907] = "RAF_GET_DRAW_HISTORY_RESPONSE";
|
|
132
|
+
ClassId[ClassId["RAF_CLAIM_PRIZE_REQUEST"] = 908] = "RAF_CLAIM_PRIZE_REQUEST";
|
|
133
|
+
ClassId[ClassId["RAF_CLAIM_PRIZE_RESPONSE"] = 909] = "RAF_CLAIM_PRIZE_RESPONSE";
|
|
132
134
|
/*
|
|
133
135
|
RAF_GET_TICKETS_REQUEST = 902,
|
|
134
136
|
RAF_GET_TICKETS_RESPONSE = 903,
|
|
@@ -2447,22 +2449,29 @@ var AchOverviewMissionsFilter;
|
|
|
2447
2449
|
AchOverviewMissionsFilter[AchOverviewMissionsFilter["ALL_EXCEPT_COMPLETED_AND_LOCKED"] = 5] = "ALL_EXCEPT_COMPLETED_AND_LOCKED";
|
|
2448
2450
|
})(AchOverviewMissionsFilter || (AchOverviewMissionsFilter = {}));
|
|
2449
2451
|
|
|
2450
|
-
const UICustomSectionTransform =
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2452
|
+
const UICustomSectionTransform = response => {
|
|
2453
|
+
const items = [];
|
|
2454
|
+
Object.keys(response.customSections).forEach(key => {
|
|
2455
|
+
const r = response.customSections[key];
|
|
2456
|
+
const id = parseInt(key);
|
|
2457
|
+
if (r.section_type_id !== undefined && r.section_type_id >= 1) {
|
|
2458
|
+
const x = {
|
|
2459
|
+
id: id,
|
|
2460
|
+
body: r.body,
|
|
2461
|
+
menu_img: r.menu_img,
|
|
2462
|
+
menu_name: r.menu_name,
|
|
2463
|
+
section_type_id: r.section_type_id,
|
|
2464
|
+
custom_skin_images: r.custom_skin_images,
|
|
2465
|
+
generic_custom_css: r.generic_custom_css,
|
|
2466
|
+
mission_tabs_options: r.mission_tabs_options,
|
|
2467
|
+
overview_missions_count: r.overview_missions_count,
|
|
2468
|
+
overview_missions_filter: r.overview_missions_filter,
|
|
2469
|
+
theme: r.theme
|
|
2470
|
+
};
|
|
2471
|
+
items.push(x);
|
|
2472
|
+
}
|
|
2465
2473
|
});
|
|
2474
|
+
return items;
|
|
2466
2475
|
};
|
|
2467
2476
|
|
|
2468
2477
|
const BonusItemsTransform = items => {
|
|
@@ -2574,7 +2583,8 @@ class SmarticoAPI {
|
|
|
2574
2583
|
static getAvatarUrl(label_api_key) {
|
|
2575
2584
|
const envId = SmarticoAPI.getEnvDnsSuffix(label_api_key);
|
|
2576
2585
|
const avatarUrl = AVATAR_DOMAIN.replace('{ENV_ID}', SmarticoAPI.getEnvDnsSuffix(label_api_key));
|
|
2577
|
-
|
|
2586
|
+
const envs = ['4', '5', '6', '7'];
|
|
2587
|
+
if (envs.includes(envId)) {
|
|
2578
2588
|
return SmarticoAPI.replaceSmrDomainsWithCloudfront(avatarUrl);
|
|
2579
2589
|
} else {
|
|
2580
2590
|
return avatarUrl;
|
|
@@ -2592,7 +2602,8 @@ class SmarticoAPI {
|
|
|
2592
2602
|
const timeStart = new Date().getTime();
|
|
2593
2603
|
result = await this.messageSender(message, this.publicUrl, expectCID);
|
|
2594
2604
|
const timeEnd = new Date().getTime();
|
|
2595
|
-
|
|
2605
|
+
const envs = ['4', '5', '6', '7'];
|
|
2606
|
+
if (envs.includes(SmarticoAPI.getEnvDnsSuffix(this.label_api_key)) && result) {
|
|
2596
2607
|
result = SmarticoAPI.replaceSmrDomainsWithCloudfront(result);
|
|
2597
2608
|
}
|
|
2598
2609
|
if (this.logHTTPTiming) {
|
|
@@ -3047,7 +3058,7 @@ class SmarticoAPI {
|
|
|
3047
3058
|
return await this.send(message, ClassId.GET_CUSTOM_SECTIONS_RESPONSE);
|
|
3048
3059
|
}
|
|
3049
3060
|
async getCustomSectionsT(user_ext_id) {
|
|
3050
|
-
return UICustomSectionTransform(
|
|
3061
|
+
return UICustomSectionTransform(await this.getCustomSections(user_ext_id));
|
|
3051
3062
|
}
|
|
3052
3063
|
async getTranslationsT(user_ext_id, lang_code, areas, cacheSec = 60) {
|
|
3053
3064
|
return await this.coreGetTranslations(user_ext_id, lang_code, areas, 30);
|