@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/docs/README.md CHANGED
@@ -22,6 +22,7 @@
22
22
  - [TStoreCategory](interfaces/TStoreCategory.md)
23
23
  - [TStoreItem](interfaces/TStoreItem.md)
24
24
  - [TMissionOrBadge](interfaces/TMissionOrBadge.md)
25
+ - [AchRelatedGame](interfaces/AchRelatedGame.md)
25
26
  - [TMissionOrBadgeTask](interfaces/TMissionOrBadgeTask.md)
26
27
  - [TMissionOptInResult](interfaces/TMissionOptInResult.md)
27
28
  - [TTournamentRegistrationResult](interfaces/TTournamentRegistrationResult.md)
@@ -0,0 +1,28 @@
1
+ # Interface: AchRelatedGame
2
+
3
+ ## Properties
4
+
5
+ ### ext\_game\_id
6
+
7
+ • **ext\_game\_id**: `string`
8
+
9
+ The ID of the related game
10
+
11
+ ___
12
+
13
+ ### game\_public\_meta
14
+
15
+ • **game\_public\_meta**: `Object`
16
+
17
+ Game public meta information
18
+
19
+ #### Type declaration
20
+
21
+ | Name | Type | Description |
22
+ | :------ | :------ | :------ |
23
+ | `name` | `string` | The name of the game |
24
+ | `link` | `string` | The URL to the game |
25
+ | `image` | `string` | The URL to the image of the game |
26
+ | `enabled` | `boolean` | The indicator if the game is enabled |
27
+ | `game_categories` | `string`[] | The list of categories of the game |
28
+ | `game_provider` | `string` | The name of the game provider |
@@ -88,7 +88,15 @@ ___
88
88
 
89
89
  • **no\_attempts\_message**: `string`
90
90
 
91
- The message that should be shown to the user when he cannot play the game because he doesn't have spin attempts or points.
91
+ The message that should be shown to the user when he cannot play the game because he doesn't have spin attempts.
92
+
93
+ ___
94
+
95
+ ### no\_points\_message
96
+
97
+ • **no\_points\_message**: `string`
98
+
99
+ The message that should be shown to the user when he cannot play the game because he doesn't have points.
92
100
 
93
101
  ___
94
102
 
@@ -165,3 +165,11 @@ ___
165
165
  • **tasks**: [`TMissionOrBadgeTask`](TMissionOrBadgeTask.md)[]
166
166
 
167
167
  The list of tasks of the mission or badge
168
+
169
+ ___
170
+
171
+ ### related\_games
172
+
173
+ • `Optional` **related\_games**: [`AchRelatedGame`](AchRelatedGame.md)[]
174
+
175
+ List of casino games (or other types of entities) related to the mission or badge
@@ -351,6 +351,14 @@ Indicator if tournament instance is upcoming (status PUBLISHED or REGISTER)
351
351
 
352
352
  ___
353
353
 
354
+ ### related\_games
355
+
356
+ • `Optional` **related\_games**: [`AchRelatedGame`](AchRelatedGame.md)[]
357
+
358
+ List of casino games (or other types of entities) related to the tournament
359
+
360
+ ___
361
+
354
362
  ### players
355
363
 
356
364
  • `Optional` **players**: { `public_username`: `string` ; `avatar_url`: `string` ; `position`: `number` ; `scores`: `number` ; `is_me`: `boolean` }[]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartico/public-api",
3
- "version": "0.0.101",
3
+ "version": "0.0.103",
4
4
  "description": "Smartico public API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -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;
@@ -31,6 +31,7 @@ export const SAWTemplatesTransform = (items: SAWTemplate[]): TMiniGameTemplate[]
31
31
  ,
32
32
  over_limit_message: r.saw_template_ui_definition.over_limit_message,
33
33
  no_attempts_message: r.saw_template_ui_definition.no_attempts_message,
34
+ no_points_message: r.saw_template_ui_definition.no_points_message,
34
35
  jackpot_symbol: r.saw_template_ui_definition.jackpot_symbol,
35
36
  saw_game_type: SAWGameTypeNamed(r.saw_game_type_id),
36
37
  saw_buyin_type: SAWBuyInTypeNamed(r.saw_buyin_type_id),
