@smartico/public-api 0.0.197 → 0.0.199

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 (67) hide show
  1. package/dist/Inbox/InboxMessage.d.ts +3 -0
  2. package/dist/Inbox/OpenLinksType.d.ts +4 -0
  3. package/dist/Inbox/index.d.ts +1 -0
  4. package/dist/MiniGames/SAWTemplate.d.ts +2 -2
  5. package/dist/Quiz/MarketsAnswersType.d.ts +22 -0
  6. package/dist/SmarticoPublicAPI.d.ts +23 -0
  7. package/dist/Store/BuyShopItemErrorCode.d.ts +10 -0
  8. package/dist/Store/BuyShopItemRequest.d.ts +4 -0
  9. package/dist/Store/BuyShopItemResponse.d.ts +4 -0
  10. package/dist/Store/GetCategoriesShopResponse.d.ts +5 -0
  11. package/dist/Store/GetShopItemsResponse.d.ts +5 -0
  12. package/dist/Store/ShopCategory.d.ts +5 -0
  13. package/dist/Store/ShopCategoryPublicMeta.d.ts +4 -0
  14. package/dist/Store/ShopItem.d.ts +9 -0
  15. package/dist/Store/ShopItemPublicMeta.d.ts +10 -0
  16. package/dist/Store/ShopItemType.d.ts +4 -0
  17. package/dist/Store/StorItemPruchased.d.ts +6 -0
  18. package/dist/Tournaments/Tournament.d.ts +2 -0
  19. package/dist/WSAPI/WSAPITypes.d.ts +4 -0
  20. package/dist/index.js +12 -1
  21. package/dist/index.js.map +1 -1
  22. package/dist/index.modern.mjs +13 -2
  23. package/dist/index.modern.mjs.map +1 -1
  24. package/dist/service/index.d.ts +5 -0
  25. package/dist/service/types/ErrorCodes.d.ts +13 -0
  26. package/dist/service/types/GRequest.d.ts +16 -0
  27. package/dist/service/types/GResponse.d.ts +10 -0
  28. package/dist/service/types/Game/GameAttemptType.d.ts +6 -0
  29. package/dist/service/types/Game/GameCanPlayType.d.ts +10 -0
  30. package/dist/service/types/Game/GameExternalStatus.d.ts +6 -0
  31. package/dist/service/types/Game/GameInfo.d.ts +9 -0
  32. package/dist/service/types/Game/GamePick.d.ts +90 -0
  33. package/dist/service/types/Game/GameUtil.d.ts +7 -0
  34. package/dist/service/types/SmarticoProto/GetTranslationsRequest.d.ts +7 -0
  35. package/dist/service/types/SmarticoProto/GetTranslationsResponse.d.ts +7 -0
  36. package/dist/service/types/SmarticoProto/ProtocolMessage.d.ts +5 -0
  37. package/dist/service/types/SmarticoProto/ProtocolRequest.d.ts +6 -0
  38. package/dist/service/types/SmarticoProto/ProtocolResponse.d.ts +5 -0
  39. package/dist/service/types/SmarticoProto/PublicLabelInfo.d.ts +34 -0
  40. package/dist/service/types/SmarticoProto/PublicProperties.d.ts +11 -0
  41. package/dist/service/types/SmarticoProto/ResponseIdentify.d.ts +12 -0
  42. package/dist/service/types/SmarticoProto/SAW/SAWAcknowledgeType.d.ts +5 -0
  43. package/dist/service/types/SmarticoProto/SAW/SAWBuyInType.d.ts +5 -0
  44. package/dist/service/types/SmarticoProto/SAW/SAWDoSpinRequest.d.ts +5 -0
  45. package/dist/service/types/SmarticoProto/SAW/SAWDoSpinResponse.d.ts +15 -0
  46. package/dist/service/types/SmarticoProto/SAW/SAWGameType.d.ts +10 -0
  47. package/dist/service/types/SmarticoProto/SAW/SAWGetTemplatesRequest.d.ts +3 -0
  48. package/dist/service/types/SmarticoProto/SAW/SAWGetTemplatesResponse.d.ts +5 -0
  49. package/dist/service/types/SmarticoProto/SAW/SAWPrize.d.ts +11 -0
  50. package/dist/service/types/SmarticoProto/SAW/SAWPrizeType.d.ts +8 -0
  51. package/dist/service/types/SmarticoProto/SAW/SAWPrizeUI.d.ts +13 -0
  52. package/dist/service/types/SmarticoProto/SAW/SAWTemplate.d.ts +21 -0
  53. package/dist/service/types/SmarticoProto/SAW/SAWTemplateUI.d.ts +31 -0
  54. package/dist/service/types/SmarticoProto/SAW/SAWWinSoundType.d.ts +12 -0
  55. package/dist/service/types/SmarticoProto/TranslationArea.d.ts +9 -0
  56. package/dist/service/types/User/UserInfo.d.ts +10 -0
  57. package/dist/util/Util.d.ts +51 -0
  58. package/docs/interfaces/TMiniGameTemplate.md +16 -0
  59. package/docs/interfaces/TTournament.md +16 -0
  60. package/package.json +1 -1
  61. package/src/Inbox/InboxMessage.ts +6 -0
  62. package/src/Inbox/OpenLinksType.ts +4 -0
  63. package/src/Inbox/index.ts +1 -0
  64. package/src/MiniGames/SAWGetTemplatesResponse.ts +3 -1
  65. package/src/MiniGames/SAWTemplate.ts +3 -2
  66. package/src/Tournaments/Tournament.ts +7 -0
  67. package/src/WSAPI/WSAPITypes.ts +9 -1
