@smartico/public-api 0.0.253 → 0.0.255

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/.github/workflows/semgrep.yml +26 -0
  2. package/dist/Base/ClassId.d.ts +2 -0
  3. package/dist/Jackpots/GetJackpotEligibleGamesRequest.d.ts +4 -0
  4. package/dist/Jackpots/GetJackpotEligibleGamesResponse.d.ts +34 -0
  5. package/dist/Jackpots/index.d.ts +2 -0
  6. package/dist/SmarticoAPI.d.ts +7 -0
  7. package/dist/WSAPI/WSAPI.d.ts +18 -0
  8. package/dist/index.js +262 -180
  9. package/dist/index.js.map +1 -1
  10. package/dist/index.modern.mjs +66 -1
  11. package/dist/index.modern.mjs.map +1 -1
  12. package/docs/README.md +4 -0
  13. package/docs/classes/WSAPI.md +29 -0
  14. package/docs/interfaces/GetJackpotEligibleGamesRequest.md +43 -0
  15. package/docs/interfaces/GetJackpotEligibleGamesResponse.md +63 -0
  16. package/docs/interfaces/JackpotEligibleGame.md +73 -0
  17. package/docs/interfaces/TGetJackpotEligibleGamesResponse.md +7 -0
  18. package/package.json +1 -1
  19. package/src/Base/ClassId.ts +3 -0
  20. package/src/Jackpots/GetJackpotEligibleGamesRequest.ts +5 -0
  21. package/src/Jackpots/GetJackpotEligibleGamesResponse.ts +50 -0
  22. package/src/Jackpots/index.ts +2 -0
  23. package/src/SmarticoAPI.ts +16 -2
  24. package/src/WSAPI/WSAPI.ts +30 -0
  25. package/dist/Quiz/MarketsAnswersType.d.ts +0 -22
  26. package/dist/Raffle/GetDrawResponse.d.ts +0 -5
  27. package/dist/SmarticoPublicAPI.d.ts +0 -23
  28. package/dist/Store/BuyShopItemErrorCode.d.ts +0 -10
  29. package/dist/Store/BuyShopItemRequest.d.ts +0 -4
  30. package/dist/Store/BuyShopItemResponse.d.ts +0 -4
  31. package/dist/Store/GetCategoriesShopResponse.d.ts +0 -5
  32. package/dist/Store/GetShopItemsResponse.d.ts +0 -5
  33. package/dist/Store/ShopCategory.d.ts +0 -5
  34. package/dist/Store/ShopCategoryPublicMeta.d.ts +0 -4
  35. package/dist/Store/ShopItem.d.ts +0 -9
  36. package/dist/Store/ShopItemPublicMeta.d.ts +0 -10
  37. package/dist/Store/ShopItemType.d.ts +0 -4
  38. package/dist/Store/StorItemPruchased.d.ts +0 -6
  39. package/dist/service/index.d.ts +0 -5
  40. package/dist/service/types/ErrorCodes.d.ts +0 -13
  41. package/dist/service/types/GRequest.d.ts +0 -16
  42. package/dist/service/types/GResponse.d.ts +0 -10
  43. package/dist/service/types/Game/GameAttemptType.d.ts +0 -6
  44. package/dist/service/types/Game/GameCanPlayType.d.ts +0 -10
  45. package/dist/service/types/Game/GameExternalStatus.d.ts +0 -6
  46. package/dist/service/types/Game/GameInfo.d.ts +0 -9
  47. package/dist/service/types/Game/GamePick.d.ts +0 -90
  48. package/dist/service/types/Game/GameUtil.d.ts +0 -7
  49. package/dist/service/types/SmarticoProto/GetTranslationsRequest.d.ts +0 -7
  50. package/dist/service/types/SmarticoProto/GetTranslationsResponse.d.ts +0 -7
  51. package/dist/service/types/SmarticoProto/ProtocolMessage.d.ts +0 -5
  52. package/dist/service/types/SmarticoProto/ProtocolRequest.d.ts +0 -6
  53. package/dist/service/types/SmarticoProto/ProtocolResponse.d.ts +0 -5
  54. package/dist/service/types/SmarticoProto/PublicLabelInfo.d.ts +0 -34
  55. package/dist/service/types/SmarticoProto/PublicProperties.d.ts +0 -11
  56. package/dist/service/types/SmarticoProto/ResponseIdentify.d.ts +0 -12
  57. package/dist/service/types/SmarticoProto/SAW/SAWAcknowledgeType.d.ts +0 -5
  58. package/dist/service/types/SmarticoProto/SAW/SAWBuyInType.d.ts +0 -5
  59. package/dist/service/types/SmarticoProto/SAW/SAWDoSpinRequest.d.ts +0 -5
  60. package/dist/service/types/SmarticoProto/SAW/SAWDoSpinResponse.d.ts +0 -15
  61. package/dist/service/types/SmarticoProto/SAW/SAWGameType.d.ts +0 -10
  62. package/dist/service/types/SmarticoProto/SAW/SAWGetTemplatesRequest.d.ts +0 -3
  63. package/dist/service/types/SmarticoProto/SAW/SAWGetTemplatesResponse.d.ts +0 -5
  64. package/dist/service/types/SmarticoProto/SAW/SAWPrize.d.ts +0 -11
  65. package/dist/service/types/SmarticoProto/SAW/SAWPrizeType.d.ts +0 -8
  66. package/dist/service/types/SmarticoProto/SAW/SAWPrizeUI.d.ts +0 -13
  67. package/dist/service/types/SmarticoProto/SAW/SAWTemplate.d.ts +0 -21
  68. package/dist/service/types/SmarticoProto/SAW/SAWTemplateUI.d.ts +0 -31
  69. package/dist/service/types/SmarticoProto/SAW/SAWWinSoundType.d.ts +0 -12
  70. package/dist/service/types/SmarticoProto/TranslationArea.d.ts +0 -9
  71. package/dist/service/types/User/UserInfo.d.ts +0 -10
  72. package/dist/util/Util.d.ts +0 -51
