@smartico/public-api 0.0.217 → 0.0.218

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.
@@ -743,7 +743,8 @@ const InboxMessagesTransform = items => {
743
743
  sent_date: item.createDate,
744
744
  message_guid: item.engagement_uid,
745
745
  read: item.is_read,
746
- favorite: item.is_starred
746
+ favorite: item.is_starred,
747
+ category_id: item.category_id
747
748
  };
748
749
  return x;
749
750
  });
@@ -788,6 +789,13 @@ var OpenLinksType;
788
789
  OpenLinksType[OpenLinksType["CurrentWindow"] = 2] = "CurrentWindow";
789
790
  })(OpenLinksType || (OpenLinksType = {}));
790
791
 
792
+ var InboxCategories;
793
+ (function (InboxCategories) {
794
+ InboxCategories[InboxCategories["General"] = 0] = "General";
795
+ InboxCategories[InboxCategories["Platform"] = 1] = "Platform";
796
+ InboxCategories[InboxCategories["Personal"] = 2] = "Personal";
797
+ })(InboxCategories || (InboxCategories = {}));
798
+
791
799
  var BuyStoreItemErrorCode;
792
800
  (function (BuyStoreItemErrorCode) {
793
801
  BuyStoreItemErrorCode[BuyStoreItemErrorCode["FAILED_TO_BUY_SHOP_ITEM"] = 121] = "FAILED_TO_BUY_SHOP_ITEM";
@@ -2098,12 +2106,13 @@ class WSAPI {
2098
2106
  from,
2099
2107
  to,
2100
2108
  onlyFavorite,
2109
+ categoryId,
2101
2110
  onUpdate
2102
2111
  } = {}) {
2103
2112
  if (onUpdate) {
2104
2113
  this.onUpdateCallback.set(onUpdateContextKey.InboxMessages, onUpdate);
2105
2114
  }
2106
- return await this.api.getInboxMessagesT(null, from, to, onlyFavorite);
2115
+ return await this.api.getInboxMessagesT(null, from, to, onlyFavorite, categoryId);
2107
2116
  }
2108
2117
  /**
2109
2118
  * Returns the message body of the specified message guid.
@@ -2985,18 +2994,19 @@ class SmarticoAPI {
2985
2994
  async getTranslationsT(user_ext_id, lang_code, areas, cacheSec = 60) {
2986
2995
  return await this.coreGetTranslations(user_ext_id, lang_code, areas, 30);
2987
2996
  }
2988
- async getInboxMessages(user_ext_id, limit = 20, offset = 0, starred_only) {
2997
+ async getInboxMessages(user_ext_id, limit = 20, offset = 0, starred_only, category_id) {
2989
2998
  const message = this.buildMessage(user_ext_id, ClassId.GET_INBOX_MESSAGES_REQUEST, {
2990
2999
  limit,
2991
3000
  offset,
2992
- starred_only
3001
+ starred_only,
3002
+ category_id
2993
3003
  });
2994
3004
  return await this.send(message, ClassId.GET_INBOX_MESSAGES_RESPONSE);
2995
3005
  }
2996
- async getInboxMessagesT(user_ext_id, from = 0, to = 20, favoriteOnly = false) {
3006
+ async getInboxMessagesT(user_ext_id, from = 0, to = 20, favoriteOnly = false, categoryId) {
2997
3007
  const limit = to - from > 20 ? 20 : to - from;
2998
3008
  const offset = from;
2999
- return InboxMessagesTransform((await this.getInboxMessages(user_ext_id, limit, offset, favoriteOnly)).log);
3009
+ return InboxMessagesTransform((await this.getInboxMessages(user_ext_id, limit, offset, favoriteOnly, categoryId)).log);
3000
3010
  }
3001
3011
  async getInboxMessageBody(messageGuid) {
3002
3012
  var _this3 = this;
@@ -3479,5 +3489,5 @@ var JackpotType;
3479
3489
  JackpotType[JackpotType["Personal"] = 2] = "Personal";
3480
3490
  })(JackpotType || (JackpotType = {}));
3481
3491
 
3482
- export { AchCategoryTransform, AchievementAvailabilityStatus, AchievementStatus, AchievementTaskType, AchievementType, ActivityTypeLimited, BonusItemsTransform, BonusStatus, BuyStoreItemErrorCode, ClassId, CookieStore, CoreUtils, ECacheContext, GetLevelMapResponseTransform, InboxMessageBodyTransform, InboxMessageType, InboxMessagesTransform, JackpotContributionType, JackpotType, LeaderBoardPeriodType, MiniGamePrizeTypeName, MiniGamePrizeTypeNamed, OCache, OpenLinksType, PrizeModifiers, PrizeModifiersKeysNames, PublicLabelSettings, QuizAnswersValueType, QuizMarketPerSport, QuizSportType, SAWAcknowledgeType, SAWAcknowledgeTypeName, SAWAcknowledgeTypeNamed, SAWAskForUsername, SAWBuyInType, SAWBuyInTypeName, SAWBuyInTypeNamed, SAWGPMarketType, SAWGameLayout, SAWGameType, SAWGameTypeName, SAWGameTypeNamed, SAWHistoryTransform, SAWPrizeType, SAWSpinErrorCode, SAWTemplatesTransform, SAWUtils, SAWWinSoundFiles, SAWWinSoundType, ScheduledMissionType, SmarticoAPI, StoreCategoryTransform, StoreItemPurchasedTransform, StoreItemTransform, StoreItemType, StoreItemTypeName, StoreItemTypeNamed, TournamentInstanceStatus, TournamentInstanceStatusName, TournamentItemsTransform, TournamentRegistrationError, TournamentRegistrationStatus, TournamentRegistrationStatusName, TournamentRegistrationStatusNamed, TournamentRegistrationType, TournamentRegistrationTypeGetName, TournamentType, TournamentUtils, TranslationArea, UserAchievementTransform, marketsInfo, quizAnswerAwayTeamReplacementText, quizAnswerHomeTeamReplacementText, quizAnswersTrKeys, quizDrawReplacementText, quizEvenReplacementText, quizNoGoalsReplacementText, quizNoReplacementText, quizOddReplacementText, quizOrReplacementText, quizSupportedSports, quizYesReplacementText, tournamentInfoItemTransform };
3492
+ export { AchCategoryTransform, AchievementAvailabilityStatus, AchievementStatus, AchievementTaskType, AchievementType, ActivityTypeLimited, BonusItemsTransform, BonusStatus, BuyStoreItemErrorCode, ClassId, CookieStore, CoreUtils, ECacheContext, GetLevelMapResponseTransform, InboxCategories, InboxMessageBodyTransform, InboxMessageType, InboxMessagesTransform, JackpotContributionType, JackpotType, LeaderBoardPeriodType, MiniGamePrizeTypeName, MiniGamePrizeTypeNamed, OCache, OpenLinksType, PrizeModifiers, PrizeModifiersKeysNames, PublicLabelSettings, QuizAnswersValueType, QuizMarketPerSport, QuizSportType, SAWAcknowledgeType, SAWAcknowledgeTypeName, SAWAcknowledgeTypeNamed, SAWAskForUsername, SAWBuyInType, SAWBuyInTypeName, SAWBuyInTypeNamed, SAWGPMarketType, SAWGameLayout, SAWGameType, SAWGameTypeName, SAWGameTypeNamed, SAWHistoryTransform, SAWPrizeType, SAWSpinErrorCode, SAWTemplatesTransform, SAWUtils, SAWWinSoundFiles, SAWWinSoundType, ScheduledMissionType, SmarticoAPI, StoreCategoryTransform, StoreItemPurchasedTransform, StoreItemTransform, StoreItemType, StoreItemTypeName, StoreItemTypeNamed, TournamentInstanceStatus, TournamentInstanceStatusName, TournamentItemsTransform, TournamentRegistrationError, TournamentRegistrationStatus, TournamentRegistrationStatusName, TournamentRegistrationStatusNamed, TournamentRegistrationType, TournamentRegistrationTypeGetName, TournamentType, TournamentUtils, TranslationArea, UserAchievementTransform, marketsInfo, quizAnswerAwayTeamReplacementText, quizAnswerHomeTeamReplacementText, quizAnswersTrKeys, quizDrawReplacementText, quizEvenReplacementText, quizNoGoalsReplacementText, quizNoReplacementText, quizOddReplacementText, quizOrReplacementText, quizSupportedSports, quizYesReplacementText, tournamentInfoItemTransform };
3483
3493
  //# sourceMappingURL=index.modern.mjs.map