@@ -6,6 +6,7 @@ export interface SAWTemplateUI {
6
6
  description?: string;
7
7
  over_limit_message?: string;
8
8
  no_attempts_message?: string;
9
+ no_points_message?: string;
9
10
  thumbnail?: string;
10
11
  sectors_count: number;
11
12
  priority: number;
@@ -64,7 +64,18 @@ export const UserAchievementTransform = (items: UserAchievement[]): TMissionOrBa
64
64
  points_reward: t.points_reward,
65
65
  is_completed: t.isCompleted,
66
66
  progress: t.userProgress,
67
- }))
67
+ })),
68
+ related_games: (r.related_games || []).map(g => ({
69
+ ext_game_id: g.ext_game_id,
70
+ game_public_meta: {
71
+ name: g.game_public_meta.name,
72
+ link: g.game_public_meta.link,
73
+ image: g.game_public_meta.image,
74
+ enabled: g.game_public_meta.enabled,
75
+ game_categories: g.game_public_meta.game_categories,
76
+ game_provider: g.game_public_meta.game_provider,
77
+ },
78
+ })),
68
79
  }
69
80
  ));
70
81
  }
@@ -37,6 +37,17 @@ const tournamentPrizeTypeToPrizeName = (type: ActivityTypeLimited) => {
37
37
  export const tournamentInfoItemTransform = (t: GetTournamentInfoResponse): TTournamentDetailed => {
38
38
  const response: TTournamentDetailed = {
39
39
  ...TournamentItemsTransform([t.tournamentInfo.tournamentLobbyInfo])[0],
40
+ related_games: (t.tournamentInfo.tournamentLobbyInfo.related_games || []).map(g => ({
41
+ ext_game_id: g.ext_game_id,
42
+ game_public_meta: {
43
+ name: g.game_public_meta.name,
44
+ link: g.game_public_meta.link,
45
+ image: g.game_public_meta.image,
46
+ enabled: g.game_public_meta.enabled,
47
+ game_categories: g.game_public_meta.game_categories,
48
+ game_provider: g.game_public_meta.game_provider,
49
+ },
50
+ })),
40
51
  players: t.tournamentInfo.players.map( p => ({
41
52
  public_username: p.userAltName,
42
53
  avatar_url: p.avatar_url,
@@ -72,9 +72,12 @@ export interface TMiniGameTemplate {
72
72
 
73
73
  /** 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 */
74
74
  over_limit_message: string;
75
- /** The message that should be shown to the user when he cannot play the game because he doesn't have spin attempts or points. */
75
+ /** The message that should be shown to the user when he cannot play the game because he doesn't have spin attempts. */
76
76
  no_attempts_message: string;
77
77
 
78
+ /** The message that should be shown to the user when he cannot play the game because he doesn't have points. */
79
+ no_points_message: string;
80
+
78
81
  /** Current jackpont amount, if jackpot is enabled. */
79
82
  jackpot_current: number;
80
83
  /** 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. */
@@ -247,6 +250,8 @@ export interface TTournament {
247
250
  */
248
251
  export interface TTournamentDetailed extends TTournament {
249
252
 
253
+ /** List of casino games (or other types of entities) related to the tournament */
254
+ related_games?: AchRelatedGame[],
250
255
  /** The list of the tournament participants */
251
256
  players?: {
252
257
  /** The username of the participant */
@@ -389,6 +394,29 @@ export interface TMissionOrBadge {
389
394
 
390
395
  /** The list of tasks of the mission or badge */
391
396
  tasks: TMissionOrBadgeTask[]
397
+
398
+ /** List of casino games (or other types of entities) related to the mission or badge */
399
+ related_games?: AchRelatedGame[];
400
+ }
401
+
402
+ export interface AchRelatedGame {
403
+ /** The ID of the related game */
404
+ ext_game_id: string;
405
+ /** Game public meta information */
406
+ game_public_meta: {
407
+ /** The name of the game */
408
+ name: string;
409
+ /** The URL to the game */
410
+ link: string;
411
+ /** The URL to the image of the game */
412
+ image: string;
413
+ /** The indicator if the game is enabled */
414
+ enabled: boolean;
415
+ /** The list of categories of the game */
416
+ game_categories: string[];
417
+ /** The name of the game provider */
418
+ game_provider: string;
419
+ }
392
420
  }
393
421
 
394
422
  /**