@smartico/public-api 0.0.186 → 0.0.188

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;
@@ -15,4 +15,5 @@ export interface SAWPrize {
15
15
  active_from_ts?: number;
16
16
  active_till_ts?: number;
17
17
  relative_period_timezone?: number;
18
+ is_surcharge?: boolean;
18
19
  }
@@ -17,4 +17,5 @@ export interface SAWPrizeUI {
17
17
  replace_name_with_image?: boolean;
18
18
  acknowledge_action_title?: string;
19
19
  custom_win_sound?: string;
20
+ out_of_stock_message?: string;
20
21
  }
@@ -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
@@ -30,6 +30,7 @@ export interface TMiniGamePrize {
30
30
  acknowledge_action_title: string;
31
31
  acknowledge_dp_additional?: string;
32
32
  acknowledge_action_title_additional?: string;
33
+ out_of_stock_message?: string;
33
34
  pool?: number;
34
35
  pool_initial?: number;
35
36
  wins_count?: number;
@@ -37,6 +38,7 @@ export interface TMiniGamePrize {
37
38
  active_from_ts?: number;
38
39
  active_till_ts?: number;
39
40
  relative_period_timezone?: number;
41
+ is_surcharge?: boolean;
40
42
  }
41
43
  /**
42
44
  * TMiniGamePlayResult describes the response of call to _smartico.api.playMiniGame(template_id) method
@@ -359,6 +361,8 @@ export interface TStoreItem {
359
361
  category_ids: number[];
360
362
  /** Number of items in the pool avaliable for the purchase.*/
361
363
  pool?: number;
364
+ /** The custom data of the store item defined by operator. Can be a JSON object, string or number */
365
+ custom_data: any;
362
366
  /** The T&C text for the store item */
363
367
  hint_text?: string;
364
368
  /** Purchase time to show in purchase history screen */
package/dist/index.js CHANGED
@@ -415,13 +415,15 @@ var SAWTemplatesTransform = function SAWTemplatesTransform(items) {
415
415
  acknowledge_action_title: p.saw_prize_ui_definition.acknowledge_action_title,
416
416
  acknowledge_dp_additional: p.saw_prize_ui_definition.acknowledge_dp_additional,
417
417
  acknowledge_action_title_additional: p.saw_prize_ui_definition.acknowledge_action_title_additional,
418
+ out_of_stock_message: p.saw_prize_ui_definition.out_of_stock_message,
418
419
  pool: p.pool,
419
420
  pool_initial: p.pool_initial,
420
421
  wins_count: p.wins_count,
421
422
  weekdays: p.weekdays,
422
423
  active_from_ts: p.active_from_ts,
423
424
  active_till_ts: p.active_till_ts,
424
- relative_period_timezone: p.relative_period_timezone
425
+ relative_period_timezone: p.relative_period_timezone,
426
+ is_surcharge: p.is_surcharge
425
427
  };
426
428
  return y;
427
429
  })
@@ -807,7 +809,8 @@ var StoreItemTransform = function StoreItemTransform(items) {
807
809
  type: StoreItemTypeNamed(r.itemTypeId),
808
810
  can_buy: r.canBuy,
809
811
  category_ids: (_r$categoryIds = r.categoryIds) != null ? _r$categoryIds : [],
810
- pool: r.shopPool
812
+ pool: r.shopPool,
813
+ custom_data: IntUtils.JsonOrText(r.itemPublicMeta.custom_data)
811
814
  };
812
815
  return x;
813
816
  });