@@ -1,5 +1,6 @@
1
1
  import { TInboxMessageBody } from '../WSAPI/WSAPITypes';
2
2
  import { InboxMessageType } from './InboxMessageType';
3
+ import { OpenLinksType } from './OpenLinksType';
3
4
  export interface InboxMessageBody {
4
5
  action: string;
5
6
  body: string;
@@ -13,6 +14,8 @@ export interface InboxMessageBody {
13
14
  }[];
14
15
  show_preview?: boolean;
15
16
  show_duration_sec?: number;
17
+ enable_zoom_mode?: boolean;
18
+ open_links?: OpenLinksType;
16
19
  }
17
20
  export interface InboxMessage {
18
21
  createDate: string;
@@ -0,0 +1,4 @@
1
+ export declare enum OpenLinksType {
2
+ NewWindow = 1,
3
+ CurrentWindow = 2
4
+ }
@@ -8,3 +8,4 @@ export * from './MarkInboxMessageStarredRequest';
8
8
  export * from './MarkInboxMessageStarredResponse';
9
9
  export * from './MarkInboxMessageDeletedRequest';
10
10
  export * from './MarkInboxMessageDeletedResponse';
11
+ export * from './OpenLinksType';
@@ -12,8 +12,8 @@ export interface SAWTemplate {
12
12
  spin_count?: number;
13
13
  prizes: SAWPrize[];
14
14
  is_visible: boolean;
15
- activeFromDate: number;
16
- activeTillDate: number;
15
+ activeFromDate?: number;
16
+ activeTillDate?: number;
17
17
  jackpot_add_on_attempt: number;
18
18
  jackpot_current: number;
19
19
  jackpot_guaranteed: 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,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 };
@@ -55,5 +55,7 @@ export interface Tournament {
55
55
  tournamentPlayer?: TournamentPlayer;
56
56
  /** List of casino games (or other types of entities) related to the tournament */
57
57
  related_games?: AchRelatedGame[];
58
+ minScoreToWin?: number;
59
+ hideLeaderboardsMinScores?: boolean;
58
60
  }
59
61
  export declare const TournamentItemsTransform: (items: Tournament[]) => TTournament[];
@@ -111,6 +111,8 @@ export interface TMiniGameTemplate {
111
111
  prizes: TMiniGamePrize[];
112
112
  expose_game_stat_on_api?: boolean;
113
113
  relative_period_timezone?: number;
114
+ activeFromDate?: number;
115
+ activeTillDate?: number;
114
116
  }
115
117
  /**
116
118
  * TUser describes the information of the user
@@ -270,6 +272,8 @@ export interface TTournament {
270
272
  is_in_progress: boolean;
271
273
  /** Indicator if tournament instance is upcoming (status PUBLISHED or REGISTER) */
272
274
  is_upcoming: boolean;
275
+ min_scores_win?: number;
276
+ hide_leaderboard_min_scores?: boolean;
273
277
  }
274
278
  /**
275
279
  * TTournamentDetailed describes the information of the tournament item and includes list of participants, their scores and position in the tournament leaderboard
package/dist/index.js CHANGED
@@ -402,6 +402,9 @@ var SAWTemplatesTransform = function SAWTemplatesTransform(items) {
402
402
  promo_text: r.saw_template_ui_definition.promo_text,
403
403
  custom_data: IntUtils.JsonOrText(r.saw_template_ui_definition.custom_data),
404
404
  expose_game_stat_on_api: r.expose_game_stat_on_api,
405
+ relative_period_timezone: r.relative_period_timezone,
406
+ activeFromDate: r.activeFromDate,
407
+ activeTillDate: r.activeTillDate,
405
408
  next_available_spin_ts: r.next_available_spin_ts,
406
409
  prizes: r.prizes.map(function (p) {
407
410
  var y = {
@@ -750,6 +753,12 @@ exports.InboxMessageType = void 0;
750
753
  })(exports.InboxMessageType || (exports.InboxMessageType = {}));
751
754
  // keep in sync with BO enum
752
755
 
756
+ exports.OpenLinksType = void 0;
757
+ (function (OpenLinksType) {
758
+ OpenLinksType[OpenLinksType["NewWindow"] = 1] = "NewWindow";
759
+ OpenLinksType[OpenLinksType["CurrentWindow"] = 2] = "CurrentWindow";
760
+ })(exports.OpenLinksType || (exports.OpenLinksType = {}));
761
+
753
762
  exports.BuyStoreItemErrorCode = void 0;
754
763
  (function (BuyStoreItemErrorCode) {
755
764
  BuyStoreItemErrorCode[BuyStoreItemErrorCode["FAILED_TO_BUY_SHOP_ITEM"] = 121] = "FAILED_TO_BUY_SHOP_ITEM";
@@ -1060,7 +1069,9 @@ var TournamentItemsTransform = function TournamentItemsTransform(items) {
1060
1069
  is_cancelled: TournamentUtils.isCancelled(r),
1061
1070
  is_finished: TournamentUtils.isFinished(r),
1062
1071
  is_in_progress: TournamentUtils.isInProgress(r),
1063
- is_upcoming: TournamentUtils.isUpcoming(r)
1072
+ is_upcoming: TournamentUtils.isUpcoming(r),
1073
+ min_scores_win: r.minScoreToWin,
1074
+ hide_leaderboard_min_scores: r.hideLeaderboardsMinScores
1064
1075
  };
1065
1076
  if (r.prizeStructure) {
1066
1077
  x.prizes = r.prizeStructure.prizes.map(function (p) {