@smartico/public-api 0.0.343 → 0.0.345

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartico/public-api",
3
- "version": "0.0.343",
3
+ "version": "0.0.345",
4
4
  "description": "Smartico public API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,4 +1,19 @@
1
1
  export enum SAWExposeUserSpinId {
2
2
  UserId = 1,
3
3
  SpinId = 2,
4
- }
4
+ }
5
+
6
+ export enum SAWExposeUserSpinIdName {
7
+ UserId = 'userId',
8
+ SpinId = 'spinId',
9
+ }
10
+
11
+ /** @hidden */
12
+ export const SAWExposeUserSpinIdNamed = (id: SAWExposeUserSpinId): SAWExposeUserSpinIdName => {
13
+ return (
14
+ {
15
+ [SAWExposeUserSpinId.UserId]: SAWExposeUserSpinIdName.UserId,
16
+ [SAWExposeUserSpinId.SpinId]: SAWExposeUserSpinIdName.SpinId,
17
+ }[id]
18
+ );
19
+ };
@@ -1,4 +1,19 @@
1
1
  export enum SAWGameLayout {
2
2
  Horizontal = 1,
3
3
  VerticalMap = 2,
4
- }
4
+ }
5
+
6
+ export enum SAWGameLayoutName {
7
+ Horizontal = 'horizontal',
8
+ VerticalMap = 'vertical-map',
9
+ }
10
+
11
+ /** @hidden */
12
+ export const SAWGameLayoutNamed = (layout: SAWGameLayout): SAWGameLayoutName => {
13
+ return (
14
+ {
15
+ [SAWGameLayout.Horizontal]: SAWGameLayoutName.Horizontal,
16
+ [SAWGameLayout.VerticalMap]: SAWGameLayoutName.VerticalMap,
17
+ }[layout]
18
+ );
19
+ };
@@ -3,7 +3,9 @@ import { TMiniGamePrize, TMiniGameTemplate } from '../WSAPI/WSAPITypes';
3
3
  import { ProtocolResponse } from './../Base/ProtocolResponse';
4
4
  import { SAWAcknowledgeTypeNamed } from './SAWAcknowledgeType';
5
5
  import { SAWBuyInType, SAWBuyInTypeNamed } from './SAWBuyInType';
6
- import { SAWGameTypeNamed } from './SAWGameType';
6
+ import { SAWExposeUserSpinIdNamed } from './SAWExposeUserSpinId';
7
+ import { SAWGameLayoutNamed } from './SAWGameLayout';
8
+ import { SAWGameType, SAWGameTypeNamed } from './SAWGameType';
7
9
  import { MiniGamePrizeTypeNamed } from './SAWPrizeType';
8
10
  import { SAWTemplate } from './SAWTemplate';
9
11
 
@@ -45,9 +47,16 @@ export const SAWTemplatesTransform = (items: SAWTemplate[]): TMiniGameTemplate[]
45
47
  steps_to_finish_game: r.saw_template_ui_definition.steps_to_finish_game,
46
48
  custom_section_id: r.saw_template_ui_definition.custom_section_id,
47
49
  saw_template_ui_definition: r.saw_template_ui_definition,
50
+ ...(r.saw_game_type_id === SAWGameType.LootboxCalendarDays || r.saw_game_type_id === SAWGameType.LootboxWeekdays
51
+ ? { game_layout: SAWGameLayoutNamed(r.saw_template_ui_definition.game_layout) }
52
+ : {}
53
+ ),
48
54
  show_prize_history: r.show_prize_history,
49
55
  max_number_of_attempts: r.maxSpinsCount,
50
56
  max_spins_period_ms: r.maxSpinsPediodMs,
57
+ ...(r.saw_template_ui_definition.expose_user_spin_id
58
+ ? { expose_user_spin_id: SAWExposeUserSpinIdNamed(r.saw_template_ui_definition.expose_user_spin_id) }
59
+ : {}),
51
60
 
