@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.
Files changed (72) hide show
  1. package/dist/Core/GetAchievementsUserInfoResponse.d.ts +2 -0
  2. package/dist/Jackpots/GetJackpotWinnersRequest.d.ts +1 -1
  3. package/dist/Jackpots/JackpotDetails.d.ts +8 -11
  4. package/dist/Quiz/MarketsAnswersType.d.ts +22 -0
  5. package/dist/Raffle/GetDrawResponse.d.ts +5 -0
  6. package/dist/Raffle/GetDrawRunResponse.d.ts +1 -1
  7. package/dist/Raffle/GetRaffleDrawRunsHistoryResponse.d.ts +1 -1
  8. package/dist/Raffle/GetRafflesResponse.d.ts +1 -1
  9. package/dist/Raffle/RaffleClaimPrizeResponse.d.ts +1 -1
  10. package/dist/SmarticoPublicAPI.d.ts +23 -0
  11. package/dist/Store/BuyShopItemErrorCode.d.ts +10 -0
  12. package/dist/Store/BuyShopItemRequest.d.ts +4 -0
  13. package/dist/Store/BuyShopItemResponse.d.ts +4 -0
  14. package/dist/Store/GetCategoriesShopResponse.d.ts +5 -0
  15. package/dist/Store/GetShopItemsResponse.d.ts +5 -0
  16. package/dist/Store/ShopCategory.d.ts +5 -0
  17. package/dist/Store/ShopCategoryPublicMeta.d.ts +4 -0
  18. package/dist/Store/ShopItem.d.ts +9 -0
  19. package/dist/Store/ShopItemPublicMeta.d.ts +10 -0
  20. package/dist/Store/ShopItemType.d.ts +4 -0
  21. package/dist/Store/StorItemPruchased.d.ts +6 -0
  22. package/dist/WSAPI/WSAPI.d.ts +1 -1
  23. package/dist/WSAPI/WSAPITypes.d.ts +1 -1
  24. package/dist/index.js +1 -1
  25. package/dist/index.js.map +1 -1
  26. package/dist/index.modern.mjs +1 -1
  27. package/dist/index.modern.mjs.map +1 -1
  28. package/dist/service/index.d.ts +5 -0
  29. package/dist/service/types/ErrorCodes.d.ts +13 -0
  30. package/dist/service/types/GRequest.d.ts +16 -0
  31. package/dist/service/types/GResponse.d.ts +10 -0
  32. package/dist/service/types/Game/GameAttemptType.d.ts +6 -0
  33. package/dist/service/types/Game/GameCanPlayType.d.ts +10 -0
  34. package/dist/service/types/Game/GameExternalStatus.d.ts +6 -0
  35. package/dist/service/types/Game/GameInfo.d.ts +9 -0
  36. package/dist/service/types/Game/GamePick.d.ts +90 -0
  37. package/dist/service/types/Game/GameUtil.d.ts +7 -0
  38. package/dist/service/types/SmarticoProto/GetTranslationsRequest.d.ts +7 -0
  39. package/dist/service/types/SmarticoProto/GetTranslationsResponse.d.ts +7 -0
  40. package/dist/service/types/SmarticoProto/ProtocolMessage.d.ts +5 -0
  41. package/dist/service/types/SmarticoProto/ProtocolRequest.d.ts +6 -0
  42. package/dist/service/types/SmarticoProto/ProtocolResponse.d.ts +5 -0
  43. package/dist/service/types/SmarticoProto/PublicLabelInfo.d.ts +34 -0
  44. package/dist/service/types/SmarticoProto/PublicProperties.d.ts +11 -0
  45. package/dist/service/types/SmarticoProto/ResponseIdentify.d.ts +12 -0
  46. package/dist/service/types/SmarticoProto/SAW/SAWAcknowledgeType.d.ts +5 -0
  47. package/dist/service/types/SmarticoProto/SAW/SAWBuyInType.d.ts +5 -0
  48. package/dist/service/types/SmarticoProto/SAW/SAWDoSpinRequest.d.ts +5 -0
  49. package/dist/service/types/SmarticoProto/SAW/SAWDoSpinResponse.d.ts +15 -0
  50. package/dist/service/types/SmarticoProto/SAW/SAWGameType.d.ts +10 -0
  51. package/dist/service/types/SmarticoProto/SAW/SAWGetTemplatesRequest.d.ts +3 -0
  52. package/dist/service/types/SmarticoProto/SAW/SAWGetTemplatesResponse.d.ts +5 -0
  53. package/dist/service/types/SmarticoProto/SAW/SAWPrize.d.ts +11 -0
  54. package/dist/service/types/SmarticoProto/SAW/SAWPrizeType.d.ts +8 -0
  55. package/dist/service/types/SmarticoProto/SAW/SAWPrizeUI.d.ts +13 -0
  56. package/dist/service/types/SmarticoProto/SAW/SAWTemplate.d.ts +21 -0
  57. package/dist/service/types/SmarticoProto/SAW/SAWTemplateUI.d.ts +31 -0
  58. package/dist/service/types/SmarticoProto/SAW/SAWWinSoundType.d.ts +12 -0
  59. package/dist/service/types/SmarticoProto/TranslationArea.d.ts +9 -0
  60. package/dist/service/types/User/UserInfo.d.ts +10 -0
  61. package/dist/util/Util.d.ts +51 -0
  62. package/docs/interfaces/JackpotDetails.md +8 -16
  63. package/package.json +1 -1
  64. package/src/Core/GetAchievementsUserInfoResponse.ts +2 -0
  65. package/src/Jackpots/GetJackpotWinnersRequest.ts +1 -1
  66. package/src/Jackpots/JackpotDetails.ts +8 -10
  67. package/src/Raffle/GetDrawRunResponse.ts +1 -1
  68. package/src/Raffle/GetRaffleDrawRunsHistoryResponse.ts +1 -1
  69. package/src/Raffle/GetRafflesResponse.ts +1 -2
  70. package/src/Raffle/RaffleClaimPrizeResponse.ts +1 -1
  71. package/src/WSAPI/WSAPI.ts +2 -2
  72. 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,4 @@
