@smartico/public-api 0.0.184 → 0.0.186

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.
@@ -135,3 +135,9 @@ ___
135
135
  ### active\_till\_ts
136
136
 
137
137
  • `Optional` **active\_till\_ts**: `number`
138
+
139
+ ___
140
+
141
+ ### relative\_period\_timezone
142
+
143
+ • `Optional` **relative\_period\_timezone**: `number`
@@ -109,6 +109,14 @@ Holds time from which mission will become available, for the missions that are t
109
109
 
110
110
  ___
111
111
 
112
+ ### active\_till\_ts
113
+
114
+ • **active\_till\_ts**: `number`
115
+
116
+ Holds time till mission will become unavailable, for the missions that are targeted to be available from specific date/time
117
+
118
+ ___
119
+
112
120
  ### dt\_start
113
121
 
114
122
  • **dt\_start**: `number`
@@ -47,3 +47,19 @@ ___
47
47
  • **is\_claimed**: `boolean`
48
48
 
49
49
  Flag indicating to show whether prize in the mini-game claimed or not
50
+
51
+ ___
52
+
53
+ ### create\_date\_ts
54
+
55
+ • **create\_date\_ts**: `number`
56
+
57
+ Win prize date in milliseconds
58
+
59
+ ___
60
+
61
+ ### acknowledge\_date\_ts
62
+
63
+ • **acknowledge\_date\_ts**: `number`
64
+
65
+ Claim prize date in milliseconds
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartico/public-api",
3
- "version": "0.0.184",
3
+ "version": "0.0.186",
4
4
  "description": "Smartico public API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,4 @@
1
+ export enum SAWGameLayout {
2
+ Horizontal = 1,
3
+ VerticalMap = 2,
4
+ }
@@ -60,6 +60,7 @@ export const SAWTemplatesTransform = (items: SAWTemplate[]): TMiniGameTemplate[]
60
60
  weekdays: p.weekdays,
61
61
  active_from_ts: p.active_from_ts,
62
62
  active_till_ts: p.active_till_ts,
63
+ relative_period_timezone: p.relative_period_timezone,
63
64
  };
64
65
  return y;
65
66
  }),
@@ -15,4 +15,5 @@ export interface SAWPrize {
15
15
  weekdays?: number[];
16
16
  active_from_ts?: number;
17
17
  active_till_ts?: number;
18
+ relative_period_timezone?: number;
18
19
  }
@@ -1,4 +1,5 @@
1
1
  import { SAWAskForUsername } from './SAWAskForUsername';
2
+ import { SAWGameLayout } from './SAWGameLayout';
2
3
 
3
4
  export interface SAWTemplateUI {
4
5
  skin: string;
@@ -48,4 +49,5 @@ export interface SAWTemplateUI {
48
49
  id: string;
49
50
  content: string;
50
51
  };
52
+ game_layout?: SAWGameLayout;
51
53
  }
@@ -13,6 +13,8 @@ export interface SAWPrizesHistory {
13
13
  prize_amount: number,
14
14
  client_request_id: string,
15
15
  is_claimed: boolean,
16
+ create_date_ts: number;
17
+ acknowledge_date_ts: number;
16
18
  }
17
19
 
18
20
  export const SAWHistoryTransform = (items: SAWPrizesHistory[]): TSawHistory[] => {
@@ -23,7 +25,9 @@ export const SAWHistoryTransform = (items: SAWPrizesHistory[]): TSawHistory[] =>
23
25
  saw_prize_id: r.saw_prize_id,
24
26
  prize_amount: r.prize_amount,
25
27
  client_request_id: r.client_request_id,
26
- is_claimed: r.is_claimed
28
+ is_claimed: r.is_claimed,
29
+ create_date_ts: r.create_date_ts,
30
+ acknowledge_date_ts: r.acknowledge_date_ts,
27
31
  }
28
32
  return x;
29
33
  })
@@ -30,6 +30,7 @@ export interface UserAchievement {
30
30
  scheduledMissionType?: ScheduledMissionType;
31
31
  related_games?: AchRelatedGame[];
32
32
  active_from_ts?: number; // indicates when 'scheduled' mission is active from,
33
+ active_till_ts?: number; // indicates when 'scheduled' mission is active till,
33
34
  ach_categories?: number[];
34
35
 
35
36
  ach_completed_id?: number; // ID of the completion fact from ach_completed or ach_completed_recurring tables
@@ -63,6 +64,7 @@ export const UserAchievementTransform = (items: UserAchievement[]): TMissionOrBa
63
64
  is_opted_in: r.isOptedIn,
64
65
  time_limit_ms: r.time_limit_ms,
65
66
  active_from_ts: r.active_from_ts,
67
+ active_till_ts: r.active_from_ts,
66
68
  dt_start: r.start_date_ts,
67
69
  reward: r.ach_public_meta.reward,
68
70
  progress: r.progress,
@@ -868,7 +868,7 @@ class SmarticoAPI {
868
868
  response.userPosition.avatar_url = CoreUtils.avatarUrl(response.userPosition.avatar_id, this.avatarDomain);
869
869
  }
870
870
 
871
- if (response.tournamentInfo.players?.length) {
871
+ if (response.tournamentInfo?.players?.length) {
872
872
  response.tournamentInfo.players.forEach((p) => {
873
873
  p.avatar_url = CoreUtils.avatarUrl(p.avatar_id, this.avatarDomain);
874
874
  });
@@ -53,6 +53,8 @@ export interface TMiniGamePrize {
53
53
  active_from_ts?: number;
54
54
  /* Holds time till which prize will become available, for the prizes that are targeted to be available from specific time (UNIX timestamp) */
55
55
  active_till_ts?: number;
56
+ /* Time zone to ensure each day aligns with your local midnight. */
57
+ relative_period_timezone?: number;
56
58
  }
57
59
 
58
60
  /**
@@ -469,6 +471,9 @@ export interface TMissionOrBadge {
469
471
 
470
472
  /** Holds time from which mission will become available, for the missions that are targeted to be available from specific date/time */
471
473
  active_from_ts: number;
474
+
475
+ /** Holds time till mission will become unavailable, for the missions that are targeted to be available from specific date/time */
476
+ active_till_ts: number;
472
477
 
473
478
  /** The date when the mission was started, relevant for the time limited missions */
474
479
  dt_start: number;
@@ -773,4 +778,8 @@ export interface TSawHistory {
773
778
  client_request_id: string,
774
779
  /** Flag indicating to show whether prize in the mini-game claimed or not */
775
780
  is_claimed: boolean,
781
+ /** Win prize date in milliseconds */
782
+ create_date_ts: number;
783
+ /** Claimed prize date in milliseconds */
784
+ acknowledge_date_ts: number;
776
785
  }