@smartico/public-api 0.0.303 → 0.0.305
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/Missions/AchievementPublicMeta.d.ts +2 -0
- package/dist/Store/BuyStoreItemErrorCode.d.ts +3 -1
- package/dist/WSAPI/WSAPITypes.d.ts +4 -0
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +5 -1
- package/dist/index.modern.mjs.map +1 -1
- package/docs/enums/BuyStoreItemErrorCode.md +8 -0
- package/docs/interfaces/TMissionOrBadge.md +16 -0
- package/package.json +1 -1
- package/src/Missions/AchievementPublicMeta.ts +2 -0
- package/src/Missions/UserAchievement.ts +2 -0
- package/src/Store/BuyStoreItemErrorCode.ts +2 -0
- package/src/WSAPI/WSAPITypes.ts +7 -1
|
@@ -18,5 +18,7 @@ export declare enum BuyStoreItemErrorCode {
|
|
|
18
18
|
/** User doesn't have enough gems on balance */
|
|
19
19
|
SHOP_NO_BALANCE_GEMS = 11011,
|
|
20
20
|
/** User doesn't have enough diamonds on balance */
|
|
21
|
-
SHOP_NO_BALANCE_DIAMONDS = 11012
|
|
21
|
+
SHOP_NO_BALANCE_DIAMONDS = 11012,
|
|
22
|
+
/** Failed to buy item because of purchase limitation */
|
|
23
|
+
SHOP_FAILED_PURCHASE_LIMITATION = 11014
|
|
22
24
|
}
|
|
@@ -608,6 +608,10 @@ export interface TMissionOrBadge {
|
|
|
608
608
|
next_recurrence_date_ts?: number;
|
|
609
609
|
/** Availability status of the mission depends on the defined time limits */
|
|
610
610
|
availability_status?: AchievementAvailabilityStatus;
|
|
611
|
+
/** Title for the claim reward button */
|
|
612
|
+
claim_button_title?: string;
|
|
613
|
+
/** Action for the claim reward button */
|
|
614
|
+
claim_button_action?: string;
|
|
611
615
|
}
|
|
612
616
|
export interface AchRelatedGame {
|
|
613
617
|
/** The ID of the related game */
|
package/dist/index.js
CHANGED
|
@@ -910,6 +910,8 @@ exports.BuyStoreItemErrorCode = void 0;
|
|
|
910
910
|
BuyStoreItemErrorCode[BuyStoreItemErrorCode["SHOP_NO_BALANCE_GEMS"] = 11011] = "SHOP_NO_BALANCE_GEMS";
|
|
911
911
|
/** User doesn't have enough diamonds on balance */
|
|
912
912
|
BuyStoreItemErrorCode[BuyStoreItemErrorCode["SHOP_NO_BALANCE_DIAMONDS"] = 11012] = "SHOP_NO_BALANCE_DIAMONDS";
|
|
913
|
+
/** Failed to buy item because of purchase limitation */
|
|
914
|
+
BuyStoreItemErrorCode[BuyStoreItemErrorCode["SHOP_FAILED_PURCHASE_LIMITATION"] = 11014] = "SHOP_FAILED_PURCHASE_LIMITATION";
|
|
913
915
|
})(exports.BuyStoreItemErrorCode || (exports.BuyStoreItemErrorCode = {}));
|
|
914
916
|
|
|
915
917
|
var StoreCategoryTransform = function StoreCategoryTransform(items) {
|
|
@@ -1351,7 +1353,9 @@ var UserAchievementTransform = function UserAchievementTransform(items) {
|
|
|
1351
1353
|
completed_this_week: completedThisWeek,
|
|
1352
1354
|
completed_this_month: completedThisMonth,
|
|
1353
1355
|
custom_section_type_id: r.ach_public_meta.custom_section_type_id,
|
|
1354
|
-
availability_status: MissionUtils.getAvailabilityStatus(r)
|
|
1356
|
+
availability_status: MissionUtils.getAvailabilityStatus(r),
|
|
1357
|
+
claim_button_title: r.ach_public_meta.claim_button_title,
|
|
1358
|
+
claim_button_action: r.ach_public_meta.claim_button_action
|
|
1355
1359
|
};
|
|
1356
1360
|
if (r.ach_status_id === exports.AchievementStatus.Recurring) {
|
|
1357
1361
|
x.next_recurrence_date_ts = r.next_recurrence_date_ts;
|