@smartico/public-api 0.0.312 → 0.0.314

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.
@@ -17,6 +17,7 @@ export interface InboxMessageBody {
17
17
  show_duration_sec?: number;
18
18
  enable_zoom_mode?: boolean;
19
19
  open_links?: OpenLinksType;
20
+ custom_data?: string;
20
21
  }
21
22
  export interface InboxMessage {
22
23
  createDate: string;
@@ -26,5 +27,6 @@ export interface InboxMessage {
26
27
  is_starred: boolean;
27
28
  is_deleted?: boolean;
28
29
  category_id?: InboxCategories;
30
+ expire_on_dt?: number;
29
31
  }
30
32
  export declare const InboxMessageBodyTransform: (item: InboxMessageBody) => TInboxMessageBody;
@@ -1,5 +1,6 @@
1
1
  import { AchievementTaskPublicMeta } from './AchievementTaskPublicMeta';
2
2
  import { AchievementTaskType } from './AchievementTaskType';
3
+ import { AffectsProgress } from './UserAchievementTaskAffectsProgress';
3
4
  export interface UserAchievementTask {
4
5
  task_id?: number;
5
6
  task_public_meta?: AchievementTaskPublicMeta;
@@ -13,8 +14,7 @@ export interface UserAchievementTask {
13
14
  unlocked_by_mission_id?: number;
14
15
  unlocked_by_level_id?: number;
15
16
  user_state_params?: {
16
- map: {
17
- [key: string]: any;
18
- };
17
+ [key: string]: any;
19
18
  };
19
+ affects_progress?: AffectsProgress | null;
20
20
  }
@@ -0,0 +1,6 @@
1
+ export interface AffectsProgress {
2
+ affects_level: boolean;
3
+ affects_leaderboard: boolean;
4
+ affects_current_balance: boolean;
5
+ rewardPoints: number;
6
+ }
@@ -21,3 +21,4 @@ export * from './AchievementAvailabilityStatus';
21
21
  export * from './GetRelatedAchTourResponse';
22
22
  export * from './MissionsUtils';
23
23
  export * from './MissionCategory';
24
+ export * from './UserAchievementTaskAffectsProgress';
@@ -709,6 +709,8 @@ export interface TInboxMessage {
709
709
  favorite: boolean;
710
710
  /** Category id per inbox message, can be part of System inboxes, Personal inboxes or General inbox messages */
711
711
  category_id?: InboxCategories;
712
+ /** The epoch timestamp, with milliseconds, when the message is going to be expired */
713
+ expire_on_dt?: number;
712
714
  }
713
715
  export interface TInboxMessageBody {
714
716
  /** Message title */
@@ -732,6 +734,8 @@ export interface TInboxMessageBody {
732
734
  /** Button text */
733
735
  text: string;
734
736
  }[];
737
+ /** The custom data of the inbox message defined by operator. Can be a JSON object, string or number */
738
+ custom_data?: string;
735
739
  }
736
740
  export interface InboxMarkMessageAction {
737
741
  /** An error code representing the result of marking a message as deleted, favorite or read. Successful marking action if err_code is 0 */
package/dist/index.js CHANGED
@@ -832,7 +832,8 @@ var InboxMessagesTransform = function InboxMessagesTransform(items) {
832
832
  message_guid: item.engagement_uid,
833
833
  read: item.is_read,
834
834
  favorite: item.is_starred,
835
- category_id: item.category_id
835
+ category_id: item.category_id,
836
+ expire_on_dt: item.expire_on_dt
836
837
  };
837
838
  return x;
838
839
  });
@@ -855,6 +856,7 @@ var InboxMessageBodyTransform = function InboxMessageBodyTransform(item) {
855
856
  });
856
857
  }
857
858
  x.html_body = (item == null ? void 0 : item.html_body) || null;
859
+ x.custom_data = IntUtils.JsonOrText(item == null ? void 0 : item.custom_data);
858
860
  }
859
861
  return x;
860
862
  };
@@ -1295,7 +1297,10 @@ MissionUtils.replaceFavGameNameTag = function (task) {
1295
1297
  var _userStateOperator$k;
1296
1298
  var operator = (_userStateOperator$k = userStateOperator[k]) == null ? void 0 : _userStateOperator$k.op;
1297
1299
  if (operatorsMulti.includes(operator)) {
1298
- var value = userStateParams[k];
1300
+ var _userStateParams$k;
1301
+ var value = (_userStateParams$k = userStateParams[k]) == null ? void 0 : _userStateParams$k.filter(function (v) {
1302
+ return Boolean(v);
1303
+ });
1299
1304
  if (value && value.length > 0) {
1300
1305
  replacementValue = value.map(function (v) {
1301
1306
  var cleaned = v.replace(/_/g, ' ').toLowerCase();