@smartico/public-api 0.0.274 → 0.0.276
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/Jackpots/JackpotPot.d.ts +8 -10
- package/dist/MiniGames/SAWSpinErrorCode.d.ts +5 -1
- package/dist/Raffle/GetDrawRunResponse.d.ts +1 -0
- package/dist/Raffle/GetRaffleDrawRunsHistoryResponse.d.ts +1 -0
- package/dist/Raffle/GetRafflesResponse.d.ts +5 -0
- package/dist/Raffle/Raffle.d.ts +1 -1
- package/dist/Raffle/RaffleClaimPrizeResponse.d.ts +1 -0
- package/dist/Raffle/RafflePrize.d.ts +1 -1
- package/dist/Raffle/index.d.ts +1 -0
- package/dist/Store/BuyStoreItemErrorCode.d.ts +5 -1
- package/dist/WSAPI/WSAPITypes.d.ts +2 -2
- package/dist/index.js +25 -7
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +24 -6
- package/dist/index.modern.mjs.map +1 -1
- package/docs/README.md +11 -128
- package/docs/classes/WSAPI.md +1 -1
- package/docs/enums/AchCustomSectionType.md +67 -0
- package/docs/enums/BuyStoreItemErrorCode.md +16 -0
- package/docs/enums/InboxCategories.md +19 -0
- package/docs/enums/JackPotTemparature.md +33 -0
- package/docs/enums/PrizeModifiers.md +49 -0
- package/docs/enums/SAWAcknowledgeTypeName.md +25 -0
- package/docs/enums/SAWAskForUsername.md +13 -0
- package/docs/enums/SAWGameLayout.md +13 -0
- package/docs/enums/SAWSpinErrorCode.md +16 -0
- package/docs/interfaces/JackpotPot.md +1 -4
- package/docs/interfaces/Raffle.md +1 -1
- package/docs/interfaces/RaffleDraw.md +1 -1
- package/docs/interfaces/RaffleDrawPublicMeta.md +65 -0
- package/docs/interfaces/RaffleDrawRun.md +1 -1
- package/docs/interfaces/RafflePrize.md +1 -1
- package/docs/interfaces/RafflePrizePublicMeta.md +25 -0
- package/docs/interfaces/RafflePublicMeta.md +59 -0
- package/docs/interfaces/SAWTemplateUI.md +284 -0
- package/docs/interfaces/TInboxMessage.md +1 -1
- package/docs/interfaces/TMiniGamePrize.md +2 -2
- package/docs/interfaces/TMiniGameTemplate.md +1 -1
- package/docs/interfaces/TUICustomSection.md +1 -1
- package/package.json +1 -1
- package/src/Jackpots/JackpotPot.ts +8 -10
- package/src/MiniGames/SAWSpinErrorCode.ts +4 -0
- package/src/Raffle/GetDrawRunResponse.ts +1 -1
- package/src/Raffle/GetRaffleDrawRunsHistoryResponse.ts +1 -0
- package/src/Raffle/GetRafflesResponse.ts +5 -0
- package/src/Raffle/Raffle.ts +1 -1
- package/src/Raffle/RaffleClaimPrizeResponse.ts +1 -1
- package/src/Raffle/RafflePrize.ts +1 -1
- package/src/Raffle/index.ts +1 -0
- package/src/SmarticoAPI.ts +2 -2
- package/src/Store/BuyStoreItemErrorCode.ts +4 -0
- package/src/WSAPI/WSAPITypes.ts +5 -3
- package/dist/Quiz/MarketsAnswersType.d.ts +0 -22
- package/dist/Raffle/GetDrawResponse.d.ts +0 -5
- package/dist/SmarticoPublicAPI.d.ts +0 -23
- package/dist/Store/BuyShopItemErrorCode.d.ts +0 -10
- package/dist/Store/BuyShopItemRequest.d.ts +0 -4
- package/dist/Store/BuyShopItemResponse.d.ts +0 -4
- package/dist/Store/GetCategoriesShopResponse.d.ts +0 -5
- package/dist/Store/GetShopItemsResponse.d.ts +0 -5
- package/dist/Store/ShopCategory.d.ts +0 -5
- package/dist/Store/ShopCategoryPublicMeta.d.ts +0 -4
- package/dist/Store/ShopItem.d.ts +0 -9
- package/dist/Store/ShopItemPublicMeta.d.ts +0 -10
- package/dist/Store/ShopItemType.d.ts +0 -4
- package/dist/Store/StorItemPruchased.d.ts +0 -6
- package/dist/service/index.d.ts +0 -5
- package/dist/service/types/ErrorCodes.d.ts +0 -13
- package/dist/service/types/GRequest.d.ts +0 -16
- package/dist/service/types/GResponse.d.ts +0 -10
- package/dist/service/types/Game/GameAttemptType.d.ts +0 -6
- package/dist/service/types/Game/GameCanPlayType.d.ts +0 -10
- package/dist/service/types/Game/GameExternalStatus.d.ts +0 -6
- package/dist/service/types/Game/GameInfo.d.ts +0 -9
- package/dist/service/types/Game/GamePick.d.ts +0 -90
- package/dist/service/types/Game/GameUtil.d.ts +0 -7
- package/dist/service/types/SmarticoProto/GetTranslationsRequest.d.ts +0 -7
- package/dist/service/types/SmarticoProto/GetTranslationsResponse.d.ts +0 -7
- package/dist/service/types/SmarticoProto/ProtocolMessage.d.ts +0 -5
- package/dist/service/types/SmarticoProto/ProtocolRequest.d.ts +0 -6
- package/dist/service/types/SmarticoProto/ProtocolResponse.d.ts +0 -5
- package/dist/service/types/SmarticoProto/PublicLabelInfo.d.ts +0 -34
- package/dist/service/types/SmarticoProto/PublicProperties.d.ts +0 -11
- package/dist/service/types/SmarticoProto/ResponseIdentify.d.ts +0 -12
- package/dist/service/types/SmarticoProto/SAW/SAWAcknowledgeType.d.ts +0 -5
- package/dist/service/types/SmarticoProto/SAW/SAWBuyInType.d.ts +0 -5
- package/dist/service/types/SmarticoProto/SAW/SAWDoSpinRequest.d.ts +0 -5
- package/dist/service/types/SmarticoProto/SAW/SAWDoSpinResponse.d.ts +0 -15
- package/dist/service/types/SmarticoProto/SAW/SAWGameType.d.ts +0 -10
- package/dist/service/types/SmarticoProto/SAW/SAWGetTemplatesRequest.d.ts +0 -3
- package/dist/service/types/SmarticoProto/SAW/SAWGetTemplatesResponse.d.ts +0 -5
- package/dist/service/types/SmarticoProto/SAW/SAWPrize.d.ts +0 -11
- package/dist/service/types/SmarticoProto/SAW/SAWPrizeType.d.ts +0 -8
- package/dist/service/types/SmarticoProto/SAW/SAWPrizeUI.d.ts +0 -13
- package/dist/service/types/SmarticoProto/SAW/SAWTemplate.d.ts +0 -21
- package/dist/service/types/SmarticoProto/SAW/SAWTemplateUI.d.ts +0 -31
- package/dist/service/types/SmarticoProto/SAW/SAWWinSoundType.d.ts +0 -12
- package/dist/service/types/SmarticoProto/TranslationArea.d.ts +0 -9
- package/dist/service/types/User/UserInfo.d.ts +0 -10
- package/dist/util/Util.d.ts +0 -51
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
declare enum JackPotTemparature {
|
|
2
|
-
/** cold */
|
|
2
|
+
/** cold, seed amount < current pot < (min amount - seed amount)/2 */
|
|
3
3
|
COLD = 0,
|
|
4
|
-
/** warm */
|
|
4
|
+
/** warm, (min amount - seed amount)/2 < current pot < min amount */
|
|
5
5
|
WARM = 1,
|
|
6
|
-
/** hot */
|
|
7
|
-
HOT = 2
|
|
6
|
+
/** hot, current pot > min amount, entered explosion range */
|
|
7
|
+
HOT = 2,
|
|
8
|
+
/** burning, current pot > min amount + 0.5 * (max amount - min amount). E.g. mid of allowed explosion range */
|
|
9
|
+
BURNING = 3
|
|
8
10
|
}
|
|
9
11
|
interface JackpotPot {
|
|
10
12
|
/** ID of the jackpot template */
|
|
@@ -17,11 +19,7 @@ interface JackpotPot {
|
|
|
17
19
|
current_pot_amount_user_currency: number;
|
|
18
20
|
/** the date/time when this pot exploded */
|
|
19
21
|
explode_date_ts: number;
|
|
20
|
-
/** current pot temperature
|
|
21
|
-
* 0 - cold. seed amount < current pot < (min amount - seed amount)/2
|
|
22
|
-
* 1 - warm. (min amount - seed amount)/2 < current pot < min amount
|
|
23
|
-
* 2 - hot. current pot > min amount
|
|
24
|
-
*/
|
|
22
|
+
/** current pot temperature */
|
|
25
23
|
current_pot_temperature: JackPotTemparature;
|
|
26
24
|
}
|
|
27
|
-
export { JackpotPot };
|
|
25
|
+
export { JackpotPot, JackPotTemparature };
|
|
@@ -14,5 +14,9 @@ export declare enum SAWSpinErrorCode {
|
|
|
14
14
|
/** Special code for the 'visitor' mode */
|
|
15
15
|
SAW_VISITOR_STOP_SPIN_REQUEST = -40001,
|
|
16
16
|
/** User is not in the segment */
|
|
17
|
-
SAW_NOT_IN_SEGMENT = 40009
|
|
17
|
+
SAW_NOT_IN_SEGMENT = 40009,
|
|
18
|
+
/** User doesn't have enough gems to play. In case buy in type for the game is 'gems' based */
|
|
19
|
+
SAW_NO_BALANCE_GEMS = 40011,
|
|
20
|
+
/** User doesn't have enough diamonds to play. In case buy in type for the game is 'diamonds' based */
|
|
21
|
+
SAW_NO_BALANCE_DIAMONDS = 40012
|
|
18
22
|
}
|
|
@@ -4,4 +4,5 @@ import { RaffleDrawRun } from './RaffleDrawRun';
|
|
|
4
4
|
export interface GetRaffleDrawRunsHistoryResponse extends ProtocolResponse {
|
|
5
5
|
draw_runs: RaffleDrawRun[];
|
|
6
6
|
}
|
|
7
|
+
/** @hidden */
|
|
7
8
|
export declare const drawRunHistoryTransform: (res: GetRaffleDrawRunsHistoryResponse) => TRaffleDrawRun[];
|
|
@@ -8,8 +8,13 @@ import { RaffleTicket } from './RaffleTicket';
|
|
|
8
8
|
export interface GetRafflesResponse extends ProtocolResponse {
|
|
9
9
|
items: Raffle[];
|
|
10
10
|
}
|
|
11
|
+
/** @hidden */
|
|
11
12
|
export declare const ticketsTransform: (items: RaffleTicket[]) => TRaffleTicket[];
|
|
13
|
+
/** @hidden */
|
|
12
14
|
export declare const winnersTransform: (items: RafflePrizeWinner[]) => TRafflePrizeWinner[];
|
|
15
|
+
/** @hidden */
|
|
13
16
|
export declare const prizeTransform: (items: RafflePrize[]) => TRafflePrize[];
|
|
17
|
+
/** @hidden */
|
|
14
18
|
export declare const drawTransform: (items: RaffleDraw[]) => TRaffleDraw[];
|
|
19
|
+
/** @hidden */
|
|
15
20
|
export declare const raffleTransform: (items: Raffle[]) => TRaffle[];
|
package/dist/Raffle/Raffle.d.ts
CHANGED
package/dist/Raffle/index.d.ts
CHANGED
|
@@ -14,5 +14,9 @@ export declare enum BuyStoreItemErrorCode {
|
|
|
14
14
|
/** Failed to buy item because of limit of max items is reached */
|
|
15
15
|
SHOP_FAILED_MAX_BOUGHT_ITEMS_REACHED = 11006,
|
|
16
16
|
/** Failed to buy item because no more items are available */
|
|
17
|
-
SHOP_FAILED_POOL_EMPTY = 11009
|
|
17
|
+
SHOP_FAILED_POOL_EMPTY = 11009,
|
|
18
|
+
/** User doesn't have enough gems on balance */
|
|
19
|
+
SHOP_NO_BALANCE_GEMS = 11011,
|
|
20
|
+
/** User doesn't have enough diamonds on balance */
|
|
21
|
+
SHOP_NO_BALANCE_DIAMONDS = 11012
|
|
18
22
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BuyStoreItemErrorCode } from '../Store';
|
|
2
|
-
import { MiniGamePrizeTypeName, SAWAcknowledgeTypeName, SAWBuyInTypeName, SAWGameTypeName, SAWSpinErrorCode, SAWTemplate, SAWTemplateUI } from '../MiniGames';
|
|
2
|
+
import { MiniGamePrizeTypeName, SAWAcknowledgeTypeName, SAWAskForUsername, SAWBuyInTypeName, SAWGameLayout, SAWGameTypeName, SAWSpinErrorCode, SAWTemplate, SAWTemplateUI } from '../MiniGames';
|
|
3
3
|
import { TournamentRegistrationError, TournamentRegistrationStatusName, TournamentRegistrationTypeName } from '../Tournaments';
|
|
4
4
|
import { AchievementAvailabilityStatus } from '../Missions';
|
|
5
5
|
import { LeaderBoardPeriodType } from '../Leaderboard';
|
|
@@ -1076,4 +1076,4 @@ export interface TransformedRaffleClaimPrizeResponse {
|
|
|
1076
1076
|
/** Error message, will be exposed only if ErrorCode is not 0 */
|
|
1077
1077
|
errorMessage?: string;
|
|
1078
1078
|
}
|
|
1079
|
-
export {};
|
|
1079
|
+
export { SAWAcknowledgeTypeName, PrizeModifiers, SAWTemplateUI, InboxCategories, AchCustomSectionType, SAWAskForUsername, SAWGameLayout };
|
package/dist/index.js
CHANGED
|
@@ -515,6 +515,10 @@ exports.SAWSpinErrorCode = void 0;
|
|
|
515
515
|
SAWSpinErrorCode[SAWSpinErrorCode["SAW_VISITOR_STOP_SPIN_REQUEST"] = -40001] = "SAW_VISITOR_STOP_SPIN_REQUEST";
|
|
516
516
|
/** User is not in the segment */
|
|
517
517
|
SAWSpinErrorCode[SAWSpinErrorCode["SAW_NOT_IN_SEGMENT"] = 40009] = "SAW_NOT_IN_SEGMENT";
|
|
518
|
+
/** User doesn't have enough gems to play. In case buy in type for the game is 'gems' based */
|
|
519
|
+
SAWSpinErrorCode[SAWSpinErrorCode["SAW_NO_BALANCE_GEMS"] = 40011] = "SAW_NO_BALANCE_GEMS";
|
|
520
|
+
/** User doesn't have enough diamonds to play. In case buy in type for the game is 'diamonds' based */
|
|
521
|
+
SAWSpinErrorCode[SAWSpinErrorCode["SAW_NO_BALANCE_DIAMONDS"] = 40012] = "SAW_NO_BALANCE_DIAMONDS";
|
|
518
522
|
})(exports.SAWSpinErrorCode || (exports.SAWSpinErrorCode = {}));
|
|
519
523
|
|
|
520
524
|
var _SAWWinSoundFiles;
|
|
@@ -879,6 +883,10 @@ exports.BuyStoreItemErrorCode = void 0;
|
|
|
879
883
|
BuyStoreItemErrorCode[BuyStoreItemErrorCode["SHOP_FAILED_MAX_BOUGHT_ITEMS_REACHED"] = 11006] = "SHOP_FAILED_MAX_BOUGHT_ITEMS_REACHED";
|
|
880
884
|
/** Failed to buy item because no more items are available */
|
|
881
885
|
BuyStoreItemErrorCode[BuyStoreItemErrorCode["SHOP_FAILED_POOL_EMPTY"] = 11009] = "SHOP_FAILED_POOL_EMPTY";
|
|
886
|
+
/** User doesn't have enough gems on balance */
|
|
887
|
+
BuyStoreItemErrorCode[BuyStoreItemErrorCode["SHOP_NO_BALANCE_GEMS"] = 11011] = "SHOP_NO_BALANCE_GEMS";
|
|
888
|
+
/** User doesn't have enough diamonds on balance */
|
|
889
|
+
BuyStoreItemErrorCode[BuyStoreItemErrorCode["SHOP_NO_BALANCE_DIAMONDS"] = 11012] = "SHOP_NO_BALANCE_DIAMONDS";
|
|
882
890
|
})(exports.BuyStoreItemErrorCode || (exports.BuyStoreItemErrorCode = {}));
|
|
883
891
|
|
|
884
892
|
var StoreCategoryTransform = function StoreCategoryTransform(items) {
|
|
@@ -1657,6 +1665,7 @@ var GetLevelMapResponseTransform = function GetLevelMapResponseTransform(levels)
|
|
|
1657
1665
|
});
|
|
1658
1666
|
};
|
|
1659
1667
|
|
|
1668
|
+
/** @hidden */
|
|
1660
1669
|
var ticketsTransform = function ticketsTransform(items) {
|
|
1661
1670
|
return items.map(function (item) {
|
|
1662
1671
|
return {
|
|
@@ -1665,6 +1674,7 @@ var ticketsTransform = function ticketsTransform(items) {
|
|
|
1665
1674
|
};
|
|
1666
1675
|
});
|
|
1667
1676
|
};
|
|
1677
|
+
/** @hidden */
|
|
1668
1678
|
var winnersTransform = function winnersTransform(items) {
|
|
1669
1679
|
return items.map(function (item) {
|
|
1670
1680
|
return {
|
|
@@ -1680,6 +1690,7 @@ var winnersTransform = function winnersTransform(items) {
|
|
|
1680
1690
|
};
|
|
1681
1691
|
});
|
|
1682
1692
|
};
|
|
1693
|
+
/** @hidden */
|
|
1683
1694
|
var prizeTransform = function prizeTransform(items) {
|
|
1684
1695
|
return items.map(function (item) {
|
|
1685
1696
|
return {
|
|
@@ -1701,6 +1712,7 @@ var prizeTransform = function prizeTransform(items) {
|
|
|
1701
1712
|
};
|
|
1702
1713
|
});
|
|
1703
1714
|
};
|
|
1715
|
+
/** @hidden */
|
|
1704
1716
|
var drawTransform = function drawTransform(items) {
|
|
1705
1717
|
return items.map(function (item) {
|
|
1706
1718
|
return {
|
|
@@ -1728,6 +1740,7 @@ var drawTransform = function drawTransform(items) {
|
|
|
1728
1740
|
};
|
|
1729
1741
|
});
|
|
1730
1742
|
};
|
|
1743
|
+
/** @hidden */
|
|
1731
1744
|
var raffleTransform = function raffleTransform(items) {
|
|
1732
1745
|
return items.map(function (item) {
|
|
1733
1746
|
return {
|
|
@@ -1747,6 +1760,7 @@ var raffleTransform = function raffleTransform(items) {
|
|
|
1747
1760
|
});
|
|
1748
1761
|
};
|
|
1749
1762
|
|
|
1763
|
+
/** @hidden */
|
|
1750
1764
|
var drawRunTransform = function drawRunTransform(res) {
|
|
1751
1765
|
return {
|
|
1752
1766
|
id: res.draw.draw_id,
|
|
@@ -1796,6 +1810,7 @@ var RaffleDrawTypeExecution;
|
|
|
1796
1810
|
RaffleDrawTypeExecution[RaffleDrawTypeExecution["Grand"] = 2] = "Grand";
|
|
1797
1811
|
})(RaffleDrawTypeExecution || (RaffleDrawTypeExecution = {}));
|
|
1798
1812
|
|
|
1813
|
+
/** @hidden */
|
|
1799
1814
|
var drawRunHistoryTransform = function drawRunHistoryTransform(res) {
|
|
1800
1815
|
return res.draw_runs.map(function (item) {
|
|
1801
1816
|
return {
|
|
@@ -1818,6 +1833,7 @@ var drawRunHistoryTransform = function drawRunHistoryTransform(res) {
|
|
|
1818
1833
|
});
|
|
1819
1834
|
};
|
|
1820
1835
|
|
|
1836
|
+
/** @hidden */
|
|
1821
1837
|
var raffleClaimPrizeResponseTransform = function raffleClaimPrizeResponseTransform(info) {
|
|
1822
1838
|
return {
|
|
1823
1839
|
errorCode: info.errCode,
|
|
@@ -3594,7 +3610,7 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
3594
3610
|
try {
|
|
3595
3611
|
var tsBaseRQ = _this3.buildMessage(user_ext_id, exports.ClassId.GET_TRANSLATIONS_REQUEST, {
|
|
3596
3612
|
lang_code: DEFAULT_LANG_EN,
|
|
3597
|
-
hash_code:
|
|
3613
|
+
hash_code: null,
|
|
3598
3614
|
areas: areas
|
|
3599
3615
|
});
|
|
3600
3616
|
return Promise.resolve(_this3.send(tsBaseRQ, exports.ClassId.GET_TRANSLATIONS_RESPONSE)).then(function (trBase) {
|
|
@@ -3602,7 +3618,7 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
3602
3618
|
if (lang_code !== DEFAULT_LANG_EN) {
|
|
3603
3619
|
var trUserRQ = _this3.buildMessage(user_ext_id, exports.ClassId.GET_TRANSLATIONS_REQUEST, {
|
|
3604
3620
|
lang_code: lang_code,
|
|
3605
|
-
hash_code:
|
|
3621
|
+
hash_code: null,
|
|
3606
3622
|
areas: areas
|
|
3607
3623
|
});
|
|
3608
3624
|
return Promise.resolve(_this3.send(trUserRQ, exports.ClassId.GET_TRANSLATIONS_RESPONSE)).then(function (trUser) {
|
|
@@ -4928,15 +4944,17 @@ exports.JackpotContributionType = void 0;
|
|
|
4928
4944
|
JackpotContributionType[JackpotContributionType["Percentage"] = 2] = "Percentage";
|
|
4929
4945
|
})(exports.JackpotContributionType || (exports.JackpotContributionType = {}));
|
|
4930
4946
|
|
|
4931
|
-
|
|
4947
|
+
exports.JackPotTemparature = void 0;
|
|
4932
4948
|
(function (JackPotTemparature) {
|
|
4933
|
-
/** cold */
|
|
4949
|
+
/** cold, seed amount < current pot < (min amount - seed amount)/2 */
|
|
4934
4950
|
JackPotTemparature[JackPotTemparature["COLD"] = 0] = "COLD";
|
|
4935
|
-
/** warm */
|
|
4951
|
+
/** warm, (min amount - seed amount)/2 < current pot < min amount */
|
|
4936
4952
|
JackPotTemparature[JackPotTemparature["WARM"] = 1] = "WARM";
|
|
4937
|
-
/** hot */
|
|
4953
|
+
/** hot, current pot > min amount, entered explosion range */
|
|
4938
4954
|
JackPotTemparature[JackPotTemparature["HOT"] = 2] = "HOT";
|
|
4939
|
-
|
|
4955
|
+
/** burning, current pot > min amount + 0.5 * (max amount - min amount). E.g. mid of allowed explosion range */
|
|
4956
|
+
JackPotTemparature[JackPotTemparature["BURNING"] = 3] = "BURNING";
|
|
4957
|
+
})(exports.JackPotTemparature || (exports.JackPotTemparature = {}));
|
|
4940
4958
|
|
|
4941
4959
|
exports.JackpotType = void 0;
|
|
4942
4960
|
(function (JackpotType) {
|