@smartico/public-api 0.0.101 → 0.0.103
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/PublicProperties.d.ts +0 -2
- package/dist/MiniGames/SAWTemplateUI.d.ts +1 -0
- package/dist/WSAPI/WSAPITypes.d.ts +26 -1
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +24 -1
- package/dist/index.modern.mjs.map +1 -1
- package/docs/README.md +1 -0
- package/docs/interfaces/AchRelatedGame.md +28 -0
- package/docs/interfaces/TMiniGameTemplate.md +9 -1
- package/docs/interfaces/TMissionOrBadge.md +8 -0
- package/docs/interfaces/TTournamentDetailed.md +8 -0
- package/package.json +1 -1
- package/src/Core/PublicProperties.ts +0 -2
- package/src/MiniGames/SAWGetTemplatesResponse.ts +1 -0
- package/src/MiniGames/SAWTemplateUI.ts +1 -0
- package/src/Missions/UserAchievement.ts +12 -1
- package/src/Tournaments/GetTournamentInfoResponse.ts +11 -0
- package/src/WSAPI/WSAPITypes.ts +29 -1
|
@@ -2,8 +2,6 @@ export interface PublicProperties {
|
|
|
2
2
|
core_user_language?: string;
|
|
3
3
|
ach_points_balance?: number;
|
|
4
4
|
ach_points_ever?: number;
|
|
5
|
-
ach_points_board_period_type_1?: number;
|
|
6
|
-
ach_points_board_period_type_2?: number;
|
|
7
5
|
ach_level_current_id?: number;
|
|
8
6
|
ach_level_current?: string;
|
|
9
7
|
core_is_test_account?: boolean;
|
|
@@ -58,8 +58,10 @@ export interface TMiniGameTemplate {
|
|
|
58
58
|
next_available_spin_ts: number;
|
|
59
59
|
/** The message that should be shown to the user when he cannot play the game, server rejected attempt with error code SAWSpinErrorCode.SAW_FAILED_MAX_SPINS_REACHED */
|
|
60
60
|
over_limit_message: string;
|
|
61
|
-
/** The message that should be shown to the user when he cannot play the game because he doesn't have spin attempts
|
|
61
|
+
/** The message that should be shown to the user when he cannot play the game because he doesn't have spin attempts. */
|
|
62
62
|
no_attempts_message: string;
|
|
63
|
+
/** The message that should be shown to the user when he cannot play the game because he doesn't have points. */
|
|
64
|
+
no_points_message: string;
|
|
63
65
|
/** Current jackpont amount, if jackpot is enabled. */
|
|
64
66
|
jackpot_current: number;
|
|
65
67
|
/** The amount that will be added to the jackpot every time when somebody plays the game. Note that the contribution amount is abstract, means that no money or points are deducted from the user balance. */
|
|
@@ -206,6 +208,8 @@ export interface TTournament {
|
|
|
206
208
|
* TTournamentDetailed describes the information of the tournament item and includes list of participants, their scores and position in the tournament leaderboard
|
|
207
209
|
*/
|
|
208
210
|
export interface TTournamentDetailed extends TTournament {
|
|
211
|
+
/** List of casino games (or other types of entities) related to the tournament */
|
|
212
|
+
related_games?: AchRelatedGame[];
|
|
209
213
|
/** The list of the tournament participants */
|
|
210
214
|
players?: {
|
|
211
215
|
/** The username of the participant */
|
|
@@ -342,6 +346,27 @@ export interface TMissionOrBadge {
|
|
|
342
346
|
custom_data: any;
|
|
343
347
|
/** The list of tasks of the mission or badge */
|
|
344
348
|
tasks: TMissionOrBadgeTask[];
|
|
349
|
+
/** List of casino games (or other types of entities) related to the mission or badge */
|
|
350
|
+
related_games?: AchRelatedGame[];
|
|
351
|
+
}
|
|
352
|
+
export interface AchRelatedGame {
|
|
353
|
+
/** The ID of the related game */
|
|
354
|
+
ext_game_id: string;
|
|
355
|
+
/** Game public meta information */
|
|
356
|
+
game_public_meta: {
|
|
357
|
+
/** The name of the game */
|
|
358
|
+
name: string;
|
|
359
|
+
/** The URL to the game */
|
|
360
|
+
link: string;
|
|
361
|
+
/** The URL to the image of the game */
|
|
362
|
+
image: string;
|
|
363
|
+
/** The indicator if the game is enabled */
|
|
364
|
+
enabled: boolean;
|
|
365
|
+
/** The list of categories of the game */
|
|
366
|
+
game_categories: string[];
|
|
367
|
+
/** The name of the game provider */
|
|
368
|
+
game_provider: string;
|
|
369
|
+
};
|
|
345
370
|
}
|
|
346
371
|
/**
|
|
347
372
|
* TMissionOrBadgeTask describes the information of tasks that belings to mission or badge. See also TMissionOrBadge
|
package/dist/index.js
CHANGED
|
@@ -284,6 +284,7 @@ var SAWTemplatesTransform = function SAWTemplatesTransform(items) {
|
|
|
284
284
|
thumbnail: (_r$saw_skin_ui_defini = r.saw_skin_ui_definition) != null && _r$saw_skin_ui_defini.skin_folder ? ((_r$saw_skin_ui_defini2 = r.saw_skin_ui_definition) == null ? void 0 : _r$saw_skin_ui_defini2.skin_folder) + '/ico.png' : "https://libs.smartico.ai/gf/images/saw/" + r.saw_skin_key + "/ico.png",
|
|
285
285
|
over_limit_message: r.saw_template_ui_definition.over_limit_message,
|
|
286
286
|
no_attempts_message: r.saw_template_ui_definition.no_attempts_message,
|
|
287
|
+
no_points_message: r.saw_template_ui_definition.no_points_message,
|
|
287
288
|
jackpot_symbol: r.saw_template_ui_definition.jackpot_symbol,
|
|
288
289
|
saw_game_type: SAWGameTypeNamed(r.saw_game_type_id),
|
|
289
290
|
saw_buyin_type: SAWBuyInTypeNamed(r.saw_buyin_type_id),
|
|
@@ -635,6 +636,19 @@ var UserAchievementTransform = function UserAchievementTransform(items) {
|
|
|
635
636
|
is_completed: t.isCompleted,
|
|
636
637
|
progress: t.userProgress
|
|
637
638
|
};
|
|
639
|
+
}),
|
|
640
|
+
related_games: (r.related_games || []).map(function (g) {
|
|
641
|
+
return {
|
|
642
|
+
ext_game_id: g.ext_game_id,
|
|
643
|
+
game_public_meta: {
|
|
644
|
+
name: g.game_public_meta.name,
|
|
645
|
+
link: g.game_public_meta.link,
|
|
646
|
+
image: g.game_public_meta.image,
|
|
647
|
+
enabled: g.game_public_meta.enabled,
|
|
648
|
+
game_categories: g.game_public_meta.game_categories,
|
|
649
|
+
game_provider: g.game_public_meta.game_provider
|
|
650
|
+
}
|
|
651
|
+
};
|
|
638
652
|
})
|
|
639
653
|
};
|
|
640
654
|
});
|
|
@@ -736,6 +750,19 @@ var tournamentPrizeTypeToPrizeName = function tournamentPrizeTypeToPrizeName(typ
|
|
|
736
750
|
};
|
|
737
751
|
var tournamentInfoItemTransform = function tournamentInfoItemTransform(t) {
|
|
738
752
|
var response = _extends({}, TournamentItemsTransform([t.tournamentInfo.tournamentLobbyInfo])[0], {
|
|
753
|
+
related_games: (t.tournamentInfo.tournamentLobbyInfo.related_games || []).map(function (g) {
|
|
754
|
+
return {
|
|
755
|
+
ext_game_id: g.ext_game_id,
|
|
756
|
+
game_public_meta: {
|
|
757
|
+
name: g.game_public_meta.name,
|
|
758
|
+
link: g.game_public_meta.link,
|
|
759
|
+
image: g.game_public_meta.image,
|
|
760
|
+
enabled: g.game_public_meta.enabled,
|
|
761
|
+
game_categories: g.game_public_meta.game_categories,
|
|
762
|
+
game_provider: g.game_public_meta.game_provider
|
|
763
|
+
}
|
|
764
|
+
};
|
|
765
|
+
}),
|
|
739
766
|
players: t.tournamentInfo.players.map(function (p) {
|
|
740
767
|
return {
|
|
741
768
|
public_username: p.userAltName,
|