@smartico/public-api 0.0.316 → 0.0.317

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.
@@ -875,6 +875,12 @@ var InboxCategories;
875
875
  InboxCategories[InboxCategories["Personal"] = 2] = "Personal";
876
876
  })(InboxCategories || (InboxCategories = {}));
877
877
 
878
+ var InboxReadStatus;
879
+ (function (InboxReadStatus) {
880
+ InboxReadStatus[InboxReadStatus["UnreadOnly"] = 1] = "UnreadOnly";
881
+ InboxReadStatus[InboxReadStatus["ReadOnly"] = 2] = "ReadOnly";
882
+ })(InboxReadStatus || (InboxReadStatus = {}));
883
+
878
884
  var BuyStoreItemErrorCode;
879
885
  (function (BuyStoreItemErrorCode) {
880
886
  /** User don't have enough points on balance */
@@ -2574,7 +2580,9 @@ class WSAPI {
2574
2580
  return OCache.use(onUpdateContextKey.LeaderBoards, ECacheContext.WSAPI, () => this.api.leaderboardsGetT(null, periodType, getPreviousPeriod), CACHE_DATA_SEC);
2575
2581
  }
2576
2582
  /** Returns inbox messages based on the provided parameters. "From" and "to" indicate the range of messages to be fetched.
2577
- * The maximum number of messages per request is limited to 20. An indicator "onlyFavorite" can be passed to get only messages marked as favorites.
2583
+ * The maximum number of messages per request is limited to 20.
2584
+ * An indicator "onlyFavorite" can be passed to get only messages marked as favorites.
2585
+ * An indicator "read_status" can be passed to get only messages marked as read or unread.
2578
2586
  * You can leave this params empty and by default it will return list of messages ranging from 0 to 20.
2579
2587
  * This functions return list of messages without the body of the message.
2580
2588
  * To get the body of the message you need to call getInboxMessageBody function and pass the message guid contained in each message of this request.
@@ -2590,12 +2598,13 @@ class WSAPI {
2590
2598
  to,
2591
2599
  onlyFavorite,
2592
2600
  categoryId,
2601
+ read_status,
2593
2602
  onUpdate
2594
2603
  } = {}) {
2595
2604
  if (onUpdate) {
2596
2605
  this.onUpdateCallback.set(onUpdateContextKey.InboxMessages, onUpdate);
2597
2606
  }
2598
- return await this.api.getInboxMessagesT(null, from, to, onlyFavorite, categoryId);
2607
+ return await this.api.getInboxMessagesT(null, from, to, onlyFavorite, categoryId, read_status);
2599
2608
  }
2600
2609
  /**
2601
2610
  * Returns inbox unread count.
@@ -3782,19 +3791,20 @@ class SmarticoAPI {
3782
3791
  async getTranslationsT(user_ext_id, lang_code, areas, cacheSec = 60) {
3783
3792
  return await this.coreGetTranslations(user_ext_id, lang_code, areas, 30);
3784
3793
  }
3785
- async getInboxMessages(user_ext_id, limit = 20, offset = 0, starred_only, category_id) {
3794
+ async getInboxMessages(user_ext_id, limit = 20, offset = 0, starred_only, category_id, read_status) {
3786
3795
  const message = this.buildMessage(user_ext_id, ClassId.GET_INBOX_MESSAGES_REQUEST, {
3787
3796
  limit,
3788
3797
  offset,
3789
3798
  starred_only,
3790
- category_id
3799
+ category_id,
3800
+ read_status
3791
3801
  });
3792
3802
  return await this.send(message, ClassId.GET_INBOX_MESSAGES_RESPONSE);
3793
3803
  }
3794
- async getInboxMessagesT(user_ext_id, from = 0, to = 20, favoriteOnly = false, categoryId) {
3804
+ async getInboxMessagesT(user_ext_id, from = 0, to = 20, favoriteOnly = false, categoryId, read_status) {
3795
3805
  const limit = to - from > 20 ? 20 : to - from;
3796
3806
  const offset = from;
3797
- return InboxMessagesTransform((await this.getInboxMessages(user_ext_id, limit, offset, favoriteOnly, categoryId)).log);
3807
+ return InboxMessagesTransform((await this.getInboxMessages(user_ext_id, limit, offset, favoriteOnly, categoryId, read_status)).log);
3798
3808
  }
3799
3809
  async getInboxUnreadCountT(user_ext_id) {
3800
3810
  const limit = 1;
@@ -4352,5 +4362,5 @@ var JackpotType;
4352
4362
  JackpotType[JackpotType["Personal"] = 2] = "Personal";
4353
4363
  })(JackpotType || (JackpotType = {}));
4354
4364
 
4355
- export { AchCategoryTransform, AchCustomLayoutTheme, AchCustomSectionType, AchMissionsTabsOptions, AchOverviewMissionsFilter, AchievementAvailabilityStatus, AchievementStatus, AchievementTaskType, AchievementType, ActivityTypeLimited, AnalyticsInboxSubScreenNameId, AnalyticsInterfaceType, AnalyticsScreenNameId, AnalyticsTournamentsLobbySubScreenNameId, BonusItemsTransform, BonusStatus, BuyStoreItemErrorCode, ClassId, CookieStore, CoreUtils, ECacheContext, GetJackpotEligibleGamesResponseTransform, GetJackpotWinnersResponseTransform, GetLevelMapResponseTransform, InboxCategories, InboxMessageBodyTransform, InboxMessageType, InboxMessagesTransform, JackPotTemparature, JackpotContributionType, JackpotType, LeaderBoardPeriodType, LiquidEntityData, MiniGamePrizeTypeName, MiniGamePrizeTypeNamed, MissionCategory, MissionUtils, OCache, OpenLinksType, PrizeModifiers, PrizeModifiersKeysNames, PublicLabelSettings, QuizAnswersValueType, QuizMarketPerSport, QuizSportType, SAWAcknowledgeType, SAWAcknowledgeTypeName, SAWAcknowledgeTypeNamed, SAWAskForUsername, SAWBuyInType, SAWBuyInTypeName, SAWBuyInTypeNamed, SAWGPMarketType, SAWGameDifficultyType, SAWGameDifficultyTypeName, SAWGameLayout, SAWGameType, SAWGameTypeName, SAWGameTypeNamed, SAWHistoryTransform, SAWPrizeType, SAWSpinErrorCode, SAWTemplatesTransform, SAWUtils, SAWWheelLayout, SAWWinSoundFiles, SAWWinSoundType, SawGameDifficultyTypeNamed, ScheduledMissionType, SmarticoAPI, StoreCategoryTransform, StoreItemPurchaseType, StoreItemPurchasedTransform, StoreItemTransform, StoreItemType, StoreItemTypeName, StoreItemTypeNamed, TournamentInstanceStatus, TournamentInstanceStatusName, TournamentItemsTransform, TournamentRegistrationError, TournamentRegistrationStatus, TournamentRegistrationStatusName, TournamentRegistrationStatusNamed, TournamentRegistrationType, TournamentRegistrationTypeGetName, TournamentType, TournamentUtils, TranslationArea, UICustomSectionTransform, UserAchievementTransform, getLeaderBoardTransform, marketsInfo, quizAnswerAwayTeamReplacementText, quizAnswerHomeTeamReplacementText, quizAnswersTrKeys, quizDrawReplacementText, quizEvenReplacementText, quizNoGoalsReplacementText, quizNoReplacementText, quizOddReplacementText, quizOrReplacementText, quizSupportedSports, quizYesReplacementText, tournamentInfoItemTransform };
4365
+ export { AchCategoryTransform, AchCustomLayoutTheme, AchCustomSectionType, AchMissionsTabsOptions, AchOverviewMissionsFilter, AchievementAvailabilityStatus, AchievementStatus, AchievementTaskType, AchievementType, ActivityTypeLimited, AnalyticsInboxSubScreenNameId, AnalyticsInterfaceType, AnalyticsScreenNameId, AnalyticsTournamentsLobbySubScreenNameId, BonusItemsTransform, BonusStatus, BuyStoreItemErrorCode, ClassId, CookieStore, CoreUtils, ECacheContext, GetJackpotEligibleGamesResponseTransform, GetJackpotWinnersResponseTransform, GetLevelMapResponseTransform, InboxCategories, InboxMessageBodyTransform, InboxMessageType, InboxMessagesTransform, InboxReadStatus, JackPotTemparature, JackpotContributionType, JackpotType, LeaderBoardPeriodType, LiquidEntityData, MiniGamePrizeTypeName, MiniGamePrizeTypeNamed, MissionCategory, MissionUtils, OCache, OpenLinksType, PrizeModifiers, PrizeModifiersKeysNames, PublicLabelSettings, QuizAnswersValueType, QuizMarketPerSport, QuizSportType, SAWAcknowledgeType, SAWAcknowledgeTypeName, SAWAcknowledgeTypeNamed, SAWAskForUsername, SAWBuyInType, SAWBuyInTypeName, SAWBuyInTypeNamed, SAWGPMarketType, SAWGameDifficultyType, SAWGameDifficultyTypeName, SAWGameLayout, SAWGameType, SAWGameTypeName, SAWGameTypeNamed, SAWHistoryTransform, SAWPrizeType, SAWSpinErrorCode, SAWTemplatesTransform, SAWUtils, SAWWheelLayout, SAWWinSoundFiles, SAWWinSoundType, SawGameDifficultyTypeNamed, ScheduledMissionType, SmarticoAPI, StoreCategoryTransform, StoreItemPurchaseType, StoreItemPurchasedTransform, StoreItemTransform, StoreItemType, StoreItemTypeName, StoreItemTypeNamed, TournamentInstanceStatus, TournamentInstanceStatusName, TournamentItemsTransform, TournamentRegistrationError, TournamentRegistrationStatus, TournamentRegistrationStatusName, TournamentRegistrationStatusNamed, TournamentRegistrationType, TournamentRegistrationTypeGetName, TournamentType, TournamentUtils, TranslationArea, UICustomSectionTransform, UserAchievementTransform, getLeaderBoardTransform, marketsInfo, quizAnswerAwayTeamReplacementText, quizAnswerHomeTeamReplacementText, quizAnswersTrKeys, quizDrawReplacementText, quizEvenReplacementText, quizNoGoalsReplacementText, quizNoReplacementText, quizOddReplacementText, quizOrReplacementText, quizSupportedSports, quizYesReplacementText, tournamentInfoItemTransform };
4356
4366
  //# sourceMappingURL=index.modern.mjs.map