@smartico/public-api 0.0.263 → 0.0.265
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/Core/GetAchievementsUserInfoResponse.d.ts +2 -0
- package/dist/Jackpots/GetJackpotWinnersRequest.d.ts +1 -1
- package/dist/Jackpots/JackpotDetails.d.ts +8 -11
- package/dist/Quiz/MarketsAnswersType.d.ts +22 -0
- package/dist/Raffle/GetDrawResponse.d.ts +5 -0
- package/dist/Raffle/GetDrawRunResponse.d.ts +1 -1
- package/dist/Raffle/GetRaffleDrawRunsHistoryResponse.d.ts +1 -1
- package/dist/Raffle/GetRafflesResponse.d.ts +1 -1
- package/dist/Raffle/RaffleClaimPrizeResponse.d.ts +1 -1
- package/dist/SmarticoPublicAPI.d.ts +23 -0
- package/dist/Store/BuyShopItemErrorCode.d.ts +10 -0
- package/dist/Store/BuyShopItemRequest.d.ts +4 -0
- package/dist/Store/BuyShopItemResponse.d.ts +4 -0
- package/dist/Store/GetCategoriesShopResponse.d.ts +5 -0
- package/dist/Store/GetShopItemsResponse.d.ts +5 -0
- package/dist/Store/ShopCategory.d.ts +5 -0
- package/dist/Store/ShopCategoryPublicMeta.d.ts +4 -0
- package/dist/Store/ShopItem.d.ts +9 -0
- package/dist/Store/ShopItemPublicMeta.d.ts +10 -0
- package/dist/Store/ShopItemType.d.ts +4 -0
- package/dist/Store/StorItemPruchased.d.ts +6 -0
- package/dist/WSAPI/WSAPI.d.ts +1 -1
- package/dist/WSAPI/WSAPITypes.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +1 -1
- package/dist/index.modern.mjs.map +1 -1
- package/dist/service/index.d.ts +5 -0
- package/dist/service/types/ErrorCodes.d.ts +13 -0
- package/dist/service/types/GRequest.d.ts +16 -0
- package/dist/service/types/GResponse.d.ts +10 -0
- package/dist/service/types/Game/GameAttemptType.d.ts +6 -0
- package/dist/service/types/Game/GameCanPlayType.d.ts +10 -0
- package/dist/service/types/Game/GameExternalStatus.d.ts +6 -0
- package/dist/service/types/Game/GameInfo.d.ts +9 -0
- package/dist/service/types/Game/GamePick.d.ts +90 -0
- package/dist/service/types/Game/GameUtil.d.ts +7 -0
- package/dist/service/types/SmarticoProto/GetTranslationsRequest.d.ts +7 -0
- package/dist/service/types/SmarticoProto/GetTranslationsResponse.d.ts +7 -0
- package/dist/service/types/SmarticoProto/ProtocolMessage.d.ts +5 -0
- package/dist/service/types/SmarticoProto/ProtocolRequest.d.ts +6 -0
- package/dist/service/types/SmarticoProto/ProtocolResponse.d.ts +5 -0
- package/dist/service/types/SmarticoProto/PublicLabelInfo.d.ts +34 -0
- package/dist/service/types/SmarticoProto/PublicProperties.d.ts +11 -0
- package/dist/service/types/SmarticoProto/ResponseIdentify.d.ts +12 -0
- package/dist/service/types/SmarticoProto/SAW/SAWAcknowledgeType.d.ts +5 -0
- package/dist/service/types/SmarticoProto/SAW/SAWBuyInType.d.ts +5 -0
- package/dist/service/types/SmarticoProto/SAW/SAWDoSpinRequest.d.ts +5 -0
- package/dist/service/types/SmarticoProto/SAW/SAWDoSpinResponse.d.ts +15 -0
- package/dist/service/types/SmarticoProto/SAW/SAWGameType.d.ts +10 -0
- package/dist/service/types/SmarticoProto/SAW/SAWGetTemplatesRequest.d.ts +3 -0
- package/dist/service/types/SmarticoProto/SAW/SAWGetTemplatesResponse.d.ts +5 -0
- package/dist/service/types/SmarticoProto/SAW/SAWPrize.d.ts +11 -0
- package/dist/service/types/SmarticoProto/SAW/SAWPrizeType.d.ts +8 -0
- package/dist/service/types/SmarticoProto/SAW/SAWPrizeUI.d.ts +13 -0
- package/dist/service/types/SmarticoProto/SAW/SAWTemplate.d.ts +21 -0
- package/dist/service/types/SmarticoProto/SAW/SAWTemplateUI.d.ts +31 -0
- package/dist/service/types/SmarticoProto/SAW/SAWWinSoundType.d.ts +12 -0
- package/dist/service/types/SmarticoProto/TranslationArea.d.ts +9 -0
- package/dist/service/types/User/UserInfo.d.ts +10 -0
- package/dist/util/Util.d.ts +51 -0
- package/docs/interfaces/JackpotDetails.md +8 -16
- package/package.json +1 -1
- package/src/Core/GetAchievementsUserInfoResponse.ts +2 -0
- package/src/Jackpots/GetJackpotWinnersRequest.ts +1 -1
- package/src/Jackpots/JackpotDetails.ts +8 -10
- package/src/Raffle/GetDrawRunResponse.ts +1 -1
- package/src/Raffle/GetRaffleDrawRunsHistoryResponse.ts +1 -1
- package/src/Raffle/GetRafflesResponse.ts +1 -2
- package/src/Raffle/RaffleClaimPrizeResponse.ts +1 -1
- package/src/WSAPI/WSAPI.ts +2 -2
- package/src/WSAPI/WSAPITypes.ts +2 -1
|
@@ -3,6 +3,8 @@ export interface GetAchievementsUserInfoResponse extends ProtocolResponse {
|
|
|
3
3
|
level_counter_1?: number;
|
|
4
4
|
level_counter_2?: number;
|
|
5
5
|
points_balance: number;
|
|
6
|
+
gems_balance: number;
|
|
7
|
+
diamonds_balance: number;
|
|
6
8
|
points_ever: number;
|
|
7
9
|
current_level: number;
|
|
8
10
|
points_board_period_type_1: number;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { AchRelatedGame } from '../Base/AchRelatedGame';
|
|
2
1
|
import { JackpotContributionType } from './JackpotContributionType';
|
|
3
2
|
import { JackpotPot } from './JackpotPot';
|
|
4
3
|
import { JackpotPublicMeta } from './JackpotPublicMeta';
|
|
@@ -11,25 +10,23 @@ import { JackpotType } from './JackpotType';
|
|
|
11
10
|
interface JackpotDetails {
|
|
12
11
|
/** ID of the jackpot template */
|
|
13
12
|
jp_template_id: number;
|
|
14
|
-
/**
|
|
13
|
+
/** Type of jackpot logic */
|
|
15
14
|
jp_type_id: JackpotType;
|
|
16
15
|
/** UI information of jackpot, like name, description, etc. */
|
|
17
16
|
jp_public_meta: JackpotPublicMeta;
|
|
18
|
-
/**
|
|
17
|
+
/** Base currency of the jackpot */
|
|
19
18
|
jp_currency: string;
|
|
20
|
-
/**
|
|
19
|
+
/** Wallet currency of currently logged in user */
|
|
21
20
|
user_currency: string;
|
|
22
|
-
/**
|
|
23
|
-
related_games?: AchRelatedGame[];
|
|
24
|
-
/** type of the user contribution to the jackpot */
|
|
21
|
+
/** Type of the user contribution to the jackpot */
|
|
25
22
|
contribution_type: JackpotContributionType;
|
|
26
|
-
/**
|
|
23
|
+
/** Value of the user contribution. Fixed amount or percentage of bet depending on the contribution type */
|
|
27
24
|
contribution_value: number;
|
|
28
|
-
/**
|
|
25
|
+
/** Information of current value of the jackpot */
|
|
29
26
|
pot: JackpotPot;
|
|
30
|
-
/**
|
|
27
|
+
/** Indication if the current user is opted in to the jackpot */
|
|
31
28
|
is_opted_in: boolean;
|
|
32
|
-
/**
|
|
29
|
+
/** Indicates whether all games are eligible for the jackpot */
|
|
33
30
|
ach_related_game_allow_all: boolean;
|
|
34
31
|
/** The number of users who have opted in to participate in the jackpot */
|
|
35
32
|
registration_count: number;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare enum MarketsValueType {
|
|
2
|
+
HomeTeam = "1",
|
|
3
|
+
AwayTeam = "2",
|
|
4
|
+
Draw = "x",
|
|
5
|
+
HomeTeamHomeTeam = "1/1",
|
|
6
|
+
HomeTeamDraw = "1/x",
|
|
7
|
+
HomeTeamAwayTeam = "1/2",
|
|
8
|
+
DrawHomeTeam = "x/1",
|
|
9
|
+
DrawDraw = "x/x",
|
|
10
|
+
DrawAwayTeam = "x/2",
|
|
11
|
+
AwayTeamHomeTeam = "2/1",
|
|
12
|
+
AwayTeamDraw = "2/x",
|
|
13
|
+
AwayTeamAwayTeam = "2/2",
|
|
14
|
+
Yes = "yes",
|
|
15
|
+
No = "no",
|
|
16
|
+
Odd = "odd",
|
|
17
|
+
Even = "even",
|
|
18
|
+
HomeOdd = "1/odd",
|
|
19
|
+
HomeEven = "1/even",
|
|
20
|
+
AwayOdd = "2/odd",
|
|
21
|
+
AwayEven = "2/even"
|
|
22
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TRaffleDraw } from '
|
|
1
|
+
import { TRaffleDraw } from '../WSAPI/WSAPITypes';
|
|
2
2
|
import { ProtocolResponse } from '../Base/ProtocolResponse';
|
|
3
3
|
import { RaffleDraw } from './RaffleDraw';
|
|
4
4
|
export interface GetDrawRunResponse extends ProtocolResponse {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TRaffleDrawRun } from '
|
|
1
|
+
import { TRaffleDrawRun } from '../WSAPI/WSAPITypes';
|
|
2
2
|
import { ProtocolResponse } from '../Base/ProtocolResponse';
|
|
3
3
|
import { RaffleDrawRun } from './RaffleDrawRun';
|
|
4
4
|
export interface GetRaffleDrawRunsHistoryResponse extends ProtocolResponse {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TRaffle, TRaffleDraw, TRafflePrize, TRafflePrizeWinner, TRaffleTicket } from '
|
|
1
|
+
import { TRaffle, TRaffleDraw, TRafflePrize, TRafflePrizeWinner, TRaffleTicket } from '../WSAPI/WSAPITypes';
|
|
2
2
|
import { ProtocolResponse } from '../Base/ProtocolResponse';
|
|
3
3
|
import { Raffle } from './Raffle';
|
|
4
4
|
import { RaffleDraw } from './RaffleDraw';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TransformedRaffleClaimPrizeResponse } from "
|
|
1
|
+
import { TransformedRaffleClaimPrizeResponse } from "../WSAPI/WSAPITypes";
|
|
2
2
|
import { ProtocolResponse } from "../Base/ProtocolResponse";
|
|
3
3
|
export interface RaffleClaimPrizeResponse extends ProtocolResponse {
|
|
4
4
|
errCode: number;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ClassId } from "./Base/ClassId";
|
|
2
|
+
import { SAWGetTemplatesResponse } from './MiniGames/SAWGetTemplatesResponse';
|
|
3
|
+
import { SAWTemplate } from './MiniGames/SAWTemplate';
|
|
4
|
+
import { ILogger } from './ILogger';
|
|
5
|
+
interface IOptions {
|
|
6
|
+
logger?: ILogger;
|
|
7
|
+
logCIDs?: ClassId[];
|
|
8
|
+
logHTTPTiming?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare class SmarticoPublicApi {
|
|
11
|
+
private label_api_key;
|
|
12
|
+
private brand_api_key;
|
|
13
|
+
private publicUrl;
|
|
14
|
+
private logger;
|
|
15
|
+
private logCIDs;
|
|
16
|
+
private logHTTPTiming;
|
|
17
|
+
constructor(label_api_key: string, brand_api_key: string, options?: IOptions);
|
|
18
|
+
private send;
|
|
19
|
+
private buildMessage;
|
|
20
|
+
miniGamesGetTemplates(user_ext_id: string): Promise<SAWGetTemplatesResponse>;
|
|
21
|
+
miniGamesFormatTemplatesForWidget(templates: SAWTemplate[], pointsBalance: number): any[];
|
|
22
|
+
}
|
|
23
|
+
export { SmarticoPublicApi };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare enum BuyShopItemErrorCode {
|
|
2
|
+
FAILED_TO_BUY_SHOP_ITEM = 121,
|
|
3
|
+
SHOP_NO_BALANCE = 11000,
|
|
4
|
+
SHOP_WRONG_LABEL = 11001,
|
|
5
|
+
SHOP_FAILED_TO_BUY_BONUS = 11002,
|
|
6
|
+
SHOP_FAILED_TO_BUY_SHOP_ITEM_CONDITION = 11003,
|
|
7
|
+
SHOP_FAILED_TO_BUY_SHOP_ITEM_CONDITION_PURSHASE = 11004,
|
|
8
|
+
SHOP_FAILED_TO_BUY_MATCHING_BONUS = 11005,
|
|
9
|
+
SHOP_FAILED_MAX_BOUGHT_ITEMS_REACHED = 11006
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ShopItemPublicMeta } from "./ShopItemPublicMeta";
|
|
2
|
+
import { ShopItemType } from "./ShopItemType";
|
|
3
|
+
export interface ShopItem {
|
|
4
|
+
id: number;
|
|
5
|
+
itemTypeId: ShopItemType;
|
|
6
|
+
itemPublicMeta: ShopItemPublicMeta;
|
|
7
|
+
categoryIds?: number[];
|
|
8
|
+
canBuy?: boolean;
|
|
9
|
+
}
|
package/dist/WSAPI/WSAPI.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { LeaderBoardPeriodType } from '../Leaderboard';
|
|
|
4
4
|
import { JackpotDetails, JackpotWinnerHistory, JackpotsOptinResponse, JackpotsOptoutResponse } from '../Jackpots';
|
|
5
5
|
import { GetRelatedAchTourResponse } from '../Missions/GetRelatedAchTourResponse';
|
|
6
6
|
import { InboxCategories } from '../Inbox/InboxCategories';
|
|
7
|
-
import { TGetJackpotEligibleGamesResponse } from '
|
|
7
|
+
import { TGetJackpotEligibleGamesResponse } from '../Jackpots/GetJackpotEligibleGamesResponse';
|
|
8
8
|
/** @group General API */
|
|
9
9
|
export declare class WSAPI {
|
|
10
10
|
private api;
|
|
@@ -7,7 +7,7 @@ import { AchCustomLayoutTheme, AchCustomSectionType, AchMissionsTabsOptions, Ach
|
|
|
7
7
|
import { BonusStatus, BonusTemplateMetaMap, BonusMetaMap } from '../Bonuses';
|
|
8
8
|
import { PrizeModifiers } from '../MiniGames/PrizeModifiers';
|
|
9
9
|
import { InboxCategories } from '../Inbox/InboxCategories';
|
|
10
|
-
import { RaffleDrawInstanceState, RaffleDrawTypeExecution } from '
|
|
10
|
+
import { RaffleDrawInstanceState, RaffleDrawTypeExecution } from '../Raffle';
|
|
11
11
|
type TRibbon = 'sale' | 'hot' | 'new' | 'vip' | string;
|
|
12
12
|
/**
|
|
13
13
|
* TMiniGamePrize describes the information of prize in the array of prizes in the TMiniGameTemplate
|
package/dist/index.js
CHANGED
|
@@ -3045,7 +3045,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3045
3045
|
jp_template_id = _ref10.jp_template_id;
|
|
3046
3046
|
try {
|
|
3047
3047
|
var _this46 = this;
|
|
3048
|
-
return Promise.resolve(OCache.use(onUpdateContextKey.JackpotWinners, exports.ECacheContext.WSAPI, function () {
|
|
3048
|
+
return Promise.resolve(OCache.use(onUpdateContextKey.JackpotWinners + jp_template_id, exports.ECacheContext.WSAPI, function () {
|
|
3049
3049
|
return _this46.api.getJackpotWinnersT(null, limit, offset, jp_template_id);
|
|
3050
3050
|
}, JACKPOT_WINNERS_CACHE_SEC));
|
|
3051
3051
|
} catch (e) {
|