1
- import { ProtocolRequest } from "src/Base/ProtocolRequest";
1
+ import { ProtocolRequest } from "../Base/ProtocolRequest";
2
2
  interface GetJackpotWinnersRequest extends ProtocolRequest {
3
3
  /** The ID of the jackpot template */
4
4
  jp_template_id: 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
- /** type of jackpot logic */
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
- /** base currency of the jackpot */
17
+ /** Base currency of the jackpot */
19
18
  jp_currency: string;
20
- /** wallet currency of currently logged in user */
19
+ /** Wallet currency of currently logged in user */
21
20
  user_currency: string;
22
- /** list of related games that are eligible for the jackpot */
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
- /** value of the user contribution. Fixed amount or percentage of bet depending on the contribution type */
23
+ /** Value of the user contribution. Fixed amount or percentage of bet depending on the contribution type */
27
24
  contribution_value: number;
28
- /** information of current value of the jackpot */
25
+ /** Information of current value of the jackpot */
29
26
  pot: JackpotPot;
30
- /** indication if the current user is opted in to the jackpot */
27
+ /** Indication if the current user is opted in to the jackpot */
31
28
  is_opted_in: boolean;
32
- /** indicates whether all games are eligible for the jackpot */
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
+ }
@@ -0,0 +1,5 @@
1
+ import { ProtocolResponse } from '../Base/ProtocolResponse';
2
+ import { RaffleDraw } from './RaffleDraw';
3
+ export interface GetDrawResponse extends ProtocolResponse {
4
+ draw: RaffleDraw;
5
+ }
@@ -1,4 +1,4 @@
1
- import { TRaffleDraw } from 'src/WSAPI/WSAPITypes';
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 'src/WSAPI/WSAPITypes';
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 'src/WSAPI/WSAPITypes';
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 "src/WSAPI/WSAPITypes";
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,4 @@
1
+ import { ProtocolMessage } from "../Base/ProtocolMessage";
2
+ export interface BuyShopItemRequest extends ProtocolMessage {
3
+ itemId: number;
4
+ }
@@ -0,0 +1,4 @@
1
+ import { ProtocolResponse } from "../Base/ProtocolResponse";
2
+ export interface BuyShopItemResponse extends ProtocolResponse {
3
+ success?: boolean;
4
+ }
@@ -0,0 +1,5 @@
1
+ import { ProtocolResponse } from "../Base/ProtocolResponse";
2
+ import { ShopCategory } from "./ShopCategory";
3
+ export interface GetCategoriesShopResponse extends ProtocolResponse {
4
+ categories: ShopCategory[];
5
+ }
@@ -0,0 +1,5 @@
1
+ import { ProtocolResponse } from "../Base/ProtocolResponse";
2
+ import { ShopItem } from "./ShopItem";
3
+ export interface GetShopItemsResponse extends ProtocolResponse {
4
+ items: ShopItem[];
5
+ }
@@ -0,0 +1,5 @@
1
+ import { ShopCategoryPublicMeta } from "./ShopCategoryPublicMeta";
2
+ export interface ShopCategory {
3
+ id?: number;
4
+ publicMeta?: ShopCategoryPublicMeta;
5
+ }
@@ -0,0 +1,4 @@
1
+ export interface ShopCategoryPublicMeta {
2
+ name?: string;
3
+ order?: number;
4
+ }
@@ -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
+ }
@@ -0,0 +1,10 @@
1
+ export interface ShopItemPublicMeta {
2
+ price: string;
3
+ image_url: string;
4
+ name: string;
5
+ description: string;
6
+ label_tag: string;
7
+ limit_message: string;
8
+ priority: number;
9
+ related_items: number[];
10
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum ShopItemType {
2
+ Bonus = 1,
3
+ Manual = 2
4
+ }
@@ -0,0 +1,6 @@
1
+ import { StoreItem } from "./StoreItem";
2
+ interface StorItemPruchased extends StoreItem {
3
+ purchase_ts: number;
4
+ purchase_points_amount: number;
5
+ }
6
+ export { StorItemPruchased };
@@ -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 'src/Jackpots/GetJackpotEligibleGamesResponse';
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 'src/Raffle';
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) {