@smartico/public-api 0.0.193 → 0.0.195

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.
@@ -26,3 +26,4 @@ Game public meta information
26
26
  | `enabled` | `boolean` | The indicator if the game is enabled |
27
27
  | `game_categories` | `string`[] | The list of categories of the game |
28
28
  | `game_provider` | `string` | The name of the game provider |
29
+ | `mobile_spec_link` | `string` | The URL to the mobile game |
@@ -28,3 +28,4 @@ ___
28
28
  | `enabled` | `boolean` |
29
29
  | `game_categories?` | `string`[] |
30
30
  | `game_provider?` | `string` |
31
+ | `mobile_spec_link?` | `string` |
@@ -293,3 +293,19 @@ ___
293
293
  • `Optional` **custom\_section\_type\_id**: `number`
294
294
 
295
295
  ID of specific Custom Section type
296
+
297
+ ___
298
+
299
+ ### max\_completion\_count
300
+
301
+ • `Optional` **max\_completion\_count**: `number`
302
+
303
+ Max number of times the user can complete a mission in case if mission type is Recurring upon completion. NULL equals infinite.
304
+
305
+ ___
306
+
307
+ ### completion\_count
308
+
309
+ • `Optional` **completion\_count**: `number`
310
+
311
+ Current completion count for Recurring upon completion missions
@@ -62,4 +62,4 @@ ___
62
62
 
63
63
  • **acknowledge\_date\_ts**: `number`
64
64
 
65
- Claim prize date in milliseconds
65
+ Claimed prize date in milliseconds
@@ -111,6 +111,14 @@ Number of items in the pool avaliable for the purchase.
111
111
 
112
112
  ___
113
113
 
114
+ ### custom\_data
115
+
116
+ • **custom\_data**: `any`
117
+
118
+ The custom data of the store item defined by operator. Can be a JSON object, string or number
119
+
120
+ ___
121
+
114
122
  ### hint\_text
115
123
 
116
124
  • `Optional` **hint\_text**: `string`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartico/public-api",
3
- "version": "0.0.193",
3
+ "version": "0.0.195",
4
4
  "description": "Smartico public API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -6,4 +6,5 @@ export enum AchievementStatus {
6
6
  FeaturedManually = 5,
7
7
  FeaturedAI = 6,
8
8
  Recurring = 7,
9
+ RecurringUponCompletion = 8
9
10
  }
@@ -26,12 +26,15 @@ export interface UserAchievement {
26
26
  milliseconds_till_available?: number;
27
27
  completed_tasks?: number;
28
28
  achievementTasks?: UserAchievementTask[];
29
+ next_recurrence_date_ts?: number;
29
30
  ach_status_id?: AchievementStatus;
30
31
  scheduledMissionType?: ScheduledMissionType;
31
32
  related_games?: AchRelatedGame[];
32
33
  active_from_ts?: number; // indicates when 'scheduled' mission is active from,
33
34
  active_till_ts?: number; // indicates when 'scheduled' mission is active till,
34
35
  ach_categories?: number[];
36
+ recurring_quantity?: number; // max completion count for Recurring upon completion
37
+ completed_count?: number; // completion count for Recurring upon completion
35
38
 
36
39
  ach_completed_id?: number; // ID of the completion fact from ach_completed or ach_completed_recurring tables
37
40
  requires_prize_claim?: boolean; // flag from achievement if the mission prize will be given only after user claims it
@@ -98,6 +101,7 @@ export const UserAchievementTransform = (items: UserAchievement[]): TMissionOrBa
98
101
  enabled: g.game_public_meta.enabled,
99
102
  game_categories: g.game_public_meta.game_categories,
100
103
  game_provider: g.game_public_meta.game_provider,
104
+ mobile_spec_link: g.game_public_meta.mobile_spec_link
101
105
  },
102
106
  })),
103
107
  category_ids: r.ach_categories ?? [],
@@ -111,6 +115,11 @@ export const UserAchievementTransform = (items: UserAchievement[]): TMissionOrBa
111
115
  completed_this_month: completedThisMonth,
112
116
  custom_section_type_id: r.ach_public_meta.custom_section_type_id,
113
117
  };
118
+
119
+ if (r.ach_status_id === AchievementStatus.RecurringUponCompletion) {
120
+ x.completion_count = r.completed_count;
121
+ x.max_completion_count = r.recurring_quantity;
122
+ }
114
123
  return x;
115
124
  });
116
125
  };
@@ -39,6 +39,7 @@ export const StoreItemPurchasedTransform = (items: StoreItemPurchased[]): TStore
39
39
  purchased_today: purchasedToday,
40
40
  purchased_this_week: purchasedThisWeek,
41
41
  purchased_this_month: purchasedThisMonth,
42
+ custom_data: r.itemPublicMeta.custom_data
42
43
  };
43
44
 
44
45
  return x;
@@ -34,6 +34,7 @@ export const tournamentInfoItemTransform = (t: GetTournamentInfoResponse): TTour
34
34
  enabled: g.game_public_meta.enabled,
35
35
  game_categories: g.game_public_meta.game_categories,
36
36
  game_provider: g.game_public_meta.game_provider,
37
+ mobile_spec_link: g.game_public_meta.mobile_spec_link,
37
38
  },
38
39
  })),
39
40
  players: t.tournamentInfo.players.map((p) => TournamentUtils.getPlayerTransformed(p)),
@@ -553,6 +553,12 @@ export interface TMissionOrBadge {
553
553
 
554
554
  /** ID of specific Custom Section type */
555
555
  custom_section_type_id?: number;
556
+
557
+ /** Max number of times the user can complete a mission in case if mission type is Recurring upon completion. NULL equals infinite. */
558
+ max_completion_count?: number;
559
+
560
+ /** Current completion count for Recurring upon completion missions */
561
+ completion_count?: number;
556
562
  }
557
563
 
558
564
  export interface AchRelatedGame {