package/docs/README.md CHANGED
@@ -19,6 +19,10 @@
19
19
  ## Interfaces
20
20
 
21
21
  - [AchRelatedGame](interfaces/AchRelatedGame.md)
22
+ - [GetJackpotEligibleGamesRequest](interfaces/GetJackpotEligibleGamesRequest.md)
23
+ - [GetJackpotEligibleGamesResponse](interfaces/GetJackpotEligibleGamesResponse.md)
24
+ - [TGetJackpotEligibleGamesResponse](interfaces/TGetJackpotEligibleGamesResponse.md)
25
+ - [JackpotEligibleGame](interfaces/JackpotEligibleGame.md)
22
26
  - [GetJackpotWinnersRequest](interfaces/GetJackpotWinnersRequest.md)
23
27
  - [GetJackpotWinnersResponse](interfaces/GetJackpotWinnersResponse.md)
24
28
  - [JackpotWinnerHistory](interfaces/JackpotWinnerHistory.md)
@@ -989,6 +989,35 @@ _smartico.api.getJackpotWinners({
989
989
 
990
990
  ___
991
991
 
992
+ ### getJackpotEligibleGames
993
+
994
+ ▸ **getJackpotEligibleGames**(`«destructured»`): `Promise`\<[`TGetJackpotEligibleGamesResponse`](../interfaces/TGetJackpotEligibleGamesResponse.md)\>
995
+
996
+ Returns the eligible games for the jackpot with the specified jp_template_id.
997
+
998
+ **Example**:
999
+ ```
1000
+ _smartico.api.getJackpotEligibleGames({ jp_template_id: 123 }).then((result) => {
1001
+ console.log(result);
1002
+ });
1003
+ ```
1004
+
1005
+ **Visitor mode: not supported**
1006
+
1007
+ #### Parameters
1008
+
1009
+ | Name | Type |
1010
+ | :------ | :------ |
1011
+ | `«destructured»` | `Object` |
1012
+ | › `jp_template_id` | `number` |
1013
+ | › `onUpdate?` | () => `void` |
1014
+
1015
+ #### Returns
1016
+
1017
+ `Promise`\<[`TGetJackpotEligibleGamesResponse`](../interfaces/TGetJackpotEligibleGamesResponse.md)\>
1018
+
1019
+ ___
1020
+
992
1021
  ### getRelatedItemsForGame
993
1022
 
994
1023
  ▸ **getRelatedItemsForGame**(`related_game_id`): `Promise`\<`GetRelatedAchTourResponse`\>
@@ -0,0 +1,43 @@
1
+ # Interface: GetJackpotEligibleGamesRequest
2
+
3
+ ## Hierarchy
4
+
5
+ - `ProtocolMessage`
6
+
7
+ ↳ **`GetJackpotEligibleGamesRequest`**
8
+
9
+ ## Properties
10
+
11
+ ### cid
12
+
13
+ • **cid**: `number`
14
+
15
+ #### Inherited from
16
+
17
+ ProtocolMessage.cid
18
+
19
+ ___
20
+
21
+ ### ts
22
+
23
+ • `Optional` **ts**: `number`
24
+
25
+ #### Inherited from
26
+
27
+ ProtocolMessage.ts
28
+
29
+ ___
30
+
31
+ ### uuid
32
+
33
+ • `Optional` **uuid**: `string`
34
+
35
+ #### Inherited from
36
+
37
+ ProtocolMessage.uuid
38
+
39
+ ___
40
+
41
+ ### jp\_template\_id
42
+
43
+ • **jp\_template\_id**: `number`
@@ -0,0 +1,63 @@
1
+ # Interface: GetJackpotEligibleGamesResponse
2
+
3
+ ## Hierarchy
4
+
5
+ - `ProtocolResponse`
6
+
7
+ ↳ **`GetJackpotEligibleGamesResponse`**
8
+
9
+ ## Properties
10
+
11
+ ### cid
12
+
13
+ • **cid**: `number`
14
+
15
+ #### Inherited from
16
+
17
+ ProtocolResponse.cid
18
+
19
+ ___
20
+
21
+ ### ts
22
+
23
+ • `Optional` **ts**: `number`
24
+
25
+ #### Inherited from
26
+
27
+ ProtocolResponse.ts
28
+
29
+ ___
30
+
31
+ ### uuid
32
+
33
+ • `Optional` **uuid**: `string`
34
+
35
+ #### Inherited from
36
+
37
+ ProtocolResponse.uuid
38
+
39
+ ___
40
+
41
+ ### errCode
42
+
43
+ • `Optional` **errCode**: `number`
44
+
45
+ #### Inherited from
46
+
47
+ ProtocolResponse.errCode
48
+
49
+ ___
50
+
51
+ ### errMsg
52
+
53
+ • `Optional` **errMsg**: `string`
54
+
55
+ #### Inherited from
56
+
57
+ ProtocolResponse.errMsg
58
+
59
+ ___
60
+
61
+ ### eligible\_games
62
+
63
+ • **eligible\_games**: [`AchRelatedGame`](AchRelatedGame.md)[]
@@ -0,0 +1,73 @@
1
+ # Interface: JackpotEligibleGame
2
+
3
+ ## Properties
4
+
5
+ ### game\_id
6
+
7
+ • **game\_id**: `number`
8
+
9
+ ID of the game on Smartico side
10
+
11
+ ___
12
+
13
+ ### ext\_game\_id
14
+
15
+ • **ext\_game\_id**: `string`
16
+
17
+ ID of the game on operator side
18
+
19
+ ___
20
+
21
+ ### name
22
+
23
+ • **name**: `string`
24
+
25
+ Name of the game
26
+
27
+ ___
28
+
29
+ ### link
30
+
31
+ • **link**: `string`
32
+
33
+ Link to the game
34
+
35
+ ___
36
+
37
+ ### image
38
+
39
+ • **image**: `string`
40
+
41
+ Image of the game
42
+
43
+ ___
44
+
45
+ ### enabled
46
+
47
+ • **enabled**: `boolean`
48
+
49
+ Whether the game is enabled
50
+
51
+ ___
52
+
53
+ ### game\_categories
54
+
55
+ • **game\_categories**: `string`[]
56
+
57
+ Categories of the game
58
+
59
+ ___
60
+
61
+ ### game\_provider
62
+
63
+ • **game\_provider**: `string`
64
+
65
+ Provider of the game
66
+
67
+ ___
68
+
69
+ ### mobile\_spec\_link
70
+
71
+ • **mobile\_spec\_link**: `string`
72
+
73
+ The link to the mobile game
@@ -0,0 +1,7 @@
1
+ # Interface: TGetJackpotEligibleGamesResponse
2
+
3
+ ## Properties
4
+
5
+ ### eligible\_games
6
+
7
+ • **eligible\_games**: [`JackpotEligibleGame`](JackpotEligibleGame.md)[]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartico/public-api",
3
- "version": "0.0.253",
3
+ "version": "0.0.255",
4
4
  "description": "Smartico public API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -150,6 +150,9 @@ export enum ClassId {
150
150
  JP_GET_WINNERS_REQUEST = 809,
151
151
  JP_GET_WINNERS_RESPONSE = 810,
152
152
 
153
+ JP_GET_ELIGIBLE_GAMES_REQUEST = 811,
154
+ JP_GET_ELIGIBLE_GAMES_RESPONSE = 812,
155
+
153
156
  RAF_GET_RAFFLES_REQUEST = 902,
154
157
  RAF_GET_RAFFLES_RESPONSE = 903,
155
158
  RAF_GET_DRAW_RUN_REQUEST = 904,
@@ -0,0 +1,5 @@
1
+ import { ProtocolMessage } from '../Base/ProtocolMessage';
2
+
3
+ export interface GetJackpotEligibleGamesRequest extends ProtocolMessage {
4
+ jp_template_id: number;
5
+ }
@@ -0,0 +1,50 @@
1
+ import { ProtocolResponse } from '../Base/ProtocolResponse';
2
+ import { AchRelatedGame } from '../Base/AchRelatedGame';
3
+
4
+ export interface GetJackpotEligibleGamesResponse extends ProtocolResponse {
5
+ eligible_games: AchRelatedGame[];
6
+ }
7
+
8
+ export interface TGetJackpotEligibleGamesResponse {
9
+ eligible_games: JackpotEligibleGame[];
10
+ }
11
+
12
+ export interface JackpotEligibleGame {
13
+ /** ID of the game on Smartico side */
14
+ game_id: number;
15
+ /** ID of the game on operator side */
16
+ ext_game_id: string;
17
+ /** Name of the game */
18
+ name: string;
19
+ /** Link to the game */
20
+ link: string;
21
+ /** Image of the game */
22
+ image: string;
23
+ /** Whether the game is enabled */
24
+ enabled: boolean;
25
+ /** Categories of the game */
26
+ game_categories: string[];
27
+ /** Provider of the game */
28
+ game_provider: string;
29
+ /** The link to the mobile game */
30
+ mobile_spec_link: string;
31
+ }
32
+
33
+ /**
34
+ * @ignore
35
+ */
36
+ export const GetJackpotEligibleGamesResponseTransform = ({ eligible_games } : { eligible_games: AchRelatedGame[]}): TGetJackpotEligibleGamesResponse => {
37
+ const games = eligible_games.map((game: AchRelatedGame) => ({
38
+ game_id: game.ach_game_id,
39
+ ext_game_id: game.ext_game_id,
40
+ name: game.game_public_meta.name,
41
+ link: game.game_public_meta.link,
42
+ image: game.game_public_meta.image,
43
+ enabled: game.game_public_meta.enabled,
44
+ game_categories: game.game_public_meta.game_categories,
45
+ game_provider: game.game_public_meta.game_provider,
46
+ mobile_spec_link: game.game_public_meta.mobile_spec_link,
47
+ }));
48
+
49
+ return { eligible_games: games };
50
+ };
@@ -16,3 +16,5 @@ export * from './JackpotsOptoutResponse';
16
16
  export * from './JackpotHtmlTemplate';
17
17
  export * from './GetJackpotWinnersRequest';
18
18
  export * from './GetJackpotWinnersResponse';
19
+ export * from './GetJackpotEligibleGamesRequest';
20
+ export * from './GetJackpotEligibleGamesResponse';
@@ -13,7 +13,6 @@ import {
13
13
  SAWHistoryTransform,
14
14
  SAWPrizesHistory,
15
15
  SAWSpinErrorCode,
16
- SAWTemplate,
17
16
  SAWTemplatesTransform,
18
17
  SAWWinningHistoryRequest,
19
18
  SAWWinningHistoryResponse,
@@ -94,7 +93,6 @@ import {
94
93
  TSegmentCheckResult,
95
94
  TUICustomSection,
96
95
  TBonus,
97
- TSawHistory,
98
96
  TRaffle,
99
97
  } from './WSAPI/WSAPITypes';
100
98
  import { getLeaderBoardTransform } from './Leaderboard/LeaderBoards';
@@ -126,6 +124,8 @@ import { InboxCategories } from './Inbox/InboxCategories';
126
124
  import { GetDrawRunRequest, GetDrawRunResponse, GetRaffleDrawRunsHistoryRequest, GetRaffleDrawRunsHistoryResponse, RaffleClaimPrizeRequest, RaffleClaimPrizeResponse } from './Raffle';
127
125
  import { GetJackpotWinnersResponse, GetJackpotWinnersResponseTransform, JackpotWinnerHistory } from './Jackpots/GetJackpotWinnersResponse';
128
126
  import { GetJackpotWinnersRequest } from './Jackpots/GetJackpotWinnersRequest';
127
+ import { GetJackpotEligibleGamesRequest } from './Jackpots/GetJackpotEligibleGamesRequest';
128
+ import { GetJackpotEligibleGamesResponse, GetJackpotEligibleGamesResponseTransform, JackpotEligibleGame, TGetJackpotEligibleGamesResponse } from './Jackpots/GetJackpotEligibleGamesResponse';
129
129
 
130
130
  const PUBLIC_API_URL = 'https://papi{ENV_ID}.smartico.ai/services/public';
131
131
  const C_SOCKET_PROD = 'wss://api{ENV_ID}.smartico.ai/websocket/services';
@@ -505,6 +505,20 @@ class SmarticoAPI {
505
505
  return GetJackpotWinnersResponseTransform((await this.getJackpotWinners(user_ext_id, limit, offset, jp_template_id)).winners);
506
506
  }
507
507
 
508
+ public async getJackpotEligibleGames(user_ext_id: string, { jp_template_id } : { jp_template_id: number }): Promise<GetJackpotEligibleGamesResponse> {
509
+ const message = this.buildMessage<GetJackpotEligibleGamesRequest, GetJackpotEligibleGamesResponse>(
510
+ user_ext_id,
511
+ ClassId.JP_GET_ELIGIBLE_GAMES_REQUEST,
512
+ { jp_template_id },
513
+ );
514
+
515
+ return await this.send<GetJackpotEligibleGamesResponse>(message, ClassId.JP_GET_ELIGIBLE_GAMES_RESPONSE);;
516
+ }
517
+
518
+ public async getJackpotEligibleGamesT(user_ext_id: string, { jp_template_id } : { jp_template_id: number }): Promise<TGetJackpotEligibleGamesResponse> {
519
+ return GetJackpotEligibleGamesResponseTransform(await this.getJackpotEligibleGames(user_ext_id, { jp_template_id }));
520
+ }
521
+
508
522
  public async sawGetTemplates(
509
523
  user_ext_id: string,
510
524
  force_language?: string,
@@ -70,6 +70,7 @@ import {
70
70
  raffleClaimPrizeResponseTransform,
71
71
  } from '../Raffle';
72
72
  import { IntUtils } from '../IntUtils';
73
+ import { JackpotEligibleGame, TGetJackpotEligibleGamesResponse } from 'src/Jackpots/GetJackpotEligibleGamesResponse';
73
74
 
74
75
  /** @hidden */
75
76
  const CACHE_DATA_SEC = 30;
@@ -77,6 +78,7 @@ const CACHE_DATA_SEC = 30;
77
78
  const JACKPOT_TEMPLATE_CACHE_SEC = 30;
78
79
  const JACKPOT_POT_CACHE_SEC = 1;
79
80
  const JACKPOT_WINNERS_CACHE_SEC = 30;
81
+ const JACKPOT_ELIGIBLE_GAMES_CACHE_SEC = 30;
80
82
 
81
83
  /** @hidden */
82
84
  enum onUpdateContextKey {
@@ -100,6 +102,7 @@ enum onUpdateContextKey {
100
102
  SAWHistory = 'sawHistory',
101
103
  JackpotWinners = 'jackpotWinners',
102
104
  Raffles = 'raffles',
105
+ JackpotEligibleGames = 'jackpotEligibleGames',
103
106
  }
104
107
 
105
108
  /** @group General API */
@@ -1095,6 +1098,33 @@ export class WSAPI {
1095
1098
  );
1096
1099
  }
1097
1100
 
1101
+ /**
1102
+ * Returns the eligible games for the jackpot with the specified jp_template_id.
1103
+ *
1104
+ * **Example**:
1105
+ * ```
1106
+ * _smartico.api.getJackpotEligibleGames({ jp_template_id: 123 }).then((result) => {
1107
+ * console.log(result);
1108
+ * });
1109
+ * ```
1110
+ *
1111
+ * **Visitor mode: not supported**
1112
+ *
1113
+ */
1114
+
1115
+ public async getJackpotEligibleGames({ jp_template_id, onUpdate } : { jp_template_id: number, onUpdate?: () => void }): Promise<TGetJackpotEligibleGamesResponse> {
1116
+ if (onUpdate) {
1117
+ this.onUpdateCallback.set(onUpdateContextKey.JackpotEligibleGames, onUpdate);
1118
+ }
1119
+
1120
+ return OCache.use(
1121
+ onUpdateContextKey.JackpotEligibleGames + jp_template_id,
1122
+ ECacheContext.WSAPI,
1123
+ () => this.api.getJackpotEligibleGamesT(null, { jp_template_id }),
1124
+ JACKPOT_ELIGIBLE_GAMES_CACHE_SEC,
1125
+ );
1126
+ }
1127
+
1098
1128
  /**
1099
1129
  * Returns all the related tournaments and missions for the provided game id for the current user
1100
1130
  * The provided Game ID should correspond to the ID from the Games Catalog - https://help.smartico.ai/welcome/technical-guides/games-catalog-api
@@ -1,22 +0,0 @@
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,5 +0,0 @@
1
- import { ProtocolResponse } from '../Base/ProtocolResponse';
2
- import { RaffleDraw } from './RaffleDraw';
3
- export interface GetDrawResponse extends ProtocolResponse {
4
- draw: RaffleDraw;
5
- }
@@ -1,23 +0,0 @@
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 };
@@ -1,10 +0,0 @@
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
- }
@@ -1,4 +0,0 @@
1
- import { ProtocolMessage } from "../Base/ProtocolMessage";
2
- export interface BuyShopItemRequest extends ProtocolMessage {
3
- itemId: number;
4
- }
@@ -1,4 +0,0 @@
1
- import { ProtocolResponse } from "../Base/ProtocolResponse";
2
- export interface BuyShopItemResponse extends ProtocolResponse {
3
- success?: boolean;
4
- }
@@ -1,5 +0,0 @@
1
- import { ProtocolResponse } from "../Base/ProtocolResponse";
2
- import { ShopCategory } from "./ShopCategory";
3
- export interface GetCategoriesShopResponse extends ProtocolResponse {
4
- categories: ShopCategory[];
5
- }
@@ -1,5 +0,0 @@
1
- import { ProtocolResponse } from "../Base/ProtocolResponse";
2
- import { ShopItem } from "./ShopItem";
3
- export interface GetShopItemsResponse extends ProtocolResponse {
4
- items: ShopItem[];
5
- }
@@ -1,5 +0,0 @@
1
- import { ShopCategoryPublicMeta } from "./ShopCategoryPublicMeta";
2
- export interface ShopCategory {
3
- id?: number;
4
- publicMeta?: ShopCategoryPublicMeta;
5
- }
@@ -1,4 +0,0 @@
1
- export interface ShopCategoryPublicMeta {
2
- name?: string;
3
- order?: number;
4
- }
@@ -1,9 +0,0 @@
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
- }
@@ -1,10 +0,0 @@
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
- }
@@ -1,4 +0,0 @@
1
- export declare enum ShopItemType {
2
- Bonus = 1,
3
- Manual = 2
4
- }
@@ -1,6 +0,0 @@
1
- import { StoreItem } from "./StoreItem";
2
- interface StorItemPruchased extends StoreItem {
3
- purchase_ts: number;
4
- purchase_points_amount: number;
5
- }
6
- export { StorItemPruchased };
@@ -1,5 +0,0 @@
1
- import { ErrorCodes, ErrorCodesGame } from './types/ErrorCodes';
2
- import { GBaseRequest } from './types/GRequest';
3
- import { GResponseBase, GResponse } from './types/GResponse';
4
- import { SAWSpinErrorCode } from './types/SmarticoProto/SAW/SAWDoSpinResponse';
5
- export { ErrorCodes, ErrorCodesGame, SAWSpinErrorCode, GBaseRequest, GResponseBase, GResponse, };
@@ -1,13 +0,0 @@
1
- import { SAWSpinErrorCode } from "./SmarticoProto/SAW/SAWDoSpinResponse";
2
- export declare const ErrorCodes_FatalStartingRange = 100000;
3
- export declare enum ErrorCodesGame {
4
- OK = 0,
5
- NoBetsUpdatedOnSubmit = 3,
6
- RepeatRequest_Unhandled = 4,
7
- Fatal_NotValidHash,
8
- Fatal_WrongCustomerID,
9
- Fatal_TemplateNotFound,
10
- Fatal_NoOpenRounds,
11
- Fatal_Unhandled
12
- }
13
- export type ErrorCodes = SAWSpinErrorCode | ErrorCodesGame;
@@ -1,16 +0,0 @@
1
- interface GBaseRequest {
2
- customer_id: string;
3
- ext_user_id: string;
4
- int_user_id: number;
5
- smartico_ext_user_id: string;
6
- ext_game_id: number;
7
- lang: string;
8
- hash: string;
9
- zoom?: number;
10
- label_api_key?: string;
11
- brand_key?: string;
12
- bridgeId?: string;
13
- height?: 'auto' | string;
14
- theme?: string;
15
- }
16
- export { GBaseRequest };
@@ -1,10 +0,0 @@
1
- import { ErrorCodes } from "./ErrorCodes";
2
- interface GResponseBase {
3
- errCode: ErrorCodes;
4
- errMessage?: string;
5
- }
6
- interface GResponse<T> extends GResponseBase {
7
- data?: T;
8
- }
9
- declare const SMX = 1;
10
- export { GResponseBase, GResponse, SMX };
@@ -1,6 +0,0 @@
1
- declare enum GameAttemptType {
2
- Free = 1,
3
- Points = 2,
4
- Attempts = 3
5
- }
6
- export { GameAttemptType };
@@ -1,10 +0,0 @@
1
- declare enum GameCanPlayType {
2
- Yes = 1,
3
- NotEnoughPoints = 2,
4
- NotEnoughAttempts = 3,
5
- InactiveGame = 4,
6
- TimeRestrictions = 5,
7
- SegmentRestrictions = 6,
8
- GameNotFound = 7
9
- }
10
- export { GameCanPlayType };
@@ -1,6 +0,0 @@
1
- declare enum GameExternalStatus {
2
- Draft = 1,
3
- Active = 2,
4
- Archived = 3
5
- }
6
- export { GameExternalStatus };
@@ -1,9 +0,0 @@
1
- import { ResponseIdentifyLabelInfo } from "../SmarticoProto/PublicLabelInfo";
2
- import { GamePickRoundBase } from "./GamePick";
3
- import { SAWTemplate } from "../SmarticoProto/SAW/SAWTemplate";
4
- interface GameInfo {
5
- sawTemplate: SAWTemplate;
6
- allRounds: GamePickRoundBase[];
7
- labelInfo: ResponseIdentifyLabelInfo;
8
- }
9
- export { GameInfo };