52
61
  prizes: r.prizes.map((p) => {
53
62
  const y: TMiniGamePrize = {
@@ -1,5 +1,5 @@
1
1
  import { BuyStoreItemErrorCode } from '../Store';
2
- import { AttemptPeriodType, MiniGamePrizeTypeName, SAWAcknowledgeTypeName, SAWAskForUsername, SAWBuyInTypeName, SAWGameLayout, SAWGameTypeName, SAWSpinErrorCode, SAWTemplate, SAWTemplateUI } from '../MiniGames';
2
+ import { AttemptPeriodType, MiniGamePrizeTypeName, SAWAcknowledgeTypeName, SAWAskForUsername, SAWBuyInTypeName, SAWExposeUserSpinIdName, SAWGameLayout, SAWGameLayoutName, SAWGameTypeName, SAWSpinErrorCode, SAWTemplate, SAWTemplateUI } from '../MiniGames';
3
3
  import { TournamentRegistrationError, TournamentRegistrationStatusName, TournamentRegistrationTypeName } from '../Tournaments';
4
4
  import { AchievementAvailabilityStatus, BadgesTimeLimitStates } from '../Missions';
5
5
  import { LeaderBoardPeriodType } from '../Leaderboard';
@@ -188,12 +188,16 @@ export interface TMiniGameTemplate {
188
188
 
189
189
  /** The UI definition of the mini-game */
190
190
  saw_template_ui_definition: SAWTemplateUI;
191
+ /** The layout of the game */
192
+ game_layout?: SAWGameLayoutName;
191
193
  /** When enabled the prize history icon is visible on a certain template */
192
194
  show_prize_history?: boolean;
193
195
  /** The maximum number of attempts that user can do during period of time */
194
196
  max_number_of_attempts?: number;
195
197
  /** The period of time in milliseconds during which the user can do the maximum number of attempts */
196
198
  max_spins_period_ms?: number;
199
+ /** The ID of the user spin id to expose on the game */
200
+ expose_user_spin_id?: SAWExposeUserSpinIdName;
197
201
  }
198
202
 
199
203
  /**
package/docs/README.md DELETED
@@ -1,230 +0,0 @@
1
- # Smartico API documentation
2
-
3
- ## Enumerations
4
-
5
- - [PointChangeSourceType](enums/PointChangeSourceType.md)
6
- - [UserBalanceType](enums/UserBalanceType.md)
7
- - [BonusStatus](enums/BonusStatus.md)
8
- - [AchCustomSectionType](enums/AchCustomSectionType.md)
9
- - [AchCustomLayoutTheme](enums/AchCustomLayoutTheme.md)
10
- - [AchMissionsTabsOptions](enums/AchMissionsTabsOptions.md)
11
- - [AchOverviewMissionsFilter](enums/AchOverviewMissionsFilter.md)
12
- - [LiquidEntityData](enums/LiquidEntityData.md)
13
- - [InboxCategories](enums/InboxCategories.md)
14
- - [JackpotContributionType](enums/JackpotContributionType.md)
15
- - [JackPotTemparature](enums/JackPotTemparature.md)
16
- - [JackpotType](enums/JackpotType.md)
17
- - [LeaderBoardPeriodType](enums/LeaderBoardPeriodType.md)
18
- - [AttemptPeriodType](enums/AttemptPeriodType.md)
19
- - [PrizeModifiers](enums/PrizeModifiers.md)
20
- - [SAWAcknowledgeType](enums/SAWAcknowledgeType.md)
21
- - [SAWAcknowledgeTypeName](enums/SAWAcknowledgeTypeName.md)
22
- - [SAWAskForUsername](enums/SAWAskForUsername.md)
23
- - [SAWBuyInType](enums/SAWBuyInType.md)
24
- - [SAWBuyInTypeName](enums/SAWBuyInTypeName.md)
25
- - [SAWExposeUserSpinId](enums/SAWExposeUserSpinId.md)
26
- - [SAWGameDifficultyType](enums/SAWGameDifficultyType.md)
27
- - [SAWGameDifficultyTypeName](enums/SAWGameDifficultyTypeName.md)
28
- - [SAWGameLayout](enums/SAWGameLayout.md)
29
- - [SAWGameType](enums/SAWGameType.md)
30
- - [SAWGameTypeName](enums/SAWGameTypeName.md)
31
- - [SAWPrizeType](enums/SAWPrizeType.md)
32
- - [MiniGamePrizeTypeName](enums/MiniGamePrizeTypeName.md)
33
- - [SAWSpinErrorCode](enums/SAWSpinErrorCode.md)
34
- - [SAWWheelLayout](enums/SAWWheelLayout.md)
35
- - [SAWWinSoundType](enums/SAWWinSoundType.md)
36
- - [AchievementAvailabilityStatus](enums/AchievementAvailabilityStatus.md)
37
- - [RaffleDrawInstanceState](enums/RaffleDrawInstanceState.md)
38
- - [RaffleDrawTypeExecution](enums/RaffleDrawTypeExecution.md)
39
- - [BuyStoreItemErrorCode](enums/BuyStoreItemErrorCode.md)
40
- - [TournamentRegistrationError](enums/TournamentRegistrationError.md)
41
- - [TournamentRegistrationStatus](enums/TournamentRegistrationStatus.md)
42
- - [TournamentRegistrationStatusName](enums/TournamentRegistrationStatusName.md)
43
- - [TournamentRegistrationType](enums/TournamentRegistrationType.md)
44
- - [BonusStatus](enums/BonusStatus-1.md)
45
-
46
- ## Classes
47
-
48
- - [SAWUtils](classes/SAWUtils.md)
49
-
50
- ## Interfaces
51
-
52
- - [AchRelatedGame](interfaces/AchRelatedGame.md)
53
- - [GetJackpotEligibleGamesRequest](interfaces/GetJackpotEligibleGamesRequest.md)
54
- - [GetJackpotEligibleGamesResponse](interfaces/GetJackpotEligibleGamesResponse.md)
55
- - [TGetJackpotEligibleGamesResponse](interfaces/TGetJackpotEligibleGamesResponse.md)
56
- - [JackpotEligibleGame](interfaces/JackpotEligibleGame.md)
57
- - [GetJackpotWinnersRequest](interfaces/GetJackpotWinnersRequest.md)
58
- - [GetJackpotWinnersResponse](interfaces/GetJackpotWinnersResponse.md)
59
- - [JackpotWinnerHistory](interfaces/JackpotWinnerHistory.md)
60
- - [GetJackpotsPotsRequest](interfaces/GetJackpotsPotsRequest.md)
61
- - [GetJackpotsPotsResponse](interfaces/GetJackpotsPotsResponse.md)
62
- - [GetJackpotsRequest](interfaces/GetJackpotsRequest.md)
63
- - [GetJackpotsResponse](interfaces/GetJackpotsResponse.md)
64
- - [JackPotWinner](interfaces/JackPotWinner.md)
65
- - [JackpotDetails](interfaces/JackpotDetails.md)
66
- - [JackpotHtmlTemplate](interfaces/JackpotHtmlTemplate.md)
67
- - [JackpotPot](interfaces/JackpotPot.md)
68
- - [JackpotPublicMeta](interfaces/JackpotPublicMeta.md)
69
- - [JackpotWinPush](interfaces/JackpotWinPush.md)
70
- - [JackpotsOptinRequest](interfaces/JackpotsOptinRequest.md)
71
- - [JackpotsOptinResponse](interfaces/JackpotsOptinResponse.md)
72
- - [JackpotsOptoutRequest](interfaces/JackpotsOptoutRequest.md)
73
- - [JackpotsOptoutResponse](interfaces/JackpotsOptoutResponse.md)
74
- - [SAWAcknowledgeSpinPushRequest](interfaces/SAWAcknowledgeSpinPushRequest.md)
75
- - [SAWDoAknowledgeRequest](interfaces/SAWDoAknowledgeRequest.md)
76
- - [SAWDoAknowledgeResponse](interfaces/SAWDoAknowledgeResponse.md)
77
- - [SAWDoSpinRequest](interfaces/SAWDoSpinRequest.md)
78
- - [SAWDoSpinResponse](interfaces/SAWDoSpinResponse.md)
79
- - [SAWEventSawPush](interfaces/SAWEventSawPush.md)
80
- - [SAWGetTemplatesRequest](interfaces/SAWGetTemplatesRequest.md)
81
- - [SAWGetTemplatesResponse](interfaces/SAWGetTemplatesResponse.md)
82
- - [SAWPrize](interfaces/SAWPrize.md)
83
- - [SAWPrizeDropAknowledgeRequest](interfaces/SAWPrizeDropAknowledgeRequest.md)
84
- - [SAWPrizeDropAknowledgeResponse](interfaces/SAWPrizeDropAknowledgeResponse.md)
85
- - [SAWPrizeDropWinPush](interfaces/SAWPrizeDropWinPush.md)
86
- - [SAWPrizeUI](interfaces/SAWPrizeUI.md)
87
- - [SAWSpinsCountPush](interfaces/SAWSpinsCountPush.md)
88
- - [SAWTemplate](interfaces/SAWTemplate.md)
89
- - [SAWTemplateUI](interfaces/SAWTemplateUI.md)
90
- - [SAWWinningHistoryRequest](interfaces/SAWWinningHistoryRequest.md)
91
- - [SAWWinningHistoryResponse](interfaces/SAWWinningHistoryResponse.md)
92
- - [SAWPrizesHistory](interfaces/SAWPrizesHistory.md)
93
- - [GetDrawRunRequest](interfaces/GetDrawRunRequest.md)
94
- - [GetDrawRunResponse](interfaces/GetDrawRunResponse.md)
95
- - [GetRaffleDrawRunsHistoryRequest](interfaces/GetRaffleDrawRunsHistoryRequest.md)
96
- - [GetRaffleDrawRunsHistoryResponse](interfaces/GetRaffleDrawRunsHistoryResponse.md)
97
- - [GetRafflesRequest](interfaces/GetRafflesRequest.md)
98
- - [GetRafflesResponse](interfaces/GetRafflesResponse.md)
99
- - [RafflePublicMeta](interfaces/RafflePublicMeta.md)
100
- - [Raffle](interfaces/Raffle.md)
101
- - [RaffleClaimPrizeRequest](interfaces/RaffleClaimPrizeRequest.md)
102
- - [RaffleClaimPrizeResponse](interfaces/RaffleClaimPrizeResponse.md)
103
- - [RaffleDraw](interfaces/RaffleDraw.md)
104
- - [RaffleDrawPublicMeta](interfaces/RaffleDrawPublicMeta.md)
105
- - [RaffleDrawRun](interfaces/RaffleDrawRun.md)
106
- - [RaffleOptinRequest](interfaces/RaffleOptinRequest.md)
107
- - [RaffleOptinResponse](interfaces/RaffleOptinResponse.md)
108
- - [RafflePrizePublicMeta](interfaces/RafflePrizePublicMeta.md)
109
- - [RafflePrize](interfaces/RafflePrize.md)
110
- - [RafflePrizeWinner](interfaces/RafflePrizeWinner.md)
111
- - [RaffleTicket](interfaces/RaffleTicket.md)
112
- - [TMiniGamePrize](interfaces/TMiniGamePrize.md)
113
- - [TMiniGamePlayResult](interfaces/TMiniGamePlayResult.md)
114
- - [TMiniGamePlayBatchResult](interfaces/TMiniGamePlayBatchResult.md)
115
- - [TMiniGameTemplate](interfaces/TMiniGameTemplate.md)
116
- - [TUserProfile](interfaces/TUserProfile.md)
117
- - [TLevel](interfaces/TLevel.md)
118
- - [TLevelCurrent](interfaces/TLevelCurrent.md)
119
- - [TTournament](interfaces/TTournament.md)
120
- - [TTournamentDetailed](interfaces/TTournamentDetailed.md)
121
- - [TStoreCategory](interfaces/TStoreCategory.md)
122
- - [TStoreItem](interfaces/TStoreItem.md)
123
- - [TAchCategory](interfaces/TAchCategory.md)
124
- - [TMissionOrBadge](interfaces/TMissionOrBadge.md)
125
- - [AchRelatedGame](interfaces/AchRelatedGame-1.md)
126
- - [TMissionOrBadgeTask](interfaces/TMissionOrBadgeTask.md)
127
- - [TMissionOptInResult](interfaces/TMissionOptInResult.md)
128
- - [TMissionClaimRewardResult](interfaces/TMissionClaimRewardResult.md)
129
- - [TTournamentRegistrationResult](interfaces/TTournamentRegistrationResult.md)
130
- - [TBuyStoreItemResult](interfaces/TBuyStoreItemResult.md)
131
- - [TGetTranslations](interfaces/TGetTranslations.md)
132
- - [TInboxMessage](interfaces/TInboxMessage.md)
133
- - [TInboxMessageBody](interfaces/TInboxMessageBody.md)
134
- - [InboxMarkMessageAction](interfaces/InboxMarkMessageAction.md)
135
- - [LeaderBoardDetailsT](interfaces/LeaderBoardDetailsT.md)
136
- - [LeaderBoardsRewardsT](interfaces/LeaderBoardsRewardsT.md)
137
- - [LeaderBoardUserT](interfaces/LeaderBoardUserT.md)
138
- - [UserLevelExtraCountersT](interfaces/UserLevelExtraCountersT.md)
139
- - [TSegmentCheckResult](interfaces/TSegmentCheckResult.md)
140
- - [TUICustomSection](interfaces/TUICustomSection.md)
141
- - [TBonus](interfaces/TBonus.md)
142
- - [BonusTemplateMetaMap](interfaces/BonusTemplateMetaMap.md)
143
- - [BonusMetaMap](interfaces/BonusMetaMap.md)
144
- - [TClaimBonusResult](interfaces/TClaimBonusResult.md)
145
- - [TSawHistory](interfaces/TSawHistory.md)
146
- - [TRaffle](interfaces/TRaffle.md)
147
- - [TRaffleTicket](interfaces/TRaffleTicket.md)
148
- - [TRafflePrize](interfaces/TRafflePrize.md)
149
- - [TRafflePrizeWinner](interfaces/TRafflePrizeWinner.md)
150
- - [TRaffleDraw](interfaces/TRaffleDraw.md)
151
- - [TRaffleDrawRun](interfaces/TRaffleDrawRun.md)
152
- - [TransformedRaffleClaimPrizeResponse](interfaces/TransformedRaffleClaimPrizeResponse.md)
153
- - [TActivityLog](interfaces/TActivityLog.md)
154
- - [TRaffleOptinResponse](interfaces/TRaffleOptinResponse.md)
155
-
156
- ## General API
157
-
158
- - [WSAPI](classes/WSAPI.md)
159
-
160
- ## Type Aliases
161
-
162
- ### TournamentRegistrationTypeName
163
-
164
- Ƭ **TournamentRegistrationTypeName**: ``"AUTO"`` \| ``"OPT_IN"`` \| ``"BUY_IN_POINTS"`` \| ``"MANUAL_APPROVAL"`` \| ``"REQUIRES_QUALIFICATION"`` \| ``"BUY_IN_GEMS"`` \| ``"BUY_IN_DIAMONDS"`` \| ``"UNKNOWN"``
165
-
166
- ## Variables
167
-
168
- ### PrizeModifiersKeysNames
169
-
170
- • `Const` **PrizeModifiersKeysNames**: `Object`
171
-
172
- #### Type declaration
173
-
174
- | Name | Type |
175
- | :------ | :------ |
176
- | `1` | `string` |
177
- | `2` | `string` |
178
- | `3` | `string` |
179
- | `4` | `string` |
180
- | `5` | `string` |
181
- | `6` | `string` |
182
- | `7` | `string` |
183
- | `8` | `string` |
184
-
185
- ___
186
-
187
- ### SAWWinSoundFiles
188
-
189
- • `Const` **SAWWinSoundFiles**: `Object`
190
-
191
- #### Type declaration
192
-
193
- | Name | Type |
194
- | :------ | :------ |
195
- | `4` | `any` |
196
- | `1` | `string` |
197
- | `2` | `string` |
198
- | `3` | `string` |
199
-
200
- ## Functions
201
-
202
- ### SAWTemplatesTransform
203
-
204
- ▸ **SAWTemplatesTransform**(`items`): [`TMiniGameTemplate`](interfaces/TMiniGameTemplate.md)[]
205
-
206
- #### Parameters
207
-
208
- | Name | Type |
209
- | :------ | :------ |
210
- | `items` | [`SAWTemplate`](interfaces/SAWTemplate.md)[] |
211
-
212
- #### Returns
213
-
214
- [`TMiniGameTemplate`](interfaces/TMiniGameTemplate.md)[]
215
-
216
- ___
217
-
218
- ### SAWHistoryTransform
219
-
220
- ▸ **SAWHistoryTransform**(`items`): [`TSawHistory`](interfaces/TSawHistory.md)[]
221
-
222
- #### Parameters
223
-
224
- | Name | Type |
225
- | :------ | :------ |
226
- | `items` | [`SAWPrizesHistory`](interfaces/SAWPrizesHistory.md)[] |
227
-
228
- #### Returns
229
-
230
- [`TSawHistory`](interfaces/TSawHistory.md)[]
@@ -1,43 +0,0 @@
1
- # Interface: GemsDiamondsLog
2
-
3
- ## Properties
4
-
5
- ### create\_date
6
-
7
- • **create\_date**: `number`
8
-
9
- ___
10
-
11
- ### user\_ext\_id
12
-
13
- • **user\_ext\_id**: `string`
14
-
15
- ___
16
-
17
- ### crm\_brand\_id
18
-
19
- • **crm\_brand\_id**: `number`
20
-
21
- ___
22
-
23
- ### type
24
-
25
- • **type**: [`UserBalanceType`](../enums/UserBalanceType.md)
26
-
27
- ___
28
-
29
- ### amount
30
-
31
- • **amount**: `number`
32
-
33
- ___
34
-
35
- ### balance
36
-
37
- • **balance**: `number`
38
-
39
- ___
40
-
41
- ### source\_type\_id
42
-
43
- • **source\_type\_id**: [`PointChangeSourceType`](../enums/PointChangeSourceType.md)
@@ -1,43 +0,0 @@
1
- # Interface: PointsLog
2
-
3
- ## Properties
4
-
5
- ### create\_date
6
-
7
- • **create\_date**: `number`
8
-
9
- ___
10
-
11
- ### user\_ext\_id
12
-
13
- • **user\_ext\_id**: `string`
14
-
15
- ___
16
-
17
- ### crm\_brand\_id
18
-
19
- • **crm\_brand\_id**: `number`
20
-
21
- ___
22
-
23
- ### points\_collected
24
-
25
- • **points\_collected**: `number`
26
-
27
- ___
28
-
29
- ### user\_points\_ever
30
-
31
- • **user\_points\_ever**: `number`
32
-
33
- ___
34
-
35
- ### user\_points\_balance
36
-
37
- • **user\_points\_balance**: `number`
38
-
39
- ___
40
-
41
- ### source\_type\_id
42
-
43
- • **source\_type\_id**: [`PointChangeSourceType`](../enums/PointChangeSourceType.md)