@smartico/public-api 0.0.185 → 0.0.187

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.
@@ -11,6 +11,8 @@ export interface InboxMessageBody {
11
11
  inbox_cta_text: string;
12
12
  action: string;
13
13
  }[];
14
+ show_preview?: boolean;
15
+ show_duration_sec?: number;
14
16
  }
15
17
  export interface InboxMessage {
16
18
  createDate: string;
@@ -11,5 +11,7 @@ export interface SAWPrizesHistory {
11
11
  prize_amount: number;
12
12
  client_request_id: string;
13
13
  is_claimed: boolean;
14
+ create_date_ts: number;
15
+ acknowledge_date_ts: number;
14
16
  }
15
17
  export declare const SAWHistoryTransform: (items: SAWPrizesHistory[]) => TSawHistory[];
@@ -27,6 +27,7 @@ export interface UserAchievement {
27
27
  scheduledMissionType?: ScheduledMissionType;
28
28
  related_games?: AchRelatedGame[];
29
29
  active_from_ts?: number;
30
+ active_till_ts?: number;
30
31
  ach_categories?: number[];
31
32
  ach_completed_id?: number;
32
33
  requires_prize_claim?: boolean;
@@ -9,4 +9,5 @@ export interface StoreItemPublicMeta {
9
9
  priority: number;
10
10
  related_items: number[];
11
11
  hint_text: string;
12
+ custom_data: string;
12
13
  }
@@ -285,7 +285,7 @@ export declare class WSAPI {
285
285
  * **Visitor mode: not supported**
286
286
  */
287
287
  playMiniGame(template_id: number, { onUpdate }?: {
288
- onUpdate?: (data: TMissionOrBadge[]) => void;
288
+ onUpdate?: (data: TMiniGameTemplate[]) => void;
289
289
  }): Promise<TMiniGamePlayResult>;
290
290
  /**
291
291
  * Plays the specified by template_id mini-game on behalf of user spin_count times and returns array of the prizes
@@ -359,6 +359,8 @@ export interface TStoreItem {
359
359
  category_ids: number[];
360
360
  /** Number of items in the pool avaliable for the purchase.*/
361
361
  pool?: number;
362
+ /** The custom data of the store item defined by operator. Can be a JSON object, string or number */
363
+ custom_data: any;
362
364
  /** The T&C text for the store item */
363
365
  hint_text?: string;
364
366
  /** Purchase time to show in purchase history screen */
@@ -415,6 +417,8 @@ export interface TMissionOrBadge {
415
417
  time_limit_ms: number;
416
418
  /** Holds time from which mission will become available, for the missions that are targeted to be available from specific date/time */
417
419
  active_from_ts: number;
420
+ /** Holds time till mission will become unavailable, for the missions that are targeted to be available from specific date/time */
421
+ active_till_ts: number;
418
422
  /** The date when the mission was started, relevant for the time limited missions */
419
423
  dt_start: number;
420
424
  /** The progress of the mission in percents calculated as the aggregated relative percentage of all tasks */
@@ -686,5 +690,9 @@ export interface TSawHistory {
686
690
  client_request_id: string;
687
691
  /** Flag indicating to show whether prize in the mini-game claimed or not */
688
692
  is_claimed: boolean;
693
+ /** Win prize date in milliseconds */
694
+ create_date_ts: number;
695
+ /** Claimed prize date in milliseconds */
696
+ acknowledge_date_ts: number;
689
697
  }
690
698
  export {};
package/dist/index.js CHANGED
@@ -468,7 +468,9 @@ var SAWHistoryTransform = function SAWHistoryTransform(items) {
468
468
  saw_prize_id: r.saw_prize_id,
469
469
  prize_amount: r.prize_amount,
470
470
  client_request_id: r.client_request_id,
471
- is_claimed: r.is_claimed
471
+ is_claimed: r.is_claimed,
472
+ create_date_ts: r.create_date_ts,
473
+ acknowledge_date_ts: r.acknowledge_date_ts
472
474
  };
473
475
  return x;
474
476
  });
@@ -805,7 +807,8 @@ var StoreItemTransform = function StoreItemTransform(items) {
805
807
  type: StoreItemTypeNamed(r.itemTypeId),
806
808
  can_buy: r.canBuy,
807
809
  category_ids: (_r$categoryIds = r.categoryIds) != null ? _r$categoryIds : [],
808
- pool: r.shopPool
810
+ pool: r.shopPool,
811
+ custom_data: IntUtils.JsonOrText(r.itemPublicMeta.custom_data)
809
812
  };
810
813
  return x;
811
814
  });
@@ -888,6 +891,7 @@ var UserAchievementTransform = function UserAchievementTransform(items) {
888
891
  is_opted_in: r.isOptedIn,
889
892
  time_limit_ms: r.time_limit_ms,
890
893
  active_from_ts: r.active_from_ts,
894
+ active_till_ts: r.active_from_ts,
891
895
  dt_start: r.start_date_ts,
892
896
  reward: r.ach_public_meta.reward,
893
897
  progress: r.progress,